/* ═══════════════════════════════════════════════════════
   LEXALABS HOTELS — Dashboard Design System
   Aesthetic: Anthropic — warm cream, coral accent, editorial
   ═══════════════════════════════════════════════════════ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ── */
:root {
    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', monospace;

    /* Light mode — Anthropic warm cream */
    --bg-primary:    #fdf8f2;
    --bg-secondary:  #ffffff;
    --bg-tertiary:   #f5ede2;
    --bg-inset:      #ede4d6;
    --text-primary:  #1a1510;
    --text-secondary:#4a3f35;
    --text-muted:    #9a8f83;
    --border:        #e3d8cc;
    --border-light:  #ece6de;

    /* Accent — Anthropic coral/terracotta */
    --accent:              #cc5833;
    --accent-hover:        #b84d2c;
    --accent-subtle:       rgba(204,88,51,0.08);
    --accent-success:      #166534;
    --accent-success-bg:   #f0fdf4;
    --accent-warning:      #92400e;
    --accent-warning-bg:   #fffbeb;
    --accent-danger:       #991b1b;
    --accent-danger-bg:    #fef2f2;
    --accent-info:         #1e3a8a;
    --accent-info-bg:      #eff6ff;

    /* Urgency */
    --urgency-fresh:    #16a34a;
    --urgency-moderate: #d97706;
    --urgency-critical: #dc2626;

    /* Sidebar — pure black */
    --sidebar-bg:          #000000;
    --sidebar-bg-hover:    #1a1a1a;
    --sidebar-bg-active:   #1a1a1a;
    --sidebar-text:        rgba(255,255,255,0.55);
    --sidebar-text-active: #ffffff;
    --sidebar-accent:      #cc5833;
    --sidebar-width:       240px;

    /* Spacing */
    --s-1: 0.25rem;
    --s-2: 0.5rem;
    --s-3: 0.75rem;
    --s-4: 1rem;
    --s-5: 1.25rem;
    --s-6: 1.5rem;
    --s-8: 2rem;
    --s-10: 2.5rem;
    --s-12: 3rem;

    /* Radii — sharp, Harvey-style */
    --r-sm:   2px;
    --r-md:   4px;
    --r-lg:   6px;
    --r-xl:   8px;
    --r-full: 9999px;

    /* Shadows — very subtle */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);

    /* Transitions */
    --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);
    --t-fast:  150ms var(--ease-out);
    --t-base:  250ms var(--ease-out);
    --t-slow:  400ms var(--ease-out);
}

/* ── Dark Mode — Anthropic dark warm ── */
[data-theme="dark"] {
    --bg-primary:    #110f0b;
    --bg-secondary:  #1c1814;
    --bg-tertiary:   #241f1a;
    --bg-inset:      #1c1814;
    --text-primary:  #fdf8f2;
    --text-secondary:#a09388;
    --text-muted:    #5a5048;
    --border:        #2e2620;
    --border-light:  #261f1a;
    --accent:        #d96040;
    --accent-hover:  #c55538;
    --accent-subtle: rgba(204,88,51,0.12);
    --accent-success-bg: rgba(22,101,52,0.15);
    --accent-warning-bg: rgba(146,64,14,0.15);
    --accent-danger-bg:  rgba(153,27,27,0.15);
    --accent-info-bg:    rgba(30,58,138,0.15);
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Layout ── */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
    transition: transform var(--t-base);
}
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}
.page-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: var(--s-8);
}

/* ── Sidebar ── */
.sidebar-brand {
    padding: var(--s-6);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand h1 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--sidebar-text-active);
    letter-spacing: -0.02em;
}
.sidebar-nav {
    flex: 1;
    padding: var(--s-4) var(--s-3);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: 8px var(--s-4);
    border-radius: var(--r-md);
    font-size: 0.84rem;
    font-weight: 450;
    color: var(--sidebar-text);
    transition: all var(--t-fast);
    position: relative;
    letter-spacing: -0.01em;
}
.nav-item:hover {
    background: var(--sidebar-bg-hover);
    color: var(--sidebar-text-active);
}
.nav-item.active {
    background: var(--sidebar-bg-active);
    color: var(--sidebar-text-active);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 2px; height: 55%;
    background: var(--sidebar-accent);
    border-radius: 0 2px 2px 0;
}
.nav-item svg { width: 16px; height: 16px; opacity: 0.55; }
.nav-item.active svg { opacity: 1; }
.nav-item:hover svg { opacity: 1; }
.nav-badge {
    margin-left: auto;
    background: var(--accent-danger);
    color: white;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--r-full);
    min-width: 18px;
    text-align: center;
}
.nav-badge:empty, .nav-badge[data-count="0"] { display: none; }
.sidebar-org {
    padding: var(--s-3) var(--s-6);
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: .75rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-footer {
    padding: var(--s-4) var(--s-6);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.theme-toggle-row {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    font-size: 0.78rem;
    color: var(--sidebar-text);
}
.theme-toggle-row svg { width: 14px; height: 14px; }
.toggle-switch {
    margin-left: auto;
    width: 32px; height: 18px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: var(--r-full);
    position: relative;
    transition: background var(--t-fast);
}
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 14px; height: 14px;
    background: var(--sidebar-text);
    border-radius: 50%;
    transition: transform var(--t-fast), background var(--t-fast);
}
.toggle-switch.active { background: rgba(255,255,255,0.25); }
.toggle-switch.active::after {
    transform: translateX(14px);
    background: white;
}

/* ── Top Bar ── */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--s-8);
    gap: var(--s-6);
}
.page-header { margin-bottom: var(--s-8); }
.page-header h1, .page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.2;
}
.page-title span {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
    margin-left: var(--s-2);
    letter-spacing: 0;
}
.search-bar { position: relative; flex: 0 1 320px; }
.search-bar svg {
    position: absolute;
    left: var(--s-3);
    top: 50%; transform: translateY(-50%);
    width: 14px; height: 14px;
    color: var(--text-muted);
}
.search-bar input {
    width: 100%;
    padding: 8px var(--s-3) 8px 2.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    font-size: 0.84rem;
    color: var(--text-primary);
    transition: all var(--t-fast);
    outline: none;
    letter-spacing: -0.01em;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-subtle);
}
.search-spinner { position: absolute; right: var(--s-3); top: 50%; transform: translateY(-50%); display: none; }
.htmx-request .search-spinner { display: block; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-primary); padding: var(--s-2); }
.mobile-menu-btn svg { width: 22px; height: 22px; }

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-4);
    margin-bottom: var(--s-8);
}
.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-5) var(--s-5);
    display: flex;
    align-items: center;
    gap: var(--s-4);
    box-shadow: var(--shadow-xs);
    transition: all var(--t-fast);
    position: relative;
    overflow: hidden;
}
.stat-card:hover { box-shadow: var(--shadow-sm); }
.stat-icon {
    width: 38px; height: 38px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-icon--warning { background: var(--accent-warning-bg); color: var(--accent-warning); }
.stat-icon--info    { background: var(--accent-info-bg);    color: var(--accent-info); }
.stat-icon--success { background: var(--accent-success-bg); color: var(--accent-success); }
.stat-icon--neutral { background: var(--bg-tertiary);       color: var(--text-secondary); }
.stat-number {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}
.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: var(--s-1);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 500;
}
.stat-card--alert { border-left: 2px solid var(--accent-warning); }
.stat-card--alert .stat-number { color: var(--accent-warning); }

/* ── Toolbar ── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--s-5);
    flex-wrap: wrap;
    gap: var(--s-3);
}
.filter-group { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.filter-btn {
    padding: 6px var(--s-3);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    transition: all var(--t-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    letter-spacing: -0.01em;
}
.filter-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.filter-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
[data-theme="dark"] .filter-btn.active { background: var(--sidebar-text-active); color: var(--sidebar-bg); border-color: var(--sidebar-text-active); }
.filter-sep { width: 1px; height: 20px; background: var(--border); margin: 0 var(--s-1); }
.view-toggle { display: flex; background: var(--bg-tertiary); border-radius: var(--r-md); padding: 2px; }
.view-btn {
    padding: 5px var(--s-3);
    border: none; border-radius: var(--r-sm);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem; font-weight: 500;
    display: flex; align-items: center; gap: var(--s-1);
    transition: all var(--t-fast);
}
.view-btn svg { width: 13px; height: 13px; }
.view-btn.active { background: var(--bg-secondary); color: var(--text-primary); box-shadow: var(--shadow-xs); }

/* ── Task Table ── */
.table-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}
.task-table { width: 100%; border-collapse: collapse; }
.task-table th {
    background: var(--bg-tertiary);
    text-align: left;
    padding: var(--s-3) var(--s-4);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.task-table td {
    padding: var(--s-3) var(--s-4);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.task-table tbody tr { transition: background var(--t-fast); }
.task-table tbody tr:hover { background: var(--accent-subtle); }
.task-table tbody tr:last-child td { border-bottom: none; }
.col-urgency { width: 6px; padding: 0 !important; }
.urgency-bar { width: 3px; height: 100%; min-height: 40px; border-radius: 2px; display: block; }
.urgency-bar--fresh    { background: var(--urgency-fresh); }
.urgency-bar--moderate { background: var(--urgency-moderate); animation: pulse-amber 2s ease-in-out infinite; }
.urgency-bar--critical { background: var(--urgency-critical); animation: pulse-red 1.2s ease-in-out infinite; }
.task-id {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}
.task-id:hover { color: var(--text-primary); }
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    padding: 2px 8px;
    border-radius: var(--r-sm);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
.type-room_service { background: #fef3c7; color: #92400e; }
.type-cleaning     { background: #e0f2fe; color: #075985; }
.type-maintenance  { background: #fee2e2; color: #991b1b; }
.type-spa          { background: #f3e8ff; color: #6b21a8; }
.type-laundry      { background: #e0f7fa; color: #006064; }
.type-other        { background: var(--bg-tertiary); color: var(--text-secondary); }
[data-theme="dark"] .type-room_service { background: rgba(254,243,199,0.12); }
[data-theme="dark"] .type-cleaning     { background: rgba(224,242,254,0.12); }
[data-theme="dark"] .type-maintenance  { background: rgba(254,226,226,0.12); }
[data-theme="dark"] .type-spa          { background: rgba(243,232,255,0.12); }
.guest-cell .guest-name { font-weight: 500; color: var(--text-primary); }
.guest-cell .room-tag {
    display: inline-block;
    margin-left: var(--s-2);
    font-size: 0.68rem;
    font-family: var(--font-mono);
    padding: 1px 5px;
    background: var(--bg-tertiary);
    border-radius: var(--r-sm);
    color: var(--text-muted);
}
.desc-cell a { color: var(--text-secondary); transition: color var(--t-fast); }
.desc-cell a:hover { color: var(--text-primary); }
.staff-name { font-size: 0.8rem; color: var(--text-secondary); }
.staff-name--unassigned { font-style: italic; color: var(--text-muted); }
.age-cell { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }

/* Inline status select */
.status-select {
    appearance: none; -webkit-appearance: none;
    border: 1px solid transparent;
    padding: 3px 10px; padding-right: 1.4rem;
    border-radius: var(--r-sm);
    font-size: 0.72rem; font-weight: 600;
    cursor: pointer; transition: all var(--t-fast); outline: none;
    text-transform: uppercase; letter-spacing: 0.04em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 5px center;
}
.status-select:hover { border-color: var(--border); }
.status-select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-subtle); }
.status-select.status-pending     { background-color: var(--accent-warning-bg); color: var(--accent-warning); }
.status-select.status-in_progress { background-color: var(--accent-info-bg);    color: var(--accent-info); }
.status-select.status-completed   { background-color: var(--accent-success-bg); color: var(--accent-success); }
.status-select.status-cancelled   { background-color: var(--bg-tertiary);        color: var(--text-muted); }
.assign-select { background-color: var(--bg-secondary); color: var(--text-primary); border-color: var(--border); min-width: 120px; }

/* ── Kanban Board ── */
.kanban-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); min-height: 50vh; }
.kanban-column { background: var(--bg-tertiary); border-radius: var(--r-lg); padding: var(--s-4); display: flex; flex-direction: column; }
.kanban-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: var(--s-3); margin-bottom: var(--s-3); border-bottom: 1px solid var(--border); }
.kanban-header--pending     { border-color: var(--accent-warning); }
.kanban-header--in_progress { border-color: var(--accent-info); }
.kanban-header--completed   { border-color: var(--accent-success); }
.kanban-title { font-weight: 600; font-size: 0.8rem; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.06em; }
.kanban-count { font-size: 0.68rem; font-weight: 600; padding: 1px 6px; border-radius: var(--r-full); background: var(--bg-secondary); color: var(--text-muted); }
.kanban-cards { flex: 1; display: flex; flex-direction: column; gap: var(--s-3); overflow-y: auto; }
.kanban-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-4); transition: all var(--t-fast); position: relative; }
.kanban-card:hover { box-shadow: var(--shadow-sm); }
.kanban-card.urgency-critical { border-left: 2px solid var(--urgency-critical); }
.kanban-card.urgency-moderate { border-left: 2px solid var(--urgency-moderate); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-2); }
.card-desc { display: block; font-size: 0.84rem; color: var(--text-primary); margin-bottom: var(--s-3); line-height: 1.4; }
.card-desc:hover { color: var(--accent); }
.card-meta { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-muted); margin-bottom: var(--s-3); }
.card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: var(--s-3); border-top: 1px solid var(--border-light); }
.card-staff { font-size: 0.72rem; color: var(--text-muted); }

/* ── Urgency Dot ── */
.urgency-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.urgency-dot--fresh    { background: var(--urgency-fresh); }
.urgency-dot--moderate { background: var(--urgency-moderate); animation: pulse-amber 2s ease-in-out infinite; }
.urgency-dot--critical { background: var(--urgency-critical); animation: pulse-red 1.2s ease-in-out infinite; }

/* ── Detail Page ── */
.breadcrumb { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-6); font-size: 0.84rem; color: var(--text-muted); }
.breadcrumb a { transition: color var(--t-fast); }
.breadcrumb a:hover { color: var(--text-primary); }
.breadcrumb svg { width: 13px; height: 13px; }
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: var(--s-5); align-items: start; }
.detail-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); overflow: hidden; }
.detail-card-header { padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.detail-card-header h2 { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.02em; }
.detail-card-body { padding: var(--s-5); }
.detail-row { display: flex; align-items: baseline; padding: var(--s-3) 0; border-bottom: 1px solid var(--border-light); }
.detail-row:last-child { border-bottom: none; }
.detail-label { width: 120px; flex-shrink: 0; font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.detail-value { font-size: 0.88rem; color: var(--text-primary); }

/* ── Forms ── */
.form-group { margin-bottom: var(--s-4); }
.form-group label {
    display: block;
    margin-bottom: var(--s-2);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.form-select, .form-textarea, .form-input {
    width: 100%;
    padding: 9px var(--s-3);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all var(--t-fast);
    outline: none;
    letter-spacing: -0.01em;
}
.form-textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.form-select:focus, .form-textarea:focus, .form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-subtle);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: 10px var(--s-5);
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font-size: 0.84rem;
    font-weight: 600;
    transition: all var(--t-fast);
    letter-spacing: -0.01em;
    cursor: pointer;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .btn-primary { background: var(--accent); color: white; }
[data-theme="dark"] .btn-primary:hover { background: var(--accent-hover); }
.btn svg { width: 15px; height: 15px; }
.btn--sm { padding: 5px 10px; font-size: 0.78rem; }
.btn-warning { background: var(--accent-warning); color: #fff; border: none; }
.btn-warning:hover { filter: brightness(0.9); }
.btn-danger  { background: var(--accent-danger);  color: #fff; border: none; }
.btn-danger:hover  { filter: brightness(0.9); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); border-color: var(--accent); }

/* ── Badge ── */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--r-sm);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* ── Data Table (generic) ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding: var(--s-3) var(--s-4);
    font-size: 0.68rem; font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border);
    background: var(--bg-tertiary);
    white-space: nowrap;
}
.data-table td {
    padding: var(--s-3) var(--s-4);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-light);
}
.data-table tbody tr:hover { background: var(--accent-subtle); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ── Chat Bubbles ── */
.chat-container { display: flex; flex-direction: column; gap: var(--s-3); max-height: 500px; overflow-y: auto; padding: var(--s-4); scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.chat-bubble { display: flex; gap: var(--s-3); max-width: 82%; }
.chat-guest { align-self: flex-start; }
.chat-concierge { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.7rem; }
.chat-guest .chat-avatar     { background: var(--bg-tertiary); color: var(--text-muted); }
.chat-concierge .chat-avatar { background: var(--accent-subtle); color: var(--accent); }
.chat-avatar svg { width: 13px; height: 13px; }
.chat-body { padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); font-size: 0.84rem; line-height: 1.5; }
.chat-guest .chat-body     { background: var(--bg-tertiary); border-bottom-left-radius: var(--r-sm); color: var(--text-primary); }
.chat-concierge .chat-body { background: var(--accent); color: white; border-bottom-right-radius: var(--r-sm); }
[data-theme="dark"] .chat-concierge .chat-body { background: var(--accent); color: white; }
.chat-sender { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: var(--s-1); opacity: 0.6; }
.chat-time { font-size: 0.63rem; color: var(--text-muted); margin-top: var(--s-1); }

/* ── Guests Page ── */
.guest-table { width: 100%; border-collapse: collapse; }
.guest-table th { text-align: left; padding: var(--s-3) var(--s-4); font-size: 0.68rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--border); background: var(--bg-tertiary); }
.guest-table td { padding: var(--s-3) var(--s-4); font-size: 0.85rem; border-bottom: 1px solid var(--border-light); }
.guest-table tbody tr:hover { background: var(--accent-subtle); }
.guest-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-tertiary); color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.78rem; margin-right: var(--s-2); vertical-align: middle; border: 1px solid var(--border); }
.task-count-badge { display: inline-block; padding: 1px 6px; border-radius: var(--r-sm); font-size: 0.68rem; font-weight: 600; }
.task-count-badge--active { background: var(--accent-warning-bg); color: var(--accent-warning); }
.task-count-badge--total  { background: var(--bg-tertiary); color: var(--text-muted); }

/* ── Toast ── */
#toast-container { position: fixed; bottom: var(--s-8); right: var(--s-8); z-index: 1000; display: flex; flex-direction: column-reverse; gap: var(--s-3); pointer-events: none; }
.toast { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); font-size: 0.84rem; font-weight: 500; color: white; box-shadow: var(--shadow-lg); transform: translateX(120%); transition: transform 300ms var(--ease-spring); pointer-events: auto; display: flex; align-items: center; gap: var(--s-2); letter-spacing: -0.01em; }
.toast--visible  { transform: translateX(0); }
.toast--success  { background: var(--accent-success); }
.toast--error    { background: var(--accent-danger); }
.toast--info     { background: var(--accent-info); }
.toast svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: var(--s-12) var(--s-8); color: var(--text-muted); }
.empty-state svg { width: 40px; height: 40px; margin-bottom: var(--s-4); opacity: 0.25; }
.empty-state p { font-size: 0.88rem; }

/* ── Sidebar Overlay ── */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 49; opacity: 0; transition: opacity var(--t-base); }
.sidebar-overlay.active { display: block; opacity: 1; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .kanban-board { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-menu-btn { display: flex; }
    .page-container { padding: var(--s-4); }
    .top-bar { flex-wrap: wrap; }
    .search-bar { flex: 1 1 100%; order: 3; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
    .task-table thead { display: none; }
    .task-table, .task-table tbody, .task-table tr, .task-table td { display: block; }
    .task-table tr { padding: var(--s-4); margin-bottom: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-secondary); }
    .task-table td { padding: var(--s-1) 0; border: none; display: flex; justify-content: space-between; align-items: center; }
    .task-table td::before { content: attr(data-label); font-size: 0.68rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
    .col-urgency { display: none !important; }
}

/* ── Animations ── */
@keyframes pulse-amber {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}
@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.page-enter { animation: fadeIn 0.2s ease; }

/* ── Staff Schedule ── */
.dept-section { margin-bottom: var(--s-8); }
.dept-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); padding-bottom: var(--s-2); border-bottom: 1px solid var(--border); }
.dept-title { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); letter-spacing: -0.02em; }
.dept-count { font-size: 0.72rem; color: var(--text-muted); background: var(--bg-tertiary); padding: 2px 8px; border-radius: var(--r-full); }
.shift-chips { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-bottom: var(--s-1); }
.shift-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 2px 6px; white-space: nowrap; color: var(--text-secondary); }
.shift-chip-del { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 0.85rem; line-height: 1; padding: 0 2px; transition: color var(--t-fast); }
.shift-chip-del:hover { color: var(--accent-danger); }
.add-shift-details { margin-top: var(--s-1); }
.add-shift-details summary.btn-link { cursor: pointer; font-size: 0.78rem; color: var(--accent); list-style: none; display: inline; user-select: none; }
.add-shift-details summary.btn-link:hover { text-decoration: underline; }
.add-shift-details summary::-webkit-details-marker { display: none; }
.form-select--sm, .form-input--sm { font-size: 0.78rem; padding: 4px 8px; height: 2rem; }
.staff-row--inactive { opacity: 0.45; }
.contact-info { display: flex; flex-direction: column; gap: 2px; }
.contact-line { display: flex; align-items: center; gap: 4px; font-size: 0.78rem; color: var(--text-secondary); }

/* ── Modal ── */
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; align-items: center; justify-content: center; }
.modal-backdrop.modal--open { display: flex; animation: fadeIn 0.15s ease; }
.modal-dialog { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: min(480px, 95vw); max-height: 90vh; overflow-y: auto; padding: var(--s-6); animation: slideUp 0.2s ease; }

/* ── Loading ── */
.loading-spinner { text-align: center; padding: var(--s-8); color: var(--text-muted); }

/* ── HTMX ── */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }

/* ── Agent Settings & Integrations ── */
.integrations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1rem; }

.integration-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-5);
    transition: border-color .2s, box-shadow .2s;
}
.integration-card--enabled { border-color: #22c55e55; }

.integration-card-header { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .85rem; }
.integration-meta { flex: 1; }
.integration-name { font-weight: 600; font-size: .88rem; color: var(--text-primary); letter-spacing: -0.01em; }
.integration-status { font-size: .68rem; font-weight: 600; padding: 2px 7px; border-radius: var(--r-sm); background: var(--bg-tertiary); color: var(--text-muted); white-space: nowrap; align-self: flex-start; text-transform: uppercase; letter-spacing: 0.05em; }
.integration-status--on { background: var(--accent-success-bg); color: var(--accent-success); }
[data-theme="dark"] .integration-status--on { background: rgba(22,101,52,0.2); color: #86efac; }
.integration-form { display: flex; flex-direction: column; }

.integration-field-label { font-size: .7rem; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; display: block; text-transform: uppercase; letter-spacing: 0.07em; }
.integration-toggle-row { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .84rem; font-weight: 500; }
.integration-toggle-row input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }
