/* =============================================
   MODO CRUDA — CSS Completo
   Dark theme: Mint Green / Dark Navy / Coral
   Mobile-first, PWA-ready, glassmorphism
   ============================================= */

:root {
    /* Colores principales */
    --color-mint: #A8D5BA;
    --color-mint-light: #C5E8D3;
    --color-mint-dark: #7BB894;
    --color-navy: #1E3D59;
    --color-navy-light: #2A5580;
    --color-navy-dark: #142B40;
    --color-coral: #FF6B6B;
    --color-coral-light: #FF8A8A;
    --color-coral-dark: #E05555;

    /* Fondos */
    --color-bg: #0A0F1A;
    --color-bg-card: #111827;
    --color-bg-elevated: #1A2332;
    --color-bg-secondary: rgba(17, 24, 39, 0.6);

    /* Texto */
    --color-text: #F0F4F8;
    --color-text-secondary: rgba(240, 244, 248, 0.7);
    --color-text-muted: #6B7B8D;

    /* Bordes */
    --color-border: rgba(168, 213, 186, 0.12);
    --color-border-hover: rgba(168, 213, 186, 0.25);

    /* Feedback */
    --color-success: #A8D5BA;
    --color-error: #FF6B6B;
    --color-warning: #FFD93D;
    --color-info: #6CB4EE;

    /* Tipografía */
    --font-display: 'Syne', -apple-system, sans-serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;

    /* Tamaños */
    --header-height: 64px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
    --space-3xl: 48px;
    --space-4xl: 64px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Glassmorphism */
    --glass-bg: rgba(17, 24, 39, 0.75);
    --glass-border: rgba(168, 213, 186, 0.08);
    --glass-blur: 20px;

    /* Transiciones */
    --transition-base: 0.2s ease;
    --transition-slow: 0.4s ease;
}

/* ── Reset ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Tipografía ───────────────────────────── */
h1, h2, h3, h4, h5, h6,
.heading-display { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

a { color: var(--color-mint); text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--color-mint-light); }

.text-gradient {
    background: linear-gradient(135deg, var(--color-mint), var(--color-coral));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ── Container ────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); }

/* ── Header ───────────────────────────────── */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    padding-top: env(safe-area-inset-top, 0px);
}

.header-flex {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--header-height);
}

.logo img { height: 32px; width: auto; }
.logo-text {
    font-family: var(--font-display); font-weight: 800;
    font-size: 1.25rem; color: var(--color-mint);
    text-transform: uppercase; letter-spacing: 0.05em;
}

.header-nav { display: flex; align-items: center; gap: var(--space-lg); }

.nav-link {
    color: var(--color-text-secondary);
    font-size: 0.875rem; font-weight: 500;
    padding: var(--space-sm) 0;
    transition: color var(--transition-base);
    border-bottom: 2px solid transparent;
}
.nav-link:hover,
.nav-link.active { color: var(--color-mint); border-bottom-color: var(--color-mint); }

.nav-link--logout { color: var(--color-text-muted); }
.nav-link--logout:hover { color: var(--color-coral); }

/* Hamburger */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: var(--space-sm); }
.menu-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--color-text); margin: 5px 0;
    transition: var(--transition-base);
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .header-nav {
        display: none; position: fixed;
        top: var(--header-height); left: 0; right: 0; bottom: 0;
        background: var(--color-bg);
        flex-direction: column; align-items: center; justify-content: center;
        gap: var(--space-2xl);
    }
    .header-nav.open { display: flex; }
    .nav-link { font-size: 1.25rem; }
}

/* ── Buttons ──────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body); font-size: 0.9375rem; font-weight: 600;
    border: none; border-radius: var(--radius-md); cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none; line-height: 1.4;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
    background: var(--color-mint); color: var(--color-navy-dark);
}
.btn--primary:hover { background: var(--color-mint-light); color: var(--color-navy-dark); }

.btn--secondary {
    background: transparent; color: var(--color-mint);
    border: 1px solid var(--color-mint);
}
.btn--secondary:hover { background: rgba(168, 213, 186, 0.1); color: var(--color-mint); }

.btn--coral {
    background: var(--color-coral); color: #fff;
}
.btn--coral:hover { background: var(--color-coral-light); color: #fff; }

.btn--ghost {
    background: transparent; color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}
.btn--ghost:hover { border-color: var(--color-border-hover); color: var(--color-text); }

.btn--sm { padding: var(--space-sm) var(--space-lg); font-size: 0.8125rem; }
.btn--lg { padding: var(--space-lg) var(--space-2xl); font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Cards ────────────────────────────────── */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: border-color var(--transition-base);
}
.card:hover { border-color: var(--color-border-hover); }
.card--glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

/* ── Forms ────────────────────────────────── */
.form-group { margin-bottom: var(--space-xl); }
.form-label {
    display: block; margin-bottom: var(--space-sm);
    font-size: 0.875rem; font-weight: 500; color: var(--color-text-secondary);
}
.form-input,
.form-select,
.form-textarea {
    width: 100%; padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: var(--font-body); font-size: 1rem;
    transition: border-color var(--transition-base);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-mint);
    box-shadow: 0 0 0 3px rgba(168, 213, 186, 0.15);
}
.form-input::placeholder { color: var(--color-text-muted); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.75rem; color: var(--color-text-muted); margin-top: var(--space-xs); }
.form-error { color: var(--color-error); font-size: 0.8125rem; margin-top: var(--space-xs); }

/* ── Flash messages ───────────────────────── */
.flash {
    padding: var(--space-md) 0;
    font-size: 0.875rem; font-weight: 500;
    animation: flash-in 0.3s ease;
}
.flash--success { background: rgba(168, 213, 186, 0.15); color: var(--color-success); border-bottom: 1px solid rgba(168, 213, 186, 0.2); }
.flash--error   { background: rgba(255, 107, 107, 0.15); color: var(--color-error); border-bottom: 1px solid rgba(255, 107, 107, 0.2); }
.flash--info    { background: rgba(108, 180, 238, 0.15); color: var(--color-info); border-bottom: 1px solid rgba(108, 180, 238, 0.2); }

@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Cookie Banner ────────────────────────── */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    padding: var(--space-lg) 0;
}
.cookie-inner {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg);
    flex-wrap: wrap;
}
.cookie-inner p { font-size: 0.8125rem; color: var(--color-text-secondary); }

/* ── Main Content ─────────────────────────── */
.main-content { min-height: calc(100vh - var(--header-height) - 200px); padding-bottom: var(--space-3xl); }

/* ── Footer ───────────────────────────────── */
.site-footer {
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    padding: var(--space-3xl) 0 var(--space-2xl);
    margin-top: var(--space-4xl);
}
.footer__top { display: flex; justify-content: space-between; gap: var(--space-2xl); flex-wrap: wrap; margin-bottom: var(--space-2xl); }
.footer__brand { max-width: 300px; }
.footer__tagline { color: var(--color-text-muted); font-size: 0.875rem; margin-top: var(--space-sm); }
.footer__links-group h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); margin-bottom: var(--space-md); }
.footer__links-group a { display: block; color: var(--color-text-secondary); font-size: 0.875rem; padding: var(--space-xs) 0; }
.footer__links-group a:hover { color: var(--color-mint); }
.footer__bottom { border-top: 1px solid var(--color-border); padding-top: var(--space-xl); }
.footer__bottom p { font-size: 0.75rem; color: var(--color-text-muted); }
.footer__addr { margin-top: var(--space-xs); }

/* ── Hero (Landing) ───────────────────────── */
.hero {
    min-height: calc(100vh - var(--header-height));
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: var(--space-4xl) var(--space-lg);
    background: radial-gradient(ellipse at 50% 0%, rgba(30, 61, 89, 0.4) 0%, transparent 70%);
}
.hero__content { max-width: 680px; }
.hero__logo img { height: 64px; width: auto; margin-bottom: var(--space-2xl); }
.hero__badge {
    display: inline-flex; align-items: center; gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: rgba(168, 213, 186, 0.1);
    border: 1px solid rgba(168, 213, 186, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8125rem; font-weight: 600; color: var(--color-mint);
    margin-bottom: var(--space-2xl);
}
.hero__title {
    font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800; line-height: 1.1; margin-bottom: var(--space-xl);
}
.hero__subtitle {
    font-size: 1.125rem; color: var(--color-text-secondary);
    line-height: 1.7; margin-bottom: var(--space-2xl);
    max-width: 540px; margin-left: auto; margin-right: auto;
}
.hero__cta { display: flex; gap: var(--space-lg); justify-content: center; flex-wrap: wrap; }

/* ── Sections ─────────────────────────────── */
.section { padding: var(--space-4xl) 0; }
.section__header { text-align: center; margin-bottom: var(--space-3xl); }
.section__label {
    display: inline-flex; align-items: center; gap: var(--space-sm);
    font-size: 0.8125rem; font-weight: 600; color: var(--color-mint);
    text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}
.section__title { font-size: 2rem; }

/* ── Features Grid ────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-xl);
}
.feature-card { padding: var(--space-2xl); }
.feature-card__icon {
    width: 48px; height: 48px;
    background: rgba(168, 213, 186, 0.1);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: var(--space-lg);
    color: var(--color-mint);
}
.feature-card__title { font-size: 1.125rem; margin-bottom: var(--space-sm); }
.feature-card__desc { color: var(--color-text-secondary); font-size: 0.9375rem; line-height: 1.6; }

/* ── Steps (How it works) ─────────────────── */
.steps { display: flex; flex-direction: column; gap: var(--space-2xl); max-width: 600px; margin: 0 auto; }
.step {
    display: flex; gap: var(--space-xl); align-items: flex-start;
}
.step__number {
    flex-shrink: 0; width: 40px; height: 40px;
    background: var(--color-mint); color: var(--color-navy-dark);
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 800; font-size: 1.125rem;
}
.step__title { font-weight: 600; margin-bottom: var(--space-xs); }
.step__desc { color: var(--color-text-secondary); font-size: 0.9375rem; }

/* ── Auth Pages ───────────────────────────── */
.auth-page {
    display: flex; align-items: center; justify-content: center;
    min-height: calc(100vh - var(--header-height) - 200px);
    padding: var(--space-3xl) var(--space-lg);
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card__title { text-align: center; margin-bottom: var(--space-2xl); font-size: 1.75rem; }
.auth-card__footer { text-align: center; margin-top: var(--space-xl); color: var(--color-text-secondary); font-size: 0.875rem; }

/* ── Admin Layout ─────────────────────────── */
.admin-layout { display: flex; min-height: calc(100vh - var(--header-height)); }
.admin-sidebar {
    width: 240px; flex-shrink: 0;
    background: var(--color-bg-card);
    border-right: 1px solid var(--color-border);
    padding: var(--space-xl);
}
.admin-sidebar__nav { display: flex; flex-direction: column; gap: var(--space-xs); }
.admin-sidebar__link {
    display: flex; align-items: center; gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    font-size: 0.875rem; font-weight: 500;
    transition: all var(--transition-base);
}
.admin-sidebar__link:hover { background: var(--color-bg-elevated); color: var(--color-text); }
.admin-sidebar__link.active { background: rgba(168, 213, 186, 0.1); color: var(--color-mint); }
.admin-main { flex: 1; padding: var(--space-2xl); overflow-x: auto; }

@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--color-border); padding: var(--space-md); }
    .admin-sidebar__nav { flex-direction: row; overflow-x: auto; gap: var(--space-sm); }
    .admin-sidebar__link { white-space: nowrap; }
    .admin-main { padding: var(--space-lg); }
}

/* ── Data Tables ──────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
    text-align: left; padding: var(--space-md) var(--space-lg);
    color: var(--color-text-muted); font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-border);
}
.data-table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}
.data-table tr:hover td { background: rgba(168, 213, 186, 0.03); }

/* ── Badges ───────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: var(--space-xs);
    padding: 2px var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.6875rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.03em;
}
.badge--mint    { background: rgba(168, 213, 186, 0.15); color: var(--color-mint); }
.badge--coral   { background: rgba(255, 107, 107, 0.15); color: var(--color-coral); }
.badge--navy    { background: rgba(30, 61, 89, 0.4); color: var(--color-mint-light); }
.badge--warning { background: rgba(255, 217, 61, 0.15); color: var(--color-warning); }
.badge--muted   { background: rgba(107, 123, 141, 0.2); color: var(--color-text-muted); }

/* ── Tab Bar (App móvil) ──────────────────── */
.tab-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-top: 1px solid var(--glass-border);
    display: flex; justify-content: space-around;
    padding: var(--space-sm) 0;
    padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom, 0px));
}
.tab-bar__item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--color-text-muted);
    font-size: 0.625rem; font-weight: 500;
    padding: var(--space-xs) var(--space-sm);
    text-decoration: none;
    transition: color var(--transition-base);
}
.tab-bar__item svg { width: 22px; height: 22px; }
.tab-bar__item.active { color: var(--color-mint); }
.tab-bar__item:hover { color: var(--color-text); }

/* Padding inferior cuando hay tab bar */
.has-tab-bar { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }

/* ── KPI Cards ────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); margin-bottom: var(--space-2xl); }
.kpi-card { padding: var(--space-xl); }
.kpi-card__label { font-size: 0.75rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-sm); }
.kpi-card__value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; color: var(--color-mint); }
.kpi-card__change { font-size: 0.75rem; color: var(--color-success); margin-top: var(--space-xs); }

/* ── Utilities ────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ── Fade-in animation ────────────────────── */
.fade-in {
    opacity: 0; transform: translateY(16px);
    animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }
.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.2s; }
.fade-in:nth-child(4) { animation-delay: 0.3s; }

/* ── Empty state ──────────────────────────── */
.empty-state { text-align: center; padding: var(--space-4xl) var(--space-lg); }
.empty-state__icon { font-size: 3rem; margin-bottom: var(--space-lg); opacity: 0.4; }
.empty-state__title { font-size: 1.25rem; margin-bottom: var(--space-sm); }
.empty-state__desc { color: var(--color-text-secondary); margin-bottom: var(--space-xl); max-width: 400px; margin-left: auto; margin-right: auto; }

/* ── Avatar ───────────────────────────────── */
.avatar {
    width: 40px; height: 40px; border-radius: var(--radius-full);
    background: var(--color-navy); color: var(--color-mint);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; font-size: 1rem;
    overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 64px; height: 64px; font-size: 1.5rem; }
.avatar--xl { width: 96px; height: 96px; font-size: 2rem; }

/* ── Skeleton loaders ─────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--color-bg-card) 25%, var(--color-bg-elevated) 50%, var(--color-bg-card) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton-pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Responsive helpers ───────────────────── */
@media (max-width: 640px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    .hero__title { font-size: 2rem; }
}

/* ═══════════════════════════════════════════
   FASE 9 — MEJORAS UX
   ═══════════════════════════════════════════ */

/* ── Page transitions ─────────────────────── */
.main-content {
    animation: pageIn 0.3s ease;
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Toast notifications ──────────────────── */
.toast {
    position: fixed;
    top: calc(var(--header-height) + var(--space-lg));
    right: var(--space-lg);
    z-index: 300;
    max-width: 360px;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 4.7s forwards;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.toast--success { background: rgba(168, 213, 186, 0.95); color: var(--color-navy-dark); }
.toast--error   { background: rgba(255, 107, 107, 0.95); color: #fff; }
.toast--info    { background: rgba(30, 61, 89, 0.95); color: var(--color-text); border: 1px solid var(--color-border); }

@keyframes toastIn  { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-20px); } }

@media (max-width: 640px) {
    .toast { left: var(--space-lg); right: var(--space-lg); max-width: none; }
}

/* ── Push notification banner ─────────────── */
.push-banner {
    position: fixed;
    bottom: calc(70px + env(safe-area-inset-bottom, 0px) + var(--space-lg));
    left: var(--space-lg);
    right: var(--space-lg);
    z-index: 150;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    animation: slideUp 0.4s ease;
    max-width: 400px;
    margin: 0 auto;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

/* ── Improved skeleton ────────────────────── */
.skeleton-text { height: 14px; border-radius: 7px; margin-bottom: var(--space-sm); }
.skeleton-text:last-child { width: 60%; }
.skeleton-circle { border-radius: var(--radius-full); }
.skeleton-card { height: 120px; border-radius: var(--radius-lg); }

/* ── Pull to refresh indicator ────────────── */
.ptr-indicator {
    text-align: center;
    padding: var(--space-lg);
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    transition: transform 0.3s;
}
.ptr-indicator svg {
    animation: ptrSpin 1s linear infinite;
}
@keyframes ptrSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ── Loading overlay ──────────────────────── */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 500;
    background: rgba(10, 15, 26, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--space-xl);
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-mint);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Improved form focus ──────────────────── */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-mint);
    box-shadow: 0 0 0 3px rgba(168, 213, 186, 0.15), 0 0 20px rgba(168, 213, 186, 0.05);
}

/* ── Card hover lift ──────────────────────── */
a.card:hover,
.card--interactive:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
a.card,
.card--interactive {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ── Status dot (online/offline) ──────────── */
.status-dot {
    width: 8px; height: 8px;
    border-radius: var(--radius-full);
    display: inline-block;
}
.status-dot--online  { background: var(--color-success); box-shadow: 0 0 6px var(--color-success); }
.status-dot--offline { background: var(--color-text-muted); }

/* ── Notification count badge ─────────────── */
.notif-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 18px; height: 18px;
    border-radius: var(--radius-full);
    background: var(--color-coral);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ── Improved data table responsive ───────── */
@media (max-width: 768px) {
    .data-table { font-size: 0.75rem; }
    .data-table th,
    .data-table td { padding: var(--space-sm); }
    .data-table th:last-child,
    .data-table td:last-child { position: sticky; right: 0; background: var(--color-bg-card); }
}

/* ── Smooth scroll ────────────────────────── */
html { scroll-behavior: smooth; }

/* ── Focus visible (accessibility) ────────── */
:focus-visible {
    outline: 2px solid var(--color-mint);
    outline-offset: 2px;
}

/* ── Print styles ─────────────────────────── */
@media print {
    .site-header, .site-footer, .tab-bar, .admin-sidebar,
    .cookie-banner, .flash, .btn { display: none !important; }
    body { background: #fff; color: #000; padding: 0; }
    .main-content { min-height: auto; }
    .card { border: 1px solid #ddd; break-inside: avoid; }
}
