/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Premium Light Theme Colors */
    --bg-primary: #f8fafc; /* Soft Slate */
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(79, 70, 229, 0.15);
    
    --color-text-main: #0f172a; /* Slate 900 */
    --color-text-muted: #475569; /* Slate 600 */
    --color-text-darker: #94a3b8; /* Slate 400 */

    /* Accent Palette */
    --primary: #4f46e5; /* Indigo */
    --primary-hover: #3730a3;
    --primary-glow: rgba(79, 70, 229, 0.08);

    --cyan: #0891b2;
    --cyan-glow: rgba(8, 145, 178, 0.08);

    --success: #059669;
    --success-glow: rgba(5, 150, 105, 0.08);

    --warning: #d97706;
    --warning-glow: rgba(217, 119, 6, 0.08);

    --danger: #dc2626;
    --danger-glow: rgba(220, 38, 38, 0.08);
}

/* Base resets & layout */
html, body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--color-text-main);
    font-family: var(--font-primary);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    color: var(--color-text-main);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Grid Layout & Containers */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.dashboard-sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.dashboard-main {
    flex-grow: 1;
    padding: 2rem 3rem;
    background: transparent;
    overflow-y: auto;
}

/* Sidebar Elements */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.sidebar-logo img {
    max-height: 48px;
    object-fit: contain;
}

.sidebar-profile {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profile-name {
    font-weight: 600;
    color: var(--color-text-main);
    font-size: 0.95rem;
    word-break: break-all;
}

.profile-role {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.profile-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.sidebar-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.5rem 1rem;
    background: rgba(220, 38, 38, 0.05);
    border: 1px solid rgba(220, 38, 38, 0.15);
    color: var(--danger);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.sidebar-logout-btn:hover {
    background: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

/* Styled Menu List */
.menu-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.menu-group-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-text-darker);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    padding-left: 0.75rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    color: var(--color-text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.menu-link:hover {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.04);
}

.menu-link.active {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.12);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--primary);
}

.menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
}

.menu-link:hover .menu-icon,
.menu-link.active .menu-icon {
    color: var(--primary);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 35px -8px rgba(79, 70, 229, 0.05);
}

/* Stat Cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px -10px rgba(79, 70, 229, 0.1);
}

.stat-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-val {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--color-text-main);
}

/* Custom form elements */
.form-group-custom {
    margin-bottom: 1.5rem;
}

.form-label-custom {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.form-control-custom,
.form-select-custom,
.form-textarea-custom {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    color: var(--color-text-main);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
}

.form-control-custom:focus,
.form-select-custom:focus,
.form-textarea-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: #ffffff;
}

.form-textarea-custom {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--primary) 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.btn-secondary-custom {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--color-text-muted);
}

.btn-secondary-custom:hover {
    background: #f8fafc;
    border-color: var(--border-hover);
    color: var(--color-text-main);
}

/* Tables */
.table-responsive-custom {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.table-custom {
    width: 100%;
    margin-bottom: 0;
    color: var(--color-text-main);
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom th {
    background-color: #f1f5f9;
    border-bottom: 1px solid var(--border-color);
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    text-align: left;
}

.table-custom td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    background-color: #ffffff;
}

.table-custom tbody tr:hover td {
    background-color: #f8fafc;
}

/* Badges */
.badge-custom {
    display: inline-flex;
    align-items: center;
    padding: 0.3em 0.6em;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary { background: var(--primary-glow); color: var(--primary); }
.badge-cyan { background: var(--cyan-glow); color: var(--cyan); }
.badge-success { background: var(--success-glow); color: var(--success); }
.badge-warning { background: var(--warning-glow); color: var(--warning); }
.badge-danger { background: var(--danger-glow); color: var(--danger); }

/* Banner / Welcome Area */
.welcome-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--color-text-main);
}

.welcome-subtitle {
    color: var(--color-text-muted);
    margin: 0;
}

/* Quick link grid */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.quick-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.quick-card:hover {
    background: #f8fafc;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.05);
}

.quick-card-title {
    font-weight: 600;
    color: var(--color-text-main);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-card-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

/* Utility classes */
.text-cyan { color: var(--cyan) !important; }
.text-indigo { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }

/* Responsive adjustments */
@media (max-width: 992px) {
    .dashboard-container {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .dashboard-main {
        padding: 1.5rem;
    }
}

/* OSHA Section Content Styling */
.section-main-heading {
    color: var(--color-text-main);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    font-family: var(--font-heading);
}

.section-sub-heading {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.section-content-box {
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 1px solid transparent;
}

.section-content-box.policy {
    background: var(--primary-glow);
    border-color: rgba(79, 70, 229, 0.15);
    color: var(--color-text-main);
}

.section-content-box.highlight {
    background: var(--warning-glow);
    border-color: rgba(217, 119, 6, 0.15);
    color: var(--color-text-main);
}

.section-content-box.info {
    background: rgba(0, 0, 0, 0.02);
    border-color: var(--border-color);
    color: var(--color-text-main);
}

.section-text {
    line-height: 1.8;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    text-align: justify;
    margin-bottom: 1.25rem;
}

.section-list {
    line-height: 1.8;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    padding-left: 1.25rem;
    margin-bottom: 1.5rem;
}

.section-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.section-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Sidebar Search Styling */
.sidebar-search input:focus {
    border-color: var(--primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.search-results-dropdown {
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.2) transparent;
}

.search-results-dropdown::-webkit-scrollbar {
    width: 4px;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.2);
    border-radius: 2px;
}

.search-cat-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 6px 4px 6px;
    border-bottom: 1px solid var(--border-color);
    margin-top: 6px;
}

.search-cat-header:first-of-type {
    margin-top: 0;
}

.search-item {
    display: block;
    padding: 6px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s;
    margin-top: 2px;
}

.search-item:hover {
    background-color: var(--primary-glow);
}

.search-item-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-desc {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    padding: 12px 6px;
}

/* Sliding Search Drawer */
.search-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(4px);
    z-index: 10400;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-drawer {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    box-shadow: 15px 0 35px -10px rgba(0, 0, 0, 0.08);
    z-index: 10500;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    box-sizing: border-box;
}

.search-drawer.active {
    left: 0;
}

.search-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.search-drawer-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-heading);
}

.search-drawer-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    line-height: 1;
}

.search-drawer-close:hover {
    color: var(--primary);
}

.frequent-search-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-right: 0.5rem;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.frequent-search-tag:hover {
    background: var(--primary-glow);
    color: var(--primary);
    border-color: rgba(79, 70, 229, 0.2);
}


