        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box
        }

        :root {
            --bg: #0c0a1a;
            --bg2: #141028;
            --surface: rgba(255, 255, 255, 0.04);
            --surface2: rgba(255, 255, 255, 0.07);
            --surface3: rgba(255, 255, 255, 0.1);
            --border: rgba(255, 255, 255, 0.08);
            --border2: rgba(255, 255, 255, 0.14);
            --text: #e8e4f0;
            --text2: #a09bb8;
            --text3: #6b6588;
            --accent: #8b5cf6;
            --accent2: #a78bfa;
            --accent3: #6d28d9;
            --green: #22c55e;
            --green2: rgba(34, 197, 94, 0.15);
            --red: #ef4444;
            --red2: rgba(239, 68, 68, 0.15);
            --amber: #f59e0b;
            --amber2: rgba(245, 158, 11, 0.15);
            --blue: #3b82f6;
            --blue2: rgba(59, 130, 246, 0.15);
            --pink: #ec4899;
            --cyan: #06b6d4;
            --radius: 12px;
            --radius2: 16px;
            --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
            --glass: blur(20px) saturate(180%);
        }

        html,
        body {
            height: 100%;
            font-family: 'Inter', system-ui, sans-serif;
            background: var(--bg);
            color: var(--text);
            overflow: hidden
        }

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

        /* Layout */
        .app {
            display: flex;
            height: 100vh;
            width: 100vw
        }

        .sidebar {
            width: 240px;
            background: var(--bg2);
            border-right: 1px solid var(--border);
            display: flex;
            flex-direction: column;
            padding: 20px 0;
            flex-shrink: 0;
            transition: transform .3s ease;
            z-index: 100
        }

        .sidebar .logo {
            padding: 0 24px 28px;
            display: flex;
            align-items: center;
            gap: 12px
        }

        .sidebar .logo-icon {
            width: 38px;
            height: 38px;
            background: linear-gradient(135deg, var(--accent), var(--pink));
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px
        }

        .sidebar .logo-text {
            font-size: 16px;
            font-weight: 700;
            letter-spacing: -0.3px
        }

        .sidebar .logo-sub {
            font-size: 10px;
            color: var(--text3);
            letter-spacing: 0.5px;
            text-transform: uppercase
        }

        .sidebar nav {
            flex: 1;
            padding: 0 12px
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 16px;
            border-radius: 10px;
            cursor: pointer;
            color: var(--text2);
            font-size: 13.5px;
            font-weight: 500;
            transition: all .2s;
            margin-bottom: 2px;
            user-select: none
        }

        .nav-item:hover {
            background: var(--surface2);
            color: var(--text)
        }

        .nav-item.active {
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.1));
            color: #fff;
            box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.3)
        }

        .nav-item .icon {
            font-size: 18px;
            width: 22px;
            text-align: center
        }

        .nav-section {
            font-size: 10px;
            color: var(--text3);
            text-transform: uppercase;
            letter-spacing: 1.2px;
            padding: 16px 16px 6px;
            font-weight: 600
        }

        .sidebar-footer {
            padding: 12px 16px;
            border-top: 1px solid var(--border);
            margin: 0 12px
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px;
            border-radius: 10px;
            cursor: pointer;
            transition: background .2s
        }

        .user-info:hover {
            background: var(--surface2)
        }

        .user-avatar {
            width: 34px;
            height: 34px;
            background: linear-gradient(135deg, var(--accent), var(--pink));
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 13px;
            flex-shrink: 0
        }

        .user-name {
            font-size: 13px;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis
        }

        .user-role {
            font-size: 11px;
            color: var(--text3)
        }

        .main {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            min-width: 0
        }

        .topbar {
            height: 60px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 28px;
            flex-shrink: 0;
            background: var(--bg)
        }

        .topbar h1 {
            font-size: 18px;
            font-weight: 700;
            letter-spacing: -0.3px
        }

        .topbar-actions {
            display: flex;
            align-items: center;
            gap: 10px
        }

        .content {
            flex: 1;
            overflow-y: auto;
            padding: 24px 28px;
            scrollbar-width: thin;
            scrollbar-color: var(--surface3) transparent
        }

        .content::-webkit-scrollbar {
            width: 6px
        }

        .content::-webkit-scrollbar-track {
            background: transparent
        }

        .content::-webkit-scrollbar-thumb {
            background: var(--surface3);
            border-radius: 3px
        }

        /* Buttons */
        .btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 18px;
            border-radius: 8px;
            font-family: inherit;
            font-size: 13px;
            font-weight: 600;
            border: none;
            cursor: pointer;
            transition: all .2s;
            white-space: nowrap
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--accent), var(--accent3));
            color: #fff;
            box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3)
        }

        .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 20px rgba(139, 92, 246, 0.45)
        }

        .btn-ghost {
            background: var(--surface2);
            color: var(--text);
            border: 1px solid var(--border2)
        }

        .btn-ghost:hover {
            background: var(--surface3)
        }

        .btn-danger {
            background: var(--red2);
            color: var(--red);
            border: 1px solid rgba(239, 68, 68, 0.2)
        }

        .btn-danger:hover {
            background: rgba(239, 68, 68, 0.25)
        }

        .btn-sm {
            padding: 6px 12px;
            font-size: 12px
        }

        .btn-icon {
            width: 36px;
            height: 36px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            background: var(--surface);
            border: 1px solid var(--border);
            color: var(--text2);
            cursor: pointer;
            font-size: 16px;
            transition: all .2s
        }

        .btn-icon:hover {
            background: var(--surface2);
            color: var(--text)
        }

        .hamburger {
            display: none;
            background: none;
            border: none;
            color: var(--text);
            font-size: 22px;
            cursor: pointer;
            padding: 4px
        }

        /* Cards */
        .card {
            background: var(--surface);
            backdrop-filter: var(--glass);
            -webkit-backdrop-filter: var(--glass);
            border: 1px solid var(--border);
            border-radius: var(--radius2);
            padding: 20px;
            transition: all .3s
        }

        .card:hover {
            border-color: var(--border2)
        }

        .card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px
        }

        .card-title {
            font-size: 15px;
            font-weight: 700;
            letter-spacing: -0.2px
        }

        /* Stats */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
            margin-bottom: 24px
        }

        .stat-card {
            position: relative;
            overflow: hidden
        }

        .stat-card .stat-icon {
            width: 42px;
            height: 42px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            margin-bottom: 12px
        }

        .stat-card .stat-value {
            font-size: 28px;
            font-weight: 800;
            letter-spacing: -1px;
            margin-bottom: 2px
        }

        .stat-card .stat-label {
            font-size: 12px;
            color: var(--text2);
            font-weight: 500
        }

        .stat-card .stat-glow {
            position: absolute;
            width: 80px;
            height: 80px;
            border-radius: 50%;
            filter: blur(40px);
            opacity: .15;
            top: -10px;
            right: -10px
        }

        .stat-purple .stat-icon {
            background: rgba(139, 92, 246, 0.15);
            color: var(--accent2)
        }

        .stat-purple .stat-glow {
            background: var(--accent)
        }

        .stat-green .stat-icon {
            background: var(--green2);
            color: var(--green)
        }

        .stat-green .stat-glow {
            background: var(--green)
        }

        .stat-amber .stat-icon {
            background: var(--amber2);
            color: var(--amber)
        }

        .stat-amber .stat-glow {
            background: var(--amber)
        }

        .stat-blue .stat-icon {
            background: var(--blue2);
            color: var(--blue)
        }

        .stat-blue .stat-glow {
            background: var(--blue)
        }

        /* Table */
        .table-wrap {
            overflow-x: auto;
            border-radius: var(--radius);
            border: 1px solid var(--border)
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13.5px
        }

        th {
            text-align: left;
            padding: 10px 16px;
            background: var(--surface);
            color: var(--text2);
            font-weight: 600;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            border-bottom: 1px solid var(--border);
            white-space: nowrap
        }

        td {
            padding: 12px 16px;
            border-bottom: 1px solid var(--border);
            vertical-align: middle
        }

        tr:last-child td {
            border-bottom: none
        }

        tr:hover td {
            background: var(--surface)
        }

        /* Badge */
        .badge {
            display: inline-flex;
            align-items: center;
            padding: 3px 10px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.2px
        }

        .badge-purple {
            background: rgba(139, 92, 246, 0.15);
            color: var(--accent2)
        }

        .badge-green {
            background: var(--green2);
            color: var(--green)
        }

        .badge-amber {
            background: var(--amber2);
            color: var(--amber)
        }

        .badge-blue {
            background: var(--blue2);
            color: var(--blue)
        }

        .badge-pink {
            background: rgba(236, 72, 153, 0.15);
            color: var(--pink)
        }

        .badge-red {
            background: var(--red2);
            color: var(--red)
        }

        /* Forms / Inputs */
        .form-group {
            margin-bottom: 16px
        }

        .form-label {
            display: block;
            font-size: 12px;
            font-weight: 600;
            color: var(--text2);
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px
        }

        .form-input,
        .form-select {
            width: 100%;
            padding: 10px 14px;
            background: var(--surface2);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text);
            font-family: inherit;
            font-size: 13.5px;
            outline: none;
            transition: border-color .2s
        }

        .form-input:focus,
        .form-select:focus {
            border-color: var(--accent)
        }

        .form-select {
            appearance: none;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3e%3cpath fill='%23a09bb8' d='M1 1l5 5 5-5'/%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 12px center;
            padding-right: 32px
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px
        }

        .form-check {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            cursor: pointer
        }

        /* Modal */
        .modal-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            z-index: 200;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
            animation: fadeIn .2s
        }

        .modal-backdrop.show {
            display: flex
        }

        .modal {
            background: var(--bg2);
            border: 1px solid var(--border2);
            border-radius: var(--radius2);
            width: 100%;
            max-width: 480px;
            max-height: 90vh;
            overflow-y: auto;
            animation: slideUp .3s
        }

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 24px 0
        }

        .modal-header h2 {
            font-size: 17px;
            font-weight: 700
        }

        .modal-body {
            padding: 20px 24px
        }

        .modal-footer {
            padding: 0 24px 20px;
            display: flex;
            gap: 10px;
            justify-content: flex-end
        }

        /* Login */
        .login-page {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100vh;
            background: linear-gradient(135deg, #0c0a1a 0%, #1a1040 50%, #0c0a1a 100%);
            padding: 20px
        }

        .login-box {
            width: 100%;
            max-width: 400px;
            text-align: center
        }

        .login-logo {
            width: 64px;
            height: 64px;
            background: linear-gradient(135deg, var(--accent), var(--pink));
            border-radius: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            margin: 0 auto 20px;
            box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3)
        }

        .login-box h1 {
            font-size: 24px;
            font-weight: 800;
            margin-bottom: 4px;
            letter-spacing: -0.5px
        }

        .login-box p {
            color: var(--text2);
            font-size: 14px;
            margin-bottom: 32px
        }

        .login-box .card {
            text-align: left;
            padding: 28px
        }

        .login-error {
            background: var(--red2);
            color: var(--red);
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 13px;
            margin-bottom: 16px;
            display: none
        }

        /* Shifts Calendar */
        .week-nav {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 20px;
            flex-wrap: wrap
        }

        .week-label {
            font-size: 15px;
            font-weight: 700;
            min-width: 200px
        }

        .calendar-grid {
            margin-bottom: 20px;
            overflow-x: auto;
        }

        .cal-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            table-layout: fixed;
        }

        .cal-table th,
        .cal-table td {
            border: 1px solid var(--border);
            vertical-align: top;
        }

        .cal-loc-col {
            width: 110px;
            min-width: 90px;
        }

        .cal-day-th {
            text-align: center;
            padding: 8px 4px;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            color: var(--text3);
            letter-spacing: 0.5px;
            background: var(--surface);
        }

        .cal-day-th .day-num {
            font-size: 20px;
            color: var(--text);
            letter-spacing: -1px;
            display: block;
            margin-top: 2px
        }

        .cal-day-th.today {
            color: var(--accent2);
            background: rgba(139, 92, 246, 0.06);
        }

        .cal-day-th.today .day-num {
            color: var(--accent);
            background: rgba(139, 92, 246, 0.15);
            width: 34px;
            height: 34px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-top: 4px
        }

        .cal-loc-label {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text2);
            padding: 8px 8px;
            background: var(--surface);
            white-space: nowrap;
            display: flex;
            align-items: center;
            gap: 6px;
            position: sticky;
            left: 0;
            z-index: 1;
        }

        .cal-loc-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
            display: inline-block;
        }

        .cal-cell {
            padding: 4px;
            min-height: 50px;
            background: var(--bg);
        }

        .cal-cell .shift-chip {
            margin-bottom: 3px;
            padding: 5px 8px;
            font-size: 11px;
            border-radius: 6px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            background: var(--surface2);
            border: 1px solid var(--border);
            transition: all .2s;
        }

        .cal-cell .shift-chip:last-child {
            margin-bottom: 0;
        }

        .cal-cell .shift-chip:hover {
            border-color: var(--accent);
            transform: translateY(-1px);
        }

        .cal-cell .shift-chip .chip-bar {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
        }

        .cal-cell .shift-chip .chip-name {
            color: var(--text2);
            font-size: 10px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            padding-left: 4px;
        }

        .cal-cell .shift-chip .chip-time {
            color: var(--text3);
            font-size: 9px;
            margin-top: 1px;
            padding-left: 4px;
        }

        .cal-add-btn {
            width: 100%;
            border: 1px dashed var(--border);
            background: none;
            color: var(--text3);
            border-radius: 4px;
            font-size: 16px;
            cursor: pointer;
            padding: 4px;
            transition: all .2s;
            display: block;
        }

        .cal-add-btn:hover {
            background: var(--accent);
            color: #fff;
            border-color: var(--accent);
        }

        .cal-loc-row:nth-child(even) .cal-cell {
            background: var(--surface);
        }

        .day-col {
            min-width: 0
        }

        .day-header {
            text-align: center;
            padding: 8px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            color: var(--text3);
            letter-spacing: 0.8px;
            margin-bottom: 6px
        }

        .day-header .day-num {
            font-size: 22px;
            color: var(--text);
            letter-spacing: -1px;
            display: block;
            margin-top: 2px
        }

        .day-header.today {
            color: var(--accent2)
        }

        .day-header.today .day-num {
            color: var(--accent);
            background: rgba(139, 92, 246, 0.15);
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-top: 4px
        }

        .shift-chip {
            background: var(--surface2);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 8px 10px;
            margin-bottom: 6px;
            cursor: pointer;
            transition: all .2s;
            font-size: 12px;
            position: relative;
            overflow: hidden
        }

        .shift-chip:hover {
            border-color: var(--accent);
            transform: translateY(-1px)
        }

        .loc-group {
            margin-bottom: 12px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 8px;
            padding-top: 0
        }

        .loc-group-header {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 6px 6px 4px;
            margin-bottom: 4px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            gap: 6px
        }

        .loc-group-header::before {
            content: '';
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: currentColor;
            flex-shrink: 0
        }

        .loc-add-btn {
            margin-left: auto;
            background: none;
            border: 1px solid var(--border);
            color: var(--text2);
            width: 20px;
            height: 20px;
            border-radius: 4px;
            font-size: 14px;
            line-height: 1;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all .2s;
            padding: 0
        }

        .loc-add-btn:hover {
            background: var(--accent);
            color: #fff;
            border-color: var(--accent)
        }

        .loc-group .shift-chip {
            margin-bottom: 4px;
            border: none;
            background: var(--surface2)
        }

        .loc-group .shift-chip:last-child {
            margin-bottom: 0
        }

        .shift-chip .chip-name {
            color: var(--text2);
            font-size: 11px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis
        }

        .shift-chip .chip-time {
            color: var(--text3);
            font-size: 10px;
            margin-top: 2px
        }

        .shift-chip .chip-bar {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px
        }

        .add-shift-btn {
            width: 100%;
            padding: 6px;
            border: 1px dashed var(--border2);
            border-radius: 8px;
            color: var(--text3);
            font-size: 16px;
            background: none;
            cursor: pointer;
            transition: all .2s
        }

        .add-shift-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
            background: rgba(139, 92, 246, 0.05)
        }

        /* Employees */
        .emp-card {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 16px
        }

        .emp-avatar {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 14px;
            flex-shrink: 0
        }

        .emp-info {
            flex: 1;
            min-width: 0
        }

        .emp-name {
            font-weight: 600;
            font-size: 14px
        }

        .emp-email {
            font-size: 12px;
            color: var(--text3);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis
        }

        .emp-actions {
            display: flex;
            gap: 6px
        }

        /* Reports */
        .report-summary {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 12px;
            margin-bottom: 20px
        }

        .report-card {
            text-align: center;
            padding: 16px
        }

        .report-val {
            font-size: 24px;
            font-weight: 800;
            letter-spacing: -0.5px
        }

        .report-lbl {
            font-size: 11px;
            color: var(--text2);
            margin-top: 2px
        }

        /* Animations */
        @keyframes fadeIn {
            from {
                opacity: 0
            }

            to {
                opacity: 1
            }
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px)
            }

            to {
                opacity: 1;
                transform: translateY(0)
            }
        }

        .page {
            display: none;
            animation: fadeIn .25s
        }

        .page.active {
            display: block
        }

        /* Toast */
        .toast {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 12px 20px;
            border-radius: 10px;
            font-size: 13px;
            font-weight: 600;
            z-index: 300;
            animation: slideDown .3s;
            box-shadow: var(--shadow)
        }

        .toast-success {
            background: var(--green);
            color: #fff
        }

        .toast-error {
            background: var(--red);
            color: #fff
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-12px)
            }

            to {
                opacity: 1;
                transform: translateY(0)
            }
        }

        /* Empty state */
        .empty {
            text-align: center;
            padding: 40px 20px;
            color: var(--text3)
        }

        .empty .empty-icon {
            font-size: 40px;
            margin-bottom: 12px;
            opacity: .5
        }

        .empty .empty-text {
            font-size: 14px
        }

        /* Mobile */
        @media(max-width:900px) {
            .sidebar {
                position: fixed;
                left: 0;
                top: 0;
                bottom: 0;
                transform: translateX(-100%);
                box-shadow: 4px 0 30px rgba(0, 0, 0, .5)
            }

            .sidebar.open {
                transform: translateX(0)
            }

            .sidebar-overlay {
                position: fixed;
                inset: 0;
                background: rgba(0, 0, 0, 0.5);
                z-index: 99;
                display: none
            }

            .sidebar-overlay.show {
                display: block
            }

            .hamburger {
                display: block
            }

            .content {
                padding: 16px
            }

            .topbar {
                padding: 0 16px
            }

            .stats-grid {
                grid-template-columns: 1fr 1fr
            }

            .form-row {
                grid-template-columns: 1fr
            }

            /* Calendar responsive - horizontal scroll on mobile */
            .calendar-grid {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .cal-table {
                min-width: 700px;
            }

            .cal-loc-col {
                width: 80px;
                min-width: 70px;
            }

            .cal-loc-label {
                font-size: 8px;
                padding: 6px 4px;
            }

            .cal-day-th {
                font-size: 9px;
                padding: 6px 2px;
            }

            .cal-day-th .day-num {
                font-size: 16px;
            }

            .cal-cell .shift-chip .chip-name {
                font-size: 9px;
            }

            .cal-cell .shift-chip .chip-time {
                font-size: 8px;
            }

            /* Week nav responsive */
            .week-nav {
                flex-wrap: wrap;
                gap: 8px;
                justify-content: center
            }

            .week-label {
                width: 100%;
                text-align: center;
                font-size: 14px;
                order: -1
            }

            .week-nav .btn {
                font-size: 11px;
                padding: 6px 10px
            }

            /* Modals responsive */
            .modal {
                width: 95vw !important;
                max-width: 95vw !important;
                max-height: 90vh;
                margin: 5vh auto;
                overflow-y: auto
            }

            .modal-body {
                max-height: 60vh;
                overflow-y: auto
            }

            /* Tables responsive */
            .table-wrap {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch
            }

            table {
                font-size: 12px
            }

            th,
            td {
                padding: 8px 10px
            }

            /* Cards on mobile */
            .emp-card,
            .user-card,
            .tpl-card {
                padding: 10px 12px;
                gap: 10px
            }

            .emp-avatar {
                width: 34px;
                height: 34px;
                font-size: 12px
            }

            .emp-name {
                font-size: 13px
            }

            .emp-email {
                font-size: 11px
            }

            .emp-actions .btn-icon {
                width: 30px;
                height: 30px;
                font-size: 14px
            }

            /* Report cards */
            .report-summary {
                grid-template-columns: 1fr 1fr;
                gap: 8px
            }

            .report-val {
                font-size: 20px
            }

            /* Stat cards */
            .stat-card .stat-value {
                font-size: 22px
            }

            .stat-card .stat-icon {
                width: 36px;
                height: 36px;
                font-size: 16px
            }

            /* Login responsive */
            .login-box {
                padding: 20px;
                width: 95%;
                max-width: 380px
            }

            .login-box h1 {
                font-size: 20px
            }

            /* Alerts on mobile */
            .alerts-box {
                padding: 10px 14px
            }

            .alert-item {
                font-size: 11px;
                padding: 8px 10px
            }

            /* Topbar title */
            .topbar h1 {
                font-size: 16px
            }

            /* Shift chips on mobile calendar */
            .shift-chip .chip-name {
                font-size: 11px
            }

            .shift-chip .chip-time {
                font-size: 10px
            }

            .loc-group-header {
                font-size: 10px
            }

            /* Settings card */
            #pageSettings .card {
                max-width: 100% !important
            }
        }

        @media(max-width:500px) {
            .stats-grid {
                grid-template-columns: 1fr
            }

            .report-summary {
                grid-template-columns: 1fr
            }

            /* Even smaller text on tiny screens */
            .topbar h1 {
                font-size: 14px
            }

            .content {
                padding: 12px
            }

            .card {
                padding: 14px;
                border-radius: 10px
            }

            .card-title {
                font-size: 13px
            }

            .week-nav .btn {
                font-size: 10px;
                padding: 5px 8px
            }

            .modal {
                width: 98vw !important;
                max-width: 98vw !important;
                border-radius: 12px
            }

            .form-input,
            .form-select {
                font-size: 14px;
                padding: 10px 12px
            }

            /* Bottom safe area for iOS */
            .sidebar-footer {
                padding-bottom: env(safe-area-inset-bottom, 12px)
            }
        }

        /* Touch improvements */
        @media(hover: none) and (pointer: coarse) {

            .btn,
            .btn-icon,
            .nav-item,
            .shift-chip,
            .loc-add-btn {
                min-height: 44px;
                min-width: 44px
            }

            .nav-item {
                padding: 12px 16px
            }

            .btn-sm {
                min-height: 36px;
                padding: 8px 14px
            }

            .loc-add-btn {
                width: 28px;
                height: 28px
            }

            .shift-chip {
                padding: 8px 10px
            }

            .emp-actions .btn-icon {
                min-width: 36px;
                min-height: 36px
            }
        }

        /* Schedule Alerts */
        .alerts-box {
            border-radius: var(--radius);
            padding: 14px 18px;
            margin-bottom: 16px
        }

        .alerts-box.warning {
            background: var(--amber2);
            border: 1px solid rgba(245, 158, 11, .3)
        }

        .alerts-box.critical {
            background: var(--red2);
            border: 1px solid rgba(239, 68, 68, .3);
            animation: pulse-alert 2s ease-in-out infinite
        }

        .alerts-box.ok {
            background: var(--green2);
            border: 1px solid rgba(34, 197, 94, .3)
        }

        @keyframes pulse-alert {

            0%,
            100% {
                opacity: 1
            }

            50% {
                opacity: .85
            }
        }

        .alerts-header {
            display: flex;
            align-items: center;
            justify-content: space-between
        }

        .alerts-title {
            font-weight: 600;
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 8px
        }

        .alerts-count {
            font-size: 11px;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 10px;
            color: #fff
        }

        .alerts-box.warning .alerts-count {
            background: var(--amber)
        }

        .alerts-box.critical .alerts-count {
            background: var(--red)
        }

        .alerts-toggle {
            background: var(--surface);
            border: 1px solid var(--border);
            color: var(--text2);
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 11px;
            cursor: pointer;
            font-family: inherit
        }

        .alerts-list {
            display: none;
            margin-top: 10px
        }

        .alerts-list.visible {
            display: block
        }

        .alert-item {
            background: var(--surface);
            border-radius: 8px;
            padding: 10px 12px;
            margin-bottom: 6px;
            font-size: 12px;
            border-left: 3px solid var(--amber)
        }

        .alert-item.critical {
            border-left-color: var(--red)
        }

        .alert-item:last-child {
            margin-bottom: 0
        }

        .alert-type {
            font-weight: 700;
            font-size: 10px;
            text-transform: uppercase;
            margin-bottom: 3px;
            color: var(--text3)
        }

        .alert-msg {
            color: var(--text2);
            line-height: 1.4
        }

        /* Force create banner */
        .force-banner {
            background: var(--amber2);
            border: 1px solid rgba(245, 158, 11, .3);
            border-radius: var(--radius);
            padding: 12px 16px;
            margin-top: 10px
        }

        .force-banner p {
            font-size: 12px;
            color: var(--amber);
            margin-bottom: 8px
        }

        .force-banner .btn {
            font-size: 12px
        }

        /* Users page */
        .user-card {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 16px
        }

        .user-badge {
            font-size: 10px;
            padding: 2px 8px;
            border-radius: 6px;
            font-weight: 600;
            text-transform: uppercase
        }

        .user-badge.admin {
            background: rgba(139, 92, 246, .15);
            color: var(--accent2)
        }

        .user-badge.supervisor {
            background: rgba(59, 130, 246, .15);
            color: var(--blue)
        }

        .user-badge.employee {
            background: var(--green2);
            color: var(--green)
        }

        /* Templates page */
        .tpl-card {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px
        }

        .tpl-time {
            font-size: 13px;
            font-weight: 600;
            color: var(--accent2)
        }

        .tpl-loc {
            font-size: 11px;
            color: var(--text3)
        }

        /* Acknowledgments */
        .ack-status {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            font-weight: 600;
            padding: 3px 8px;
            border-radius: 6px
        }

        .ack-status.seen {
            background: var(--green2);
            color: var(--green)
        }

        .ack-status.unseen {
            background: var(--red2);
            color: var(--red)
        }

        /* Supervisor view */
        .sup-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 16px;
            margin-bottom: 12px
        }

        .sup-shift-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid var(--border)
        }

        .sup-shift-row:last-child {
            border-bottom: none
        }

        /* Operator view info */
        .op-info-bar {
            background: var(--accent2);
            color: #fff;
            font-size: 12px;
            padding: 6px 12px;
            border-radius: var(--radius);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 600
        }

        /* Form check */
        .form-check {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            color: var(--text1);
            cursor: pointer
        }

        .form-check input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--accent);
            cursor: pointer
        }

        /* Loading */
        .spinner {
            width: 28px;
            height: 28px;
            border: 3px solid var(--border);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin .6s linear infinite;
            margin: 20px auto
        }

        @keyframes spin {
            to {
                transform: rotate(360deg)
            }
        }

        .loading-text {
            text-align: center;
            color: var(--text3);
            font-size: 13px;
            margin-top: 8px
        }
