﻿@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Public+Sans:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
/* Theme modules: un archivo por tema para escalabilidad */
@import url("./themes/executive.css");
@import url("./themes/premium-azure.css");
@import url("./themes/premium-azure-soft.css");
@import url("./themes/premium-azure-deep.css");
@import url("./themes/corporate.css");
@import url("./themes/corporate-night.css");
@import url("./themes/corporate-night-soft.css");
@import url("./themes/restaurant-warm.css");
@import url("./themes/fine-dining-deluxe.css");
@import url("./themes/fine-dining-deluxe-alt.css");
@import url("./themes/violet.css");
@import url("./themes/violet-soft.css");
@import url("./themes/violet-night.css");
@import url("./themes/pastel.css");
@import url("./themes/slate-amber.css");
@import url("./themes/teal-pastel.css");
@import url("./themes/ocean-earth.css");
@import url("./themes/forest-mint.css");
@import url("./themes/cobalt-pro.css");
@import url("./themes/emerald-pro.css");
@import url("./themes/mint-minimalism.css");
@import url("./themes/industrial-quartz.css");
@import url("./themes/terracotta-slate.css");
@import url("./themes/dark.css");
@import url("./themes/fluent-office.css");
@import url("./themes/cloudflare-horizon.css");
@import url("./themes/crystal-horizon.css");

:root {
    /* Colores */
    --color-brand: #0d9488;
    --color-brand-rgb: 13, 148, 136;
    --color-brand-light: #14b8a6;
    --color-brand-lighter: #5eead4;
    --color-brand-pastel: #ccfbf1;
    /* hover/active generados dinámicamente — cada tema puede sobreescribir con valor exacto */
    --color-brand-hover:  color-mix(in srgb, var(--color-brand) 88%, #000000);
    --color-brand-active: color-mix(in srgb, var(--color-brand) 74%, #000000);
    --color-secondary: #7c3aed;
    --color-secondary-light: #8b5cf6;
    --color-secondary-lighter: #a78bfa;
    --color-secondary-pastel: #ede9fe;
    --color-secondary-hover:  color-mix(in srgb, var(--color-secondary) 88%, #000000);
    --color-secondary-active: color-mix(in srgb, var(--color-secondary) 74%, #000000);

    /* ── Colores semánticos para icon-soft (texto luminoso sobre fondos con color) ── */
    /* En modo claro usan el lighter del acento; en temas oscuros se sobreescriben */
    --icon-soft-teal-color:   var(--color-brand-lighter);
    --icon-soft-violet-color: var(--color-secondary-lighter);
    --icon-soft-orange-color: var(--accent-orange-bg);
    --icon-soft-blue-color:   var(--state-info-bg);
    --icon-soft-pink-color:   var(--accent-pink-bg);
    --icon-soft-green-color:  var(--accent-green-bg);

    /* ── Variables de sidebar — overrideables por tema ── */
    --sidebar-text:           var(--text-primary);
    --sidebar-hover-bg:       var(--surface-muted);
    --sidebar-active-bg:      var(--color-brand-pastel);
    --sidebar-icon-color:     var(--text-muted);
    --sidebar-border-hover:   var(--border-soft);

    /* ── Variables de superficie y row hover ── */
    --surface-tint:           var(--surface-muted);       /* card-header, zebra */
    --surface-row-hover:      var(--surface-muted);       /* table row hover suave */

    /* ── Estado de botones danger/success ── */
    --btn-danger-hover:       color-mix(in srgb, var(--state-danger) 78%, #000000);
    --btn-success-hover:      color-mix(in srgb, var(--accent-green-light) 78%, #000000);

    /* ── Borde y texto de elementos interactivos ── */
    --border-medium:          var(--border-input);        /* entre border-soft y border-strong */
    --text-on-hover:          var(--text-strong);         /* texto en hover de btn-secondary */

    /* ── Texto y borde de estado warning ── */
    --state-warning-text:     var(--state-warning);       /* texto en badges/alerts warning */
    --state-warning-border:   var(--accent-orange);       /* borde de alert-warning */

    /* Paleta semantica premium */
    --state-success: #16a34a;
    --state-success-bg: #dcfce7;
    --state-warning: #d97706;
    --state-warning-bg: #fef3c7;
    --state-info: #2563eb;
    --state-info-bg: #dbeafe;
    --state-danger: #dc2626;
    --state-danger-light: #ef4444;
    --state-danger-bg: #fee2e2;

    --accent-orange: #ea580c;
    --accent-orange-light: #f97316;
    --accent-orange-bg: #ffedd5;
    --accent-blue: #2563eb;
    --accent-blue-light: #3b82f6;
    --accent-pink: #db2777;
    --accent-pink-bg: #fce7f3;
    --accent-green: #059669;
    --accent-green-light: #10b981;
    --accent-green-bg: #d1fae5;

    /* Superficies, bordes y tipografia por tema */
    --surface-page: #f8fafc;
    --surface-muted: #f1f5f9;
    --surface-card: #ffffff;
    --border-soft: #e2e8f0;
    --border-input: #dbe4f0;
    --text-strong: #1e293b;
    --text-primary: #334155;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    --text-on-accent: #ffffff;
    --text-on-accent-soft: rgba(255,255,255,0.9);
    --text-on-accent-muted: rgba(255,255,255,0.8);
    --text-on-accent-faint: rgba(255,255,255,0.65);
    --text-on-accent-subtle: rgba(255,255,255,0.7);
    --text-on-accent-quiet: rgba(255,255,255,0.5);
    --surface-card-soft: rgba(255,255,255,0.95);
    --overlay-on-accent-10: rgba(255,255,255,0.1);
    --overlay-on-accent-15: rgba(255,255,255,0.15);
    --overlay-on-accent-20: rgba(255,255,255,0.2);
    --overlay-on-accent-25: rgba(255,255,255,0.25);
    --overlay-on-accent-30: rgba(255,255,255,0.3);
    --border-on-accent-soft: rgba(255,255,255,0.15);
    --border-on-accent-strong: rgba(255,255,255,0.3);
    --border-on-accent-faint: rgba(255,255,255,0.1);
    --overlay-scrim: rgba(0,0,0,0.5);
    --preloader-bg: #f5f8ff;
    
    /* Layout */
    --sidebar-width: 260px;
    --sidebar-width-collapsed: 80px;
    --topbar-height: 66px;
    --transition-speed: 0.3s;
    
    /* Escala de fuentes - Elegante y profesional */
    --font-size-xs: 0.72rem;     /* 11.5px - labels */
    --font-size-sm: 0.79rem;     /* 12.6px - secondary text */
    --font-size-base: 0.8125rem;   /* 13.4px - body text */
    --font-size-md: 0.9rem;      /* 14.4px - emphasis */
    --font-size-lg: 0.97rem;     /* 15.5px - headings small */
    --font-size-xl: 1.08rem;     /* 17.3px - headings */
    --font-size-2xl: 1.2rem;     /* 19.2px - subheadings */
    --font-size-3xl: 1.38rem;    /* 22px - page titles */
    --font-size-4xl: 1.72rem;    /* 27.5px - hero */
    --font-size-5xl: 2.05rem;    /* 32.8px - hero large */
    --font-size-6xl: 2.3rem;     /* 36.8px - hero huge */
    
    /* Font weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Colores de tema reutilizables */
    --grad-primary: var(--color-brand);
    --grad-primary-soft: var(--color-brand);
    --grad-sidebar: var(--color-brand);
    --grad-accent: var(--color-brand);

    /* Neutralizar anillo focus de Bootstrap */
    --bs-focus-ring-width: 0;
    --bs-focus-ring-color: transparent;
    --bs-focus-ring-opacity: 0;
}

/* Preloader global para evitar salto visual inicial */
html.is-loading,
html.is-loading body {
    overflow: hidden;
}

/* Mitiga parpadeo de color cuando se cambia tema en selects */
html.theme-switching,
html.theme-switching body {
    overflow: hidden;
}

body.theme-switching::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--surface-page);
    z-index: 2950;
    pointer-events: none;
    opacity: 0.98;
    animation: themeSwitchFade 0.18s ease-out forwards;
}

@keyframes themeSwitchFade {
    from {
        opacity: 0.98;
    }
    to {
        opacity: 0;
    }
}

.app-preloader {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: var(--preloader-bg);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.app-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-ring {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid rgba(15, 118, 110, 0.18);
    border-top-color: var(--color-brand);
    animation: preloaderSpin 0.8s linear infinite;
}

.preloader-label {
    font-size: var(--font-size-sm);
    letter-spacing: 0.02em;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

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

/* Selector de tema */
.theme-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.42rem;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-card);
}

.theme-switcher i {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.theme-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-card);
    color: var(--text-primary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    line-height: 1.25;
    padding: 0.32rem 0.5rem;
    min-width: 6.1rem;
    cursor: pointer;
}

.theme-select option,
.theme-select optgroup {
    background: var(--surface-card);
    color: var(--text-primary);
}

/* Estilo base para listas de opciones (aplica segun soporte del navegador) */
/* background explícito fuerza software rendering en Chrome, habilitando option:hover vía CSS */
.theme-select option,
.form-select option {
    background: var(--surface-card);
    color: var(--text-primary);
    padding: 0.45rem 0.65rem;
    font-size: var(--font-size-sm);
    line-height: 1.25;
}

.theme-select option:not(:last-child),
.form-select option:not(:last-child) {
    border-bottom: 1px solid var(--border-soft);
}

.theme-select option:hover,
.form-select option:hover {
    background: var(--color-brand-pastel) !important;
    color: var(--text-primary);
}

.theme-select option:checked,
.form-select option:checked {
    background: var(--color-brand-pastel);
    color: var(--text-primary);
}

.theme-select:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 2px rgba(var(--color-brand-rgb), 0.16);
}

.theme-floating {
    position: fixed;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 1600;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: var(--font-size-base);
    background-color: var(--surface-page);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.42;
    color: var(--text-primary);
}

/* Landing page */
body.landing-page {
    background: var(--grad-primary-soft);
    min-height: 100vh;
    overflow-x: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--grad-sidebar);
    padding: 1.2rem 0;
    z-index: 1000;
    transition: width var(--transition-speed) ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--overlay-on-accent-30);
    border-radius: 4px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.2rem 1.2rem;
    border-bottom: 1px solid var(--border-on-accent-soft);
    margin-bottom: 1rem;
}

.sidebar-brand .logo {
    width: 38px;
    height: 38px;
    background: var(--overlay-on-accent-20);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    color: var(--text-on-accent);
    flex-shrink: 0;
}

.sidebar-brand .brand-text {
    color: var(--text-on-accent);
    font-size: var(--font-size-lg);
    font-weight: 700;
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--transition-speed);
}

.sidebar.collapsed .brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-menu {
    padding: 0 0.75rem;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.64rem 0.9rem;
    color: var(--text-on-accent-muted);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 0.25rem;
    transition: all var(--transition-speed);
    cursor: pointer;
    white-space: nowrap;
    font-size: var(--font-size-sm);
}

.sidebar-menu-item:hover {
    background: var(--overlay-on-accent-15);
    color: var(--text-on-accent);
    transform: translateX(2px);
}

.sidebar-menu-item.active {
    background: var(--overlay-on-accent-25);
    color: var(--text-on-accent);
    font-weight: var(--font-weight-semibold);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sidebar-menu-item i {
    font-size: var(--font-size-lg);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-menu-item span {
    opacity: 1;
    transition: opacity var(--transition-speed);
    flex: 1;
}

.sidebar-menu-item .submenu-arrow {
    font-size: 0.75rem;
    transition: transform var(--transition-speed);
    margin-left: auto;
}

.sidebar-menu-item.active + .sidebar-submenu,
.sidebar-menu-item.has-submenu.active + .sidebar-submenu {
    display: block;
}

.sidebar.collapsed .sidebar-menu-item.has-submenu.active + .sidebar-submenu {
    display: none;
}

.sidebar-menu-item.has-submenu.active .submenu-arrow {
    transform: rotate(90deg);
}

/* Sidebar colapsado - dropdown para submenús */
.sidebar.collapsed .sidebar-menu-item {
    position: relative;
}

/* Sidebar colapsado - overflow visible para dropdown */
.sidebar.collapsed {
    overflow: visible !important;
}

/* Sidebar colapsado - eliminar borde inferior de iconos */
.sidebar.collapsed .sidebar-menu-item.has-submenu::after {
    display: none;
}

.sidebar.collapsed .sidebar-menu-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-menu-item .submenu-arrow {
    display: none;
}

/* Sidebar colapsado - dropdown para submenús */
.sidebar.collapsed .sidebar-menu {
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed .sidebar-menu-item.has-submenu {
    position: relative;
}

.sidebar.collapsed .sidebar-submenu {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    min-width: 200px;
    background: var(--surface-card);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    padding: 0.5rem;
    z-index: 1001;
    animation: fadeIn 0.2s ease;
    margin-left: 0;
    transform: translateX(-4px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hover CSS puro - popup cuando el sidebar esta colapsado */
.sidebar.collapsed .sidebar-menu-item.has-submenu:hover + .sidebar-submenu,
.sidebar.collapsed .sidebar-menu-item.has-submenu:focus-visible + .sidebar-submenu,
.sidebar.collapsed .sidebar-menu-item.has-submenu + .sidebar-submenu:hover {
    display: block !important;
}

.sidebar.collapsed .sidebar-submenu-item {
    color: var(--text-secondary);
    background: transparent;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    display: block;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-submenu-item:hover {
    background: var(--color-brand-pastel);
    color: var(--color-brand);
    padding-left: 1rem;
}

.sidebar.collapsed .sidebar-submenu-item.active {
    background: var(--color-brand-pastel);
    color: var(--color-brand);
}

/* Submenú estado normal - reducir espacio izquierdo */
.sidebar-submenu {
    display: none;
    padding-left: 0.5rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-submenu-item {
    display: block;
    padding: 0.52rem 0.95rem 0.52rem 2.2rem;
    color: var(--text-on-accent-faint);
    text-decoration: none;
    font-size: var(--font-size-sm);
    border-radius: 8px;
    margin-bottom: 2px;
    transition: all var(--transition-speed);
    white-space: nowrap;
}

.sidebar-submenu-item:hover {
    background: var(--overlay-on-accent-10);
    color: var(--text-on-accent);
    padding-left: 2.35rem;
}

.sidebar-submenu-item.active {
    background: var(--overlay-on-accent-15);
    color: var(--text-on-accent);
    font-weight: 500;
}

.sidebar-divider {
    height: 1px;
    background: var(--overlay-on-accent-15);
    margin: 1rem 0;
}

.sidebar-title {
    padding: 0.8rem 0.9rem 0.45rem;
    color: var(--text-on-accent-quiet);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-title {
    opacity: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

.sidebar.collapsed .sidebar-brand {
    padding: 0 1.5rem 1.5rem;
    justify-content: center;
}

.sidebar.collapsed .sidebar-menu-item {
    justify-content: center;
    padding: 0.875rem;
    position: relative;
}

.sidebar.collapsed .sidebar-menu-item.has-submenu {
    cursor: pointer;
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-speed) ease;
}

@media (min-width: 992px) {
    .sidebar.collapsed + .main-content {
        margin-left: var(--sidebar-width-collapsed);
    }
}

.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: var(--surface-card);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.15rem;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--color-brand-pastel);
    color: var(--color-brand);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.toggle-btn:hover {
    background: var(--color-brand);
    color: var(--text-on-accent);
    transform: scale(1.05);
}

.toggle-btn:focus-visible {
    outline: 3px solid rgba(var(--color-brand-rgb), 0.35);
    outline-offset: 2px;
}

.search-box {
    position: relative;
    width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.52rem 0.9rem 0.52rem 2.25rem;
    border: 1px solid var(--border-input);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    background: var(--surface-page);
}

.search-box input:focus {
    outline: none !important;
    border-color: var(--color-brand) !important;
    background: var(--surface-card);
    box-shadow: none !important;
}

.search-box i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-subtle);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.08rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    position: relative;
}

.topbar-btn:hover {
    background: var(--color-brand-pastel);
    color: var(--color-brand);
}

.topbar-btn:focus-visible {
    outline: 3px solid rgba(var(--color-brand-rgb), 0.35);
    outline-offset: 2px;
}

.topbar-btn .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.topbar-btn .badge-teal {
    background: var(--color-brand);
    color: var(--text-on-accent);
}

.topbar-btn .badge-violet {
    background: var(--color-secondary);
    color: var(--text-on-accent);
}

.topbar-divider {
    width: 1px;
    height: 32px;
    background: var(--border-soft);
    margin: 0 0.5rem;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.user-dropdown:hover {
    background: var(--surface-muted);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--grad-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-accent);
    font-weight: 600;
    font-size: 0.875rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-strong);
}

.user-role {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 0.5rem;
    min-width: 220px;
}

.dropdown-menu .dropdown-item {
    border-radius: 7px;
    padding: 0.52rem 0.9rem;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-speed);
}

.dropdown-menu .dropdown-item:hover {
    background: var(--color-brand-pastel);
    color: var(--color-brand);
}

.dropdown-menu .dropdown-item i {
    font-size: 1rem;
    width: 20px;
}

.dropdown-menu .dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--border-soft);
}

.dropdown-header {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem;
    border-radius: 9px;
    transition: all var(--transition-speed);
    cursor: pointer;
}

.notification-item:hover {
    background: var(--surface-page);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.teal {
    background: var(--color-brand-pastel);
    color: var(--color-brand);
}

.notification-icon.violet {
    background: var(--color-secondary-pastel);
    color: var(--color-secondary);
}

.notification-icon.orange {
    background: var(--accent-orange-bg);
    color: var(--accent-orange);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 0.25rem;
}

.notification-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.notification-time {
    font-size: 0.7rem;
    color: var(--text-subtle);
    margin-top: 0.25rem;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-scrim);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.content-area {
    padding: 1.15rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#sec-ecf,
#sec-aecf {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#sec-ecf .listados-row,
#sec-aecf .listados-row {
    flex: 1;
    align-items: stretch;
}

.page-header {
    margin-bottom: 1.1rem;
}

.page-title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-strong);
    margin-bottom: 0.15rem;
    letter-spacing: -0.01em;
}

.page-subtitle {
    font-size: var(--font-size-base);
    color: var(--text-muted);
}

.stat-card {
    background: var(--surface-card);
    border-radius: 14px;
    padding: 1.05rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all var(--transition-speed);
    border: 1px solid var(--surface-muted);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.stat-icon.teal {
    background: var(--color-brand-pastel);
    color: var(--color-brand);
}

.stat-icon.violet {
    background: var(--color-secondary-pastel);
    color: var(--color-secondary);
}

.stat-value {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-strong);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: var(--font-size-base);
    color: var(--text-muted);
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.stat-change.positive {
    background: var(--state-success-bg);
    color: var(--state-success);
}

.stat-change.negative {
    background: var(--state-danger-bg);
    color: var(--state-danger);
}

.card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    background: var(--surface-card);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--surface-muted);
    padding: 1rem 1.1rem;
    font-weight: 600;
    color: var(--text-strong);
}

.card-body {
    padding: 1.1rem;
}

.btn-outline-teal {
    color: var(--color-brand);
    border-color: var(--color-brand);
}

.btn-outline-teal:hover {
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: var(--text-on-accent);
}

.bg-teal {
    background: var(--color-brand) !important;
}

.text-teal {
    color: var(--color-brand) !important;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: var(--sidebar-width);
    }

    .sidebar.collapsed .brand-text,
    .sidebar.collapsed .sidebar-menu-item span,
    .sidebar.collapsed .sidebar-title {
        opacity: 1;
        width: auto;
    }

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

    .search-box {
        display: none;
    }

    .user-info {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .topbar {
        padding: 0 1rem;
    }

    .content-area {
        padding: 1rem;
    }

    .page-title {
        font-size: var(--font-size-2xl);
    }

    .topbar-right {
        gap: 0.25rem;
    }

    .topbar-divider {
        display: none;
    }
}

@media (max-width: 575.98px) {
    :root {
        --topbar-height: 60px;
    }

    .topbar-btn {
        width: 36px;
        height: 36px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: var(--font-size-2xl);
    }
}

.btn-teal {
    background: var(--color-brand);
    color: var(--text-on-accent);
    border: none;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    transition: all 0.3s;
}

.btn-teal:hover {
    background: color-mix(in srgb, var(--color-brand) 82%, #000000);
    color: var(--text-on-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--color-brand-rgb), 0.3);
}

.btn-violet {
    background: var(--color-secondary);
    color: var(--text-on-accent);
    border: none;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    transition: all 0.3s;
}

.btn-violet:hover {
    background: color-mix(in srgb, var(--color-secondary) 82%, #000000);
    color: var(--text-on-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--color-brand-rgb), 0.3);
}

.text-violet {
    color: var(--color-secondary) !important;
}

.bg-violet {
    background: var(--color-secondary) !important;
}

.bg-violet.bg-opacity-10 {
    background-color: var(--color-secondary-pastel) !important;
}

.bg-teal.bg-opacity-10 {
    background-color: rgba(var(--color-brand-rgb), 0.1) !important;
}

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

.border-end-0 {
    border-right: 0 !important;
}

.border-start-0 {
    border-left: 0 !important;
}

.border-2 {
    border-width: 2px !important;
}

/* ========== LANDING PAGE ========== */
.hero-section {
    min-height: 100vh;
    background: var(--grad-primary-soft);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 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='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
}

.feature-card {
    background: var(--surface-card-soft);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-on-accent-strong);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.navbar-landing {
    background: color-mix(in srgb, var(--surface-card-soft) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-soft) 78%, transparent);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.9rem 0;
    margin-top: 0.75rem;
}

.navbar-landing .navbar-brand {
    color: var(--text-strong);
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-landing .navbar-brand:hover,
.navbar-landing .navbar-brand:focus {
    color: var(--text-strong);
}

.navbar-landing .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s;
}

.navbar-landing .nav-link:hover,
.navbar-landing .nav-link:focus,
.navbar-landing .nav-link.active,
.navbar-landing .navbar-nav .show > .nav-link {
    color: var(--text-strong);
}

.navbar-landing .nav-link:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
    border-radius: 8px;
}

.navbar-landing .navbar-toggler {
    border-color: var(--border-soft);
    color: var(--text-strong);
}

.navbar-landing .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--color-brand) 24%, transparent);
}

.navbar-landing .navbar-toggler-icon {
    filter: none;
}

[data-theme="dark"] .navbar-landing .navbar-toggler-icon,
[data-theme="violet-night"] .navbar-landing .navbar-toggler-icon,
[data-theme="fine-dining-deluxe-alt"] .navbar-landing .navbar-toggler-icon,
[data-theme="corporate-001e9a-night"] .navbar-landing .navbar-toggler-icon,
[data-theme="corporate-001e9a-night-soft"] .navbar-landing .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

.nav-btn {
    background: color-mix(in srgb, var(--surface-card) 90%, transparent);
    color: var(--text-primary) !important;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 0.5rem 1.25rem !important;
}

.nav-btn:hover {
    background: var(--surface-muted) !important;
    color: var(--text-strong) !important;
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-on-accent);
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 500px;
    color: var(--text-on-accent-soft);
}

.hero-kpi {
    color: var(--text-on-accent);
}

.hero-kpi .small {
    color: var(--text-on-accent-subtle);
}

.dashboard-preview {
    background: var(--surface-card);
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    position: relative;
}

.preview-header {
    background: var(--surface-muted);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.preview-content {
    padding: 1.5rem;
    min-height: 300px;
    background: var(--surface-page);
}

.stats-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-pill {
    background: var(--surface-card);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-pill-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-preview {
    background: var(--surface-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.table-preview table {
    margin: 0;
    font-size: 0.875rem;
}

.table-preview th {
    background: var(--surface-page);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border-soft);
}

.table-preview td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--surface-muted);
}

.footer-landing {
    background: var(--text-strong);
    padding: 4rem 0 2rem;
}

.footer-landing a {
    color: var(--text-on-accent-subtle);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-landing a:hover {
    color: var(--text-on-accent);
}

.footer-landing h5 {
    color: var(--text-on-accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

@media (max-width: 991.98px) {
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .dashboard-preview {
        margin-top: 3rem;
    }
    
    .stats-preview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .stats-preview {
        grid-template-columns: 1fr;
    }
}

.form-control {
    border: 1px solid var(--border-input);
    border-radius: 8px;
    padding: 0.52rem 0.78rem;
    font-size: var(--font-size-sm);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    background: var(--surface-card);
    color: var(--text-primary);
}

.form-control:focus,
.form-control:focus-visible {
    outline: none !important;
    border-color: var(--color-brand) !important;
    box-shadow: none !important;
}

.form-select {
    border: 1px solid var(--border-input);
    border-radius: 8px;
    padding: 0.52rem 0.78rem;
    font-size: var(--font-size-sm);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    background: var(--surface-card);
    color: var(--text-primary);
}

.form-select:focus,
.form-select:focus-visible {
    outline: none !important;
    border-color: var(--color-brand) !important;
    box-shadow: none !important;
}

.btn {
    border-radius: 9px;
    padding: 0.52rem 1rem;
    font-size: var(--font-size-sm);
    transition: all var(--transition-speed);
}
/* ========== LOGIN / REGISTER / RECOVER PAGE ========== */
body.login-page,
body.register-page,
body.recover-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-page {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.login-footer {
    flex-shrink: 0;
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.login-card,
.register-card,
.recover-card,
.auth-card {
    background: var(--surface-card);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    overflow: hidden;
    max-width: 900px;
    width: min(900px, 100%);
    margin: 0 auto;
}

.login-visual,
.register-visual,
.auth-visual {
    background: var(--grad-primary);
    padding: 2.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.login-visual::before,
.register-visual::before,
.auth-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E"); */
}

.login-visual-content,
.register-visual-content,
.auth-visual-content {
    position: relative;
    z-index: 1;
    color: var(--text-on-accent);
}

.login-form,
.register-form,
.auth-form {
    padding: 1.8rem;
}

.login-form {
    padding: 2.4rem;
}

.login-form .form-control,
.register-form .form-control,
.auth-form .form-control {
    border: 1px solid var(--border-input);
    border-radius: 8px;
    padding: 0.52rem 0.78rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: var(--surface-card);
    color: var(--text-primary);
}

.login-form .form-control:focus,
.login-form .form-control:focus-visible,
.register-form .form-control:focus,
.register-form .form-control:focus-visible,
.auth-form .form-control:focus,
.auth-form .form-control:focus-visible {
    outline: none !important;
    border-color: var(--color-brand) !important;
    box-shadow: none !important;
}

.btn-login,
.btn-register,
.btn-recover,
.btn-auth {
    background: var(--grad-primary);
    border: none;
    border-radius: 10px;
    padding: 0.72rem;
    font-weight: 600;
    transition: all 0.3s;
    color: var(--text-on-accent);
    width: 100%;
}

.btn-login:hover,
.btn-register:hover,
.btn-recover:hover,
.btn-auth:hover {
    background: color-mix(in srgb, var(--color-brand) 82%, #000000);
    color: var(--text-on-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(var(--color-brand-rgb), 0.3);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
}

.password-toggle:hover {
    color: var(--color-brand);
}

.password-toggle:focus-visible {
    outline: 2px solid rgba(var(--color-brand-rgb), 0.35);
    outline-offset: 2px;
    border-radius: 8px;
}

.social-login .btn {
    border-radius: 12px;
    padding: 0.75rem;
}

@media (max-width: 767.98px) {
    .login-visual,
    .register-visual,
    .auth-visual {
        display: none;
    }
    
    .login-form,
    .register-form,
    .auth-form {
        padding: 2rem;
    }

    body.login-page,
    body.register-page,
    body.recover-page {
        padding: 0.75rem;
    }

    .login-card,
    .register-card,
    .recover-card,
    .auth-card {
        width: 100%;
        margin: 0;
    }
}

@media (max-height: 700px) and (max-width: 991.98px) {
    body.login-page,
    body.register-page,
    body.recover-page {
        align-items: flex-start;
        padding: 0.5rem;
        overflow-y: auto;
    }

    .auth-page {
        align-items: flex-start;
    }

    .login-card,
    .register-card,
    .recover-card,
    .auth-card {
        border-radius: 14px;
    }

    .login-form,
    .register-form,
    .auth-form,
    .recover-body,
    .recover-header {
        padding: 1rem;
    }
}

/* ========== RECOVER PAGE ========== */
.recover-card {
    max-width: 480px;
}

.recover-header {
    background: var(--grad-primary);
    padding: 1.6rem;
    text-align: center;
    color: var(--text-on-accent);
}

.recover-icon {
    width: 70px;
    height: 70px;
    background: var(--overlay-on-accent-20);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.recover-icon i {
    font-size: 2.1rem;
    color: var(--text-on-accent);
}

.recover-body {
    padding: 1.5rem;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.step {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-soft);
    transition: all 0.3s;
}

.step.active {
    background: var(--grad-primary);
}

.step.completed {
    background: var(--color-brand);
}

.step-hidden {
    display: none;
}

.password-strength {
    height: 6px;
    border-radius: 3px;
    background: var(--border-soft);
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    border-radius: 3px;
    transition: all 0.3s;
    width: 0%;
}

.password-strength-bar.weak {
    width: 33%;
    background: var(--state-danger);
}

.password-strength-bar.medium {
    width: 66%;
    background: var(--state-warning);
}

.password-strength-bar.strong {
    width: 100%;
    background: var(--state-success);
}

.password-requirements {
    margin-top: 1rem;
    font-size: 0.8rem;
}

.password-requirements li {
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.password-requirements li.valid {
    color: var(--state-success);
}

.password-requirements li i {
    margin-right: 0.25rem;
}

/* ========== REGISTER PAGE ========== */
.register-card {
    background: var(--surface-card);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    margin: 1rem;
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.step-indicator .step {
    width: 30px;
    height: 6px;
    border-radius: 3px;
    background: var(--border-soft);
    transition: all 0.3s;
}

.step-indicator .step.active {
    background: var(--grad-primary);
    width: 50px;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.file-upload {
    border: 2px dashed var(--border-soft);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload:hover {
    border-color: var(--color-brand);
    background: var(--color-brand-pastel);
}

.file-upload:focus-visible {
    outline: 3px solid rgba(var(--color-brand-rgb), 0.35);
    outline-offset: 2px;
}

.file-upload i {
    font-size: 2rem;
    color: var(--color-brand);
    margin-bottom: 0.5rem;
}

/* ========== PINPAD PAGE ========== */
body.pinpad-page {
    background: var(--grad-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.pinpad-card {
    width: 100%;
    max-width: 440px;
    margin: 1rem;
    background: var(--surface-card);
    border-radius: 24px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.pinpad-header {
    background: var(--grad-primary);
    color: var(--text-on-accent);
    padding: 1.4rem 1.4rem 1.2rem;
    text-align: center;
}

.pinpad-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.pinpad-body {
    padding: 1.25rem;
}

.pin-indicators {
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.pin-indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-soft);
    transition: all 0.2s ease;
}

.pin-indicator-dot.filled {
    background: var(--color-brand);
    transform: scale(1.08);
}

.pinpad-input {
    text-align: center;
    letter-spacing: 0.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.pinpad-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.62rem;
    margin-bottom: 1rem;
}

.pinpad-key {
    border: 1px solid var(--border-soft);
    background: var(--surface-page);
    color: var(--text-strong);
    border-radius: 12px;
    min-height: 56px;
    font-size: 1.05rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pinpad-key:hover {
    border-color: var(--color-brand);
    background: var(--color-brand-pastel);
    color: var(--color-brand);
}

.pinpad-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.62rem;
}

/* ========== DASHBOARD PAGE ========== */
.dataTables_wrapper .form-control,
.dataTables_wrapper .form-select {
    border: 1px solid var(--border-input);
    border-radius: 8px;
    padding: 0.36rem 0.62rem;
    font-size: var(--font-size-xs);
    min-height: 30px;
}

/* ========== SWEETALERT COMPACT ========== */
.swal2-popup {
    width: min(24rem, calc(100vw - 1.5rem)) !important;
}

.swal2-container {
    padding: 0.75rem !important;
}

.swal2-popup.swal-compact-popup {
    border-radius: 12px;
    padding: 0.75rem 0.75rem 0.65rem;
}

.swal2-popup.swal-compact-popup.swal-compact-success {
    padding: 0.9rem 0.9rem 0.75rem;
}

.swal2-title.swal-compact-title {
    font-size: 0.96rem;
    margin: 0.5rem 0 0.15rem;
    padding: 0 0.35rem;
}

.swal2-popup.swal-compact-popup.swal-compact-success .swal2-title.swal-compact-title {
    font-size: 1rem;
}

.swal2-html-container.swal-compact-text {
    font-size: 0.76rem;
    margin: 0.55rem 0 0.55rem;
    line-height: 1.28;
    padding: 0 0.6rem;
}

.swal2-popup.swal-compact-popup.swal-compact-success .swal2-html-container.swal-compact-text {
    font-size: 0.8rem;
}

.swal2-confirm.swal-compact-button {
    border-radius: 7px;
    font-size: 0.78rem;
    padding: 0.35rem 0.72rem;
    background-color: var(--state-success);
}

.swal2-icon{
    margin-top: 1em;
    width: 3.5em;
    height: 3.5em;
}

.swal2-icon-content {
    font-size: 3.2em !important;
}

.swal2-success-line-tip {
    top: 34px !important;
    left: 10px !important;
    width: 1em !important;
    transform: rotate(45deg) !important;
}

.swal2-success-line-long {
    top: 26px !important;
    left: 18px !important;
    width: 2em !important;
    
}

.swal2-x-mark-line-left {
    left: 12px !important;
    top: 25px !important;
    width: 2em !important;
    height: 5px !important;
}

.swal2-x-mark-line-right {
    right: 12px !important;
    top: 25px !important;
    width: 2em !important;
    height: 5px !important;
}

    
.swal2-actions {
    margin-top: 0.5rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.swal2-styled {
    min-height: 42px;
}

.dataTables_wrapper .form-control:focus,
.dataTables_wrapper .form-control:focus-visible,
.dataTables_wrapper .form-select:focus,
.dataTables_wrapper .form-select:focus-visible {
    outline: none !important;
    border-color: var(--color-brand) !important;
    box-shadow: none !important;
}

.dataTables_length select {
    width: 74px !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.dataTables_wrapper .row {
    --bs-gutter-y: 0.4rem;
    align-items: center;
}

.dataTables_wrapper .row.mb-3,
.dataTables_wrapper .row.mt-3 {
    margin-left: 0;
    margin-right: 0;
    padding: 0 0.45rem;
}

.dataTables_wrapper .row.mt-3 {
    padding-bottom: 0.45rem;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0;
}

.dataTables_filter input {
    border: 1px solid var(--border-input);
    border-radius: 8px;
    padding: 0.36rem 0.62rem;
    min-height: 30px;
}

.dataTables_filter input:focus,
.dataTables_filter input:focus-visible {
    outline: none !important;
    border-color: var(--color-brand) !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 170px;
}

.dataTables_info {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    padding-left: 0;
    margin-bottom: 0;
}

.dataTables_paginate {
    font-size: var(--font-size-xs);
    padding-right: 0;
    margin-bottom: 0;
}

.dataTables_paginate .paginate_button {
    border-radius: 7px !important;
    margin: 0 !important;
    min-width: 28px;
    height: 28px;
    line-height: 1.2;
    padding: 0.16rem 0.5rem !important;
}

.dataTables_wrapper .dataTables_paginate .pagination {
    margin: 0;
    gap: 0;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-item {
    margin: 0 !important;
    padding: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-item + .page-item {
    margin-left: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .page-item .page-link {
    min-width: 28px;
    height: 28px;
    padding: 0.16rem 0.5rem;
    border-radius: 7px;
    border: 1px solid var(--border-input);
    background: var(--surface-card);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    line-height: 1.1;
    box-shadow: none;
    margin: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    background: var(--grad-primary);
    border-color: transparent;
    color: var(--text-on-accent);
    padding: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .page-item:not(.active) .page-link:hover {
    background: var(--surface-muted);
    color: var(--color-brand);
    border-color: var(--border-input);
}

.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    .dataTables_wrapper .row.mb-3,
    .dataTables_wrapper .row.mt-3 {
        padding: 0 0.2rem;
    }

    .dataTables_wrapper .row.mt-3 {
        padding-bottom: 0.3rem;
    }

    .dataTables_info {
        padding-left: 0;
    }

    .dataTables_paginate {
        padding-right: 0;
    }
}

.dataTables_paginate .paginate_button.current {
    background: var(--grad-primary) !important;
    border-color: transparent !important;
    color: var(--text-on-accent) !important;
}

.dataTables_paginate .paginate_button:hover {
    background: var(--surface-muted) !important;
    border-color: transparent !important;
    color: var(--color-brand) !important;
}

.table.dataTable thead th {
    background: var(--surface-page);
    font-weight: 600;
    font-size: var(--font-size-xs);
    letter-spacing: 0.01em;
    color: var(--text-strong);
    border-bottom: 2px solid var(--border-soft);
    padding: 0.58rem 0.75rem;
}

.table.dataTable tbody td {
    padding: 0.56rem 0.75rem;
    font-size: var(--font-size-xs);
    vertical-align: middle;
    border-bottom: 1px solid var(--surface-muted);
}

.table.dataTable tbody tr:hover {
    background: var(--surface-page);
}

.table-responsive-dashboard {
    overflow-x: auto;
}

.table-actions {
    display: flex;
    gap: 0.2rem;
}

.action-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.78rem;
}

.action-btn i {
    color: inherit;
}

.action-btn.view {
    background: var(--state-info-bg);
    color: var(--state-info);
}

.action-btn.edit {
    background: var(--state-warning-bg);
    color: var(--state-warning);
}

.action-btn.delete {
    background: var(--state-danger-bg);
    color: var(--state-danger);
}

.action-btn:hover {
    transform: scale(1.1);
    filter: brightness(0.88);
}


.quick-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface-card);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    border-color: var(--color-brand);
    color: var(--color-brand);
    background: var(--color-brand-pastel);
}

.quick-action-btn i {
    font-size: 1rem;
}


/* ========== COHERENCE UTILITIES ========== */
.topbar-notification-menu {
    width: 22rem;
}

.notification-list-scroll {
    max-height: 20rem;
    overflow-y: auto;
}

.hero-pill-badge {
    border-radius: 999px;
}

.nav-toggler-surface {
    background: var(--surface-card) !important;
    border-color: var(--border-soft) !important;
}

.nav-btn-solid {
    background: var(--surface-card);
    color: var(--text-primary) !important;
}

.hero-badge-surface {
    background: var(--surface-card);
}

.section-surface-muted {
    background: var(--surface-muted);
}

.accent-glass-chip {
    background: var(--overlay-on-accent-25);
}

.input-addon-surface {
    background: var(--surface-muted);
    color: var(--text-muted);
    border-color: var(--border-input);
}

.divider-label-surface {
    background: var(--surface-card);
}

.summary-surface-box {
    background: var(--surface-muted);
}

.auth-metric-card {
    flex: 1;
}

.icon-soft-teal {
    background: var(--color-brand-pastel);
    color: var(--color-brand);
}

.icon-soft-violet {
    background: var(--color-secondary-pastel);
    color: var(--color-secondary);
}

.icon-soft-orange {
    background: var(--accent-orange-bg);
    color: var(--accent-orange);
}

.icon-soft-blue {
    background: var(--state-info-bg);
    color: var(--state-info);
}

.icon-soft-pink {
    background: var(--accent-pink-bg);
    color: var(--accent-pink);
}

.icon-soft-green {
    background: var(--accent-green-bg);
    color: var(--accent-green);
}


.feature-icon-sm {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
}

.display-icon-lg {
    font-size: 2.6rem;
}

.stat-icon-sm {
    width: 36px;
    height: 36px;
    font-size: 1rem;
}

.compact-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
    border-radius: 8px;
}

.avatar-violet {
    background: var(--color-secondary);
}

.avatar-orange {
    background: var(--accent-orange);
}

.avatar-green {
    background: var(--accent-green);
}

.avatar-red {
    background: var(--state-danger);
}

.avatar-blue {
    background: var(--accent-blue);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
}

.status-badge.success,
.status-badge.status-completed {
    background: var(--state-success-bg);
    color: var(--state-success);
}

.status-badge.warning,
.status-badge.status-pending {
    background: var(--state-warning-bg);
    color: var(--state-warning);
}

.status-badge.info,
.status-badge.status-active {
    background: var(--state-info-bg);
    color: var(--state-info);
}

.status-badge.status-inactive {
    background: var(--state-danger-bg);
    color: var(--state-danger);
}

.progress-thin {
    height: 10px;
    border-radius: 5px;
}

.progress-bar-teal-grad {
    background: var(--grad-accent);
}

.progress-bar-blue {
    background: var(--state-info);
}

.progress-bar-orange {
    background: var(--state-warning);
}

.w-65p {
    width: 65%;
}

.w-20p {
    width: 20%;
}

.w-10p {
    width: 10%;
}

.w-5p {
    width: 5%;
}

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

.text-orange-brand {
    color: var(--state-warning);
}

.divider-soft {
    border-color: var(--border-on-accent-faint);
}

/* ========== RESPONSIVE UX PATCH (MOBILE/TABLET) ========== */
.modal-dialog {
    margin: 0.75rem auto;
}

.modal-dialog.modal-dialog-centered {
    min-height: calc(100% - 1.5rem);
}

.modal-header,
.modal-body,
.modal-footer {
    padding: clamp(0.75rem, 2.6vw, 1rem);
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-footer > * {
    margin: 0 !important;
}

.modal-footer .btn {
    min-height: 42px;
}

@media (max-width: 991.98px) {
    .topbar-notification-menu {
        width: min(92vw, 22rem);
    }

    .card-header .d-flex.gap-2 {
        width: 100%;
        flex-wrap: wrap;
    }

    .card-header .form-select.w-auto {
        width: 100% !important;
    }

    .quick-action-btn {
        min-height: 44px;
    }
}

@media (max-width: 767.98px) {
    .modal {
        padding: 0;
    }

    .modal-dialog {
        margin: 0.5rem auto;
    }

    .modal-dialog.modal-dialog-centered {
        min-height: calc(100% - 1rem);
    }

    .modal-dialog-scrollable .modal-body {
        max-height: calc(100dvh - 10.5rem);
        overflow-y: auto;
    }

    .modal-title {
        font-size: var(--font-size-lg);
    }

    .modal-footer .btn {
        flex: 1 1 100%;
    }

    .quick-actions {
        width: 100%;
    }

    .quick-action-btn {
        flex: 1 1 calc(50% - 0.5rem);
        justify-content: center;
    }

    .dataTables_wrapper .row {
        --bs-gutter-y: 0.65rem;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        text-align: left !important;
    }

    .dataTables_wrapper .dataTables_filter label,
    .dataTables_wrapper .dataTables_length label {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .dataTables_wrapper .dataTables_filter input,
    .dataTables_wrapper .dataTables_length select {
        width: 100% !important;
        min-width: 0 !important;
    }

    .dataTables_wrapper .dataTables_paginate .pagination {
        flex-wrap: wrap;
        justify-content: flex-start;
        row-gap: 0.25rem;
    }
}

@media (max-width: 575.98px) {
    .quick-action-btn {
        flex: 1 1 100%;
    }

    .pinpad-card {
        margin: 0.75rem;
        border-radius: 18px;
    }

    .pinpad-key {
        min-height: 52px;
    }

    .pinpad-actions {
        grid-template-columns: 1fr;
    }

    .pinpad-actions .btn {
        min-height: 44px;
    }

    .swal2-popup {
        width: min(94vw, 22rem) !important;
    }

    .swal2-title.swal-compact-title {
        font-size: 0.92rem;
    }

    .swal2-html-container.swal-compact-text {
        font-size: 0.74rem;
    }

    .swal2-confirm.swal-compact-button {
        width: 100%;
        min-height: 44px;
    }
}

/* ------------------------------------------------------------------
   ALIAS SEM�NTICOS � Clases independientes del nombre de color
   Reemplazan las clases *-teal para que el HTML no est� acoplado
   al nombre del color del tema por defecto.
   ------------------------------------------------------------------ */

/* Texto con color primary del tema */
.text-accent             { color: var(--color-brand) !important; }

/* Fondos */
.bg-accent               { background: var(--color-brand) !important; }
.bg-accent.bg-opacity-10 { background-color: rgba(var(--color-brand-rgb), 0.1) !important; }

/* Bot�n relleno primario */
.btn-accent {
    background: var(--color-brand);
    color: var(--text-on-accent);
    border: none;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    transition: all 0.3s;
}
.btn-accent:hover {
    background: color-mix(in srgb, var(--color-brand) 82%, #000000);
    color: var(--text-on-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--color-brand-rgb), 0.3);
}

/* Bot�n outline primario */
.btn-outline-accent {
    color: var(--color-brand);
    border-color: var(--color-brand);
    background-color: transparent;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn-outline-accent:hover,
.btn-outline-accent:focus,
.btn-outline-accent:active,
.btn-outline-accent.active {
    background: var(--color-brand) !important;
    border-color: var(--color-brand) !important;
    color: var(--text-on-accent) !important;
    box-shadow: none !important;
}

/* Badge de acento (inline, no topbar) */
.badge-accent {
    background: var(--color-brand);
    color: var(--text-on-accent);
}

/* Badge dentro del topbar-btn */
.topbar-btn .badge-accent {
    background: var(--color-brand);
    color: var(--text-on-accent);
}

/* Icono soft */
.icon-soft-accent {
    background: var(--color-brand-pastel);
    color: var(--color-brand);
}

/* Notification icon modificador */
.notification-icon.accent {
    background: var(--color-brand-pastel);
    color: var(--color-brand);
}

/* Stat icon modificador */
.stat-icon.accent {
    background: var(--color-brand-pastel);
    color: var(--color-brand);
}

/* Progress bar de acento */
.progress-bar-accent {
    background: var(--grad-accent);
}

/* ========== TOAST NOTIFICATION SYSTEM ========== */
#appToastContainer {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.app-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    border: 1px solid var(--border-soft);
    background: var(--surface-card);
    box-shadow: 0 4px 16px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
    pointer-events: auto;
    animation: appToastIn 0.25s cubic-bezier(0.34, 1.3, 0.64, 1) both;
    will-change: transform, opacity;
}

.app-toast--hide {
    animation: appToastOut 0.26s ease forwards;
}

@keyframes appToastIn {
    from { opacity: 0; transform: translateX(1.5rem) scale(0.97); }
    to   { opacity: 1; transform: translateX(0)        scale(1);    }
}

@keyframes appToastOut {
    from { opacity: 1; transform: translateX(0)        scale(1);    }
    to   { opacity: 0; transform: translateX(1.5rem) scale(0.96);  }
}

/* Icon area */
.app-toast__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 1rem;
}

/* Body */
.app-toast__body {
    flex: 1;
    min-width: 0;
}

.app-toast__title {
    margin: 0 0 0.125rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-strong);
}

.app-toast__message {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

/* Close button */
.app-toast__close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
    margin-top: -0.125rem;
}

.app-toast__close:hover {
    background: var(--surface-muted);
    color: var(--text-strong);
}

/* ── Variantes de estado ── */
.app-toast--success .app-toast__icon {
    background: var(--state-success-bg);
    color: var(--state-success);
}

.app-toast--success {
    border-left: 3px solid var(--state-success);
}

.app-toast--warning .app-toast__icon {
    background: var(--state-warning-bg);
    color: var(--state-warning);
}

.app-toast--warning {
    border-left: 3px solid var(--state-warning);
}

.app-toast--error .app-toast__icon {
    background: var(--state-danger-bg);
    color: var(--state-danger);
}

.app-toast--error {
    border-left: 3px solid var(--state-danger);
}

.app-toast--info .app-toast__icon {
    background: var(--state-info-bg);
    color: var(--state-info);
}

.app-toast--info {
    border-left: 3px solid var(--state-info);
}

.app-toast--brand .app-toast__icon {
    background: var(--color-brand-pastel);
    color: var(--color-brand);
}

.app-toast--brand {
    border-left: 3px solid var(--color-brand);
}

@media (max-width: 575.98px) {
    #appToastContainer {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        padding: 0 0.75rem 0.75rem;
        gap: 0.375rem;
    }

    .app-toast {
        border-radius: 0.5rem;
    }
}
/* ========== END OF TOAST NOTIFICATIONS ========== */

/* ── Panel footer ── */
.panel-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.15rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-soft);
    background: var(--surface-card);
}
