/* ═══════════════════════════════════════════
   MODO CRUDA — CSS Base
   MODO CRUDA, S.L. — CIF B22904924
   Dark-first. Mobile-first. Sin Bootstrap.
   ═══════════════════════════════════════════ */

/* ─────────────────────────────────────
   1. VARIABLES
   ───────────────────────────────────── */
:root {
    /* Colores */
    --color-mint:        #A8D5BA;
    --color-navy:        #1E3D59;
    --color-coral:       #FF6B6B;
    --color-bg:          #0A0E1A;
    --color-bg-card:     #111827;
    --color-bg-elevated: #1F2937;
    --color-text:        #F9FAFB;
    --color-text-muted:  #9CA3AF;
    --color-border:      #374151;
    --color-success:     #10B981;
    --color-error:       #EF4444;
    --color-warning:     #F59E0B;

    /* Tipografía */
    --font-heading: 'Syne', sans-serif;
    --font-body:    'DM Sans', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;

    /* Radios */
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   16px;
    --radius-full: 9999px;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

    /* Safe areas iOS */
    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left:   env(safe-area-inset-left, 0px);
    --safe-right:  env(safe-area-inset-right, 0px);

    /* Tab bar height */
    --tab-bar-height: 64px;
}

/* ─────────────────────────────────────
   2. RESET + BASE
   ───────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--safe-top);
    padding-bottom: calc(var(--tab-bar-height) + var(--safe-bottom));
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-mint);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-text);
}

ul,
ol {
    list-style: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ─────────────────────────────────────
   3. TIPOGRAFÍA
   ───────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: clamp(1.15rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: 1rem;
    color: var(--color-text);
}

p:last-child {
    margin-bottom: 0;
}

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

.text-mono {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

/* ─────────────────────────────────────
   4. LAYOUT
   ───────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1rem;
}

.page-wrapper {
    min-height: 100vh;
    padding-bottom: calc(var(--tab-bar-height) + var(--safe-bottom) + 1rem);
}

.page-header {
    padding: 1.25rem 1rem 1rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.page-header h1,
.page-header h2 {
    font-size: 1.5rem;
}

/* Grid helpers */
.grid {
    display: grid;
    gap: 1rem;
}

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

/* Flex helpers */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap     { display: flex; gap: 0.75rem; }
.flex-col     { display: flex; flex-direction: column; }
.flex-1       { flex: 1; }

/* ─────────────────────────────────────
   5. BOTONES
   ───────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    border: none;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 44px; /* accesibilidad táctil */
}

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

/* Botón primario — mint */
.btn--primary {
    background-color: var(--color-mint);
    color: var(--color-bg);
}

.btn--primary:hover {
    background-color: #8ec9a6;
    color: var(--color-bg);
}

/* Botón danger — coral */
.btn--danger {
    background-color: var(--color-coral);
    color: #fff;
}

.btn--danger:hover {
    background-color: #e05555;
    color: #fff;
}

/* Botón outline */
.btn--outline {
    background-color: transparent;
    border: 1.5px solid var(--color-border);
    color: var(--color-text);
}

.btn--outline:hover {
    border-color: var(--color-mint);
    color: var(--color-mint);
}

/* Botón ghost */
.btn--ghost {
    background-color: transparent;
    color: var(--color-text-muted);
}

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

/* Tamaños */
.btn--sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    min-height: 36px;
}

.btn--lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    min-height: 52px;
    border-radius: var(--radius-lg);
}

.btn--full {
    width: 100%;
}

/* ─────────────────────────────────────
   6. CARDS
   ───────────────────────────────────── */
.card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.card--elevated {
    background-color: var(--color-bg-elevated);
    box-shadow: var(--shadow-md);
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.card__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
}

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

.card__footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 0.5rem;
}

/* ─────────────────────────────────────
   7. FLASH MESSAGES
   ───────────────────────────────────── */
.flash {
    position: fixed;
    top: calc(var(--safe-top) + 1rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    max-width: calc(100vw - 2rem);
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: slide-down 0.3s ease;
}

.flash--success {
    background-color: var(--color-success);
    color: #fff;
}

.flash--error {
    background-color: var(--color-error);
    color: #fff;
}

.flash--warning {
    background-color: var(--color-warning);
    color: #000;
}

.flash--info {
    background-color: var(--color-navy);
    color: var(--color-text);
    border: 1px solid var(--color-mint);
}

/* ─────────────────────────────────────
   8. BADGES
   ───────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge--active {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge--expired,
.badge--used {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge--pending {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge--mint {
    background-color: rgba(168, 213, 186, 0.15);
    color: var(--color-mint);
    border: 1px solid rgba(168, 213, 186, 0.3);
}

/* ─────────────────────────────────────
   9. FORMULARIOS
   ───────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 0.375rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--color-bg-elevated);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 44px;
}

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

.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-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239CA3AF' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-error {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-error);
    margin-top: 0.375rem;
}

.form-hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: 0.375rem;
}

/* Checkbox y radio */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--color-mint);
    cursor: pointer;
    flex-shrink: 0;
}

/* ─────────────────────────────────────
   10. NAVEGACIÓN
   ───────────────────────────────────── */
.nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--color-text);
    background-color: var(--color-bg-elevated);
}

.nav-link.active {
    color: var(--color-mint);
    background-color: rgba(168, 213, 186, 0.1);
}

/* ─────────────────────────────────────
   11. TAB BAR (móvil — fija abajo)
   ───────────────────────────────────── */
.tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--tab-bar-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background-color: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    z-index: 100;
}

.tab-bar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 0.25rem;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 500;
    transition: color 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
}

.tab-bar__item svg,
.tab-bar__item .tab-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.tab-bar__item span {
    font-size: 0.6875rem;
    line-height: 1;
}

.tab-bar__item.active,
.tab-bar__item:hover {
    color: var(--color-mint);
}

.tab-bar__item .tab-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 14px);
    background-color: var(--color-coral);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.tab-bar__item {
    position: relative;
}

/* En desktop la tab-bar se oculta */
@media (min-width: 768px) {
    .tab-bar {
        display: none;
    }

    body {
        padding-bottom: 0;
    }
}

/* ─────────────────────────────────────
   12. SCANNER RESULTS (staff PWA)
   ───────────────────────────────────── */
.scan-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 2rem;
    border-radius: var(--radius-lg);
    animation: fade-in 0.3s ease;
}

.scan-result__icon {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.scan-result__title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.scan-result__detail {
    font-size: 1rem;
    opacity: 0.85;
}

/* Verde — acceso concedido */
.scan-result--granted {
    background-color: rgba(16, 185, 129, 0.12);
    border: 2px solid var(--color-success);
    color: var(--color-success);
}

/* Rojo — acceso denegado */
.scan-result--denied {
    background-color: rgba(239, 68, 68, 0.12);
    border: 2px solid var(--color-error);
    color: var(--color-error);
}

/* Amarillo — revisión manual */
.scan-result--manual {
    background-color: rgba(245, 158, 11, 0.12);
    border: 2px solid var(--color-warning);
    color: var(--color-warning);
}

/* ─────────────────────────────────────
   13. RESPONSIVE (mobile-first)
   ───────────────────────────────────── */
@media (min-width: 640px) {
    .container {
        padding-inline: 1.5rem;
    }

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

@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }

    .container {
        padding-inline: 2rem;
    }

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

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

    /* Sidebar layout en desktop */
    .app-layout {
        display: grid;
        grid-template-columns: 240px 1fr;
        min-height: 100vh;
    }

    .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        background-color: var(--color-bg-card);
        border-right: 1px solid var(--color-border);
        padding: 1.5rem 1rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-inline: 2.5rem;
    }

    .app-layout {
        grid-template-columns: 260px 1fr;
    }
}

/* ─────────────────────────────────────
   14. ANIMACIONES
   ───────────────────────────────────── */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

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

.animate-fade-in  { animation: fade-in 0.3s ease; }
.animate-slide-up { animation: slide-up 0.3s ease; }
.animate-pulse    { animation: pulse 2s ease infinite; }

/* ─────────────────────────────────────
   15. UTILIDADES
   ───────────────────────────────────── */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-left    { text-align: left; }
.text-muted   { color: var(--color-text-muted); }
.text-mint    { color: var(--color-mint); }
.text-coral   { color: var(--color-coral); }
.text-success { color: var(--color-success); }
.text-error   { color: var(--color-error); }
.text-warning { color: var(--color-warning); }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.75rem; }
.text-lg      { font-size: 1.125rem; }
.font-bold    { font-weight: 700; }
.font-medium  { font-weight: 500; }

/* Márgenes */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-inline: auto; }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }

/* Display */
.hidden       { display: none !important; }
.block        { display: block; }
.inline-block { display: inline-block; }

/* Accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Separador */
.divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 1.5rem 0;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    background-color: var(--color-bg-elevated);
    flex-shrink: 0;
}

.avatar--sm { width: 32px; height: 32px; }
.avatar--lg { width: 56px; height: 56px; }
.avatar--xl { width: 80px; height: 80px; }

/* Estado vacío */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--color-text-muted);
    gap: 0.75rem;
}

.empty-state__icon {
    font-size: 3rem;
    opacity: 0.4;
}

.empty-state__text {
    font-size: 0.9375rem;
    max-width: 280px;
}

/* Loading spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid var(--color-border);
    border-top-color: var(--color-mint);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ─────────────────────────────────────
   LANDING PAGE
   ───────────────────────────────────── */

/* Nav */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}

.landing-nav__logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-mint);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.landing-nav__actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Hero */
.landing-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 1.5rem 5rem;
    position: relative;
    overflow: hidden;
}

.landing-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
}

.landing-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(168, 213, 186, 0.1);
    border: 1px solid rgba(168, 213, 186, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-mint);
    margin-bottom: 2rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.landing-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-mint);
    animation: pulse 2s ease infinite;
}

.landing-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.landing-hero__sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.landing-hero__ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Glow de fondo */
.landing-hero__glow {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse at center,
        rgba(168, 213, 186, 0.07) 0%,
        rgba(30, 61, 89, 0.05) 50%,
        transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Features */
.landing-features {
    padding: 5rem 0;
    border-top: 1px solid var(--color-border);
}

.landing-section__title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.75rem;
}

.landing-section__sub {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    font-size: 1.0625rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
    border-color: rgba(168, 213, 186, 0.4);
    transform: translateY(-2px);
}

.feature-card__icon {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    line-height: 1;
}

.feature-card__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.feature-card__text {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.feature-card__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.feature-card__list li {
    font-size: 0.8125rem;
    color: var(--color-mint);
    font-weight: 500;
}

/* CTA final */
.landing-cta {
    padding: 5rem 0;
    border-top: 1px solid var(--color-border);
}

.landing-cta__inner {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.landing-cta__inner h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.landing-cta__inner p {
    color: var(--color-text-muted);
    font-size: 1.0625rem;
    margin-bottom: 2rem;
}

.landing-cta__btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.landing-footer {
    border-top: 1px solid var(--color-border);
    padding: 2rem 0;
}

.landing-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

@media (min-width: 768px) {
    .landing-footer__inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.landing-footer__brand {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-mint);
    font-size: 1.1rem;
}

.landing-footer__legal {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin: 0;
}

.landing-footer__links {
    display: flex;
    gap: 1.25rem;
}

.landing-footer__links a {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.landing-footer__links a:hover {
    color: var(--color-mint);
}

/* ─────────────────────────────────────
   AUTH PAGES
   ───────────────────────────────────── */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--color-bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow-lg);
}

.auth-card__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-mint);
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-card h1 {
    font-size: 1.375rem;
    text-align: center;
    margin-bottom: 1.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    font-family: var(--font-body);
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.auth-link a {
    color: var(--color-mint);
    font-weight: 600;
}

/* ─────────────────────────────────────
   APP PAGES
   ───────────────────────────────────── */

.app-main {
    min-height: 100vh;
}

.app-content {
    padding: 1.5rem 1rem;
    padding-bottom: calc(var(--tab-bar-height) + var(--safe-bottom) + 1.5rem);
    max-width: 800px;
    margin: 0 auto;
}

.app-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

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

/* Dashboard grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
    margin-top: 0.25rem;
}

@media (min-width: 640px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card--link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    position: relative;
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
}

.card--link:hover {
    border-color: rgba(168, 213, 186, 0.4);
    transform: translateY(-1px);
}

.card-icon {
    font-size: 1.75rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.card--link h3 {
    font-size: 0.9375rem;
    font-weight: 700;
}

.card-arrow {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    color: var(--color-text-muted);
    font-size: 1rem;
}

/* Status rows */
.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9375rem;
}

.status-row:last-child {
    border-bottom: none;
}

/* ─────────────────────────────────────
   ADMIN LAYOUT
   ───────────────────────────────────── */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--color-bg-card);
    border-right: 1px solid var(--color-border);
    padding: 1.5rem 1rem;
    display: none;
    flex-direction: column;
}

.admin-sidebar__logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.admin-sidebar__brand {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--color-mint);
}

.admin-sidebar__user {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.admin-nav__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.875rem;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.admin-nav__link:hover {
    background: var(--color-bg-elevated);
    color: var(--color-text);
}

.admin-nav__link--active {
    background: rgba(168, 213, 186, 0.1);
    color: var(--color-mint);
}

.admin-nav__link--danger {
    color: var(--color-coral);
    margin-top: 1rem;
}

.admin-nav__link--danger:hover {
    background: rgba(255, 107, 107, 0.1);
    color: var(--color-coral);
}

.admin-content {
    flex: 1;
    padding: 1.5rem;
    min-width: 0;
}

.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

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

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card__icon {
    font-size: 2rem;
    line-height: 1;
}

.stat-card__number {
    font-family: var(--font-heading);
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--color-mint);
    line-height: 1;
}

.stat-card__label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Quick actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Admin sidebar visible en desktop */
@media (min-width: 768px) {
    .admin-sidebar {
        display: flex;
    }

    .admin-content {
        padding: 2rem;
    }
}

/* Admin móvil — nav horizontal arriba */
@media (max-width: 767px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        display: flex;
        flex-direction: row;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding: 0.75rem 1rem;
        overflow-x: auto;
        gap: 0;
    }

    .admin-sidebar__logo,
    .admin-sidebar__user {
        display: none;
    }

    .admin-nav {
        flex-direction: row;
        gap: 0;
        margin-top: 0;
        width: 100%;
    }

    .admin-nav__link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        white-space: nowrap;
        border-radius: var(--radius-sm);
    }

    .admin-nav__link--danger {
        margin-top: 0;
        margin-left: auto;
    }
}
