/* ===== BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #0066CC; --primary-dark: #004C99; --primary-light: #E6F0FF;
    --accent: #00B4D8; --dark: #0A1628; --dark-2: #111D33;
    --gray-900: #1a1a2e; --gray-700: #4A5568; --gray-500: #718096;
    --gray-300: #CBD5E0; --gray-200: #E2E8F0; --gray-100: #F7FAFC;
    --white: #FFFFFF; --green: #10B981; --orange: #F59E0B; --red: #EF4444; --purple: #8B5CF6;
    --radius: 10px; --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08); --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --sidebar-w: 260px;
}
html { font-size: 15px; }
body { font-family: 'Inter', -apple-system, sans-serif; color: var(--gray-700); line-height: 1.6; background: var(--gray-100); }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: var(--primary); } a:hover { text-decoration: underline; }
h1,h2,h3,h4 { color: var(--dark); line-height: 1.3; font-weight: 700; }
.link { color: var(--primary); font-weight: 600; font-size: 0.85rem; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 22px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; cursor: pointer; border: 1.5px solid transparent; transition: 0.2s; font-family: inherit; }
.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline-dark { background: transparent; color: var(--dark); border-color: var(--gray-300); }
.btn-outline-dark:hover { background: var(--dark); color: var(--white); border-color: var(--dark); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-full { width: 100%; }
.text-green { color: var(--green); font-weight: 600; }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 0.75rem; font-weight: 600; }
.badge-green { background: #D1FAE5; color: #065F46; }
.badge-orange { background: #FEF3C7; color: #92400E; }
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-gray { background: var(--gray-200); color: var(--gray-500); }
.badge-red { background: #FEE2E2; color: #991B1B; }
.badge-starter { background: var(--primary-light); color: var(--primary); font-size: 0.85rem; padding: 6px 16px; }
.plan-badge { white-space: nowrap; }

/* ===== VIEWS ===== */
.view { display: none; } .view.active { display: block; }

/* ===== AUTH PAGES ===== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%); }
.auth-card { background: var(--white); border-radius: var(--radius-lg); padding: 48px 40px; width: 100%; max-width: 440px; box-shadow: var(--shadow-md); }
.auth-card-wide { max-width: 600px; }
.auth-logo { margin-bottom: 28px; } .auth-logo img { height: 50px; margin: 0 auto; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; text-align: center; }
.auth-sub { text-align: center; color: var(--gray-500); margin-bottom: 28px; font-size: 0.92rem; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 0.88rem; color: var(--gray-500); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 5px; color: var(--dark); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-300); border-radius: 8px;
    font-size: 0.9rem; font-family: inherit; color: var(--dark); background: var(--white); outline: none; transition: 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }
.form-group input:disabled { background: var(--gray-100); color: var(--gray-500); }
.form-row { display: flex; gap: 16px; } .form-row .form-group { flex: 1; }
.form-hint { font-size: 0.8rem; color: var(--gray-500); margin-top: 4px; }
.form-divider { border: none; border-top: 1px solid var(--gray-200); margin: 24px 0; }
.form-section-title { font-size: 1.1rem; margin-bottom: 4px; }
.form-section-desc { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 16px; }
.checkbox-label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 0.85rem !important; color: var(--gray-500) !important; cursor: pointer; }
.checkbox-label input { margin-top: 3px; }
.file-upload { position: relative; }
.file-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-upload-label { display: flex; align-items: center; gap: 10px; padding: 14px; border: 2px dashed var(--gray-300); border-radius: 8px; color: var(--gray-500); font-size: 0.88rem; transition: 0.2s; }
.file-upload:hover .file-upload-label { border-color: var(--primary); color: var(--primary); }
.file-icon { font-size: 1.3rem; }

/* ===== DASHBOARD LAYOUT ===== */
.dashboard { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--dark); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; }
.sidebar-logo { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-logo img { height: 32px; }
.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; color: rgba(255,255,255,0.55); font-size: 0.88rem; font-weight: 500; transition: 0.15s; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); text-decoration: none; }
.nav-item.active { background: rgba(0,180,216,0.12); color: var(--accent); }
.nav-group-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.3); padding: 18px 14px 6px; }
.nav-item svg { flex-shrink: 0; }
.sidebar-user { padding: 16px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.82rem; flex-shrink: 0; }
.user-avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.user-info { flex: 1; }
.user-name { display: block; color: var(--white); font-weight: 600; font-size: 0.88rem; }
.user-plan { font-size: 0.75rem; color: var(--accent); }
.sidebar-user-clickable { cursor: pointer; border-radius: 8px; transition: 0.15s; padding: 12px !important; }
.sidebar-user-clickable:hover { background: rgba(255,255,255,0.06); }
.logout-btn { color: rgba(255,255,255,0.3); transition: 0.2s; } .logout-btn:hover { color: var(--red); }
.main-content { flex: 1; margin-left: var(--sidebar-w); padding: 32px; }

/* Mobile */
.mobile-header { display: none; position: fixed; top: 0; left: 0; right: 0; height: 56px; background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 0 16px; align-items: center; justify-content: space-between; z-index: 90; }
.mobile-logo { height: 28px; }
.mobile-toggle { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 4px; }
.mobile-toggle span { width: 22px; height: 2px; background: var(--dark); border-radius: 2px; }

/* ===== TABS ===== */
.tab { display: none; } .tab.active { display: block; }

/* ===== PAGE HEADER ===== */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 1.6rem; margin-bottom: 4px; }
.page-header p { color: var(--gray-500); font-size: 0.9rem; }

/* ===== STATS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; }
.stat-card-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-card-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-card-icon.green { background: #D1FAE5; color: var(--green); }
.stat-card-icon.orange { background: #FEF3C7; color: var(--orange); }
.stat-card-icon.purple { background: #EDE9FE; color: var(--purple); }
.stat-card-value { display: block; font-size: 1.4rem; font-weight: 800; color: var(--dark); }
.stat-card-label { font-size: 0.78rem; color: var(--gray-500); }

/* ===== CARDS ===== */
.card { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header h3 { font-size: 1.05rem; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* ===== NEXT BOOKING ===== */
.next-booking { display: flex; gap: 20px; align-items: center; margin-bottom: 16px; }
.next-booking-date { background: var(--primary); color: var(--white); border-radius: 12px; width: 64px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.nb-day { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.nb-month { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }
.next-booking-details strong { display: block; margin-bottom: 2px; }
.next-booking-details p { font-size: 0.85rem; color: var(--gray-500); }
.nb-status { color: var(--green) !important; font-weight: 500; }

/* ===== LAST MINUTE (overview) ===== */
.lm-list { display: flex; flex-direction: column; gap: 12px; }
.lm-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: var(--gray-100); border-radius: 8px; }
.lm-item strong { font-size: 0.9rem; } .lm-item p { font-size: 0.82rem; color: var(--gray-500); }

/* ===== ACTIVITY ===== */
.activity-list { display: flex; flex-direction: column; }
.activity-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); font-size: 0.88rem; }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.activity-icon.blue { background: var(--primary-light); color: var(--primary); }
.activity-icon.green { background: #D1FAE5; color: var(--green); }
.activity-icon.orange { background: #FEF3C7; color: var(--orange); }
.activity-time { margin-left: auto; font-size: 0.78rem; color: var(--gray-500); white-space: nowrap; }

/* ===== CALENDAR ===== */
.calendar-controls { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calendar-controls h2 { font-size: 1.2rem; }
.calendar-legend { display: flex; gap: 20px; margin-bottom: 16px; font-size: 0.82rem; color: var(--gray-500); }
.legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.dot-free { background: var(--green); } .dot-mine { background: var(--primary); } .dot-booked { background: var(--gray-300); } .dot-past { background: var(--gray-200); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-header { text-align: center; font-weight: 700; font-size: 0.8rem; color: var(--gray-500); padding: 8px 0; text-transform: uppercase; letter-spacing: 0.5px; }
.cal-day { text-align: center; padding: 14px 8px; border-radius: 8px; font-weight: 600; font-size: 0.92rem; cursor: pointer; transition: 0.15s; border: 2px solid transparent; }
.cal-day:hover { background: var(--gray-100); }
.cal-empty { cursor: default; } .cal-empty:hover { background: transparent; }
.cal-past { color: var(--gray-300); cursor: default; background: var(--gray-100); } .cal-past:hover { background: var(--gray-100); }
.cal-free { color: var(--dark); background: #D1FAE5; } .cal-free:hover { border-color: var(--green); }
.cal-mine { background: var(--primary-light); color: var(--primary); } .cal-mine:hover { border-color: var(--primary); }
.cal-booked { background: var(--gray-200); color: var(--gray-500); cursor: not-allowed; } .cal-booked:hover { background: var(--gray-200); }
.cal-today { box-shadow: inset 0 0 0 2px var(--accent); }

/* ===== BOOKING MODAL ===== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal { background: var(--white); border-radius: var(--radius-lg); padding: 36px; max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--gray-500); }
.modal h2 { font-size: 1.3rem; margin-bottom: 4px; }
.modal-date { color: var(--primary); font-weight: 600; margin-bottom: 24px; }
.chair-select { display: flex; gap: 12px; }
.chair-option { flex: 1; cursor: pointer; }
.chair-option input { display: none; }
.chair-label { display: block; text-align: center; padding: 14px; border: 2px solid var(--gray-300); border-radius: 8px; font-weight: 600; transition: 0.15s; }
.chair-label small { display: block; font-weight: 400; font-size: 0.78rem; color: var(--gray-500); }
.chair-option input:checked + .chair-label { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.time-separator { display: flex; align-items: center; color: var(--gray-500); font-size: 0.85rem; padding: 0 4px; }
.material-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.mat-check { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--gray-100); border-radius: 6px; font-size: 0.85rem; cursor: pointer; }
.modal-summary { background: var(--gray-100); border-radius: 8px; padding: 16px; margin: 20px 0; }
.modal-summary-row { display: flex; justify-content: space-between; font-size: 0.88rem; padding: 4px 0; }

/* ===== BOOKINGS LIST ===== */
.tab-filters { display: flex; gap: 8px; margin-bottom: 20px; }
.filter-btn { padding: 6px 16px; border-radius: 50px; border: 1.5px solid var(--gray-300); background: var(--white); font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: 0.15s; font-family: inherit; color: var(--gray-500); }
.filter-btn.active, .filter-btn:hover { background: var(--dark); color: var(--white); border-color: var(--dark); }
.bookings-list { display: flex; flex-direction: column; gap: 10px; }
.booking-row { display: flex; align-items: center; gap: 20px; padding: 18px 20px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.booking-date-col { text-align: center; min-width: 50px; }
.booking-day { display: block; font-size: 1.4rem; font-weight: 800; color: var(--dark); line-height: 1; }
.booking-month { font-size: 0.75rem; color: var(--gray-500); text-transform: uppercase; }
.booking-info { flex: 1; } .booking-info strong { font-size: 0.95rem; } .booking-info p { font-size: 0.82rem; color: var(--gray-500); }
.booking-past { opacity: 0.7; }
.booking-revenue { font-size: 0.82rem; color: var(--gray-500); }
.booking-actions { margin-left: auto; }

/* ===== CHECK-IN/OUT ===== */
.checkin-card { background: var(--white); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); }
.checkin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 8px; }
.checkin-steps { display: flex; flex-direction: column; gap: 0; }
.checkin-step { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--gray-100); opacity: 0.5; }
.checkin-step.step-active { opacity: 1; }
.step-indicator { width: 36px; height: 36px; border-radius: 50%; background: var(--gray-200); color: var(--gray-500); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.step-active .step-indicator { background: var(--primary); color: var(--white); }
.step-content { flex: 1; }
.step-content h4 { font-size: 1rem; margin-bottom: 4px; }
.step-content p { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 12px; }
.photo-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-upload { width: 120px; height: 90px; border: 2px dashed var(--gray-300); border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.15s; }
.photo-upload:hover { border-color: var(--primary); }
.photo-upload span { font-size: 0.75rem; color: var(--gray-500); text-align: center; padding: 4px; }
.checklist { display: flex; flex-direction: column; gap: 8px; }
.check-item { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; cursor: pointer; padding: 6px 0; }
.checkin-divider { border-top: 2px solid var(--gray-200); margin: 28px 0; }
.checkout-info { padding: 20px; background: var(--gray-100); border-radius: 8px; }
.checkout-info p { font-size: 0.88rem; color: var(--gray-500); margin-bottom: 12px; }
.checkout-info .btn { margin-top: 16px; }

/* ===== MATERIALS ===== */
.materials-info { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.info-box { padding: 16px 20px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 0.88rem; }
.info-box strong { display: block; margin-bottom: 4px; color: var(--dark); }
.info-box-accent { border-left: 3px solid var(--accent); }
.material-grid { display: flex; flex-direction: column; gap: 10px; }
.material-item { display: flex; align-items: center; gap: 16px; padding: 14px; background: var(--gray-100); border-radius: 8px; }
.mat-info { flex: 1; } .mat-info strong { font-size: 0.92rem; } .mat-info p { font-size: 0.8rem; color: var(--gray-500); }
.mat-price { font-weight: 800; font-size: 1.05rem; color: var(--dark); min-width: 60px; text-align: right; }

/* ===== DATA TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th { text-align: left; padding: 10px 12px; font-weight: 600; color: var(--gray-500); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--gray-200); }
.data-table td { padding: 12px; border-bottom: 1px solid var(--gray-100); }
.total-row td { border-top: 2px solid var(--gray-300); font-weight: 700; }

/* ===== LAST MINUTE PAGE ===== */
.lm-section { margin-bottom: 36px; }
.lm-section h3 { font-size: 1.15rem; margin-bottom: 4px; }
.lm-desc { font-size: 0.88rem; color: var(--gray-500); margin-bottom: 16px; }
.lm-cards { display: flex; flex-direction: column; gap: 12px; }
.lm-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.lm-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.lm-card-header strong { font-size: 0.95rem; } .lm-card-header p { font-size: 0.82rem; color: var(--gray-500); }
.lm-card-footer { display: flex; justify-content: space-between; align-items: center; }
.lm-discount { font-size: 0.82rem; color: var(--green); font-weight: 600; }
.waitlist-items { display: flex; flex-direction: column; gap: 10px; }
.waitlist-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: var(--gray-100); border-radius: 8px; }
.waitlist-item strong { font-size: 0.9rem; } .waitlist-item p { font-size: 0.8rem; color: var(--gray-500); }

/* ===== DEFECTS ===== */
.defect-alert { background: #FEF3C7; border: 1px solid #F59E0B; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 24px; font-size: 0.88rem; color: #92400E; }
.urgency-select { display: flex; flex-direction: column; gap: 8px; }
.urgency-option { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; cursor: pointer; }
.urg-low { color: var(--green); font-weight: 600; }
.urg-medium { color: var(--orange); font-weight: 600; }
.urg-high { color: var(--red); font-weight: 600; }
.defect-list { display: flex; flex-direction: column; gap: 12px; }
.defect-item { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--gray-100); border-radius: 8px; }
.defect-status { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-progress { background: var(--orange); } .status-resolved { background: var(--green); }
.defect-item strong { font-size: 0.9rem; } .defect-item p { font-size: 0.8rem; color: var(--gray-500); }
.defect-item .badge { margin-left: auto; }

/* ===== SIDEBAR BOTTOM ===== */
.sidebar-bottom { margin-top: auto; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 8px; }
.sidebar-bottom .nav-item { margin: 4px 12px; }

/* ===== DEMO HINT ===== */
.demo-hint { margin-top: 20px; padding: 14px; background: var(--gray-100); border-radius: 8px; font-size: 0.82rem; color: var(--gray-500); text-align: center; }
.demo-hint code { background: var(--gray-200); padding: 1px 6px; border-radius: 4px; font-size: 0.82rem; }
.demo-hint p { margin: 2px 0; }

/* ===== PROFILE ===== */
.profile-grid { display: flex; flex-direction: column; gap: 16px; }
.profile-plan { display: flex; flex-direction: column; gap: 12px; }
.profile-plan-current { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--gray-100); border-radius: 8px; }
.profile-plan-details p { font-size: 0.88rem; margin: 2px 0; }
.text-small { font-size: 0.82rem; color: var(--gray-500); }
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item { display: flex; align-items: center; gap: 16px; padding: 12px; background: var(--gray-100); border-radius: 8px; }
.doc-info { flex: 1; } .doc-info strong { font-size: 0.9rem; } .doc-info p { font-size: 0.8rem; color: var(--gray-500); }
.payment-card-display { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--gray-100); border-radius: 8px; margin-bottom: 16px; }
.payment-icon { font-size: 1.5rem; }
.payment-card-display strong { font-size: 0.95rem; } .payment-card-display p { font-size: 0.8rem; color: var(--gray-500); }
.payment-card-display .link { margin-left: auto; }
.kaution-status { display: flex; flex-direction: column; gap: 8px; }
.kaution-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; }
.smartlock-info p { font-size: 0.88rem; color: var(--gray-500); margin-bottom: 16px; }
.smartlock-status { display: flex; flex-direction: column; gap: 12px; }
.smartlock-item { display: flex; align-items: center; gap: 12px; }
.smartlock-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.smartlock-dot.active { background: var(--green); }
.smartlock-dot.inactive { background: var(--gray-300); }
.smartlock-item strong { font-size: 0.9rem; display: block; } .smartlock-item p { font-size: 0.8rem; color: var(--gray-500); }
.notif-settings { display: flex; flex-direction: column; gap: 0; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--gray-100); cursor: pointer; font-size: 0.9rem; }
.toggle-row:last-child { border-bottom: none; }
.toggle-switch { position: relative; width: 44px; height: 24px; background: var(--gray-300); border-radius: 12px; transition: 0.2s; flex-shrink: 0; }
.toggle-row input { display: none; }
.toggle-switch::after { content: ''; position: absolute; width: 18px; height: 18px; background: var(--white); border-radius: 50%; top: 3px; left: 3px; transition: 0.2s; }
.toggle-row input:checked ~ .toggle-switch { background: var(--primary); }
.toggle-row input:checked ~ .toggle-switch::after { left: 23px; }
.account-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.btn-danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: var(--white); }

/* ===== ADMIN ===== */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 2px solid var(--gray-200); padding-bottom: 0; }
.admin-tab { padding: 10px 18px; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; font-size: 0.88rem; font-weight: 600; cursor: pointer; color: var(--gray-500); font-family: inherit; transition: 0.15s; }
.admin-tab.active, .admin-tab:hover { color: var(--primary); border-bottom-color: var(--primary); }
.admin-subtab { display: none; } .admin-subtab.active { display: block; }
.admin-status-select { padding: 6px 10px; border: 1.5px solid var(--gray-300); border-radius: 6px; font-size: 0.82rem; font-family: inherit; margin-left: auto; }
code { background: var(--gray-100); padding: 2px 8px; border-radius: 4px; font-size: 0.85rem; color: var(--dark); }
.revenue-breakdown { display: flex; flex-direction: column; gap: 0; }
.rev-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: 0.9rem; }
.rev-total { border-top: 2px solid var(--gray-300); border-bottom: none; font-weight: 800; padding-top: 14px; }
.rev-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.rev-neg { color: var(--red); }
.profit-banner { text-align: center; padding: 28px; }
.profit-label { font-size: 0.9rem; color: var(--gray-500); margin-bottom: 4px; }
.profit-amount { font-size: 2.4rem; font-weight: 800; color: var(--green); }

/* ===== DOC TABS (Doctolib-Style) ===== */
.doc-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--gray-200); margin-bottom: 20px; overflow-x: auto; }
.doc-tab { padding: 10px 18px; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; font-size: 0.85rem; font-weight: 600; cursor: pointer; color: var(--gray-500); font-family: inherit; transition: 0.15s; white-space: nowrap; }
.doc-tab.active, .doc-tab:hover { color: var(--primary); border-bottom-color: var(--primary); }
.doc-subtab { display: none; } .doc-subtab.active { display: block; }
.doc-patient-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--primary-light); border-radius: 8px; margin-bottom: 16px; }

/* ===== DOC FILES ===== */
.doc-file-list { display: flex; flex-direction: column; gap: 8px; }
.doc-file { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--gray-100); border-radius: 8px; }
.doc-file .file-icon { font-size: 1.5rem; flex-shrink: 0; }
.doc-file div { flex: 1; }
.doc-file strong { font-size: 0.9rem; display: block; }
.doc-file p { font-size: 0.78rem; color: var(--gray-500); }

/* ===== INVOICE PREVIEW ===== */
.invoice-preview { background: var(--white); border: 1px solid var(--gray-200); border-radius: 8px; padding: 40px; font-size: 0.88rem; }
.inv-header { display: flex; justify-content: space-between; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 2px solid var(--dark); }
.inv-doctor strong { font-size: 1.1rem; display: block; }
.inv-doctor p { margin: 2px 0; }
.inv-meta { text-align: right; }
.inv-meta strong { font-size: 1.3rem; color: var(--primary); letter-spacing: 2px; }
.inv-meta p { font-size: 0.88rem; margin: 2px 0; color: var(--gray-500); }
.inv-small { font-size: 0.8rem; color: var(--gray-500); }
.inv-patient { margin-bottom: 24px; padding: 16px; background: var(--gray-100); border-radius: 6px; }
.inv-patient strong { font-size: 1rem; }
.inv-patient p { margin: 2px 0; font-size: 0.88rem; }
.inv-table { width: 100%; border-collapse: collapse; margin: 0; }
.inv-table th { text-align: left; padding: 8px 6px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-500); border-bottom: 2px solid var(--gray-300); }
.inv-table td { padding: 10px 6px; border-bottom: 1px solid var(--gray-100); }
.inv-right { text-align: right; font-variant-numeric: tabular-nums; }
.inv-table th:last-child { text-align: right; }
.inv-subtotal td { border-top: 1px solid var(--gray-300); font-weight: 500; padding-top: 12px; }
.inv-total td { border-top: 2px solid var(--dark); font-size: 1.05rem; padding-top: 12px; }
.inv-footer { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--gray-200); }
.inv-bank { padding: 12px; background: var(--gray-100); border-radius: 6px; margin-bottom: 12px; font-size: 0.85rem; }
.inv-bank p { margin: 2px 0; }

/* ===== PATIENT / DOC ===== */
.pat-row { cursor: pointer; transition: 0.1s; }
.pat-row:hover { background: var(--primary-light) !important; }
.tooth-chart { padding: 20px; background: var(--gray-100); border-radius: 8px; }
.tooth-chart h4 { font-size: 0.9rem; margin-bottom: 12px; }
.teeth-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.teeth-label { font-weight: 700; font-size: 0.8rem; color: var(--gray-500); width: 24px; }
.teeth-grid { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.tooth { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; border-radius: 4px; background: var(--white); border: 1.5px solid var(--gray-300); color: var(--dark); }
.tooth-filled { background: #DBEAFE; border-color: var(--primary); color: var(--primary); }
.tooth-crown { background: #FEF3C7; border-color: var(--orange); color: var(--orange); }
.tooth-missing { background: var(--gray-200); border-color: var(--gray-300); color: var(--gray-400); text-decoration: line-through; }
.tooth-divider { color: var(--gray-300); font-weight: 300; font-size: 1.2rem; }
.teeth-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 0.78rem; color: var(--gray-500); }
.tooth-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; border: 1.5px solid; }
.dot-normal { background: var(--white); border-color: var(--gray-300); }
.dot-filled { background: #DBEAFE; border-color: var(--primary); }
.dot-crown { background: #FEF3C7; border-color: var(--orange); }
.dot-missing { background: var(--gray-200); border-color: var(--gray-300); }

/* ===== DEVICE DETAIL ===== */
.device-detail-grid { display: flex; flex-direction: column; gap: 20px; }
.dd-section { padding: 16px; background: var(--gray-100); border-radius: 8px; }
.dd-section h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-500); margin-bottom: 10px; }
.dd-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.88rem; border-bottom: 1px solid rgba(0,0,0,0.04); }
.dd-row:last-child { border-bottom: none; }
.dd-row span:first-child { color: var(--gray-500); }
.dd-row span:last-child { font-weight: 500; color: var(--dark); }

/* ===== EMAIL TEMPLATE PREVIEW ===== */
.email-preview { background: var(--gray-100); border-radius: 8px; padding: 4px; }
.tmpl-email { background: var(--white); border-radius: 6px; padding: 28px; font-size: 0.88rem; line-height: 1.7; }
.tmpl-header { font-size: 1.2rem; font-weight: 800; color: var(--primary); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--primary-light); }
.tmpl-email h3 { font-size: 1.1rem; margin-bottom: 12px; }
.tmpl-btn { display: inline-block; padding: 10px 24px; background: var(--primary); color: var(--white); border-radius: 6px; font-weight: 600; margin: 16px 0; text-align: center; }
.tmpl-info-box { background: var(--gray-100); padding: 14px; border-radius: 6px; margin: 12px 0; }
.tmpl-info-box p { margin: 4px 0; font-size: 0.88rem; }
.tmpl-small { font-size: 0.8rem; color: var(--gray-500); }
.tmpl-footer { font-size: 0.75rem; color: var(--gray-300); margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--gray-200); }

/* ===== QUICK ACTIONS ===== */
.quick-actions { display: flex; flex-direction: column; gap: 8px; }

/* ===== EMAIL TEMPLATES ===== */
.email-templates { display: flex; flex-direction: column; gap: 8px; }
.template-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; background: var(--gray-100); border-radius: 8px; }
.template-item strong { font-size: 0.9rem; display: block; }
.template-item p { font-size: 0.78rem; color: var(--gray-500); }

/* ===== SETTINGS ===== */
.settings-grid { display: flex; flex-direction: column; gap: 20px; }
.setting-block { padding: 20px; background: var(--gray-100); border-radius: 8px; }
.setting-block h4 { font-size: 1rem; margin-bottom: 12px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .overview-grid { grid-template-columns: 1fr; }
    .materials-info { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: 0.3s; }
    .sidebar.open { transform: translateX(0); }
    .mobile-header { display: flex; }
    .main-content { margin-left: 0; padding: 72px 16px 24px; }
    .stats-grid { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 1.3rem; }
    .form-row { flex-direction: column; }
    .booking-row { flex-wrap: wrap; gap: 10px; }
    .booking-actions { width: 100%; }
    .calendar-legend { flex-wrap: wrap; gap: 10px; }
    .lm-card-footer { flex-direction: column; gap: 8px; align-items: flex-start; }
}
