@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

        :root {
            --sidebar-width: 270px;
            --sidebar-bg: #0f172a;
            --sidebar-active: #3b82f6;
            --sidebar-hover: #1e293b;
            --primary-bg: #f8fafc;
            --card-bg: #ffffff;
            --text-main: #0f172a;
            --text-muted: #64748b;
            --border-color: #e2e8f0;
            --success: #10b981;
            --danger: #ef4444;
            --warning: #f59e0b;
            --info: #3b82f6;
            --radius: 14px;
            --radius-sm: 10px;
            --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
            --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
            --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
            --shadow-xl: 0 20px 40px -10px rgba(0,0,0,0.12);
        }

        * { box-sizing: border-box; }

        body {
            font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
            margin: 0;
            padding: 0;
            background: var(--primary-bg);
            color: var(--text-main);
            line-height: 1.5;
            -webkit-font-smoothing: antialiased;
        }

        /* --- SIDEBAR --- */
        .sidebar {
            position: fixed;
            top: 0;
            left: 0;
            width: var(--sidebar-width);
            height: 100vh;
            background: var(--sidebar-bg);
            color: #fff;
            display: flex;
            flex-direction: column;
            z-index: 1000;
            transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: var(--shadow-xl);
        }
        .sidebar-header {
            padding: 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            background: linear-gradient(135deg, rgba(59,130,246,0.15), transparent);
        }
        .sidebar-header h2 {
            margin: 0;
            font-size: 1.1rem;
            font-weight: 800;
            letter-spacing: -0.3px;
        }
        .sidebar-header span {
            font-size: 0.68rem;
            opacity: 0.45;
            text-transform: uppercase;
            letter-spacing: 1.8px;
            margin-top: 6px;
            display: block;
            font-weight: 600;
        }
        .sidebar-nav {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem 0;
        }
        .nav-section-label {
            font-size: 0.62rem;
            text-transform: uppercase;
            letter-spacing: 1.4px;
            color: rgba(255,255,255,0.3);
            padding: 1.2rem 1.5rem 0.6rem;
            font-weight: 700;
        }
        .nav-link {
            display: flex;
            align-items: center;
            padding: 0.6rem 1.5rem;
            color: rgba(255,255,255,0.55);
            text-decoration: none;
            font-size: 0.85rem;
            font-weight: 500;
            transition: all 0.2s;
            border-left: 3px solid transparent;
            cursor: pointer;
            gap: 10px;
            margin: 2px 0;
        }
        .nav-link:hover {
            background: var(--sidebar-hover);
            color: #fff;
        }
        .nav-link.active {
            background: rgba(59,130,246,0.12);
            color: #fff;
            border-left-color: var(--sidebar-active);
        }
        .nav-icon {
            width: 20px;
            text-align: center;
            opacity: 0.8;
            font-size: 1rem;
        }
        .sidebar-footer {
            padding: 1rem 1.25rem;
            border-top: 1px solid rgba(255,255,255,0.06);
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .sidebar-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            padding: 0.65rem;
            border-radius: 10px;
            border: none;
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            color: #fff;
            letter-spacing: 0.2px;
        }
        .sidebar-btn:hover { transform: translateY(-1px); opacity: 0.92; }
        .sidebar-btn-daily { background: #334155; }
        .sidebar-btn-weekly { background: var(--info); }
        .mobile-toggle {
            display: none;
            width: 100%;
            background: rgba(255,255,255,0.1);
            color: white;
            border: none;
            padding: 0.75rem;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.85rem;
        }

        /* --- MAIN --- */
        .main-content {
            margin-left: var(--sidebar-width);
            min-height: 100vh;
            transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 2rem;
        }

        /* --- HEADER --- */
        .brand-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.75rem;
            flex-wrap: wrap;
            gap: 15px;
            padding: 1.5rem 2rem;
            background: var(--card-bg);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
        }
        .brand-text h1 {
            margin: 0;
            font-size: 1.6rem;
            font-weight: 800;
            color: var(--text-main);
            letter-spacing: -0.5px;
            line-height: 1.2;
        }
        .brand-text p {
            margin: 6px 0 0;
            font-size: 0.8rem;
            color: var(--text-muted);
            font-weight: 500;
        }
        .brand-logo img {
            height: 52px;
            width: auto;
            opacity: 0.9;
        }
        .instructions {
            background: linear-gradient(135deg, #fffbeb, #fef3c7);
            border: 1px solid #fde68a;
            border-left: 4px solid var(--warning);
            padding: 14px 18px;
            border-radius: var(--radius);
            font-size: 0.85rem;
            color: #92400e;
            margin-bottom: 1.75rem;
            font-weight: 500;
            box-shadow: var(--shadow-sm);
        }

        /* --- CARDS --- */
        .card {
            background: var(--card-bg);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 1.5rem 2rem;
            margin-bottom: 1.25rem;
            border: 1px solid var(--border-color);
            transition: box-shadow 0.25s, transform 0.25s;
        }
        .card:hover { box-shadow: var(--shadow-md); }
        .card-title {
            font-size: 0.78rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-muted);
            margin-bottom: 1.25rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* --- FORMS --- */
        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 1.25rem;
            align-items: end;
        }
        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .form-group label {
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }
        .form-group input,
        .form-group select {
            padding: 11px 14px;
            border: 1.5px solid var(--border-color);
            border-radius: var(--radius-sm);
            font-size: 0.9rem;
            background: #fff;
            transition: all 0.2s;
            color: var(--text-main);
            font-family: inherit;
            font-weight: 500;
        }
        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: var(--info);
            box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
        }
        .form-group input[readonly] {
            background: #f8fafc;
            color: var(--text-muted);
            cursor: not-allowed;
        }
        .form-group select {
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            padding-right: 36px;
        }

        /* --- AREA SECTIONS --- */
        .area {
            margin-bottom: 1.5rem;
            border-radius: var(--radius);
            background: var(--card-bg);
            box-shadow: var(--shadow);
            overflow: hidden;
            border: 1px solid var(--border-color);
            scroll-margin-top: 24px;
        }
        .area h2 {
            background: var(--cat-color, #334155);
            color: white;
            margin: 0;
            padding: 14px 22px;
            font-size: 0.95rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: sticky;
            top: 0;
            z-index: 50;
            letter-spacing: 0.2px;
        }
        .area-badge {
            font-size: 0.7rem;
            background: rgba(255,255,255,0.18);
            padding: 4px 12px;
            border-radius: 20px;
            font-weight: 600;
        }

        table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            font-size: 0.85rem;
        }
        th, td {
            padding: 10px 8px;
            border-bottom: 1px solid var(--border-color);
            text-align: center;
            vertical-align: middle;
        }
        thead th {
            background: #f8fafc;
            font-size: 0.65rem;
            text-transform: uppercase;
            color: var(--text-muted);
            font-weight: 700;
            letter-spacing: 0.6px;
            white-space: nowrap;
            border-bottom: 2px solid var(--border-color);
            position: sticky;
            top: 48px;
            z-index: 40;
        }
        tbody tr:hover { background: #fafafa; }
        tbody tr:last-child td { border-bottom: none; }
        td:first-child {
            text-align: left;
            font-weight: 600;
            color: var(--text-main);
            white-space: nowrap;
            min-width: 90px;
            padding-left: 22px;
        }

        .remark {
            width: 100%;
            min-width: 70px;
            box-sizing: border-box;
            height: 38px;
            border: 1.5px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.8rem;
            padding: 0 10px;
            transition: all 0.2s;
            font-family: inherit;
            font-weight: 500;
        }
        .remark:focus {
            outline: none;
            border-color: var(--info);
            box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
        }

        .repair-date, .done-date {
            width: 100%;
            min-width: 85px;
            height: 38px;
            border: 1.5px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.8rem;
            padding: 0 10px;
            background: #f8fafc;
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
            font-weight: 500;
        }
        .repair-date.active {
            background: #fff;
            color: var(--text-main);
            border-color: var(--danger);
        }
        .repair-date.active:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
        }
        .done-date:focus {
            outline: none;
            border-color: var(--success);
            box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
        }
        .done-date.has-value {
            background: #f0fdf4;
            border-color: var(--success);
            color: #166534;
            font-weight: 600;
        }

        input[type="radio"] {
            width: 18px;
            height: 18px;
            accent-color: var(--cat-color, var(--info));
            cursor: pointer;
        }

        /* --- PHOTO COLUMN --- */
        .photo-cell {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            min-width: 80px;
            position: relative;
        }
        .photo-trigger {
            background: #eff6ff;
            border: 1.5px dashed #bfdbfe;
            color: var(--info);
            font-size: 0.72rem;
            font-weight: 600;
            cursor: pointer;
            padding: 7px 10px;
            border-radius: 8px;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            white-space: nowrap;
        }
        .photo-trigger:hover {
            background: #dbeafe;
            border-color: var(--info);
            transform: translateY(-1px);
        }
        .photo-preview-wrapper {
            position: relative;
            display: none;
            flex-direction: column;
            align-items: center;
            gap: 6px;
        }
        .photo-preview {
            width: 50px;
            height: 50px;
            object-fit: cover;
            border-radius: 10px;
            border: 2px solid var(--border-color);
            background: #f8fafc;
            cursor: pointer;
            transition: all 0.2s;
            display: block;
        }
        .photo-preview:hover {
            transform: scale(1.08);
            border-color: var(--info);
            box-shadow: 0 4px 12px rgba(59,130,246,0.2);
        }
        .photo-preview[alt="Error"] {
            opacity: 0.5;
            border-color: var(--danger);
        }
        .photo-remove {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: none;
            background: var(--danger);
            color: #fff;
            font-size: 10px;
            line-height: 20px;
            text-align: center;
            cursor: pointer;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 6px rgba(239,68,68,0.3);
            transition: all 0.15s;
            margin-top: 2px;
        }
        .photo-remove:hover {
            transform: scale(1.15);
            background: #dc2626;
        }
        .photo-url-hidden { display: none; }

        .photo-cell.has-photo .photo-trigger { display: none; }
        .photo-cell.has-photo .photo-preview-wrapper { display: flex; }

        /* --- CATEGORY COLORS --- */
        .area-common-area       { --cat-color: #2563eb; }
        .area-comfort-rooms     { --cat-color: #7c3aed; }
        .area-loading-bay       { --cat-color: #ea580c; }
        .area-offices           { --cat-color: #059669; }
        .area-building-facilities { --cat-color: #dc2626; }
        .area-building-perimeter  { --cat-color: #475569; }

        /* --- BUTTONS --- */
        .btn-group {
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 2rem;
            padding-top: 1.5rem;
            border-top: 1px solid var(--border-color);
        }
        button {
            border: none;
            padding: 0.85rem 2rem;
            border-radius: 12px;
            cursor: pointer;
            font-weight: 700;
            font-size: 0.9rem;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-family: inherit;
            letter-spacing: 0.2px;
        }
        button:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }
        button:active { transform: translateY(0); }
        .btn-primary {
            background: linear-gradient(135deg, var(--success), #059669);
            color: white;
            box-shadow: 0 4px 14px rgba(16,185,129,0.3);
        }
        .btn-primary:hover { box-shadow: 0 6px 20px rgba(16,185,129,0.4); }
        .btn-secondary {
            background: linear-gradient(135deg, #475569, #334155);
            color: white;
        }
        .btn-warning {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: white;
        }
        .btn-danger {
            background: linear-gradient(135deg, #ef4444, #dc2626);
            color: white;
        }
        .btn-info {
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            color: white;
        }
        button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
            box-shadow: none;
        }

        /* --- VIEW TOGGLE --- */
        .view-section { display: none; }
        .view-section.active { display: block; }

        /* --- ANALYSIS PAGE --- */
        .analysis-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        .analysis-summary {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        .summary-card {
            background: var(--card-bg);
            border-radius: var(--radius);
            padding: 1.25rem;
            box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            text-align: center;
        }
        .summary-card h4 {
            margin: 0 0 0.5rem;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: var(--text-muted);
        }
        .summary-card .big-number {
            font-size: 2rem;
            font-weight: 800;
            color: var(--text-main);
            line-height: 1;
        }
        .summary-card .big-number.small { font-size: 1.4rem; }
        .analysis-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
            gap: 1.25rem;
        }
        .location-card {
            background: var(--card-bg);
            border-radius: var(--radius);
            padding: 1.5rem;
            box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            transition: box-shadow 0.2s;
        }
        .location-card:hover { box-shadow: var(--shadow-md); }
        .location-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }
        .location-header h3 {
            margin: 0;
            font-size: 1.05rem;
            font-weight: 700;
        }
        .location-rate {
            font-size: 1.4rem;
            font-weight: 800;
        }
        .progress-bar {
            height: 10px;
            background: #e2e8f0;
            border-radius: 5px;
            overflow: hidden;
            margin-bottom: 0.5rem;
        }
        .progress-fill {
            height: 100%;
            border-radius: 5px;
            transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .location-stats {
            font-size: 0.8rem;
            color: var(--text-muted);
            font-weight: 500;
            margin-bottom: 1rem;
        }
        .area-breakdown {
            border-top: 1px solid var(--border-color);
            padding-top: 0.75rem;
        }
        .area-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 0;
            font-size: 0.82rem;
            border-bottom: 1px solid #f8fafc;
        }
        .area-row:last-child { border-bottom: none; }
        .area-row span:first-child {
            font-weight: 600;
            color: var(--text-main);
        }
        .area-row .area-rate {
            font-weight: 700;
            font-size: 0.78rem;
            padding: 2px 8px;
            border-radius: 6px;
            background: #f1f5f9;
        }
        .area-row.muted span { color: var(--text-muted); }
        .area-row.muted .area-rate {
            background: transparent;
            color: var(--text-muted);
            font-weight: 500;
        }
        .analysis-empty {
            text-align: center;
            padding: 4rem 2rem;
            color: var(--text-muted);
        }
        .analysis-empty h3 {
            margin: 0 0 0.5rem;
            color: var(--text-main);
        }

        /* --- MODAL --- */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.6);
            backdrop-filter: blur(4px);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }
        .modal-overlay.active {
            opacity: 1;
            pointer-events: all;
        }
        .modal {
            background: var(--card-bg);
            border-radius: var(--radius);
            padding: 2rem;
            width: 90%;
            max-width: 440px;
            box-shadow: var(--shadow-xl);
            transform: translateY(20px) scale(0.96);
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            border: 1px solid var(--border-color);
        }
        .modal-overlay.active .modal {
            transform: translateY(0) scale(1);
        }
        .modal-title {
            font-size: 1.15rem;
            font-weight: 800;
            margin: 0 0 0.5rem;
            color: var(--text-main);
        }
        .modal-text {
            font-size: 0.9rem;
            color: var(--text-muted);
            margin-bottom: 1.5rem;
            line-height: 1.6;
        }
        .modal-input {
            width: 100%;
            padding: 12px 14px;
            border: 1.5px solid var(--border-color);
            border-radius: var(--radius-sm);
            font-size: 0.9rem;
            font-family: inherit;
            margin-bottom: 1.25rem;
            transition: all 0.2s;
        }
        .modal-input:focus {
            outline: none;
            border-color: var(--info);
            box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
        }
        .modal-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }
        .modal-actions button {
            padding: 0.65rem 1.25rem;
            font-size: 0.85rem;
        }

        /* --- ADMIN BADGE --- */
        .admin-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: linear-gradient(135deg, #8b5cf6, #7c3aed);
            color: white;
            font-size: 0.72rem;
            font-weight: 700;
            padding: 4px 12px;
            border-radius: 20px;
            margin-left: 8px;
            animation: pulse 2s infinite;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        /* --- TOAST --- */
        .toast-container {
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .toast {
            background: white;
            border-radius: var(--radius);
            padding: 14px 20px;
            box-shadow: var(--shadow-xl);
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 300px;
            max-width: 440px;
            animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            border-left: 4px solid var(--info);
            font-size: 0.9rem;
            font-weight: 500;
            border: 1px solid var(--border-color);
        }
        .toast.success { border-left-color: var(--success); }
        .toast.error   { border-left-color: var(--danger); }
        .toast.warning { border-left-color: var(--warning); }
        @keyframes slideIn {
            from { transform: translateX(120%) scale(0.9); opacity: 0; }
            to   { transform: translateX(0) scale(1); opacity: 1; }
        }

        /* --- WEEKLY PRINT --- */
        #weekly-print-area { display: none; }

        /* --- MOBILE --- */
        @media screen and (max-width: 900px) {
            .sidebar { transform: translateX(-100%); }
            .sidebar.open { transform: translateX(0); }
            .main-content { margin-left: 0; }
            .mobile-toggle { display: block; }
            .mobile-menu-btn {
                display: flex;
                align-items: center;
                justify-content: center;
                position: fixed;
                top: 16px;
                left: 16px;
                z-index: 999;
                background: var(--sidebar-bg);
                color: white;
                border: none;
                width: 44px;
                height: 44px;
                border-radius: 12px;
                font-size: 1.2rem;
                cursor: pointer;
                box-shadow: var(--shadow-lg);
            }
            .container { padding: 1rem; padding-top: 70px; }
            .brand-header { flex-direction: column; text-align: center; padding: 1.25rem; }
            .form-grid { grid-template-columns: 1fr; }
            .analysis-grid { grid-template-columns: 1fr; }
            .analysis-header { flex-direction: column; align-items: stretch; }

            #checklist-container table,
            #checklist-container thead,
            #checklist-container tbody,
            #checklist-container th,
            #checklist-container td,
            #checklist-container tr { display: block; }
            #checklist-container thead { display: none; }
            #checklist-container tr {
                border: 1px solid var(--border-color);
                margin-bottom: 14px;
                padding: 16px;
                background: var(--card-bg);
                border-radius: var(--radius);
                box-shadow: var(--shadow);
            }
            #checklist-container td {
                border: none;
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 8px 0;
                width: 100% !important;
                flex-wrap: wrap;
                gap: 4px;
            }
            #checklist-container td:first-child {
                font-size: 1rem;
                color: var(--cat-color);
                border-bottom: 2px solid var(--border-color);
                margin-bottom: 8px;
                padding-bottom: 12px;
                font-weight: 700;
            }
            #checklist-container td:not(:first-child):before {
                content: attr(data-label);
                font-weight: 700;
                font-size: 0.7rem;
                color: var(--text-muted);
                text-transform: uppercase;
                flex-shrink: 0;
            }
            .photo-cell {
                flex-direction: row;
                flex-wrap: wrap;
                justify-content: flex-end;
                gap: 6px;
            }
            .repair-date, .done-date { min-width: 120px; }
            input[type="radio"] { width: 22px; height: 22px; }
            .btn-group { flex-direction: column; width: 100%; }
            button { width: 100%; justify-content: center; }
        }

        @media print {
            @page { size: A4 landscape; margin: 8mm; }
            body {
                background: white;
                padding: 0;
                font-size: 0.62rem;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
            }
            .sidebar, .mobile-menu-btn, .toast-container, .modal-overlay { display: none !important; }
            .main-content { margin-left: 0 !important; }
            .container {
                box-shadow: none;
                max-width: none;
                padding: 0;
                margin: 0;
                width: 100%;
            }
            .card { box-shadow: none; border: 1px solid #ddd; padding: 0.6rem 0.8rem; margin-bottom: 0.8rem; }
            .card-title { font-size: 0.6rem; margin-bottom: 0.5rem; }
            .brand-header { padding: 0.6rem 0.8rem; margin-bottom: 0.8rem; }
            .brand-text h1 { font-size: 1rem; }
            .brand-text p { font-size: 0.6rem; }
            .brand-logo img { height: 32px; }
            .instructions { font-size: 0.6rem; padding: 6px 10px; margin-bottom: 0.8rem; }
            button, .btn-group, .toast-container, .history-section, .instructions,
            .photo-trigger, .photo-remove { display: none !important; }
            .area { margin-bottom: 0.8rem; page-break-inside: avoid; }
            .area + .area { page-break-before: always; }
            .area h2 {
                background: #eee !important;
                color: black !important;
                border: 1px solid #ccc;
                position: static;
                font-size: 0.72rem;
                padding: 6px 12px;
            }
            .area-badge { font-size: 0.55rem; padding: 2px 8px; }
            table { display: table !important; width: 100% !important; font-size: 0.6rem; table-layout: fixed; }
            thead { display: table-header-group !important; }
            tbody { display: table-row-group !important; }
            tr {
                display: table-row !important;
                border: none !important;
                page-break-inside: avoid;
            }
            th, td {
                display: table-cell !important;
                border: 1px solid #ccc !important;
                padding: 3px 4px !important;
                font-size: 0.6rem !important;
                overflow-wrap: break-word;
            }
            th { font-size: 0.55rem !important; padding: 4px 4px !important; }
            td:first-child { font-size: 0.6rem !important; padding-left: 8px !important; min-width: auto; width: 22%; }
            td:not(:first-child):before { content: none !important; }
            .remark { height: 22px; font-size: 0.55rem; padding: 0 4px; }
            .repair-date, .done-date { height: 22px; font-size: 0.55rem; padding: 0 4px; background: white !important; border: 1px solid #ccc !important; }
            input[type="radio"] { width: 12px; height: 12px; }
            .photo-preview { width: 22px !important; height: 22px !important; border-radius: 3px; }
            body.printing-weekly { width: 297mm; }
            body.printing-weekly #checklist-container,
            body.printing-weekly .history-section,
            body.printing-weekly #inspection-details,
            body.printing-weekly .instructions,
            body.printing-weekly .btn-group,
            body.printing-weekly #analysis-view { display: none !important; }
            body.printing-weekly #weekly-print-area { display: block !important; }
            body.printing-daily #weekly-print-area { display: none !important; }
            #weekly-print-area .area { page-break-inside: avoid; }
            #weekly-print-area .area + .area { page-break-before: always; }
            #weekly-print-area table { table-layout: fixed; width: 100%; }
            #weekly-print-area th { width: 12.5%; }
            #weekly-print-area th:first-child { width: 25%; }
        }