/* Enhanced Mobile-First Responsive Design */
/* Base mobile styles (applied to all screen sizes) */
:root {
    --primary-color: #4285f4;
    --text-color: #333;
    --border-color: #e0e0e0;
    --background-gray: #f5f5f5;
    --success-green: #34a853;
    --offline-gray: #9e9e9e;
    --font-size-small: 13px;
    --font-size-normal: 14px;
    --font-size-large: 16px;
    --mobile-padding: 1rem;
    --mobile-border-radius: 8px;
    --mobile-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: var(--font-size-normal);
}

body {
    background-color: var(--background-gray);
    color: var(--text-color);
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

/* Header and Navigation */
header {
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

/* Navbar placeholder styling to prevent flash */
#navbar-placeholder {
    min-height: 64px; /* Updated for modern navbar height */
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    transition: opacity 0.3s ease-in-out;
    position: relative;
}

#navbar-placeholder:empty {
    opacity: 0.3;
    background-color: #f5f5f5;
}

#navbar-placeholder:not(:empty) {
    opacity: 1;
}

/* Loading state for navbar */
#navbar-placeholder:empty::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Legacy nav-container - removed to prevent conflicts */

/* Modern Navbar Styles */
.modern-nav {
    background-color: #fff !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    position: relative;
    z-index: 1000;
    display: block;
    min-height: 64px;
}

/* Override any debugging styles */
.nav-logo {
    background-color: transparent !important;
    border: none !important;
}

.nav-menu {
    background-color: transparent !important;
    border: none !important;
}

.nav-list {
    background-color: transparent !important;
    border: none !important;
}

.nav-security {
    background-color: transparent !important;
    border: none !important;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    min-height: 64px;
    width: 100%;
    background-color: transparent !important;
    border: none !important;
}

.nav-logo {
    flex-shrink: 0;
}

.nav-logo img {
    height: 48px;
    width: auto;
    transition: transform 0.2s ease;
}

.nav-logo img:hover {
    transform: scale(1.05);
}

.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: var(--font-size-normal);
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(66, 133, 244, 0.08);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(66, 133, 244, 0.12);
}

.nav-link--dropdown {
    padding-right: 2rem;
}

.dropdown-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.nav-item--dropdown:hover .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
    opacity: 1;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.nav-item--dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    font-size: var(--font-size-normal);
    transition: all 0.2s ease;
    border-radius: 0;
}

.dropdown-item:hover {
    background-color: rgba(66, 133, 244, 0.08);
    color: var(--primary-color);
}

.dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

/* Security Toggle */
.nav-security {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Legacy styles for backward compatibility */
.main-nav {
    display: none; /* Hide old navbar */
}

.main-menu-center {
    display: none; /* Hide old navbar */
}

.logo {
    display: none; /* Hide old logo */
}

.nav-links {
    display: none; /* Hide old nav links */
}

.nav-icons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    z-index: 2;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Security Toggle Styles */
.security-toggle-container {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.security-toggle {
    cursor: pointer;
    user-select: none;
    gap: 0.375rem !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    min-height: 36px !important;
}

.toggle-pill {
    position: relative;
    width: 65px;
    height: 28px;
    background: #e0e0e0;
    border-radius: 14px;
    transition: all 0.3s ease;
    border: 2px solid #d0d0d0;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-pill:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.toggle-pill.unlocked {
    background: #4caf50;
    border-color: #45a049;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.toggle-icon {
    font-size: 14px;
    transition: all 0.3s ease;
    position: absolute;
    left: 6px;
}

.toggle-pill.unlocked .toggle-icon {
    left: auto;
    right: 6px;
}

.toggle-text {
    position: absolute;
    right: -90px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

.toggle-pill.unlocked .toggle-text {
    color: #2e7d32;
}

.icon-button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.icon-button img {
    width: 18px;
    height: 18px;
}

.language-button {
    background-color: var(--background-gray);
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--font-size-small);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 4px;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: #f8f9fa;
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: var(--font-size-large);
    font-weight: 600;
    color: var(--text-color);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.mobile-menu-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.mobile-nav-links {
    padding: 1rem 0;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: var(--font-size-normal);
    transition: background-color 0.2s ease;
}

.mobile-nav-link:hover {
    background-color: rgba(66, 133, 244, 0.08);
    color: var(--primary-color);
}

.mobile-nav-link--dropdown {
    position: relative;
}

.mobile-dropdown-arrow {
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.mobile-nav-item--dropdown.active .mobile-dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f8f9fa;
}

.mobile-nav-item--dropdown.active .mobile-submenu {
    max-height: 500px;
}

.mobile-submenu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-submenu-link {
    display: block;
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    font-size: var(--font-size-normal);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.mobile-submenu-link:hover {
    background-color: rgba(66, 133, 244, 0.08);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.mobile-security-toggle {
    padding: 0.625rem 1rem !important;
    border-top: 1px solid #f0f0f0;
    margin-top: 1rem;
    gap: 0.5rem !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    min-height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-toggle-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #f0f0f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-toggle-pill:hover {
    background-color: #e0e0e0;
}

.mobile-toggle-pill.unlocked {
    background-color: rgba(66, 133, 244, 0.1);
    color: var(--primary-color);
}

.mobile-toggle-icon {
    font-size: 1rem;
}

.mobile-toggle-text {
    font-size: var(--font-size-small);
    font-weight: 500;
}

/* Hide old sub-nav */
.sub-nav {
    display: none;
}

.submenu-center {
    display: none;
}

/* Main Content */
main {
    padding: 1.5rem;
    background-color: var(--background-gray);
    min-height: calc(100vh - 64px); /* Subtract modern navbar height */
}

/* Hide protected content until unlocked to prevent flash */
body.protected-locked main,
body.protected-locked .admin-container,
body.protected-locked .colleagues-container {
    visibility: hidden;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.back-button {
    text-decoration: none;
    color: var(--text-color);
    font-size: var(--font-size-large);
    line-height: 1;
}

h1 {
    font-size: var(--font-size-large);
    font-weight: 400;
}

.date-range {
    color: var(--offline-gray);
    font-size: var(--font-size-small);
}

.header-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-size-small);
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(16px);
}

.export-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 400;
    font-size: var(--font-size-small);
}



/* Table Styles */
.data-table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: var(--font-size-small);
}

th {
    font-weight: 500;
    color: var(--text-color);
    background-color: #fff;
}

td {
    color: var(--text-color);
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.status-online {
    background-color: var(--success-green);
}

.status-offline {
    background-color: var(--offline-gray);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-size: var(--font-size-small);
}

.pagination button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    color: var(--text-color);
    font-size: var(--font-size-small);
}

.pagination button.active {
    color: var(--primary-color);
    font-weight: 500;
}

.items-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    font-size: var(--font-size-small);
}

.items-per-page select {
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: var(--font-size-small);
}

.page-info {
    color: var(--offline-gray);
    font-size: var(--font-size-small);
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    overflow-y: auto;
    z-index: 10000;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--mobile-padding);
    border-bottom: 1px solid var(--border-color);
    background: #f8f9fa;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
}

.mobile-nav-links {
    padding: 1rem 0;
}

.mobile-nav-links ul {
    list-style: none;
}

.mobile-nav-links li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-main-link {
    display: block;
    padding: 1rem var(--mobile-padding);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: background-color 0.2s ease;
}

.mobile-main-link::after {
    content: '▼';
    position: absolute;
    right: var(--mobile-padding);
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.mobile-main-link.active {
    background: #f0f7ff;
    color: var(--primary-color);
}

.mobile-main-link.active::after {
    transform: translateY(-50%) rotate(180deg);
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
}

.mobile-submenu.active {
    max-height: 500px;
}

.mobile-submenu ul {
    padding: 0;
}

.mobile-submenu li {
    border-bottom: none;
}

.mobile-submenu li:last-child {
    border-bottom: none;
}

.mobile-submenu a {
    display: block;
    padding: 0.75rem var(--mobile-padding) 0.75rem 2rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.mobile-submenu a:hover {
    background: #e9ecef;
    color: var(--text-color);
}

/* Mobile Security Toggle */
.mobile-security-toggle {
    padding: 0.625rem 1rem !important;
    border-top: 1px solid #f0f0f0;
    margin-top: 1rem;
    gap: 0.5rem !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    min-height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-toggle-pill {
    position: relative;
    width: 65px;
    height: 28px;
    background: #e0e0e0;
    border-radius: 14px;
    transition: all 0.3s ease;
    border: 2px solid #d0d0d0;
    outline: none;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-toggle-pill:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mobile-toggle-pill.unlocked {
    background: #4caf50;
    border-color: #45a049;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.mobile-toggle-icon {
    font-size: 14px;
    transition: all 0.3s ease;
    position: absolute;
    left: 6px;
}

.mobile-toggle-pill.unlocked .mobile-toggle-icon {
    left: auto;
    right: 6px;
}

.mobile-toggle-text {
    position: absolute;
    right: -90px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

.mobile-toggle-pill.unlocked .mobile-toggle-text {
    color: #2e7d32;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Modern Navbar Mobile Styles */
    .nav-container {
        padding: 0.75rem 1rem;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-security {
        display: none;
    }

    /* Adjust navbar placeholder height for mobile */
    #navbar-placeholder {
        min-height: 64px; /* Modern navbar height on mobile */
    }

    /* Mobile menu width adjustment for smaller screens */
    @media (max-width: 480px) {
        .mobile-menu {
            width: 100vw;
        }
    }

    /* Page Header */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .header-left {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .header-right {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
    }

    .toggle-container {
        justify-content: space-between;
        width: 100%;
    }

    .export-button {
        width: 100%;
        padding: 0.75rem;
        font-size: var(--font-size-normal);
    }

    /* Mobile-first table redesign */
    .data-table {
        overflow: visible;
        border-radius: 6px;
        margin: 0 -0.5rem;
    }

    table {
        min-width: auto;
        width: 100%;
    }

    /* Stack table columns on mobile */
    .data-table table,
    .performance-table,
    .metrics-table {
        display: block;
        width: 100%;
    }

    .data-table thead,
    .performance-table thead,
    .metrics-table thead {
        display: none;
    }

    .data-table tbody,
    .performance-table tbody,
    .metrics-table tbody {
        display: block;
        width: 100%;
    }

    .data-table tr,
    .performance-table tr,
    .metrics-table tr {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        background: white;
        border-radius: 6px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        border: 1px solid #e0e0e0;
    }

    .data-table td,
    .performance-table td,
    .metrics-table td {
        display: block;
        width: 100%;
        padding: 0.25rem 0;
        border: none;
        text-align: left;
        font-size: 0.8rem;
    }

    .data-table td:before,
    .performance-table td:before,
    .metrics-table td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #666;
        display: inline-block;
        width: 35%;
        margin-right: 0.25rem;
        font-size: 0.75rem;
    }

    /* Special handling for date cells */
    .data-table td.date-cell:before,
    .performance-table td.date-cell:before,
    .metrics-table td.date-cell:before {
        content: "Date: ";
    }

    /* Pagination */
    .pagination {
        flex-direction: row;
        gap: 0.25rem;
        align-items: center;
        padding: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination button {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        min-width: 32px;
        min-height: 32px;
    }

    .items-per-page {
        margin-left: 0;
        justify-content: center;
        font-size: 0.75rem;
    }

    .items-per-page select {
        padding: 0.25rem;
        font-size: 0.75rem;
    }

    .page-info {
        text-align: center;
        font-size: 0.75rem;
        width: 100%;
        order: -1;
    }

    /* Mobile-first form redesign */
    .form-container,
    .data-form {
        padding: 0.5rem;
        margin: 0 -0.5rem;
    }

    .form-group {
        margin-bottom: 0.5rem;
    }

    .form-group label {
        display: block;
        margin-bottom: 0.25rem;
        font-weight: 500;
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 0.5rem;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        font-size: 0.9rem;
        box-sizing: border-box;
    }

    /* Compact form layouts */
    .form-row {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .form-row .form-group {
        flex: 1;
        min-width: 0;
    }

    /* Mobile-first grid redesign */
    .content-grid,
    .dashboard-grid,
    .reports-grid,
    .management-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .content-grid > *,
    .dashboard-grid > *,
    .reports-grid > *,
    .management-grid > * {
        margin-bottom: 0.5rem;
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
    }

    /* Special handling for 3-column layouts (highest/lowest/average) */
    .content-grid > *:nth-child(3n),
    .dashboard-grid > *:nth-child(3n),
    .reports-grid > *:nth-child(3n),
    .management-grid > *:nth-child(3n) {
        flex: 1 1 calc(33.333% - 0.33rem);
    }

    /* Ensure 3-column items stay on one line */
    .content-grid:has(> *:nth-child(3)),
    .dashboard-grid:has(> *:nth-child(3)),
    .reports-grid:has(> *:nth-child(3)),
    .management-grid:has(> *:nth-child(3)) {
        flex-wrap: nowrap;
    }

    /* Mobile-first card redesign */
    .content-card,
    .dashboard-tile,
    .report-card,
    .management-card,
    .overview-card {
        padding: 0.5rem;
        margin: 0;
        border-radius: 6px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }

    /* Reduce text sizes for compact mobile layout */
    .content-card h2,
    .dashboard-tile h3,
    .report-card h3,
    .management-card h3,
    .overview-card h3 {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }

    .content-card p,
    .dashboard-tile p,
    .report-card p,
    .management-card p,
    .overview-card p {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    /* Compact value displays */
    .tile-value,
    .stat-value,
    .summary-value {
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 0.1rem;
        line-height: 1.1;
    }

    .tile-label,
    .stat-label,
    .summary-label {
        font-size: 0.6rem;
        color: #666;
        margin-bottom: 0.1rem;
        line-height: 1.1;
    }

    /* Ultra-compact for 3-column performance cards */
    .performance-metrics .tile-value,
    .availability-metrics .tile-value,
    .metrics-summary .tile-value {
        font-size: 0.9rem;
        margin-bottom: 0.1rem;
    }

    .performance-metrics .tile-label,
    .availability-metrics .tile-label,
    .metrics-summary .tile-label {
        font-size: 0.65rem;
        margin-bottom: 0.1rem;
    }

    /* Enhanced summary cards with more space */
    .summary-grid .summary-value {
        font-size: 1rem;
        margin-bottom: 0.15rem;
        line-height: 1.2;
    }

    .summary-grid .summary-label {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    /* Dashboard summary grid optimization */
    .summary-grid {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 0.25rem;
        flex-wrap: nowrap;
        margin-bottom: 0.5rem;
    }

    .summary-grid .summary-card {
        flex: 1 1 calc(33.333% - 0.17rem) !important;
        min-width: 0;
        padding: 0.5rem 0.25rem;
        width: auto !important;
        min-height: 80px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* Stats grid optimization */
    .stats-grid {
        display: flex;
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    .stats-grid .stat-card {
        flex: 1 1 calc(50% - 0.125rem);
        min-width: 0;
        padding: 0.25rem;
    }

    /* Performance metrics - force 3 columns on one line */
    .performance-metrics,
    .availability-metrics,
    .metrics-summary {
        display: flex;
        gap: 0.25rem;
        flex-wrap: nowrap;
    }

    .performance-metrics > *,
    .availability-metrics > *,
    .metrics-summary > * {
        flex: 1 1 calc(33.333% - 0.17rem);
        min-width: 0;
        padding: 0.25rem;
    }

    /* Specific targeting for highest/lowest/average cards */
    .card:has(.tile-value),
    .tile:has(.tile-value),
    .metric-card:has(.tile-value) {
        flex: 1 1 calc(33.333% - 0.17rem);
        min-width: 0;
    }

    /* Force any container with exactly 3 cards to display horizontally */
    .content-grid:has(> *:nth-child(3):last-child),
    .dashboard-grid:has(> *:nth-child(3):last-child),
    .reports-grid:has(> *:nth-child(3):last-child) {
        flex-wrap: nowrap;
    }

    /* Mobile-first button redesign */
    .btn, .button, button {
        width: 100%;
        padding: 0.5rem;
        font-size: 0.8rem;
        min-height: 36px;
        border-radius: 6px;
        margin-bottom: 0.25rem;
    }

    /* Compact button groups */
    .button-group,
    .form-actions {
        display: flex;
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    .button-group .btn,
    .button-group .button,
    .button-group button,
    .form-actions .btn,
    .form-actions .button,
    .form-actions button {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
    }

    /* Mobile-first modal redesign */
    .modal {
        padding: 1rem;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 8px;
        padding: 1rem;
    }

    /* Mobile dashboard header styling */
    .dashboard-report-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.25rem;
        margin-bottom: 1rem;
    }

    .dashboard-report-title {
        font-size: 1.5rem;
        margin-bottom: 0;
        order: 1;
    }

    .dashboard-report-date-range {
        font-size: 0.75rem;
        color: #666;
        text-align: center;
        width: 100%;
        order: 2;
        margin-top: 0;
    }
}



@media (max-width: 480px) {
    main {
        padding: 1rem;
    }

    .page-header {
        gap: 0.75rem;
    }

    h1 {
        font-size: var(--font-size-normal);
    }

    .date-range {
        font-size: 11px;
    }

    .export-button {
        padding: 0.875rem;
    }

    .pagination button {
        padding: 0.5rem;
        min-width: 40px;
    }

    .form-container,
    .data-form {
        padding: 0.75rem;
    }

    .content-card,
    .dashboard-tile,
    .report-card,
    .management-card,
    .overview-card {
        padding: 0.75rem;
    }

    .modal-content {
        margin: 0.5rem;
        padding: 0.75rem;
    }
}

/* Mobile-specific enhancements */
@media (max-width: 767px) {
    .mobile-hidden {
        display: none !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
    
    .mobile-text-center {
        text-align: center !important;
    }
    
    .mobile-margin-bottom {
        margin-bottom: 1rem !important;
    }
    
    /* Additional mobile optimizations */
    .mobile-stack {
        display: block !important;
    }
    
    .mobile-no-margin {
        margin: 0 !important;
    }
    
    .mobile-no-padding {
        padding: 0 !important;
    }
    
    /* Ensure all content fits within screen width */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
    }
    
    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Ensure text doesn't overflow */
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 767px) and (orientation: landscape) {
    .main-nav {
        height: 48px;
    }
    
    .sub-nav {
        padding: 0.25rem 0;
    }
    
    main {
        padding: 0.75rem;
    }
    
    .page-header {
        margin-bottom: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
}

/* High DPI mobile devices */
@media (max-width: 767px) and (-webkit-min-device-pixel-ratio: 2) {
    .burger-menu span {
        height: 2px;
    }
    
    .mobile-menu {
        width: 80%;
    }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
    .btn, .button, button, .nav-links a, .sub-nav a {
        min-height: 44px;
        min-width: 44px;
    }
    
    .pagination button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Tiny footer injected via navbar.html */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: #fff;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #888;
    z-index: 1000;
}
.footer-inner { max-width: 1100px; width: 100%; text-align: center; }

/* Smaller footer text on mobile */
@media (max-width: 768px) {
  .site-footer {
    font-size: 10px;
    height: 18px;
  }
  .site-footer,
  .footer-inner {
    white-space: nowrap;
  }
  .footer-inner { padding: 0; }
  .footer-contact { display: none; }
}

@media (max-width: 480px) {
  .site-footer {
    font-size: 7px;
    height: 14px;
  }
}

@media (max-width: 380px) {
  .site-footer {
    font-size: 7px;
    height: 14px;
  }
}

@media (max-width: 340px) {
  .site-footer {
    font-size: 6px;
    height: 12px;
  }
}

@media print {
  .site-footer { position: fixed; bottom: 5mm; height: 10mm; background: transparent; border: none; color: #777; }
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.dashboard-tile {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease-in-out;
}

.dashboard-tile:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-tile[href]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tile-header h3 {
    font-size: var(--font-size-normal);
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
}

.tile-icon {
    font-size: 1.5rem;
    opacity: 0.7;
}

.tile-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tile-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1;
}

.tile-change {
    font-size: var(--font-size-small);
    font-weight: 400;
}

.tile-change.positive {
    color: var(--success-green);
}

.tile-change.negative {
    color: #ea4335;
}

.content-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.content-card h2 {
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: var(--font-size-large);
    font-weight: 500;
}

.content-card p {
    color: var(--offline-gray);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.card-button {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    display: inline-block;
    font-size: var(--font-size-small);
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.card-button:hover {
    background-color: #3367d6;
}

/* Large Navigation Tiles */
.content-card.large-tile {
    padding: 2rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card.large-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content-card.large-tile h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.content-card.large-tile p {
    font-size: var(--font-size-normal);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.content-card.large-tile .card-button {
    align-self: flex-start;
    padding: 1rem 2rem;
    font-size: var(--font-size-normal);
}

/* Form Styles */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.data-form {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: var(--font-size-normal);
    background-color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.submit-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--font-size-normal);
    font-weight: 500;
}

.cancel-button {
    background-color: var(--background-gray);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--font-size-normal);
}

/* Search and Filter Styles */
.search-container {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: var(--font-size-small);
    min-width: 200px;
}

.search-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--font-size-small);
}

.filters-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: var(--font-size-small);
    font-weight: 500;
    color: var(--text-color);
}

.filter-select,
.filter-input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: var(--font-size-small);
}

.filter-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--font-size-small);
}

/* Action Buttons */
.action-button {
    background-color: var(--background-gray);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    margin-right: 0.25rem;
}

.action-button.edit {
    background-color: #e3f2fd;
    color: #1976d2;
    border-color: #bbdefb;
}

.action-button.delete {
    background-color: #ffebee;
    color: #d32f2f;
    border-color: #ffcdd2;
}

.action-button.view {
    background-color: #e8f5e8;
    color: #2e7d32;
    border-color: #c8e6c9;
}

.action-button.download {
    background-color: #fff3e0;
    color: #f57c00;
    border-color: #ffcc02;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.available {
    background-color: #e8f5e8;
    color: #2e7d32;
}

.status-badge.unavailable {
    background-color: #ffebee;
    color: #d32f2f;
}

.status-badge.oncall {
    background-color: #fff3e0;
    color: #f57c00;
}

.efficiency-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.efficiency-badge.high {
    background-color: #e8f5e8;
    color: #2e7d32;
}

.efficiency-badge.medium {
    background-color: #fff3e0;
    color: #f57c00;
}

.efficiency-badge.low {
    background-color: #ffebee;
    color: #d32f2f;
}

/* Reports Styles */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.report-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.report-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: var(--font-size-large);
    font-weight: 500;
}

.report-stats {
    margin-bottom: 1.5rem;
}

.report-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--font-size-small);
    font-weight: 500;
    width: 100%;
}

.report-form {
    margin-bottom: 1.5rem;
}

.form-select,
.form-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: var(--font-size-small);
    margin-bottom: 0.75rem;
}

.recent-reports {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.recent-reports h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: var(--font-size-large);
    font-weight: 500;
}

.reports-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--background-gray);
}

.report-info h4 {
    margin-bottom: 0.25rem;
    color: var(--text-color);
    font-size: var(--font-size-normal);
    font-weight: 500;
}

.report-date {
    color: var(--offline-gray);
    font-size: var(--font-size-small);
}

.report-actions {
    display: flex;
    gap: 0.5rem;
}

/* Management Styles */
.management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.management-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.management-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: var(--font-size-large);
    font-weight: 500;
}

.settings-list {
    margin-bottom: 1.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    font-size: var(--font-size-normal);
    color: var(--text-color);
}

.save-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--font-size-normal);
    font-weight: 500;
    width: 100%;
}

.user-stats,
.log-stats {
    margin-bottom: 1.5rem;
}

.user-actions,
.log-actions {
    display: flex;
    gap: 0.5rem;
}

.department-list {
    margin-bottom: 1.5rem;
}

.department-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.department-item:last-child {
    border-bottom: none;
}

.department-name {
    font-size: var(--font-size-normal);
    color: var(--text-color);
}

.department-actions {
    display: flex;
    gap: 0.25rem;
}

.small-button {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    background-color: var(--background-gray);
    color: var(--text-color);
}

.small-button.edit {
    background-color: #e3f2fd;
    color: #1976d2;
    border-color: #bbdefb;
}

.small-button.delete {
    background-color: #ffebee;
    color: #d32f2f;
    border-color: #ffcdd2;
}

.add-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--font-size-normal);
    font-weight: 500;
    width: 100%;
}

.data-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.action-group h4 {
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: var(--font-size-normal);
    font-weight: 500;
}

.action-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.system-info {
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: var(--font-size-small);
    color: var(--offline-gray);
}

.info-value {
    font-size: var(--font-size-small);
    color: var(--text-color);
    font-weight: 500;
}

.check-update-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--font-size-normal);
    font-weight: 500;
    width: 100%;
}

/* Availability Overview */
.availability-overview,
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.overview-card,
.stats-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.overview-card h3,
.stats-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: var(--font-size-large);
    font-weight: 500;
}

.availability-stats,
.shift-stats,
.performance-stats,
.comparison-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-value.available {
    color: #2e7d32;
}

.stat-value.unavailable {
    color: #d32f2f;
}

.stat-value.oncall {
    color: #f57c00;
}

.stat-value.positive {
    color: #2e7d32;
}

.stat-value.negative {
    color: #d32f2f;
}

.performer-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.performer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.performer-item:last-child {
    border-bottom: none;
}

.performer-name {
    font-size: var(--font-size-small);
    color: var(--text-color);
}

.performer-stats {
    font-size: var(--font-size-small);
    color: var(--primary-color);
    font-weight: 500;
}

/* Multi-step process mobile adjustments */
.step-container {
    padding: 1rem;
}

.step-header {
    margin-bottom: 1rem;
}

.step-header h2 {
    font-size: 18px;
}

.step-progress {
    margin-bottom: 1.5rem;
}

.step-content {
    padding: 1rem;
}

.step-actions {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
}

.step-button {
    width: 100%;
    padding: 0.75rem;
    font-size: 14px;
}

/* Admin page mobile adjustments */
.admin-controls {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.table-select {
    width: 100%;
    padding: 0.75rem;
    font-size: 14px;
}

.admin-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 0.5rem;
}

.delete-button {
    padding: 0.5rem 0.75rem;
    font-size: 12px;
}

/* Modal mobile adjustments */
.modal {
    padding: 1rem;
}

.modal-content {
    margin: 1rem;
    padding: 1rem;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
}

.modal-header h2 {
    font-size: 18px;
}

.modal-body {
    padding: 1rem 0;
}

.modal-footer {
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
}

.modal-button {
    width: 100%;
    padding: 0.75rem;
    font-size: 14px;
}

/* Utility classes for mobile */
.mobile-hidden {
    display: none !important;
}

.mobile-full-width {
    width: 100% !important;
}

.mobile-text-center {
    text-align: center !important;
}

.mobile-margin-bottom {
    margin-bottom: 1rem !important;
}

/* Mobile menu specific adjustments */
.mobile-menu {
    width: 300px; /* Slightly wider for better spacing */
}

.mobile-nav-links,
.mobile-nav-links li {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.mobile-main-link {
    padding-left: 1.5rem;
}

.mobile-submenu a {
    padding: 0.75rem 2.5rem; /* Increased left padding to indent bullet points */
}

/* Dashboard summary section styles for index.html */
.dashboard-report-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
    .dashboard-report-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 1rem;
        margin-bottom: 2rem;
    }
.dashboard-report-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}
.dashboard-report-date-range {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
}
.dashboard-report-sections {
    display: grid;
    gap: 2rem;
}
.dashboard-report-section {
    background: #fafbfc;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.dashboard-section-header {
    background: #f5f5f5;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.dashboard-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}
.dashboard-section-content {
    padding: 1.5rem;
}
/* Reuse summary-grid and delvols-week-grid styles for consistency */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.summary-card {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}
.summary-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}
.summary-label {
    font-size: 0.95rem;
    color: var(--offline-gray);
    font-weight: 500;
}
.delvols-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}
.delvols-day-box {
    background: #fff;
    min-height: 80px;
    padding: 12px 6px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.delvols-day-header {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}
.delvols-day-date {
    color: #666;
    font-size: 12px;
    margin-bottom: 8px;
}
.delvols-day-cases {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.delvols-day-label {
    font-size: 0.9rem;
    color: var(--offline-gray);
}
.delvols-day-categories {
    text-align: left !important;
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    word-break: break-word;
}
.availability-green {
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    padding: 2px 6px;
    display: inline-block;
}
.availability-yellow {
    background: #fff3cd;
    color: #856404;
    border-radius: 4px;
    padding: 2px 6px;
    display: inline-block;
}
.availability-red {
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    padding: 2px 6px;
    display: inline-block;
}
.delvols-awaiting-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 1em 0.2em;
    min-height: 70px;
    color: #555;
    font-size: 1.05rem;
    font-weight: 500;
    text-align: center;
}
.awaiting-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}
.awaiting-text {
    display: block;
    line-height: 1.3;
}
@media (max-width: 900px) {
    .delvols-week-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
}
@media (max-width: 600px) {
    .dashboard-report-container {
        padding: 0.5rem;
    }
    .dashboard-report-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .delvols-week-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 0.25rem;
    }
    .dashboard-section-content {
        padding: 0.75rem;
    }
}

@media (max-width: 400px) {
    .delvols-week-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 0.15rem;
    }
    .delvols-day-box {
        padding: 8px 4px;
        min-height: 60px;
    }
    .delvols-day-header {
        font-size: 12px;
    }
    .delvols-day-date {
        font-size: 10px;
    }
    .delvols-day-cases {
        font-size: 1rem;
    }
    .delvols-day-label {
        font-size: 0.8rem;
    }
} 

.export-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(66,133,244,0.08);
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    display: block;
    width: 100%;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}
.export-btn:hover, .export-btn:focus {
    background: #1967d2;
    color: #fff;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 16px rgba(66,133,244,0.13);
}
.dashboard-report-actions {
    margin: 2rem 0 1rem 0;
    text-align: center;
} 

.delvols-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8px;
    color: #666;
    margin-top: 2px;
    margin-bottom: 2px;
    text-align: center;
}
.delvols-mini-table-cell {
    padding: 1px 3px;
    border: 1px solid #ccc;
    text-align: center !important;
    font-size: 8px;
    line-height: 1.1;
}

/* Security Button Visibility - Hide by default until unlocked */
a[href*="add-data"], 
a[href*="add_data"], 
a[href*="2nd-replen-add"],
.card-button[href*="add"],
.security-unlocked-button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Show buttons when system is unlocked */
body.security-unlocked a[href*="add-data"], 
body.security-unlocked a[href*="add_data"], 
body.security-unlocked a[href*="2nd-replen-add"],
body.security-unlocked .card-button[href*="add"],
body.security-unlocked .security-unlocked-button {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* PIN Modal Styles */
.pin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    animation: fadeIn 0.2s ease-out;
}

.pin-modal-overlay.active {
    display: flex;
}

.pin-modal {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    max-width: 420px;
    width: 100%;
    overflow: hidden;
    animation: pinModalSlideIn 0.22s ease-out;
    border: 1px solid #e5e7eb;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pinModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pin-modal-header {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 1.5rem 0.5rem;
    color: var(--text-color);
    align-items: center;
}

.pin-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    border: 1px solid #e0e7ff;
}

.pin-modal-title-wrap h3 {
    margin: 0.15rem 0 0.2rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.pin-modal-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    margin: 0;
    color: #64748b;
    font-weight: 700;
}

.pin-modal-subtitle {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.pin-modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.4rem;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.15s, border-color 0.15s;
}

.pin-modal-close:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.pin-modal-body {
    padding: 0.5rem 1.5rem 1.25rem;
    text-align: left;
}

.pin-input-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9rem;
}

.pin-input-container {
    margin-bottom: 0.5rem;
}

#pinInput {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 0.45rem;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
    box-sizing: border-box;
    background: #f8fafc;
    font-weight: 700;
    color: #0f172a;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#pinInput:focus {
    outline: none;
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

#pinInput::placeholder {
    color: #94a3b8;
    letter-spacing: normal;
    font-weight: 600;
}

.pin-helper {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

.pin-error {
    color: #b91c1c;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: left;
    display: none;
    background: #fef2f2;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #fecdd3;
}

.pin-modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 0 1.5rem 1.5rem 1.5rem;
    justify-content: center;
}

.pin-submit-btn,
.pin-cancel-btn {
    flex: 1;
    padding: 0.85rem 1rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s, background-color 0.15s, border-color 0.15s;
    min-width: 80px;
}

.pin-submit-btn {
    background: #111827;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
}

.pin-submit-btn:hover {
    background: #0b1220;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.22);
}

.pin-cancel-btn {
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.pin-cancel-btn:hover {
    background: #e2e8f0;
}

/* Mobile PIN Modal Styles */
@media (max-width: 768px) {
    .pin-modal {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .pin-modal-header {
        padding: 1rem 1rem 0.5rem;
    }
    
    .pin-modal-header h3 {
        font-size: 1rem;
    }
    
    .pin-modal-body {
        padding: 1.25rem 1rem;
    }
    
    #pinInput {
        padding: 0.75rem;
        font-size: 1.05rem;
        letter-spacing: 0.35rem;
    }
    
    .pin-modal-footer {
        padding: 0 1rem 1.25rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pin-submit-btn,
    .pin-cancel-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .pin-modal {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
    
    .pin-modal-header {
        padding: 0.75rem 0.75rem;
    }
    
    .pin-modal-header h3 {
        font-size: 0.95rem;
    }
    
    .pin-modal-body {
        padding: 1rem 0.75rem;
    }
    
    #pinInput {
        padding: 0.65rem;
        font-size: 1rem;
        letter-spacing: 0.3rem;
    }
    
    .pin-modal-footer {
        padding: 0 0.75rem 1rem 0.75rem;
    }
} 