/**
 * BookFlow.SaaS Business Administration CSS Stylesheet
 * Contains layouts required for business owners dashboards, hours setup, auth forms, and service customizations.
 */

/* =========================================================================
   1. Reset & Global Base Configuration
   ========================================================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --brand-primary: #6366f1;
    --brand-secondary: #4f46e5;
    --brand-bg: #0f172a;
    --brand-text: #f8fafc;
    --brand-font: 'Outfit', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;
    
    --text-muted: #94a3b8;
    --border-light: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(30, 41, 59, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--brand-font), 'Inter', sans-serif;
    background-color: var(--brand-bg);
    color: var(--brand-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.tenant-site {
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-light: rgba(0, 0, 0, 0.08);
    background-color: var(--brand-bg);
    color: var(--brand-text);
}

code {
    font-family: 'Fira Code', monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

.text-indigo {
    color: var(--brand-primary);
}

.text-gradient {
    background: linear-gradient(135deg, #a5b4fc 0%, var(--brand-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.font-outfit {
    font-family: 'Outfit', sans-serif;
}

.font-bold {
    font-weight: 700;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

/* =========================================================================
   2. Header & Main Navigation Bar
   ========================================================================= */
.main-header {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    border-bottom: var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-fast);
}

body.tenant-site .main-header {
    background: rgba(255, 255, 255, 0.7);
    border-bottom: var(--border-light);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
    font-size: 22px;
}

.brand-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

.logo-icon {
    font-size: 28px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition-fast);
}

body.tenant-site .nav-item {
    color: var(--brand-text);
    opacity: 0.8;
}

.nav-item:hover, .nav-item.badge-active {
    color: var(--brand-primary);
    opacity: 1;
}

/* =========================================================================
   3. Buttons & Interaction States
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    text-decoration: none;
    gap: 8px;
    line-height: 1.2;
}

.btn-primary {
    background: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

body.tenant-site .btn-primary {
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(var(--brand-primary), 0.3);
}

.btn-primary:hover {
    background: var(--brand-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--brand-text);
}

body.tenant-site .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

body.tenant-site .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--brand-primary);
    color: var(--brand-primary);
}

.btn-outline:hover {
    background: var(--brand-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-nav {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: var(--radius-sm);
}

.btn-block {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-success {
    background: var(--color-success);
    color: white;
}
.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-text-danger {
    background: transparent;
    color: var(--color-danger);
    border: none;
    font-weight: 500;
    cursor: pointer;
}
.btn-text-danger:hover {
    text-decoration: underline;
}

/* =========================================================================
   4. Grid & Layout System
   ========================================================================= */
.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 24px;
}

/* =========================================================================
   5. Card Components
   ========================================================================= */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-bottom: 30px;
}

body.tenant-site .card {
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.card h3 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
}

/* =========================================================================
   6. Alerts and Notifications
   ========================================================================= */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

body.tenant-site .alert-danger {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

body.tenant-site .alert-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

/* =========================================================================
   7. Form Controls
   ========================================================================= */
.standard-form, .auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-text);
}

.form-group input, 
.form-group textarea, 
.form-group select,
.filter-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--brand-text);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition-fast);
    font-family: inherit;
    outline: none;
}

body.tenant-site .form-group input, 
body.tenant-site .form-group textarea, 
body.tenant-site .form-group select {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
}

.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

body.tenant-site .form-group input:focus, 
body.tenant-site .form-group textarea:focus, 
body.tenant-site .form-group select:focus {
    background: #ffffff;
}

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

@media (max-width: 768px) {
    .form-group-row {
        grid-template-columns: 1fr;
    }
}

.form-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-top: 15px;
    padding-bottom: 8px;
    border-bottom: var(--border-light);
    color: var(--brand-primary);
}

.form-tip {
    font-size: 12px;
    color: var(--text-muted);
}

/* =========================================================================
   8. Subdomain input decoration
   ========================================================================= */
.subdomain-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.subdomain-input-wrapper input {
    flex: 1;
    padding-right: 150px;
}

.subdomain-suffix {
    position: absolute;
    right: 18px;
    color: var(--text-muted);
    font-weight: 600;
    pointer-events: none;
    font-size: 14px;
}

/* =========================================================================
   9. Auth Specific Design
   ========================================================================= */
.auth-card-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 250px);
}

.auth-card {
    width: 100%;
    max-width: 550px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer p {
    margin-bottom: 8px;
}

/* =========================================================================
   10. Business Dashboard Layout
   ========================================================================= */
.dashboard-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 4px;
}

.dashboard-subtitle {
    color: var(--text-muted);
}

.dashboard-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 20px;
}

@media (max-width: 768px) {
    .dashboard-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.bg-indigo-glass { background: rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.2); }
.bg-yellow-glass { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.2); }
.bg-green-glass { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); }
.bg-blue-glass { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.2); }
.bg-red-glass { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); }

.text-red {
    color: var(--color-danger);
}

.metric-icon {
    font-size: 32px;
    opacity: 0.9;
}

.metric-details {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-value {
    font-size: 28px;
    font-weight: 800;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
}

.dashboard-col-left-small {
    grid-column: span 1;
}

.dashboard-col-right-large {
    grid-column: span 1;
}

@media (max-width: 1024px) {
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-col-left-small, .dashboard-col-right-large {
        grid-column: span 1;
    }
}

/* =========================================================================
   11. Appointments Table Component
   ========================================================================= */
.card-table {
    padding: 0;
    overflow: hidden;
}

.card-header-row {
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: var(--border-light);
    flex-wrap: wrap;
    gap: 16px;
}

.filter-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-input {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-filter {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

.appointments-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.appointments-table th, .appointments-table td {
    padding: 18px 32px;
    border-bottom: var(--border-light);
}

.appointments-table th {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.appointments-table tr:last-child td {
    border-bottom: none;
}

.client-name {
    font-weight: 600;
    font-size: 15px;
}

.client-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.service-name {
    font-weight: 600;
}

.service-price {
    font-size: 13px;
    color: var(--brand-primary);
    font-weight: 600;
}

.slot-date {
    font-weight: 600;
}

.slot-time {
    font-size: 13px;
    color: var(--text-muted);
}

.status-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
}

.status-pending { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.status-confirmed { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.status-completed { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.status-cancelled { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.otp-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: monospace;
}

.action-buttons-group {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.inline-form {
    display: inline;
}

.empty-table-message {
    text-align: center;
    padding: 60px !important;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* =========================================================================
   12. Dashboard Sidebar Panel
   ========================================================================= */
.card-sidebar {
    padding: 24px;
}

.shortcut-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

body.tenant-site .shortcut-item {
    background: rgba(0, 0, 0, 0.02);
}

.shortcut-item:hover {
    border-color: var(--brand-primary);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.shortcut-icon {
    font-size: 24px;
}

.shortcut-details {
    display: flex;
    flex-direction: column;
}

.shortcut-details strong {
    font-size: 14px;
}

.shortcut-details span {
    font-size: 12px;
    color: var(--text-muted);
}

/* =========================================================================
   13. Services Setup Layout
   ========================================================================= */
.services-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.service-manage-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
}

.service-inactive {
    opacity: 0.6;
}

.service-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.badge-price {
    font-weight: 700;
    font-size: 16px;
    color: var(--brand-primary);
    margin-right: 12px;
}

.badge-duration {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.service-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.service-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex: 1;
}

.edit-service-details {
    margin-top: 15px;
    border-top: 1px solid var(--border-light);
    padding-top: 15px;
}

.btn-summary {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-primary);
    cursor: pointer;
    outline: none;
    list-style: none;
}

.btn-summary::-webkit-details-marker {
    display: none;
}

.edit-service-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.edit-service-form label {
    font-size: 12px;
    font-weight: 600;
}

.edit-service-form input, .edit-service-form textarea {
    padding: 8px 12px;
    font-size: 13px;
}

.edit-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.delete-service-row {
    margin-top: 15px;
    text-align: left;
}

/* =========================================================================
   14. Weekly Hours Layout
   ========================================================================= */
.hours-table-header {
    display: grid;
    grid-template-columns: 2fr 2fr 3fr 3fr;
    padding: 16px 24px;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    text-transform: uppercase;
}

.hours-row {
    display: grid;
    grid-template-columns: 2fr 2fr 3fr 3fr;
    padding: 20px 24px;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.hours-row:last-child {
    border-bottom: none;
}

.row-closed {
    opacity: 0.5;
}

.row-weekend {
    background: rgba(255, 255, 255, 0.01);
}

body.tenant-site .row-weekend {
    background: rgba(0, 0, 0, 0.01);
}

.time-range-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-input {
    padding: 8px 12px !important;
    font-size: 13px !important;
    text-align: center;
}

.time-sep {
    font-size: 12px;
    color: var(--text-muted);
}

.breaks-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.breaks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.break-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    animation: fadeInBreak 0.25s ease-out;
}

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

.btn-remove-break {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.btn-remove-break:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.btn-remove-break:disabled {
    color: var(--text-muted);
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-add-break {
    align-self: flex-start;
    font-size: 11px !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    border: 1px dashed var(--brand-primary);
    background: transparent;
    color: var(--brand-primary);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.btn-add-break:hover:not(:disabled) {
    background: var(--brand-primary);
    color: #ffffff !important;
}

.btn-add-break:disabled {
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted) !important;
    opacity: 0.5;
    cursor: not-allowed;
}

.hours-form-footer {
    padding: 24px;
    border-top: 1px solid var(--border-light);
    text-align: right;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

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

.slider {
    position: relative;
    width: 44px;
    height: 22px;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .4s;
    border-radius: 34px;
}

body.tenant-site .slider {
    background-color: rgba(0, 0, 0, 0.1);
}

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

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

.toggle-switch input:checked + .slider:before {
    transform: translateX(22px);
}

.toggle-label {
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .hours-table-header {
        display: none;
    }
    .hours-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px 16px;
    }
    .col-timings, .col-breaks {
        display: flex;
        justify-content: space-between;
    }
    .col-timings::before {
        content: "Hours:";
        font-weight: 600;
        font-size: 13px;
    }
    .col-breaks::before {
        content: "Break:";
        font-weight: 600;
        font-size: 13px;
    }
}

/* =========================================================================
   15. Customize Panel Styling Details
   ========================================================================= */
.color-picker-row {
    gap: 30px;
}

.color-picker-group {
    flex: 1;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-wrapper input[type="color"] {
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    background: none;
}

.color-text-input {
    flex: 1;
    font-family: monospace !important;
}

.sticky-preview-card {
    position: sticky;
    top: 100px;
}

.preview-simulator {
    margin-top: 20px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: var(--transition-fast);
}

.sim-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 16px;
}

.sim-logo {
    font-size: 20px;
}

.sim-img-logo {
    height: 24px;
    width: auto;
}

.sim-title {
    font-weight: 700;
    font-size: 16px;
}

.sim-text {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 16px;
}

.sim-service-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sim-service-item strong {
    font-size: 13px;
}

.sim-service-item p {
    font-size: 11px;
    opacity: 0.6;
}

.sim-btn-select {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    background: var(--brand-primary);
    color: white;
    border: none;
}

.sim-calendar {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 12px;
}

.sim-cal-header {
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.sim-cal-days {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.sim-cal-days span {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
}

.sim-cal-active {
    background: var(--brand-primary) !important;
    color: white;
}

/* =========================================================================
   20. Footer styling
   ========================================================================= */
.main-footer {
    border-top: var(--border-light);
    padding: 60px 24px;
    background: rgba(15, 23, 42, 0.4);
    margin-top: auto;
    font-size: 14px;
}

body.tenant-site .main-footer {
    background: rgba(0, 0, 0, 0.02);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
}

.footer-info h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.footer-info p {
    color: var(--text-muted);
    max-width: 500px;
}

.contact-details {
    margin-top: 12px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.footer-links a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 12px;
}

/* =========================================================================
   21. Animations & Micro-interactions
   ========================================================================= */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-scale-up {
    animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

/* =========================================================================
   23. Unified Theme Switcher UI Component & Mobile Responsive Adjustments
   ========================================================================= */
.theme-toggler {
    position: relative;
    display: inline-block;
    z-index: 150;
    margin-left: 8px;
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-light);
    color: var(--brand-text);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 16px;
    outline: none;
    padding: 0;
}

body.tenant-site .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.05);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

body.tenant-site .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.theme-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    min-width: 140px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    animation: scaleUp 0.18s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

html[data-resolved-theme="light"] .theme-dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.theme-dropdown-menu.show {
    display: flex;
}

.theme-dropdown-item {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: var(--transition-fast);
    width: 100%;
}

html[data-resolved-theme="light"] .theme-dropdown-item {
    color: #64748b;
}

.theme-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

html[data-resolved-theme="light"] .theme-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

.theme-dropdown-item.active {
    background: var(--brand-primary);
    color: #ffffff !important;
}

/* =========================================================================
   24. Theme Overrides (Light Mode & Dark Mode Resolution)
   ========================================================================= */
html[data-resolved-theme="dark"] {
    --brand-bg: #0f172a;
    --brand-text: #f8fafc;
    --text-muted: #94a3b8;
    --border-light: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(30, 41, 59, 0.6);
    --input-bg: rgba(15, 23, 42, 0.5);
    --input-border: rgba(255, 255, 255, 0.1);
}

html[data-resolved-theme="dark"] body.tenant-site {
    background-color: var(--brand-bg);
    color: var(--brand-text);
    --card-bg: rgba(30, 41, 59, 0.6);
    --border-light: rgba(255, 255, 255, 0.08);
}

html[data-resolved-theme="dark"] body.tenant-site .main-header {
    background: rgba(15, 23, 42, 0.7);
    border-bottom: var(--border-light);
}

html[data-resolved-theme="dark"] body.tenant-site .nav-item {
    color: var(--text-muted);
    opacity: 0.9;
}

html[data-resolved-theme="dark"] body.tenant-site .nav-item:hover,
html[data-resolved-theme="dark"] body.tenant-site .nav-item.badge-active {
    color: var(--brand-primary);
    opacity: 1;
}

html[data-resolved-theme="dark"] body.tenant-site .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--brand-text);
}

html[data-resolved-theme="dark"] body.tenant-site .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

html[data-resolved-theme="dark"] body.tenant-site .card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

html[data-resolved-theme="dark"] body.tenant-site .alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

html[data-resolved-theme="dark"] body.tenant-site .alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

html[data-resolved-theme="dark"] body.tenant-site .form-group input,
html[data-resolved-theme="dark"] body.tenant-site .form-group textarea,
html[data-resolved-theme="dark"] body.tenant-site .form-group select,
html[data-resolved-theme="dark"] .filter-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-light);
    color: var(--brand-text);
}

html[data-resolved-theme="dark"] body.tenant-site .form-group input:focus,
html[data-resolved-theme="dark"] body.tenant-site .form-group textarea:focus,
html[data-resolved-theme="dark"] body.tenant-site .form-group select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--brand-primary);
}

html[data-resolved-theme="dark"] body.tenant-site .shortcut-item {
    background: rgba(255, 255, 255, 0.02);
}

html[data-resolved-theme="dark"] body.tenant-site .row-weekend {
    background: rgba(255, 255, 255, 0.01);
}

html[data-resolved-theme="dark"] body.tenant-site .slider {
    background-color: rgba(255, 255, 255, 0.1);
}

html[data-resolved-theme="dark"] body.tenant-site .main-footer {
    background: rgba(15, 23, 42, 0.4);
}

/* B. Light Mode Settings (Overrides Dark Mode defaults on platform global site) */
html[data-resolved-theme="light"] body.platform-site {
    background-color: #f8fafc;
    color: #0f172a;
    --brand-bg: #f8fafc;
    --brand-text: #0f172a;
    --text-muted: #64748b;
    --border-light: rgba(0, 0, 0, 0.08);
    --card-bg: rgba(255, 255, 255, 0.85);
}

html[data-resolved-theme="light"] body.platform-site .main-header {
    background: rgba(255, 255, 255, 0.75);
    border-bottom: var(--border-light);
}

html[data-resolved-theme="light"] body.platform-site .nav-item {
    color: #64748b;
}

html[data-resolved-theme="light"] body.platform-site .nav-item:hover,
html[data-resolved-theme="light"] body.platform-site .nav-item.badge-active {
    color: var(--brand-primary);
}

html[data-resolved-theme="light"] body.platform-site .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

html[data-resolved-theme="light"] body.platform-site .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

html[data-resolved-theme="light"] body.platform-site .card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
}

html[data-resolved-theme="light"] body.platform-site .form-group input,
html[data-resolved-theme="light"] body.platform-site .form-group textarea,
html[data-resolved-theme="light"] body.platform-site .form-group select,
html[data-resolved-theme="light"] body.platform-site .filter-input {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    color: #0f172a;
}

html[data-resolved-theme="light"] body.platform-site .form-group input:focus,
html[data-resolved-theme="light"] body.platform-site .form-group textarea:focus,
html[data-resolved-theme="light"] body.platform-site .form-group select:focus {
    background: #ffffff;
    border-color: var(--brand-primary);
}

html[data-resolved-theme="light"] body.platform-site .main-footer {
    background: rgba(0, 0, 0, 0.02);
    border-top: var(--border-light);
}

html[data-resolved-theme="light"] body.platform-site .text-gradient {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .header-container {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    .nav-menu {
        gap: 12px;
        flex-wrap: wrap;
        font-size: 14px;
    }
    .btn-nav {
        padding: 6px 12px;
        font-size: 13px;
    }
}
