/* ──────────────────────────────────────────────────────────
   Patricia Travel Nurse Rentals — Design System
   Engineered by Champlin Enterprises
   ────────────────────────────────────────────────────────── */

:root {
    /* Brand Reds */
    --red-50:  #fef2f2;
    --red-100: #fee2e2;
    --red-200: #fecaca;
    --red-300: #fca5a5;
    --red-400: #f87171;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --red-800: #991b1b;
    --red-900: #7f1d1d;

    /* The Pink (Kevin's choice — deal with it) */
    --pink-300: #f9a8d4;
    --pink-400: #f472b6;
    --pink-500: #ec4899;

    /* Neutrals */
    --gray-50:  #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #3b82f6;
    --info-light: #dbeafe;

    /* Surfaces */
    --bg-body: var(--gray-50);
    --bg-card: #ffffff;
    --bg-nav: var(--gray-900);
    --bg-tint: var(--red-50);

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'DM Sans', 'Inter', sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-hover: 0 10px 25px -5px rgba(220,38,38,0.12), 0 8px 10px -6px rgba(0,0,0,0.05);

    /* Borders */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --border-light: 1px solid var(--gray-200);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 0.25s;

    /* Room Colors */
    --room-1: var(--red-600);
    --room-1-light: var(--red-100);
    --room-2: var(--red-400);
    --room-2-light: var(--red-50);
}

/* ── Reset & Base ──────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--bg-body);
    color: var(--gray-800);
    margin: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.5em;
}

a { color: var(--red-600); text-decoration: none; transition: color var(--duration) var(--ease-out); }
a:hover { color: var(--red-700); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container-fluid { padding: 0 20px; }

/* ── Navigation ────────────────────────────────────────── */

.site-nav {
    background: var(--bg-nav);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-brand-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--red-500), var(--red-700));
    color: #fff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: transform var(--duration) var(--ease-out);
}

.nav-brand:hover .nav-brand-icon { transform: rotate(-6deg) scale(1.05); }

.nav-brand-text {
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.brand-accent { color: var(--red-400); }

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.nav-link {
    color: var(--gray-400);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all var(--duration) var(--ease-out);
    text-decoration: none;
    position: relative;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.07);
}

.nav-link.active {
    color: #fff;
    background: rgba(220,38,38,0.2);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--red-500);
    border-radius: 2px;
}

.nav-link-muted { color: var(--gray-500); }
.nav-link-muted:hover { color: var(--gray-300); }

.btn-nav-primary {
    background: var(--red-600);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all var(--duration) var(--ease-out);
    text-decoration: none;
}

.btn-nav-primary:hover {
    background: var(--red-700);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gray-400);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Cards ─────────────────────────────────────────────── */

.card {
    background: var(--bg-card);
    border: var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--duration) var(--ease-out);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-body { padding: 18px; }

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border: var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration) var(--ease-out);
}

.stat-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* Colored accent cards */
.card-tint-red {
    background: linear-gradient(135deg, var(--red-50) 0%, #fff 60%);
    border-left: 3px solid var(--red-400);
}
.card-tint-green {
    background: linear-gradient(135deg, var(--success-light) 0%, #fff 60%);
    border-left: 3px solid var(--success);
}
.card-tint-amber {
    background: linear-gradient(135deg, var(--warning-light) 0%, #fff 60%);
    border-left: 3px solid var(--warning);
}
.card-tint-blue {
    background: linear-gradient(135deg, var(--info-light) 0%, #fff 60%);
    border-left: 3px solid var(--info);
}
.card-tint-purple {
    background: linear-gradient(135deg, #ede9fe 0%, #fff 60%);
    border-left: 3px solid #8b5cf6;
}

/* Clickable cards */
a.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-md);
}
a.card-link:hover { color: inherit; }
a.card-link:hover .card {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
a.card-link .card-go {
    font-size: 0.7rem;
    color: var(--gray-400);
    transition: color var(--duration) var(--ease-out);
}
a.card-link:hover .card-go {
    color: var(--red-600);
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
    margin: 4px 0;
}

.stat-value.positive { color: var(--success); }
.stat-value.negative { color: var(--red-600); }
.stat-value.accent { color: var(--red-600); }
.stat-value-room2 { color: var(--red-400); font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin: 4px 0; }

.tenant-name-link { color: var(--gray-800); text-decoration: none; }
.tenant-name-link:hover { color: var(--red-600); }

.stat-sub {
    font-size: 0.72rem;
    color: var(--gray-400);
}

/* Accent border cards */
.card-accent-1 { border-top: 3px solid var(--room-1); }
.card-accent-2 { border-top: 3px solid var(--room-2); }
.card-accent-success { border-top: 3px solid var(--success); }
.card-accent-danger { border-top: 3px solid var(--red-500); }
.card-accent-info { border-top: 3px solid var(--info); }

/* Card entrance animation */
@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-enter {
    animation: cardEnter 0.4s var(--ease-out) both;
}

/* ── Buttons ───────────────────────────────────────────── */

.btn {
    font-family: var(--font-body);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease-out);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: none;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--red-600);
    color: #fff;
}

.btn-primary:hover {
    background: var(--red-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}

.btn-outline {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.btn-outline:hover {
    border-color: var(--red-300);
    color: var(--red-600);
    background: var(--red-50);
}

.btn-outline-danger {
    background: transparent;
    color: var(--red-500);
    border: 1px solid var(--red-200);
    padding: 4px 10px;
    font-size: 0.78rem;
}

.btn-outline-danger:hover {
    background: var(--red-50);
    border-color: var(--red-400);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.78rem;
}

.btn-group {
    display: inline-flex;
    gap: 0;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

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

/* ── Badges ────────────────────────────────────────────── */

.badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    letter-spacing: 0.02em;
}

.badge-room-1 {
    background: var(--red-100);
    color: var(--red-700);
}

.badge-room-2 {
    background: var(--red-50);
    color: var(--red-500);
    border: 1px solid var(--red-200);
}

.badge-shared {
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-success {
    background: var(--success-light);
    color: #065f46;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400e;
}

.badge-info {
    background: var(--info-light);
    color: #1e40af;
}

.badge-pink {
    background: #fce7f3;
    color: var(--pink-500);
}

.badge-count {
    background: var(--gray-100);
    color: var(--gray-600);
    min-width: 22px;
    text-align: center;
}

.badge-recurring {
    background: var(--info-light);
    color: var(--info);
}

/* Badge pulse animation for active/current items */
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.3); }
    50% { box-shadow: 0 0 0 4px rgba(220,38,38,0); }
}

.badge-active { animation: badgePulse 2s var(--ease-out) infinite; }

/* ── Forms ─────────────────────────────────────────────── */

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
    display: block;
}

.form-control, .form-select {
    font-family: var(--font-body);
    font-size: 0.88rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--gray-800);
    background: #fff;
    transition: all var(--duration) var(--ease-out);
    width: 100%;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--red-400);
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

.form-check-input {
    accent-color: var(--red-600);
}

.form-check-input:checked {
    background-color: var(--red-600);
    border-color: var(--red-600);
}

.form-text {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ── Tables ────────────────────────────────────────────── */

.table-wrap {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: var(--border-light);
    overflow: visible;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 14px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
}

tbody td {
    font-size: 0.85rem;
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
    transition: background var(--duration) var(--ease-out);
}

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

tbody tr:hover td {
    background: var(--red-50);
}

tbody tr.row-current td {
    background: var(--warning-light);
}

tbody tr.row-past td {
    color: var(--gray-400);
}

tfoot td {
    font-size: 0.85rem;
    padding: 10px 14px;
    background: var(--gray-50);
    border-top: 2px solid var(--gray-200);
    font-weight: 600;
}

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

/* ── Alerts ────────────────────────────────────────────── */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: cardEnter 0.3s var(--ease-out) both;
}

.alert-success { background: var(--success-light); color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: var(--red-100); color: var(--red-800); border: 1px solid var(--red-200); }
.alert-warning { background: var(--warning-light); color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: var(--info-light); color: #1e40af; border: 1px solid #bfdbfe; }
.alert-light { background: var(--gray-50); color: var(--gray-700); border: var(--border-light); }

.alert a { font-weight: 600; text-decoration: underline; }
.alert .btn-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: inherit;
    opacity: 0.5;
}

/* ── Progress Bars ─────────────────────────────────────── */

.progress-track {
    background: var(--gray-100);
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
    flex-grow: 1;
}

.progress-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.8s var(--ease-out);
    background: linear-gradient(90deg, var(--red-400), var(--red-600));
}

/* ── Occupancy Rings ───────────────────────────────────── */

.occupancy-ring {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(
        var(--color, var(--red-600)) calc(var(--pct, 0) * 1%),
        var(--gray-100) calc(var(--pct, 0) * 1%)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: transform var(--duration) var(--ease-out);
}

.occupancy-ring:hover { transform: scale(1.08); }

.occupancy-ring span {
    background: var(--bg-card);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-700);
}

/* ── Occupancy Chart ───────────────────────────────────── */

.occupancy-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 120px;
    padding-top: 10px;
}

.occupancy-month {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.occupancy-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 100px;
    width: 100%;
    justify-content: center;
}

.occupancy-bar {
    width: 8px;
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: height 0.6s var(--ease-out);
    cursor: help;
}

.occupancy-bar.bar-room-1 { background: var(--red-600); }
.occupancy-bar.bar-room-2 { background: var(--red-300); }

.occupancy-month small {
    font-size: 0.65rem;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ── Financial Chart ───────────────────────────────────── */

.financial-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 160px;
    padding-top: 10px;
}

.fin-month {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.fin-month.future { opacity: 0.4; }

.fin-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 120px;
    width: 100%;
    justify-content: center;
}

.fin-bar {
    width: 10px;
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: height 0.6s var(--ease-out);
    cursor: help;
}

.fin-bar.bar-income {
    background: linear-gradient(to top, var(--success), #34d399);
}

.fin-bar.bar-expense {
    background: linear-gradient(to top, var(--red-500), var(--red-400));
}

.fin-net {
    font-size: 0.6rem;
    font-weight: 600;
    display: block;
    line-height: 1.2;
}

.fin-month small {
    font-size: 0.65rem;
    color: var(--gray-500);
    margin-top: 2px;
}

/* Legend dot */
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 3px;
}

.legend-dot.dot-income { background: var(--success); }
.legend-dot.dot-expense { background: var(--red-500); }
.legend-dot.dot-room-1 { background: var(--red-600); }
.legend-dot.dot-room-2 { background: var(--red-300); }

/* ── Room Status ───────────────────────────────────────── */

.room-card {
    background: var(--bg-card);
    border: var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration) var(--ease-out);
    position: relative;
}

.room-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.room-card-1::before { background: linear-gradient(90deg, var(--red-600), var(--red-400)); }
.room-card-2::before { background: linear-gradient(90deg, var(--red-400), var(--red-200)); }

.room-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.room-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.room-label-1 { color: var(--red-600); }
.room-label-2 { color: var(--red-400); }

.room-tenant-name { margin: 4px 0 2px; }
.room-vacant { color: var(--gray-400); }

/* ── Availability Dots ─────────────────────────────────── */

.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    background: var(--success);
}

/* ── Duration Info Box ─────────────────────────────────── */

#duration-info {
    background: var(--red-50);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--red-500);
    font-size: 0.85rem;
}

/* ── Calendar (FullCalendar overrides) ─────────────────── */

#calendar {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-md);
    border: var(--border-light);
    box-shadow: var(--shadow-sm);
}

.fc-event {
    cursor: pointer;
    padding: 2px 8px;
    font-size: 0.8rem;
    border-radius: 4px;
    font-weight: 500;
    border: none !important;
    transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}

.fc-event:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.fc-daygrid-day:hover { background: var(--red-50); }

.fc .fc-button-primary {
    background: var(--red-600);
    border-color: var(--red-600);
}

.fc .fc-button-primary:hover {
    background: var(--red-700);
    border-color: var(--red-700);
}

.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: var(--red-800);
    border-color: var(--red-800);
}

.fc .fc-today-button:disabled {
    background: var(--gray-300);
    border-color: var(--gray-300);
}

.fc .fc-toolbar-title {
    font-family: var(--font-heading);
    font-weight: 700;
}

.fc-day-today {
    background: var(--red-50) !important;
}

/* ── Vacancy Alert Bar ─────────────────────────────────── */

.vacancy-bar {
    background: var(--bg-card);
    border: var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.vacancy-bar strong {
    font-size: 0.82rem;
    color: var(--gray-700);
}

.vacancy-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    margin-right: 16px;
    margin-top: 6px;
}

/* ── Footer ────────────────────────────────────────────── */

.site-footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--gray-200);
    background: var(--bg-card);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--gray-700);
}

.footer-divider { color: var(--gray-300); }

.footer-credit {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.footer-credit a {
    color: var(--gray-600);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-credit a:hover { color: var(--red-600); }

.footer-easter-egg { transition: all 0.4s var(--ease-out); }

.pink-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--pink-400);
    background: #fce7f3;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: help;
    transition: all 0.3s var(--ease-out);
}

.pink-badge:hover {
    background: var(--pink-400);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(236,72,153,0.3);
}

.pink-text {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.5s var(--ease-out), margin 0.3s;
    margin-left: 0;
}

.pink-badge:hover .pink-text {
    max-width: 300px;
    margin-left: 2px;
}

/* ── Notes Timeline ────────────────────────────────────── */

.notes-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.note-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--duration) var(--ease-out);
    position: relative;
}

.note-item:last-child { border-bottom: none; }

.note-item:hover { background: var(--gray-50); margin: 0 -18px; padding: 12px 18px; border-radius: var(--radius-sm); }

.note-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.note-content {
    font-size: 0.85rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.note-delete-btn {
    background: none;
    border: none;
    color: var(--gray-300);
    cursor: pointer;
    padding: 0 2px;
    font-size: 0.85rem;
    transition: color var(--duration) var(--ease-out);
    line-height: 1;
}

.note-delete-btn:hover { color: var(--red-500); }

/* ── Empty States ─────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 24px 16px;
    color: var(--gray-400);
}

.empty-state i {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.88rem;
    font-weight: 500;
    margin: 0 0 4px;
    color: var(--gray-500);
}

/* ── Tooltips (CSS-only) ──────────────────────────────── */

[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--gray-800);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 400;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.2s var(--ease-out);
    z-index: 50;
    max-width: 240px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Search Bar ───────────────────────────────────────── */

.search-bar {
    position: relative;
    max-width: 280px;
}

.search-bar input {
    padding-left: 34px;
    font-size: 0.82rem;
}

.search-bar i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.85rem;
    pointer-events: none;
}

/* ── Page Header ──────────────────────────────────────── */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h2 { margin: 0; }

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

/* ── Horizontal scroll for mobile tables ──────────────── */

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll table {
    min-width: 600px;
}

/* ── Info Hints ───────────────────────────────────────── */

.info-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--gray-400);
    cursor: help;
}

.info-hint i { font-size: 0.7rem; }

/* ── Status indicator dot ─────────────────────────────── */

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot-success { background: var(--success); }
.status-dot-danger { background: var(--red-500); }
.status-dot-warning { background: var(--warning); }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-dot-pulse { animation: pulse 2s ease-in-out infinite; }

/* ── Layout Utilities ──────────────────────────────────── */

.page-content { padding: 20px 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.ms-1 { margin-left: 4px; }
.ms-2 { margin-left: 8px; }
.me-1 { margin-right: 4px; }
.me-2 { margin-right: 8px; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.d-flex { display: flex; }
.d-inline { display: inline; }
.d-block { display: block; }
.d-inline-flex { display: inline-flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow-1 { flex-grow: 1; }
.w-100 { width: 100%; }
.small { font-size: 0.82rem; }
.fw-bold { font-weight: 700; }

.text-success { color: var(--success); }
.text-danger { color: var(--red-600); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-muted { color: var(--gray-500); }

/* ── Grid ──────────────────────────────────────────────── */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 992px) {
    .nav-toggle { display: flex; }

    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-nav);
        flex-direction: column;
        padding: 12px 20px 20px;
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
        z-index: 99;
    }

    .nav-menu.open { display: flex; }

    .nav-links { flex-direction: column; width: 100%; gap: 2px; }
    .nav-link { width: 100%; padding: 10px 12px; }
    .nav-link.active::after { display: none; }
    .nav-actions { width: 100%; margin-left: 0; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.1); }
    .btn-nav-primary { flex: 1; justify-content: center; }

    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .container-fluid { padding: 0 12px; }
    .container { padding: 0 12px; }

    h2 { font-size: 1.3rem; }

    .stat-value { font-size: 1.3rem; }
    .stat-value-room2 { font-size: 1.3rem; }

    .financial-chart, .occupancy-chart { height: 100px; }
    .fin-bars { height: 80px; }
    .fin-bar, .occupancy-bar { width: 6px; }

    .occupancy-ring {
        width: 50px;
        height: 50px;
    }
    .occupancy-ring span {
        width: 36px;
        height: 36px;
        font-size: 0.65rem;
    }

    .footer-inner { flex-direction: column; text-align: center; }

    .grid-2 { grid-template-columns: 1fr; }

    .table-wrap { border-radius: var(--radius-sm); }
    thead th, tbody td { padding: 8px 10px; font-size: 0.78rem; }

    .page-header { flex-direction: column; align-items: flex-start; }
    .page-header-actions { width: 100%; }
    .search-bar { max-width: 100%; flex: 1; }

    /* Notes on mobile */
    .note-item:hover { margin: 0; padding: 12px 0; }
}

@media (max-width: 480px) {
    .nav-brand-text { font-size: 0.82rem; }
    .brand-accent { display: none; }
    .grid-4, .grid-3 { grid-template-columns: 1fr; }

    .page-header-actions { flex-wrap: wrap; }
    .btn-group .btn { padding: 4px 8px; font-size: 0.72rem; }

    /* Hide tooltips on touch */
    [data-tooltip]::after { display: none; }

    .booking-tabs { flex-wrap: wrap; }
    .action-dropdown { right: 0; left: auto; }
}

/* ──────────────────────────────────────────────────────────
   Booking Tabs
   ────────────────────────────────────────────────────────── */

.booking-tabs {
    display: flex;
    gap: 2px;
    background: var(--gray-200);
    border-radius: 8px;
    padding: 3px;
    width: fit-content;
}

.booking-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.15s ease;
}

.booking-tab:hover {
    color: var(--gray-800);
    background: rgba(255,255,255,0.5);
}

.booking-tab.active {
    background: #fff;
    color: var(--gray-900);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-600);
}

.booking-tab.active .tab-count {
    background: var(--red-100);
    color: var(--red-700);
}

/* ──────────────────────────────────────────────────────────
   Action Menu (3-dot dropdown)
   ────────────────────────────────────────────────────────── */

.action-menu {
    position: relative;
    display: inline-block;
}

.action-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s ease;
}

.action-trigger:hover {
    background: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.action-dropdown {
    display: none;
    position: fixed;
    min-width: 160px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.06);
    z-index: 1000;
    padding: 4px;
    overflow: hidden;
}

.action-menu.open .action-dropdown {
    display: block;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--gray-700);
    font-size: 0.82rem;
    text-decoration: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.1s ease;
    text-align: left;
}

.action-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.action-item.action-danger {
    color: var(--red-600);
}

.action-item.action-danger:hover {
    background: var(--red-50);
    color: var(--red-700);
}

.action-form {
    margin: 0;
    padding: 0;
}

.action-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 4px 0;
}

/* ──────────────────────────────────────────────────────────
   Archived/Status Badges & Rows
   ────────────────────────────────────────────────────────── */

.badge-archived {
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.badge-status-active {
    background: var(--success-light);
    color: #065f46;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

tr.row-archived {
    opacity: 0.6;
}

tr.row-archived:hover {
    opacity: 0.85;
}

/* ──────────────────────────────────────────────────────────
   Missing Utility Classes (used in financials.php)
   ────────────────────────────────────────────────────────── */

.h-100 { height: 100%; }

.border-success { border-left: 3px solid var(--success) !important; }
.border-danger  { border-left: 3px solid var(--red-500) !important; }
.border-info    { border-left: 3px solid var(--info) !important; }

/* ──────────────────────────────────────────────────────────
   Focus States (Accessibility)
   ────────────────────────────────────────────────────────── */

.action-trigger:focus-visible,
.btn:focus-visible,
.btn-outline:focus-visible,
.btn-primary:focus-visible,
.nav-link:focus-visible,
.nav-toggle:focus-visible,
.action-item:focus-visible,
.booking-tab:focus-visible {
    outline: 2px solid var(--red-500);
    outline-offset: 2px;
}

a:focus-visible {
    outline: 2px solid var(--red-400);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ──────────────────────────────────────────────────────────
   Form Error States
   ────────────────────────────────────────────────────────── */

.form-control.is-invalid,
.form-select.is-invalid,
.form-control[aria-invalid="true"],
.form-select[aria-invalid="true"] {
    border-color: var(--red-500);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* ──────────────────────────────────────────────────────────
   Reduced Motion (Accessibility)
   ────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .card, .stat-card, .room-card {
        animation: none !important;
    }

    .status-dot-pulse {
        animation: none !important;
    }
}

/* ──────────────────────────────────────────────────────────
   Print Styles
   ────────────────────────────────────────────────────────── */

/* ──────────────────────────────────────────────────────────
   AI Features
   ────────────────────────────────────────────────────────── */

.ai-card {
    border-left: 3px solid var(--info);
    background: linear-gradient(135deg, var(--info-light) 0%, #fff 50%);
}

.ai-card .card-title {
    color: var(--info);
}

.ai-btn {
    border-color: var(--info);
    color: var(--info);
    white-space: nowrap;
}

.ai-btn:hover {
    background: var(--info);
    color: #fff;
    border-color: var(--info);
}

.ai-hint {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--info-light);
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--gray-700);
    border-left: 3px solid var(--info);
}

.ai-hint a {
    color: var(--info);
    font-weight: 600;
    margin-left: 4px;
}

.ai-insight-loading {
    color: var(--gray-400);
    font-size: 0.85rem;
}

#ai-insight-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--gray-700);
}

.ai-message-box {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--gray-800);
    white-space: pre-wrap;
}

/* ──────────────────────────────────────────────────────────
   Booking Sections (grouped by timing)
   ────────────────────────────────────────────────────────── */

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 14px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border: var(--border-light);
    border-bottom: none;
    background: var(--gray-50);
    color: var(--gray-600);
}

.section-header-success {
    background: var(--success-light);
    color: #065f46;
    border-color: #a7f3d0;
}

.section-header-info {
    background: var(--info-light);
    color: #1e40af;
    border-color: #bfdbfe;
}

.section-header-muted {
    background: var(--gray-100);
    color: var(--gray-500);
}

.section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(255,255,255,0.6);
    color: inherit;
}

.booking-section .table-wrap {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* Booking timing labels */
.booking-timing {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.2;
    margin-top: 1px;
}

/* Sortable table headers */
.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable:hover {
    color: var(--red-600);
}

.sort-icon {
    font-size: 0.65rem;
    opacity: 0.4;
    margin-left: 2px;
    vertical-align: middle;
}

.sortable:hover .sort-icon {
    opacity: 0.7;
}

.sortable[data-dir] .sort-icon {
    opacity: 1;
    color: var(--red-600);
}

/* Totals bar */
.totals-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 12px;
    box-shadow: var(--shadow-sm);
}

.totals-divider {
    width: 1px;
    height: 16px;
    background: var(--gray-200);
}

@media (max-width: 768px) {
    .totals-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .totals-divider { display: none; }
    .section-header { font-size: 0.75rem; }
}

/* Star Ratings */
.star-rating {
    display: inline-flex;
    gap: 1px;
    white-space: nowrap;
}
.star-rating .star {
    cursor: pointer;
    font-size: 1.15rem;
    color: var(--gray-300);
    transition: color 0.15s, transform 0.15s;
    line-height: 1;
    user-select: none;
}
.star-rating .star.filled {
    color: var(--warning);
}
.star-rating .star.hover {
    color: var(--warning);
    transform: scale(1.2);
}
.star-rating .star:hover {
    transform: scale(1.25);
}

@media print {
    .site-header, .nav-toggle, .btn, .action-menu,
    .booking-tabs, .search-bar, .page-header-actions,
    .btn-group, #calendar { display: none !important; }

    body { background: #fff; color: #000; font-size: 12pt; }
    .container, .container-fluid { max-width: 100%; padding: 0; }
    .card { border: 1px solid #ccc; box-shadow: none; page-break-inside: avoid; }
    table { font-size: 10pt; }
    tr.row-past, tr.row-archived { opacity: 0.7; }
    a { color: #000; text-decoration: none; }
    .badge { border: 1px solid #999; background: #eee; }
    .dembe-fab, .dembe-chat { display: none !important; }
}

/* ──────────────────────────────────────────────────────────
   Dembe Chat Assistant — Android Material-Inspired
   ────────────────────────────────────────────────────────── */

/* FAB Button */
.dembe-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--red-600);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 10px rgba(0,0,0,0.14), 0 1px 18px rgba(0,0,0,0.12), 0 3px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.dembe-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0,0,0,0.18), 0 3px 24px rgba(0,0,0,0.15);
}

.dembe-fab:active {
    transform: scale(0.95);
}

.dembe-fab-icon,
.dembe-fab-close {
    width: 24px;
    height: 24px;
    position: absolute;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dembe-fab-close {
    transform: rotate(-90deg) scale(0);
    opacity: 0;
}

.dembe-fab-open .dembe-fab-icon {
    transform: rotate(90deg) scale(0);
    opacity: 0;
}

.dembe-fab-open .dembe-fab-close {
    transform: rotate(0) scale(1);
    opacity: 1;
}

/* Ripple effect */
.dembe-fab-ripple {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    opacity: 0;
}

.dembe-ripple-active {
    animation: dembeRipple 0.6s ease-out;
}

@keyframes dembeRipple {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Pulse on send */
.dembe-fab-pulse {
    animation: dembePulse 0.3s ease;
}

@keyframes dembePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Badge */
.dembe-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--pink-500);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dembe-badge-show {
    opacity: 1;
    transform: scale(1);
    animation: dembeBadgePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes dembeBadgePop {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Chat Window */
.dembe-chat {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.16), 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dembe-chat-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Header */
.dembe-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--red-600);
    color: #fff;
    flex-shrink: 0;
}

.dembe-header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

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

.dembe-header-name {
    display: block;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
}

.dembe-header-status {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    line-height: 1.3;
}

.dembe-header-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
}

.dembe-header-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* Messages Area */
.dembe-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    background: #f0f0f0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e0e0e0' fill-opacity='0.3'%3E%3Ccircle cx='30' cy='30' r='1.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.dembe-messages::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
}

/* Date Chip */
.dembe-date-chip {
    align-self: center;
    background: rgba(0,0,0,0.08);
    color: var(--gray-600);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 8px;
    margin: 8px 0;
}

/* Message Bubbles */
.dembe-bubble {
    max-width: 82%;
    padding: 8px 12px 4px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    opacity: 0;
    transform: translateY(12px);
}

.dembe-bubble-enter {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Incoming (Dembe) */
.dembe-bubble-in {
    align-self: flex-start;
    background: #fff;
    color: var(--gray-800);
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.06);
}

/* Outgoing (Patricia) */
.dembe-bubble-out {
    align-self: flex-end;
    background: #dcf8c6;
    color: var(--gray-800);
    border-bottom-right-radius: 6px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.06);
}

.dembe-bubble-text {
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.dembe-bubble-time {
    display: block;
    font-size: 10px;
    color: var(--gray-400);
    text-align: right;
    margin-top: 2px;
    padding-bottom: 2px;
}

.dembe-bubble-out .dembe-bubble-time {
    color: #7da66d;
}

/* Typing Indicator */
.dembe-typing {
    padding: 4px 14px 0;
    background: #f0f0f0;
    display: none;
    flex-shrink: 0;
}

.dembe-typing-show {
    display: block;
}

.dembe-typing-dots {
    display: inline-flex;
    gap: 4px;
    padding: 10px 14px;
    background: #fff;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.06);
}

.dembe-typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gray-400);
    animation: dembeTypingBounce 1.4s infinite ease-in-out;
}

.dembe-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.dembe-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dembeTypingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Input Bar */
.dembe-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.dembe-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    padding: 10px 14px;
    background: var(--gray-100);
    border-radius: 24px;
    color: var(--gray-800);
    transition: background 0.2s;
}

.dembe-input:focus {
    background: var(--gray-50);
    box-shadow: 0 0 0 2px var(--red-200);
}

.dembe-input::placeholder {
    color: var(--gray-400);
}

.dembe-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--red-600);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s, opacity 0.2s;
}

.dembe-send-btn:disabled {
    background: var(--gray-300);
    cursor: default;
    opacity: 0.6;
}

.dembe-send-btn:not(:disabled):hover {
    background: var(--red-700);
}

.dembe-send-btn:not(:disabled):active {
    transform: scale(0.9);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .dembe-chat {
        bottom: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        transform-origin: bottom center;
    }

    .dembe-fab {
        bottom: 16px;
        right: 16px;
    }

    .dembe-chat-open ~ .dembe-fab {
        opacity: 0;
        pointer-events: none;
    }
}
