/* public/css/theme.css
|--------------------------------------------------------------------------
| Night Nurse — Premium Editorial & Nightlife Theme
|--------------------------------------------------------------------------
| Design direction:
| - Discreet & Sophisticated
| - High-End Editorial Aesthetics
| - Modern Nightlife Polish
|--------------------------------------------------------------------------
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */

:root,
html[data-theme="noir"] {
    /* Backgrounds */
    --bg: #0b0a0c;
    --surface: #121014;
    --surface-2: #19161c;
    --surface-3: #211d24;
    --surface-glass: rgba(18, 16, 20, 0.75);

    /* Borders */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --border-accent: rgba(200, 138, 155, 0.35);

    /* Typography */
    --text: #f5f2f4;
    --text-soft: #d4cfd4;
    --muted: #98919a;
    --muted-2: #6f6871;

    /* Brand Accent */
    --accent: #c88a9b;
    --accent-hover: #d99aaa;
    --accent-soft: rgba(200, 138, 155, 0.12);
    --accent-strong: #b86f83;
    --accent-gradient: linear-gradient(135deg, #c88a9b 0%, #a26073 100%);

    /* Status Indicators */
    --danger: #dc6262;
    --danger-soft: rgba(220, 98, 98, 0.12);
    --success: #55b98a;
    --success-soft: rgba(85, 185, 138, 0.12);
    --warning: #d7a85b;
    --warning-soft: rgba(215, 168, 91, 0.12);

    /* Typography Families */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

    /* Shapes & Elevation */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows & Lighting */
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 8px 30px rgba(200, 138, 155, 0.2);
}

/* ==========================================================================
   ALTERNATIVE LIGHT / EDITORIAL THEME
   ========================================================================== */

html[data-theme="editorial"] {
    --bg: #f8f5f3;
    --surface: #ffffff;
    --surface-2: #f1eceb;
    --surface-3: #e8e0df;
    --surface-glass: rgba(255, 255, 255, 0.82);

    --border: rgba(30, 20, 25, 0.09);
    --border-hover: rgba(30, 20, 25, 0.22);
    --border-accent: rgba(156, 82, 104, 0.4);

    --text: #211b1f;
    --text-soft: #4e464b;
    --muted: #766d73;
    --muted-2: #9a9196;

    --accent: #9c5268;
    --accent-hover: #ad6077;
    --accent-soft: rgba(156, 82, 104, 0.09);
    --accent-strong: #843e54;
    --accent-gradient: linear-gradient(135deg, #9c5268 0%, #763348 100%);

    --danger: #c94d4d;
    --danger-soft: rgba(201, 77, 77, 0.1);
    --success: #39845f;
    --success-soft: rgba(57, 132, 95, 0.1);
    --warning: #a77b32;
    --warning-soft: rgba(167, 123, 50, 0.1);

    --shadow-sm: 0 4px 16px rgba(30, 20, 25, 0.05);
    --shadow-md: 0 12px 32px rgba(30, 20, 25, 0.08);
    --shadow-lg: 0 24px 60px rgba(30, 20, 25, 0.12);
    --shadow-glow: 0 8px 24px rgba(156, 82, 104, 0.15);
}

/* ==========================================================================
   EMERALD / NIGHTLIFE THEME
   ========================================================================== */

html[data-theme="emerald"] {
    --bg: #080d0c;
    --surface: #0e1513;
    --surface-2: #141f1b;
    --surface-3: #1a2923;
    --surface-glass: rgba(14, 21, 19, 0.78);

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --border-accent: rgba(118, 181, 154, 0.35);

    --text: #f1f5f2;
    --text-soft: #cbd7d1;
    --muted: #8b9a92;
    --muted-2: #637169;

    --accent: #76b59a;
    --accent-hover: #8bc7aa;
    --accent-soft: rgba(118, 181, 154, 0.11);
    --accent-strong: #5d9c82;
    --accent-gradient: linear-gradient(135deg, #76b59a 0%, #478369 100%);

    --danger: #dc6262;
    --danger-soft: rgba(220, 98, 98, 0.12);
    --success: #69b995;
    --success-soft: rgba(105, 185, 149, 0.12);
    --warning: #d2a65c;
    --warning-soft: rgba(210, 166, 92, 0.12);

    --shadow-glow: 0 8px 30px rgba(118, 181, 154, 0.18);
}

/* ==========================================================================
   GLOBAL RESET & BASE
   ========================================================================== */

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

html {
    background-color: var(--bg);
    color-scheme: dark;
    scroll-behavior: smooth;
}

html[data-theme="editorial"] {
    color-scheme: light;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6, .font-heading {
    margin-top: 0;
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--text);
}

h1 { font-size: clamp(2.5rem, 5vw + 1rem, 4.75rem); }
h2 { font-size: clamp(1.85rem, 3.5vw + 0.5rem, 3.25rem); }
h3 { font-size: clamp(1.35rem, 2vw + 0.2rem, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
    margin-top: 0;
    color: var(--text-soft);
}

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

/* ==========================================================================
   LINKS & SELECTION & FOCUS
   ========================================================================== */

a {
    color: inherit;
    text-decoration: none;
    transition: color 180ms ease;
}

a:not(.btn):hover {
    color: var(--accent);
}

::selection {
    background: var(--accent);
    color: #ffffff;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition:
        background 200ms ease,
        border-color 200ms ease,
        color 200ms ease,
        transform 200ms cubic-bezier(0.2, 0, 0, 1),
        box-shadow 200ms ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #ffffff;
    box-shadow: 0 10px 32px rgba(200, 138, 155, 0.32);
}

.btn-secondary {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--surface-3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-soft);
}

.btn-ghost:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ==========================================================================
   CARDS & PROFILES
   ========================================================================== */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition:
        border-color 220ms ease,
        transform 220ms ease,
        box-shadow 220ms ease;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.profile-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition:
        transform 250ms cubic-bezier(0.16, 1, 0.3, 1),
        border-color 250ms ease,
        box-shadow 250ms ease;
}

.profile-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}

.profile-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--surface-2);
}

.profile-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-card:hover .profile-card-image img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.02) 20%,
        rgba(0, 0, 0, 0.35) 60%,
        rgba(0, 0, 0, 0.82) 100%
    );
    pointer-events: none;
}

/* ==========================================================================
   BADGES
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-accent {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(200, 138, 155, 0.2);
}

.badge-success {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid rgba(85, 185, 138, 0.2);
}

.badge-muted {
    background: var(--surface-2);
    color: var(--muted);
    border: 1px solid var(--border);
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */

input,
textarea,
select {
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px 16px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

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

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

input:hover,
textarea:hover,
select:hover {
    border-color: var(--border-hover);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface-glass);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav-link {
    position: relative;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
    transition: color 180ms ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 2px;
    background: var(--accent);
    border-radius: var(--radius-full);
}

/* ==========================================================================
   HERO & SEARCH
   ========================================================================== */

.hero {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
    background:
        radial-gradient(
            circle at 75% 20%,
            rgba(200, 138, 155, 0.12),
            transparent 45%
        ),
        var(--bg);
}

.hero-eyebrow {
    margin-bottom: 16px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-title {
    max-width: 900px;
    margin-bottom: 24px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: border-color 200ms ease;
}

.search-box:focus-within {
    border-color: var(--accent);
}

.search-box input {
    border: 0;
    background: transparent;
    box-shadow: none;
    min-height: auto;
    padding: 8px;
}

.search-box input:focus {
    box-shadow: none;
}

/* ==========================================================================
   TABLES & ALERTS
   ========================================================================== */

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

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

th, td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

td {
    color: var(--text-soft);
}

tr:last-child td {
    border-bottom: 0;
}

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
}

.alert-success {
    background: var(--success-soft);
    border-color: rgba(85, 185, 138, 0.25);
    color: var(--success);
}

.alert-danger {
    background: var(--danger-soft);
    border-color: rgba(220, 98, 98, 0.25);
    color: var(--danger);
}

.alert-warning {
    background: var(--warning-soft);
    border-color: rgba(215, 168, 91, 0.25);
    color: var(--warning);
}

/* ==========================================================================
   MODALS, DROPDOWNS & STATUS
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.dropdown {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    color: var(--text-soft);
    font-size: 14px;
    transition: background-color 150ms ease, color 150ms ease;
}

.dropdown-item:hover {
    background: var(--accent-soft);
    color: var(--text);
}

.avatar {
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--muted);
    font-weight: 600;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-dot.offline {
    background: var(--muted-2);
    box-shadow: none;
}

/* ==========================================================================
   FOOTER & ACCESSIBILITY
   ========================================================================== */

footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 40px 0;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted-2);
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

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

@media (max-width: 640px) {
    body { font-size: 14px; }
    .card, .profile-card { border-radius: var(--radius-md); }
    .search-box { border-radius: var(--radius-md); }
}