/* ================================================================
   DoorPost App CSS
   Shared styles for admin dashboard and customer inquiry form
   ================================================================ */

/* ----------------------------------------------------------------
   RESET & ROOT VARIABLES
   ---------------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #0B1426;
    --deep: #111D35;
    --amber: #E8A838;
    --amber-light: #F5C96A;
    --amber-dim: rgba(232, 168, 56, 0.12);
    --amber-border: rgba(232, 168, 56, 0.15);
    --amber-glow: rgba(232, 168, 56, 0.08);
    --cream: #FFF8ED;
    --warm-gray: #B8A99A;
    --text: #E8E2D9;
    --muted: #8B8078;

    --surface: #0E1829;
    --surface-raised: #152035;
    --surface-hover: #1A2742;
    --border: rgba(255, 255, 255, 0.06);
    --border-subtle: rgba(255, 255, 255, 0.03);

    --blue: #5B9CF5;
    --blue-dim: rgba(91, 156, 245, 0.12);
    --green: #4ADE80;
    --green-dim: rgba(74, 222, 128, 0.12);
    --red: #F87171;
    --red-dim: rgba(248, 113, 113, 0.12);
    --gray-badge: #6B7280;
    --gray-badge-dim: rgba(107, 114, 128, 0.15);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 100px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 20px rgba(232, 168, 56, 0.1);

    --sidebar-width: 260px;
    --header-height: 64px;

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}


/* ----------------------------------------------------------------
   BODY DEFAULTS
   ---------------------------------------------------------------- */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--navy);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}


/* ----------------------------------------------------------------
   TYPOGRAPHY
   ---------------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--cream);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

h4 {
    font-size: 1rem;
    font-weight: 600;
}

p {
    color: var(--warm-gray);
    line-height: 1.7;
}

small {
    font-size: 0.8125rem;
    color: var(--muted);
}

label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--warm-gray);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}


/* ----------------------------------------------------------------
   LINKS
   ---------------------------------------------------------------- */
a {
    color: var(--amber);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--amber-light);
}


/* ----------------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    line-height: 1.4;
    text-decoration: none;
}

.btn:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--amber);
    color: var(--navy);
    border-color: var(--amber);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--amber-light);
    border-color: var(--amber-light);
    color: var(--navy);
    box-shadow: var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: transparent;
    color: var(--amber);
    border-color: var(--amber-border);
}

.btn-secondary:hover {
    background: rgba(232, 168, 56, 0.08);
    border-color: rgba(232, 168, 56, 0.3);
    color: var(--amber-light);
}

.btn-danger {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

.btn-danger:hover {
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 0 16px rgba(248, 113, 113, 0.15);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: transparent;
    padding: 8px 12px;
}

.btn-ghost:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.btn-sm {
    font-size: 0.8125rem;
    padding: 6px 14px;
}

.btn-lg {
    font-size: 1rem;
    padding: 14px 28px;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}


/* ----------------------------------------------------------------
   FORM INPUTS
   ---------------------------------------------------------------- */
.form-group {
    margin-bottom: 20px;
}

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

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 11px 14px;
    transition: all var(--transition-base);
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

input:hover,
textarea:hover,
select:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(232, 168, 56, 0.12);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%238B8078'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 6px;
}

.form-error {
    font-size: 0.75rem;
    color: var(--red);
    margin-top: 6px;
}

input.error,
textarea.error,
select.error {
    border-color: var(--red);
}

input.error:focus,
textarea.error:focus,
select.error:focus {
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}


/* ----------------------------------------------------------------
   CARDS
   ---------------------------------------------------------------- */
.card {
    background: var(--deep);
    border: 1px solid var(--amber-dim);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: border-color var(--transition-base);
}

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

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

.card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--cream);
}

.card-body {
    color: var(--warm-gray);
    font-size: 0.9375rem;
}

.card-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}


/* ----------------------------------------------------------------
   BADGES / STATUS PILLS
   ---------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    line-height: 1.4;
    white-space: nowrap;
}

.badge-new {
    background: rgba(232, 168, 56, 0.15);
    color: var(--amber);
}

.badge-in_progress,
.badge-in-progress {
    background: var(--blue-dim);
    color: var(--blue);
}

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

.badge-closed {
    background: var(--gray-badge-dim);
    color: var(--gray-badge);
}

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

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

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


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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead th {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    background: var(--surface);
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 14px 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

tbody tr {
    transition: background var(--transition-fast);
}

tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

tbody tr:hover {
    background: var(--surface-hover);
}

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


/* ----------------------------------------------------------------
   MODAL
   ---------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--deep);
    border: 1px solid var(--amber-dim);
    border-radius: var(--radius-xl);
    padding: 36px;
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(12px);
    transition: transform var(--transition-base);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

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

.modal-header h2 {
    font-size: 1.25rem;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.125rem;
}

.modal-close:hover {
    background: var(--surface-hover);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.1);
}

.modal-body {
    color: var(--warm-gray);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.modal-footer {
    margin-top: 28px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}


/* ================================================================
   LAYOUT COMPONENTS
   ================================================================ */

/* ----------------------------------------------------------------
   APP LAYOUT (Sidebar + Main)
   ---------------------------------------------------------------- */
.app-layout {
    display: flex;
    min-height: 100vh;
}


/* ----------------------------------------------------------------
   SIDEBAR
   ---------------------------------------------------------------- */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--deep);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: transform var(--transition-base);
}

.sidebar-logo {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo a {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--cream);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.sidebar-logo a span {
    color: var(--amber);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav a,
.sidebar-nav button {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all var(--transition-fast);
}

.sidebar-nav a:hover,
.sidebar-nav button:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.sidebar-nav a.active {
    background: rgba(232, 168, 56, 0.1);
    color: var(--amber);
}

.sidebar-nav .nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-nav a.active .nav-icon {
    opacity: 1;
}

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

.sidebar-footer .sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: var(--warm-gray);
}

.sidebar-footer .sidebar-user .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(232, 168, 56, 0.15);
    color: var(--amber);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 150;
    width: 40px;
    height: 40px;
    background: var(--deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--surface-hover);
}


/* ----------------------------------------------------------------
   MAIN CONTENT
   ---------------------------------------------------------------- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    overflow-y: auto;
}

.main-content-inner {
    padding: 36px 40px;
    max-width: 1200px;
}


/* ----------------------------------------------------------------
   PAGE HEADER
   ---------------------------------------------------------------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 1.75rem;
}

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


/* ----------------------------------------------------------------
   STATS GRID
   ---------------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--deep);
    border: 1px solid var(--amber-dim);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color var(--transition-base);
}

.stat-card:hover {
    border-color: var(--amber-border);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--amber);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.4;
}

.stat-change {
    font-size: 0.75rem;
    margin-top: 8px;
    font-weight: 500;
}

.stat-change.up {
    color: var(--green);
}

.stat-change.down {
    color: var(--red);
}


/* ================================================================
   ADMIN SPECIFIC
   ================================================================ */

/* ----------------------------------------------------------------
   TAB NAVIGATION
   ---------------------------------------------------------------- */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
    overflow-x: auto;
}

.tab-nav button,
.tab-nav a {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.tab-nav button:hover,
.tab-nav a:hover {
    color: var(--text);
}

.tab-nav button.active,
.tab-nav a.active {
    color: var(--amber);
    border-bottom-color: var(--amber);
}


/* ----------------------------------------------------------------
   INQUIRY LIST
   ---------------------------------------------------------------- */
.inquiry-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inquiry-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    cursor: pointer;
    transition: all var(--transition-base);
}

.inquiry-item:hover {
    border-color: var(--amber-border);
    background: var(--surface-raised);
}

.inquiry-item.selected {
    border-color: var(--amber);
    box-shadow: 0 0 0 1px var(--amber-dim);
}

.inquiry-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(232, 168, 56, 0.12);
    color: var(--amber);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9375rem;
    flex-shrink: 0;
}

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

.inquiry-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--cream);
    margin-bottom: 3px;
}

.inquiry-service {
    font-size: 0.8125rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inquiry-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.inquiry-time {
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
}


/* ----------------------------------------------------------------
   INQUIRY DETAIL
   ---------------------------------------------------------------- */
.inquiry-detail {
    background: var(--deep);
    border: 1px solid var(--amber-dim);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inquiry-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.inquiry-detail-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inquiry-detail-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.inquiry-detail-actions {
    display: flex;
    gap: 8px;
}

.inquiry-detail-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}


/* ----------------------------------------------------------------
   MESSAGE THREAD
   ---------------------------------------------------------------- */
.message-thread {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
    padding: 4px 0;
}

.message-thread::-webkit-scrollbar {
    width: 5px;
}

.message-thread::-webkit-scrollbar-track {
    background: transparent;
}

.message-thread::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

.message-thread::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.14);
}

.message-row {
    display: flex;
    flex-direction: column;
    max-width: 75%;
}

.message-row.customer {
    align-self: flex-start;
    align-items: flex-start;
}

.message-row.ai {
    align-self: flex-end;
    align-items: flex-end;
}

.message-row.admin {
    align-self: flex-end;
    align-items: flex-end;
}

.message-sender {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    padding: 0 4px;
}

.message-row.customer .message-sender {
    color: var(--muted);
}

.message-row.ai .message-sender {
    color: var(--amber);
}

.message-row.admin .message-sender {
    color: var(--blue);
}

.message-bubble {
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.9375rem;
    line-height: 1.6;
    word-break: break-word;
}

.message-row.customer .message-bubble {
    background: var(--surface);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.message-row.ai .message-bubble {
    background: rgba(232, 168, 56, 0.1);
    color: var(--cream);
    border-bottom-right-radius: 4px;
}

.message-row.admin .message-bubble {
    background: rgba(91, 156, 245, 0.12);
    color: var(--cream);
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 0.6875rem;
    color: var(--muted);
    margin-top: 4px;
    padding: 0 4px;
    opacity: 0.7;
}


/* ----------------------------------------------------------------
   CALENDAR GRID
   ---------------------------------------------------------------- */
.calendar-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.calendar-header {
    background: var(--surface);
    padding: 14px 8px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.calendar-header.today {
    color: var(--amber);
}

.calendar-time {
    background: var(--surface);
    padding: 12px 8px;
    text-align: right;
    font-size: 0.75rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.calendar-slot {
    background: var(--deep);
    padding: 8px;
    min-height: 56px;
    cursor: pointer;
    transition: background var(--transition-fast);
    position: relative;
}

.calendar-slot:hover {
    background: var(--surface-raised);
}

.calendar-slot.booked {
    background: rgba(232, 168, 56, 0.06);
}

.calendar-slot.booked::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: rgba(232, 168, 56, 0.12);
    border: 1px solid var(--amber-dim);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--amber);
}

.calendar-slot-label {
    position: relative;
    z-index: 1;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--amber);
    padding: 4px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ----------------------------------------------------------------
   APPOINTMENT CARD
   ---------------------------------------------------------------- */
.appointment-card {
    background: var(--deep);
    border: 1px solid var(--amber-dim);
    border-left: 3px solid var(--amber);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: border-color var(--transition-base);
}

.appointment-card:hover {
    border-color: var(--amber-border);
    border-left-color: var(--amber-light);
}

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

.appointment-card-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--cream);
}

.appointment-card-time {
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--amber);
}

.appointment-card-details {
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.6;
}

.appointment-card-details strong {
    color: var(--warm-gray);
    font-weight: 500;
}


/* ----------------------------------------------------------------
   SETTINGS FORM
   ---------------------------------------------------------------- */
.settings-form {
    max-width: 640px;
}

.settings-form .form-group {
    margin-bottom: 24px;
}

.settings-form .form-section {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.settings-form .form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-form .form-section-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 20px;
}

.settings-form .form-section-desc {
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 20px;
    line-height: 1.6;
}


/* ================================================================
   INQUIRY PAGE (CUSTOMER-FACING)
   ================================================================ */

/* ----------------------------------------------------------------
   INQUIRY CONTAINER
   ---------------------------------------------------------------- */
.inquiry-container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* ----------------------------------------------------------------
   INQUIRY HEADER
   ---------------------------------------------------------------- */
.inquiry-header {
    padding: 28px 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.inquiry-header .inquiry-logo {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 6px;
}

.inquiry-header .inquiry-logo span {
    color: var(--amber);
}

.inquiry-header .inquiry-tagline {
    font-size: 0.8125rem;
    color: var(--muted);
}


/* ----------------------------------------------------------------
   CHAT CONTAINER
   ---------------------------------------------------------------- */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
}


/* ----------------------------------------------------------------
   CHAT INPUT
   ---------------------------------------------------------------- */
.chat-input {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: var(--deep);
}

.chat-input textarea {
    flex: 1;
    min-height: 44px;
    max-height: 140px;
    resize: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 11px 18px;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text);
    font-family: var(--font-body);
    transition: border-color var(--transition-base);
}

.chat-input textarea:focus {
    outline: none;
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(232, 168, 56, 0.08);
}

.chat-input .chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--amber);
    border: none;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    font-size: 1.125rem;
}

.chat-input .chat-send:hover {
    background: var(--amber-light);
    box-shadow: var(--shadow-glow);
}

.chat-input .chat-send:active {
    transform: scale(0.95);
}

.chat-input .chat-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* ----------------------------------------------------------------
   SERVICE CHIPS
   ---------------------------------------------------------------- */
.service-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.service-chip {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--warm-gray);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 8px 18px;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.service-chip:hover {
    border-color: var(--amber-border);
    color: var(--cream);
    background: var(--surface-hover);
}

.service-chip.selected {
    background: rgba(232, 168, 56, 0.12);
    border-color: var(--amber);
    color: var(--amber);
}


/* ----------------------------------------------------------------
   BOOKING CARD (CUSTOMER VIEW)
   ---------------------------------------------------------------- */
.booking-card {
    background: var(--deep);
    border: 1px solid var(--green-dim);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
}

.booking-card-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    background: var(--green-dim);
    color: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.booking-card h3 {
    font-size: 1.125rem;
    color: var(--cream);
    margin-bottom: 6px;
}

.booking-card p {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 16px;
}

.booking-card-detail {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}

.booking-card-detail .detail-item {
    text-align: center;
}

.booking-card-detail .detail-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 4px;
}

.booking-card-detail .detail-value {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--cream);
}


/* ================================================================
   UTILITY CLASSES
   ================================================================ */

/* ----------------------------------------------------------------
   DISPLAY
   ---------------------------------------------------------------- */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

.gap-xs {
    gap: 4px;
}

.gap-sm {
    gap: 8px;
}

.gap-md {
    gap: 16px;
}

.gap-lg {
    gap: 24px;
}

.gap-xl {
    gap: 32px;
}


/* ----------------------------------------------------------------
   TEXT COLORS
   ---------------------------------------------------------------- */
.text-amber {
    color: var(--amber);
}

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

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

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

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

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

.text-warm-gray {
    color: var(--warm-gray);
}


/* ----------------------------------------------------------------
   SPACING - Margin Top
   ---------------------------------------------------------------- */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }


/* ----------------------------------------------------------------
   SPACING - Margin Bottom
   ---------------------------------------------------------------- */
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }


/* ----------------------------------------------------------------
   SPACING - Padding
   ---------------------------------------------------------------- */
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }


/* ----------------------------------------------------------------
   TEXT ALIGNMENT & SIZE
   ---------------------------------------------------------------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.font-heading { font-family: var(--font-heading); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ----------------------------------------------------------------
   WIDTH
   ---------------------------------------------------------------- */
.w-full { width: 100%; }


/* ================================================================
   RESPONSIVE
   ================================================================ */

/* ----------------------------------------------------------------
   TABLET (max-width: 1024px)
   ---------------------------------------------------------------- */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-grid {
        overflow-x: auto;
        min-width: 700px;
    }

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


/* ----------------------------------------------------------------
   MOBILE (max-width: 768px)
   ---------------------------------------------------------------- */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }

    /* Sidebar collapses to hidden, triggered by toggle */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .sidebar-toggle {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }

    .main-content-inner {
        padding: 24px 20px;
        padding-top: 68px; /* room for sidebar toggle */
    }

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

    .sidebar-overlay.active {
        display: block;
    }

    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-actions {
        width: 100%;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    /* Calendar scrollable */
    .calendar-grid {
        min-width: 600px;
    }

    .calendar-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -20px;
        padding: 0 20px;
    }

    /* Tabs become scrollable */
    .tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tab-nav::-webkit-scrollbar {
        display: none;
    }

    /* Inquiry list */
    .inquiry-item {
        padding: 14px 16px;
    }

    .inquiry-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.8125rem;
    }

    /* Message thread */
    .message-row {
        max-width: 88%;
    }

    .message-bubble {
        padding: 10px 14px;
        font-size: 0.875rem;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        padding: 24px;
        margin: 16px;
    }

    /* Table responsive */
    .table-wrap {
        margin: 0 -20px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* Booking card */
    .booking-card-detail {
        flex-direction: column;
        gap: 12px;
    }

    /* Chat input */
    .chat-input {
        padding: 12px 16px;
    }
}


/* ----------------------------------------------------------------
   SMALL MOBILE (max-width: 480px)
   ---------------------------------------------------------------- */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .main-content-inner {
        padding: 20px 16px;
        padding-top: 64px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .service-chips {
        gap: 6px;
    }

    .service-chip {
        padding: 6px 14px;
        font-size: 0.75rem;
    }

    .appointment-card {
        padding: 14px 16px;
    }

    .inquiry-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .inquiry-detail-actions {
        width: 100%;
    }

    .inquiry-detail-actions .btn {
        flex: 1;
    }
}


/* ================================================================
   SCROLLBAR GLOBAL STYLE
   ================================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.12);
}


/* ================================================================
   SELECTION
   ================================================================ */
::selection {
    background: rgba(232, 168, 56, 0.25);
    color: var(--cream);
}


/* ================================================================
   LOADING / SPINNER
   ================================================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--amber);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

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

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--muted);
    gap: 12px;
    font-size: 0.875rem;
}


/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--muted);
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    color: var(--warm-gray);
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.875rem;
    max-width: 360px;
    margin: 0 auto;
}


/* ================================================================
   TOAST / NOTIFICATION
   ================================================================ */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--deep);
    border: 1px solid var(--amber-dim);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--cream);
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-base);
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.toast.toast-success {
    border-color: var(--green-dim);
}

.toast.toast-error {
    border-color: var(--red-dim);
}


/* ================================================================
   DIVIDER
   ================================================================ */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

.divider-amber {
    border-top-color: rgba(232, 168, 56, 0.1);
}
