/* ============================= */
/* Hury Suite Admin Panel       */
/* Estilos Completos - Refactorizado */
/* ============================= */

/* ============================= */
/* 1. TOKENS / DESIGN SYSTEM     */
/* ============================= */
@import url('tokens.css');

/* ============================= */
/* 2. BASE / RESET               */
/* ============================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body,
#adminPanel,
.admin-panel,
.main-content,
.content,
.page {
    max-width: 100%;
    overflow-x: hidden !important;
}

/* Normalización universal entre Windows, Mac, iOS y Android */
.os-windows * {
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
}

.os-mac *,
.os-ios * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.os-android * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: auto;
}

/* ===== Global Admin refinements ===== */
.global-admin-card {
    padding: 14px;
}

.global-admin-table {
    min-width: 1180px;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.global-admin-table thead th {
    font-size: 22px;
    letter-spacing: 0.01em;
    color: #1f1f24;
}

.global-admin-table tbody td {
    background: #fff;
    border-top: 1px solid #ece8e4;
    border-bottom: 1px solid #ece8e4;
    vertical-align: top;
    padding-top: 12px;
    padding-bottom: 12px;
}

.global-admin-table tbody td:first-child {
    border-left: 1px solid #ece8e4;
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
}

.global-admin-table tbody td:last-child {
    border-right: 1px solid #ece8e4;
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}

.ga-id-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 18px;
    background: #fff8ef;
    color: #2b2b32;
    border: 1px solid #ffbe95;
}

.ga-business-main {
    font-size: 34px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1d1f24;
    max-width: 320px;
    word-break: break-word;
}

.ga-slug-pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #ece8e4;
    background: #fafafa;
    color: #333;
    font-size: 13px;
}

.ga-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 98px;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 800;
    border: 1px solid transparent;
}

.ga-status-badge.is-active {
    background: #e9f9f0;
    color: #16794e;
    border-color: #bce6d1;
}

.ga-status-badge.is-inactive {
    background: #fff0f0;
    color: #a53434;
    border-color: #f2c3c3;
}

.ga-domain-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 260px;
}

.ga-modules-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 610px;
}

.ga-module-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #ffbe95;
    background: #fff8f3;
    font-weight: 700;
    color: #23242a;
    user-select: none;
}

.ga-module-chip input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
}

.ga-module-chip.is-disabled {
    opacity: 0.72;
}

.ga-actions-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 140px;
}

.ga-actions-col .btn-sm {
    width: 100%;
    justify-content: center;
}

@media (max-width: 1200px) {
    .ga-business-main {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .global-admin-card {
        padding: 10px;
    }

    .ga-business-main {
        font-size: 22px;
    }

    .ga-domain-stack {
        min-width: 200px;
    }

    .ga-modules-grid {
        max-width: 420px;
    }
}

/* Estilos universales para móviles */
.device-mobile *,
.is-mobile * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.device-mobile input,
.device-mobile textarea,
.device-mobile select,
.is-mobile input,
.is-mobile textarea,
.is-mobile select {
    -webkit-user-select: text;
    user-select: text;
    font-size: 16px !important; /* Prevenir zoom en iOS al enfocar inputs */
}

/* Estilos específicos para Windows - Asegurar renderizado correcto */
.os-windows .admin-panel {
    /* Asegurar que el panel se renderice correctamente en Windows */
    display: flex !important;
    width: 100%;
    overflow-x: hidden;
}

.os-windows .sidebar {
    /* Asegurar que el sidebar se vea correctamente en Windows */
    position: fixed !important;
    height: 100vh !important;
    overflow-y: auto;
    /* Mejorar scrollbar en Windows */
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #1a1a1a;
}

.os-windows .sidebar::-webkit-scrollbar {
    width: 8px;
}

.os-windows .sidebar::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.os-windows .sidebar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.os-windows .main-content {
    /* Asegurar que el contenido principal se ajuste correctamente */
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
}

.os-windows .stat-card,
.os-windows .chart-card,
.os-windows .card {
    /* Asegurar que las tarjetas se rendericen correctamente */
    display: block !important;
    box-sizing: border-box;
}

.os-windows .stats-grid,
.os-windows .charts-grid {
    /* Asegurar que los grids funcionen correctamente en Windows */
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
}

.os-windows .header {
    /* Asegurar que el header se vea correctamente */
    position: sticky !important;
    top: 0;
    z-index: 100;
    background: var(--white) !important;
}

.os-windows .content {
    /* Asegurar que el contenido tenga el padding correcto */
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
}

.os-windows .data-table {
    /* Asegurar que las tablas se rendericen correctamente */
    width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

.os-windows .nav-item {
    /* Asegurar que los items del menú se vean bien */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Asegurar que los elementos se rendericen correctamente en Windows */
.os-windows img {
    max-width: 100%;
    height: auto;
    display: block;
}

.os-windows button,
.os-windows .btn {
    /* Asegurar que los botones funcionen correctamente */
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    /* Normalizar renderizado entre sistemas operativos */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Asegurar consistencia en Windows y Mac */
    font-feature-settings: "kern" 1;
    font-kerning: normal;
}

/* ========== LOGIN PAGE ========== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo i {
    font-size: 60px;
    color: var(--primary);
    margin-bottom: 10px;
    display: block;
}

#loginLogoImg {
    display: block;
    margin: 0 auto 10px;
}

.flag-svg {
    width: 1.5em;
    height: 1em;
    border-radius: 2px;
    vertical-align: middle;
    display: inline-block;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.logo h1 {
    color: var(--dark);
    font-size: 32px;
    margin-bottom: 5px;
}

.logo p {
    color: var(--gray);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--dark);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.btn-primary {
    width: auto;
    padding: 8px 16px;
    background: var(--primary);
    color: #000000;
    border: 2px solid #000000;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    background: var(--primary);
}

.error-message {
    color: var(--danger);
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

/* ========== ADMIN PANEL ========== */
.admin-panel {
    display: flex;
    min-height: 100vh;
    background: #F5F7FA;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #000000 0%, #1a1a1a 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
    border-right: 2px solid var(--primary);
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.sidebar-brand i {
    font-size: 32px;
    color: var(--primary);
}

.sidebar-brand h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.sidebar-user > i {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-user span {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-refresh-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 13px;
    transition: color 0.2s, background 0.2s;
}

.sidebar-refresh-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Secciones de navegación */
.nav-section {
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-section-title {
    padding: 10px 25px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
}

/* Top standalone item (Accueil) */
.nav-item.nav-item-top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    margin: 0;
    padding: 13px 20px 13px 16px;
}
.nav-item.nav-item-top:hover {
    padding-left: 16px;
}
.nav-item.nav-item-top.active {
    border-radius: 12px;
    margin: 4px 10px;
    padding-left: 16px;
}
.nav-item[data-page="settings"]:hover {
    background: transparent;
    padding-left: 16px;
}
.nav-item[data-page="settings"]:hover .nav-item-icon {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}
.nav-item.nav-item-top .nav-item-icon {
    width: 34px;
    height: 34px;
    color: var(--primary);
}

#favSection > .nav-section-header .nav-item-icon {
    color: #f5c518;
}

/* Collapsible sections */
.nav-section-header {
    display: flex;
    align-items: center;
    padding: 13px 20px 13px 16px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, color 0.2s;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.nav-section-header:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.nav-section.open > .nav-section-header {
    color: #fff;
}

.nav-section-header .nav-item-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.nav-chevron {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.45;
    transition: transform 0.25s ease, opacity 0.2s;
}

.nav-section.open > .nav-section-header .nav-chevron {
    transform: rotate(90deg);
    opacity: 0.8;
}

.nav-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.12);
}

.nav-section.open > .nav-section-body {
    max-height: 2000px;
}

/* Items de navegación mejorados */
.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    margin: 2px 0;
    border-radius: 0 8px 8px 0;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    padding-left: 30px;
}

.nav-item:hover::before {
    width: 3px;
    height: 60%;
}

.nav-item.active {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
    font-weight: 600;
    padding-left: 30px;
}

.nav-item.active::before {
    width: 4px;
    height: 70%;
    background: var(--primary);
    box-shadow: none;
}

.nav-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover .nav-item-icon {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.nav-item.active .nav-item-icon {
    background: rgba(var(--primary-rgb), 0.15);
    box-shadow: none;
}

.nav-item-icon i {
    font-size: 18px;
    color: inherit;
}

.nav-item-text {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Favourite button on nav items */
.nav-fav-btn {
    background: none;
    border: none;
    outline: none;
    padding: 4px 5px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.25);
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
    flex-shrink: 0;
    line-height: 1;
}
.nav-fav-btn:focus,
.nav-fav-btn:focus-visible {
    outline: none;
}
.nav-item:hover .nav-fav-btn {
    opacity: 1;
}
.nav-fav-btn.active {
    opacity: 1;
    color: #f5c518;
}
.nav-fav-btn.active i {
    font-weight: 900; /* fas solid star */
    font-family: "Font Awesome 6 Free";
}

/* Favoris section at top */
#navFavoris {
    cursor: default;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-height: 46px;
}
#navFavoris .fav-empty-hint {
    font-size: 11px;
    opacity: 0.35;
    margin-left: 2px;
}
#navFavoris .fav-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
#navFavoris .fav-chip:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--white);
    border: 1px solid rgba(var(--primary-rgb), 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.btn-logout:hover {
    background: var(--primary);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: #F5F7FA;
    min-height: 100vh;
}

.header {
    background: var(--white);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-menu-toggle {
    display: none;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
}

.mobile-menu-toggle:hover {
    background: var(--primary);
    transform: scale(1.05);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.language-selector {
    padding: 8px 12px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    background: var(--white);
    color: var(--dark);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.language-selector:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.language-selector:focus {
    outline: none;
    border-color: var(--primary);
}

/* Language Configuration Section */
.language-config-section {
    margin-top: 20px;
}

/* Language Buttons - Selector Moderno con Paleta Negro/Dorado/Rojo/Blanco */
.language-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}

.language-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 25px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border: 3px solid #000000;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.language-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(231, 76, 60, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.language-btn:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4), 0 0 0 2px rgba(255, 215, 0, 0.2);
    transform: translateY(-4px) scale(1.02);
    background: linear-gradient(135deg, #ffffff 0%, #fffef5 100%);
}

.language-btn:hover::before {
    opacity: 1;
}

.language-btn.active {
    border-color: var(--accent-gold);
    border-width: 4px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(231, 76, 60, 0.1) 100%);
    box-shadow: 0 12px 32px rgba(255, 215, 0, 0.5), 0 0 0 6px rgba(255, 215, 0, 0.15), inset 0 0 20px rgba(255, 215, 0, 0.1);
    color: #000000;
    transform: translateY(-2px) scale(1.03);
}

.language-btn.active::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.language-btn .btn-flag {
    font-size: 48px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
    z-index: 1;
}

.language-btn:hover .btn-flag {
    transform: scale(1.1);
    filter: none;
}

.language-btn.active .btn-flag {
    transform: scale(1.15);
    filter: none;
}

.language-btn .btn-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    z-index: 1;
    transition: all 0.3s ease;
    color: #000000;
}

.language-btn.active .btn-text {
    font-size: 19px;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.5), 0 0 8px rgba(255, 215, 0, 0.3);
    color: #000000;
}

.language-btn .btn-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #ff6a2f 100%);
    color: #000000;
    border: 2px solid #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0) rotate(-180deg);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.language-btn.active .btn-check {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    animation: checkPop 0.5s ease;
}

@keyframes checkPop {
    0% {
        transform: scale(0) rotate(-180deg);
    }
    50% {
        transform: scale(1.3) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.language-btn.active .btn-check:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #ff6a2f 0%, var(--accent-gold) 100%);
}

@media (max-width: 768px) {
    .language-buttons {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .language-btn {
        padding: 20px 15px;
    }
    
    .language-btn .btn-flag {
        font-size: 40px;
    }
    
    .language-btn .btn-text {
        font-size: 16px;
    }
}

.language-preview {
    border-top: 2px solid #E0E0E0;
    padding-top: 20px;
    margin-top: 30px;
}

.preview-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.preview-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid #E0E0E0;
}

.preview-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

.header h1 {
    color: var(--dark);
    font-size: 28px;
    margin: 0;
    flex: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
}

.user-info span {
    font-weight: 600;
}

.user-info i {
    font-size: 32px;
    color: var(--primary);
}


/* Content */
.content {
    padding: 30px;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Stats Grid */
/* ========== DASHBOARD HEADER ========== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #E8E8E8;
}

.dashboard-header-content {
    flex: 1;
}

.dashboard-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-title {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-title i {
    color: var(--primary);
    font-size: 28px;
}

.dashboard-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    gap: 10px;
}

.btn-refresh {
    padding: 10px 20px;
    height: auto;
    border-radius: 12px;
    background: #F5F7FA;
    border: 2px solid #E8E8E8;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 600;
}

.btn-refresh span {
    display: inline-block;
}

.btn-refresh:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    transform: rotate(180deg);
}

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

/* ========== STATS SECTIONS ========== */
.stats-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid #F0F0F0;
}

.section-title i {
    color: var(--primary);
    font-size: 18px;
}

/* ========== STATS GRID PRINCIPAL ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #F0F0F0;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-card-background {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    opacity: 0.1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: inherit;
}

.stat-card-content {
    padding: 24px;
    position: relative;
    z-index: 1;
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label i {
    font-size: 16px;
    opacity: 0.9;
    color: #FFFFFF;
}

.stat-trend {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.stat-trend-up {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 8px;
    line-height: 1.2;
}

.stat-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-footer-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.stat-footer i {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
    flex-shrink: 0;
}

.stat-change {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    line-height: 1.4;
    flex: 1;
}

.stat-growth,
.stat-percentage {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-top: 4px;
}

.stat-growth i {
    font-size: 11px;
    color: var(--primary);
}

.stat-percentage {
    background: rgba(255, 215, 0, 0.15);
    color: var(--primary);
}

/* Variantes de colores para stat-cards */
.stat-card-primary {
    border-left: 4px solid var(--primary);
}

.stat-card-primary .stat-card-background {
    color: var(--primary);
}

.stat-card-primary .stat-value {
    color: var(--primary);
}

.stat-card-success {
    border-left: 4px solid var(--primary);
}

.stat-card-success .stat-card-background {
    color: var(--primary);
}

.stat-card-success .stat-value {
    color: var(--primary);
}

.stat-card-warning {
    border-left: 4px solid var(--primary);
}

.stat-card-warning .stat-card-background {
    color: var(--primary);
}

.stat-card-warning .stat-value {
    color: var(--primary);
}

.stat-card-info {
    border-left: 4px solid var(--primary);
}

.stat-card-info .stat-card-background {
    color: var(--primary);
}

.stat-card-info .stat-value {
    color: var(--primary);
}

/* ========== STATS SECUNDARIAS (MINI CARDS) ========== */
.stats-secondary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.stat-mini-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.25s;
    border: 1px solid #F5F5F5;
}

.stat-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-mini-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-mini-blue {
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary);
}

.stat-mini-orange {
    background: rgba(243, 156, 18, 0.1);
    color: var(--primary);
}

.stat-mini-purple {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.stat-mini-red {
    background: rgba(231, 76, 60, 0.1);
    color: var(--primary);
}

.stat-mini-green {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.stat-mini-teal {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.stat-mini-content {
    flex: 1;
    min-width: 0;
}

.stat-mini-value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.2;
}

.stat-mini-label {
    font-size: 13px;
    color: #333;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-mini-label i {
    font-size: 12px;
    opacity: 0.6;
}

.stat-mini-hint {
    font-size: 11px;
    color: #999;
    font-weight: 400;
    line-height: 1.3;
    margin-top: 4px;
}

/* ========== ANALYTICS SECTION ========== */
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.analytics-filters {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #E8E8E8;
    background: #FFFFFF;
    color: #666;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: #1a1a1a;
    background: #FFFEF5;
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #1a1a1a;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.analytics-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #F0F0F0;
    transition: all 0.3s;
}

.analytics-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.analytics-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.analytics-card-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.analytics-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.analytics-icon-green {
    background: rgba(76, 175, 80, 0.1);
    color: var(--primary);
}

.analytics-icon-blue {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.analytics-icon-purple {
    background: rgba(156, 39, 176, 0.1);
    color: var(--primary);
}

.analytics-icon-orange {
    background: rgba(255, 152, 0, 0.1);
    color: var(--primary);
}

.analytics-icon-teal {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.analytics-icon-pink {
    background: rgba(233, 30, 99, 0.1);
    color: var(--primary);
}

.analytics-card-title h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px 0;
}

.analytics-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.analytics-summary {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    font-weight: 600;
}

.summary-value {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
}

.summary-value-green {
    color: var(--primary);
}

.summary-value-red {
    color: var(--primary);
}

.analytics-chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

.analytics-chart-container canvas {
    max-height: 280px !important;
}

/* ========== CHARTS GRID ========== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.chart-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Normalizar renderizado entre Windows y Mac */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.chart-card canvas {
    /* Asegurar que las gráficas se rendericen igual en Windows y Mac */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    image-rendering: auto;
}

.chart-card h3 {
    color: var(--dark);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-grid {
    display: grid;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #F8F9FA;
    border-radius: 8px;
}

.info-item .label {
    color: var(--gray);
}

.info-item .value {
    font-weight: 600;
    color: var(--primary);
    font-size: 18px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}


/* Card */
.card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.card h3 {
    color: var(--dark);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Table */
.table-container {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.data-table thead {
    background: var(--secondary);
    color: var(--white);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #E0E0E0;
}

.data-table tbody tr:hover {
    background: #F8F9FA;
}

.text-center {
    text-align: center !important;
}

.text-success {
    color: var(--success) !important;
    font-weight: 600;
}

.text-danger {
    color: var(--danger) !important;
    font-weight: 600;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.success { background: #fff3cd; color: var(--primary); }
.badge.warning { background: #FFF3CD; color: var(--primary); }
.badge.danger { background: #fff3cd; color: var(--primary); }
.badge.info { background: #fff3cd; color: var(--primary); }

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Form */
.form-horizontal {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Grids */
.cards-grid,
.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.menu-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.menu-list-item {
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-list-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
}

/* Estilos para acordeón de categorías del menú */
.menu-category-accordion {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.menu-category-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: background 0.2s;
}

.menu-category-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.menu-category-icon {
    transition: transform 0.3s ease;
    color: #666;
}

.menu-category-content {
    padding: 15px;
    background: #fafafa;
    transition: display 0.3s ease;
}

.reward-card,
.menu-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.reward-card:hover,
.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.reward-card img,
.menu-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.reward-card-content,
.menu-card-content {
    padding: 20px;
}

.reward-card h4,
.menu-card h4 {
    color: var(--dark);
    margin: 0 0 10px 0;
    font-size: 18px;
}

.reward-card p,
.menu-card p {
    color: var(--gray);
    font-size: 14px;
    margin: 0 0 15px 0;
}

.menu-list-item {
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex !important;
}

.menu-list-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
}

.reward-points {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 15px;
}

.price {
    color: var(--success);
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 15px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    background: var(--dark);
    color: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: none;
    animation: slideIn 0.3s;
    z-index: 2000;
}

.toast.show {
    display: block;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid #E0E0E0;
}

.modal-header h3 {
    margin: 0;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 30px;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 25px;
}

/* Banners */
.banners-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.banner-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.banner-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.banner-preview {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.banner-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    height: 100%;
}

.banner-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
}

.banner-info {
    padding: 15px;
    flex: 1;
}

.banner-info h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.banner-info p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.banner-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.banner-actions {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid #eee;
    justify-content: flex-end;
}

.image-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

/* Modal Large (Banner / formularios largos) */
.modal-overlay .modal-content.modal-large {
    width: min(980px, 94vw);
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 18px !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.modal-overlay .modal-content.modal-large .modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
}

.modal-overlay .modal-content.modal-large .modal-header h2,
.modal-overlay .modal-content.modal-large .modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #151515;
}

.modal-overlay .modal-content.modal-large .modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #ffffff;
    font-size: 24px;
    line-height: 1;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-overlay .modal-content.modal-large .modal-close:hover {
    border-color: rgba(var(--primary-rgb), 0.45);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.2);
}

.modal-overlay .modal-content.modal-large .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px;
    text-align: left;
    background: #fcfcfd;
}

.modal-overlay .modal-content.modal-large .modal-body form {
    display: grid;
    gap: 14px;
}

.modal-overlay .modal-content.modal-large .form-group label {
    font-weight: 600;
    color: #2e2e2e;
}

.modal-overlay .modal-content.modal-large .form-group input,
.modal-overlay .modal-content.modal-large .form-group textarea,
.modal-overlay .modal-content.modal-large .form-group select {
    background: #fff;
    border: 1px solid #d8dde3;
    border-radius: 10px;
    padding: 11px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-overlay .modal-content.modal-large .form-group input:focus,
.modal-overlay .modal-content.modal-large .form-group textarea:focus,
.modal-overlay .modal-content.modal-large .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.modal-overlay .modal-content.modal-large .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.modal-overlay .modal-content.modal-large .modal-footer .btn-primary,
.modal-overlay .modal-content.modal-large .modal-footer .btn-secondary {
    min-width: 120px;
    min-height: 42px;
    border-radius: 10px;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
        width: var(--sidebar-width);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header {
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .header h1 {
        font-size: 20px;
        order: 2;
        flex: 1 1 100%;
    }
    
    .header-actions {
        order: 3;
        width: 100%;
        justify-content: space-between;
    }
    
    .language-selector {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .user-info span {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .content {
        padding: 15px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-header h2 {
        font-size: 20px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        font-size: 12px;
        min-width: 800px;
    }
    
    .modal {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .modal-body {
        padding: 15px;
    }

    .modal-overlay .modal-content.modal-large {
        width: 96vw;
        max-height: 95vh;
        border-radius: 14px !important;
    }

    .modal-overlay .modal-content.modal-large .modal-header,
    .modal-overlay .modal-content.modal-large .modal-body,
    .modal-overlay .modal-content.modal-large .modal-footer {
        padding-left: 14px;
        padding-right: 14px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .charts-grid {
        grid-template-columns: 1fr !important;
    }
    
    .chart-card {
        margin-bottom: 20px;
    }
}

/* ========== RESPONSIVE UNIVERSAL - MÓVILES PEQUEÑOS (iPhone, Android) ========== */
@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .logo i {
        font-size: 50px;
    }
    
    .header {
        padding: 12px 15px;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .content {
        padding: 15px 10px;
    }
    
    .stat-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .stat-info h3 {
        font-size: 28px;
    }
    
    .stat-info p {
        font-size: 13px;
    }
    
    .btn-primary {
        padding: 12px;
        font-size: 14px;
        min-height: 44px; /* Tamaño táctil mínimo */
    }
    
    .nav-item {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 44px; /* Tamaño táctil mínimo */
    }
    
    .nav-item span {
        font-size: 13px;
    }
    
    .sidebar {
        width: 100%;
        max-width: 300px;
    }
    
    .chart-card {
        padding: 15px;
    }
    
    .chart-card h3 {
        font-size: 16px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px !important; /* Prevenir zoom en iOS */
        min-height: 44px; /* Tamaño táctil mínimo */
    }
    
    .modal {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .data-table {
        font-size: 11px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 5px;
    }
}

/* ========== ESTILOS ESPECÍFICOS PARA iOS ========== */
@supports (-webkit-touch-callout: none) {
    .os-ios .sidebar {
        -webkit-overflow-scrolling: touch;
    }
    
    .os-ios .content {
        -webkit-overflow-scrolling: touch;
    }
    
    .os-ios input,
    .os-ios textarea,
    .os-ios select {
        font-size: 16px !important; /* Prevenir zoom automático en iOS */
    }
    
    .os-ios .modal {
        -webkit-overflow-scrolling: touch;
    }
}

/* ========== ESTILOS ESPECÍFICOS PARA ANDROID ========== */
.os-android .sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #1a1a1a;
}

.os-android .content {
    scrollbar-width: thin;
}

/* ========== MEJORAS TÁCTILES UNIVERSALES PARA MÓVILES ========== */
.device-mobile .btn,
.is-mobile .btn,
.device-mobile .nav-item,
.is-mobile .nav-item,
.device-mobile button,
.is-mobile button,
.device-mobile .mobile-menu-toggle,
.is-mobile .mobile-menu-toggle {
    min-height: 44px; /* Tamaño mínimo táctil recomendado */
    min-width: 44px;
    touch-action: manipulation; /* Mejorar respuesta táctil */
    -webkit-tap-highlight-color: transparent;
}

.device-mobile .stat-card,
.is-mobile .stat-card {
    touch-action: manipulation;
}

/* ========== ORIENTACIÓN LANDSCAPE EN MÓVILES ========== */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 240px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .content {
        padding: 15px;
    }
}

/* ========== EVIDENCE PANEL ========== */
.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.filter-buttons .btn {
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-buttons .btn.active {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.evidence-card {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid var(--gray);
}

.evidence-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.evidence-card.pending {
    border-left-color: var(--warning);
}

.evidence-card.approved {
    border-left-color: var(--success);
}

.evidence-card.rejected {
    border-left-color: var(--danger);
}

.evidence-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.evidence-info h4 {
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 18px;
}

.evidence-info p {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 4px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #FFF3CD;
    color: var(--primary);
}

.status-badge.approved {
    background: #fff3cd;
    color: var(--primary);
}

.status-badge.rejected {
    background: #fff3cd;
    color: var(--primary);
}

.evidence-content {
    margin-bottom: 15px;
}

.evidence-image {
    margin-bottom: 15px;
}

.evidence-image img {
    width: 100%;
    max-width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.evidence-text {
    background: #F8F9FA;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.evidence-text p {
    color: var(--dark);
    margin-top: 8px;
    line-height: 1.5;
}

.admin-notes {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary);
}

.admin-notes p {
    color: var(--dark);
    margin-top: 8px;
    font-style: italic;
}

.evidence-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.evidence-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 10px;
    font-size: 14px;
    border-radius: 8px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state i {
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.modal-overlay.evidence-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-overlay.evidence-modal.show {
    display: flex;
}

.modal-overlay .modal-content {
    background: var(--white);
    border-radius: 15px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

.modal-overlay .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-overlay .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s ease;
}

.modal-overlay .modal-close:hover {
    color: var(--danger);
}

.modal-overlay .modal-body {
    padding: 20px;
    text-align: center;
}

/* Social Media Icons */
.social-icon {
    font-size: 16px;
    margin-right: 8px;
    display: inline-block;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #5a6268;
}

@media (max-width: 768px) {
    .evidence-grid {
        grid-template-columns: 1fr;
    }
    
    .evidence-actions {
        flex-direction: column;
    }
    
    .evidence-actions .btn {
        min-width: auto;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* ========== AUDIT PAGE STYLES ========== */
.audit-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    font-size: 36px;
    line-height: 1;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.action-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.action-success {
    background: #fff3cd;
    color: var(--primary);
}

.action-danger {
    background: #fff3cd;
    color: var(--primary);
}

.action-warning {
    background: #fff3cd;
    color: var(--primary);
}

.action-info {
    background: #fff3cd;
    color: var(--primary);
}

.filters-panel h4 {
    color: var(--dark);
    font-size: 16px;
    font-weight: 600;
}

/* ========== GIFT CARDS STYLES ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card--success {
    background: var(--primary) !important;
}

.stat-card--primary {
    background: var(--primary) !important;
}

.stat-card--warning {
    background: var(--primary) !important;
}

.stat-card--info {
    background: var(--primary) !important;
}

.stat-card--secondary {
    background: var(--primary) !important;
}

/* ========== NIVELES Y BADGES - TABLAS MEJORADAS ========== */
#levelsTableBody tr:hover,
#badgesTableBody tr:hover {
    background: linear-gradient(to right, #f8f9fa, #ffffff) !important;
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

#levelsTableBody td,
#badgesTableBody td {
    vertical-align: middle !important;
    padding: 16px 12px !important;
}

/* Animación suave para los botones de acción */
#levelsTableBody .btn,
#badgesTableBody .btn {
    transition: all 0.2s ease;
}

#levelsTableBody .btn:hover,
#badgesTableBody .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mejorar los tabs */
.tab-button {
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    background: rgba(255, 215, 0, 0.1);
}

.tab-button.active {
    color: var(--primary) !important;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
}

/* ========== MEJORAS UNIVERSALES ADICIONALES ========== */

/* Prevenir selección de texto en elementos interactivos móviles */
.device-mobile .nav-item,
.is-mobile .nav-item,
.device-mobile .btn,
.is-mobile .btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Mejorar scroll en todos los dispositivos */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

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

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #ff5a1a;
}

/* Asegurar que las imágenes se adapten en todos los dispositivos */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mejorar inputs en móviles */
.device-mobile input[type="text"],
.device-mobile input[type="email"],
.device-mobile input[type="password"],
.device-mobile input[type="number"],
.device-mobile textarea,
.device-mobile select,
.is-mobile input[type="text"],
.is-mobile input[type="email"],
.is-mobile input[type="password"],
.is-mobile input[type="number"],
.is-mobile textarea,
.is-mobile select {
    font-size: 16px !important; /* Prevenir zoom en iOS */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 8px;
}

/* Mejorar botones en todos los dispositivos */
button,
.btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
}

button:focus,
.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Asegurar que los modales funcionen bien en móviles */
.device-mobile .modal-overlay,
.is-mobile .modal-overlay {
    padding: 10px;
    align-items: flex-end; /* En móviles, modal desde abajo */
}

.device-mobile .modal,
.is-mobile .modal {
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    animation: slideUpMobile 0.3s ease;
}

@keyframes slideUpMobile {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Mejorar tablas en móviles - vista de tarjetas */
@media (max-width: 480px) {
    .data-table {
        display: block;
    }
    
    .data-table thead {
        display: none;
    }
    
    .data-table tbody {
        display: block;
    }
    
    .data-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #E0E0E0;
        border-radius: 8px;
        padding: 15px;
        background: var(--white);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }
    
    .data-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border: none;
        text-align: right;
    }
    
    .data-table td:before {
        content: attr(data-label) ': ';
        font-weight: 600;
        color: var(--dark);
        text-align: left;
        margin-right: 10px;
    }
}

/* Safe area para iPhone X y superiores */
@supports (padding: max(0px)) {
    .os-ios .header,
    .os-ios .sidebar-footer {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .os-ios .content {
        padding-bottom: max(30px, env(safe-area-inset-bottom));
    }
}


/* ============================= */
/* MÉTRICAS EXTENDIDAS           */
/* ============================= */

.metrics-filters {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label i {
    color: var(--primary);
}

.filter-select,
.filter-input {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.date-range-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-range-inputs span {
    color: #999;
    font-size: 13px;
}

.metrics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card,
.summary-card-metrics {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.summary-card:hover,
.summary-card-metrics:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(255, 215, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
}

.summary-content {
    flex: 1;
}

.summary-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.summary-value {
    font-size: 32px;
    font-weight: 900;
    color: #FFFFFF;
    margin: 0;
    line-height: 1.2;
}

.summary-change {
    font-size: 13px;
    margin-top: 6px;
    font-weight: 600;
}

.summary-change.positive {
    color: var(--primary);
}

.summary-change.negative {
    color: var(--primary);
}

.metrics-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.chart-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-header h3 i {
    color: var(--primary);
}

.chart-actions {
    display: flex;
    gap: 8px;
}

.chart-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chart-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 215, 0, 0.1);
}

.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

.metrics-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    gap: 30px;
}

.table-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.table-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-header h3 i {
    color: var(--primary);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-small:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 215, 0, 0.1);
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: #f8f8f8;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
}

.data-table tbody tr:hover {
    background: #f8f8f8;
}

.data-table .loading,
.data-table .empty,
.data-table .error {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.data-table .error {
    color: var(--primary);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Responsive para métricas */
@media (max-width: 768px) {
    .metrics-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        min-width: 100%;
    }

    .metrics-summary {
        grid-template-columns: 1fr;
    }

    .metrics-charts {
        grid-template-columns: 1fr;
    }

    .metrics-tables {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 250px;
    }
}

/* ==================== Giveaways ==================== */
.giveaways-table .giveaway-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e8e8e8;
    background: #fff;
}

.giveaways-table .giveaway-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9a9a9a;
    background: #f4f4f4;
}

.giveaways-table .giveaway-name-cell {
    min-width: 220px;
}

.giveaways-table .giveaway-name-cell strong {
    display: block;
    color: #222;
    margin-bottom: 4px;
}

.giveaways-table .giveaway-name-cell small {
    display: block;
    color: #777;
    line-height: 1.35;
}

.giveaways-table .giveaway-actions-cell {
    white-space: nowrap;
}

.giveaways-table .btn-icon {
    margin-right: 6px;
}

.giveaways-table .btn-icon:last-child {
    margin-right: 0;
}

/* Orders page */
.orders-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
}

.orders-list-panel,
.orders-detail-panel {
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    padding: 14px;
}

.orders-list {
    display: grid;
    gap: 10px;
    max-height: 70vh;
    overflow: auto;
}

.order-list-item {
    border: 1px solid #e4e4e4;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.order-list-item:hover,
.order-list-item.is-active {
    border-color: #111;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.order-list-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.order-list-customer {
    color: #333;
    font-size: 13px;
    margin-top: 6px;
}

.order-list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.order-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #ddd;
    background: #f7f7f7;
}

.order-status-badge.is-pending { background: #fff3cd; border-color: #ffbe95; }
.order-status-badge.is-accepted { background: #fff3cd; border-color: #ffbe95; }
.order-status-badge.is-preparing { background: #fff3cd; border-color: #ffbe95; }
.order-status-badge.is-on-route { background: #fff3cd; border-color: #ffbe95; }
.order-status-badge.is-delivered { background: #fff3cd; border-color: #ffbe95; }
.order-status-badge.is-cancelled { background: #fff3cd; border-color: #ffbe95; }

.order-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.order-detail-header h3 {
    margin: 0 0 10px 0;
}

.order-detail-header p,
.order-detail-totals p {
    margin: 6px 0;
}

.order-detail-actions {
    margin-bottom: 12px;
}

.order-detail-items {
    display: grid;
    gap: 10px;
}

.order-detail-item {
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 10px;
}

.order-detail-item p {
    margin: 6px 0 0;
    color: #444;
    font-size: 13px;
}

.order-detail-item-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

@media (max-width: 920px) {
    .orders-layout {
        grid-template-columns: 1fr;
    }

    .orders-list {
        max-height: 320px;
    }
}

/* =============================================== */
/* THEME UNIFICADO - EL BOCATAS (WEB STYLE)        */
/* =============================================== */

:root {
    --color-primary: #EB4908;
    --color-primary-light: #ff6a2f;
    --color-primary-dark: #c83a04;
    --primary: #EB4908;
    --primary-rgb: 235, 73, 8;
    --accent-gold: #EB4908;
    --gradient-gold: var(--primary);
    --gradient-gold-reverse: var(--primary);
    --gradient-body: linear-gradient(180deg, #f7f7f7 0%, #efefef 100%);
    --gradient-sidebar: linear-gradient(180deg, #0f0f0f 0%, #1a1a1a 100%);
    --shadow-primary: 0 8px 20px rgba(var(--primary-rgb), 0.28);
}

body {
    background: var(--gradient-body);
    color: #111;
}

.login-box {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.logo i {
    color: var(--primary);
}

.sidebar {
    background: var(--gradient-sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header h2,
.sidebar-header i {
    color: #fff;
}

.nav-section-title {
    color: rgba(255, 255, 255, 0.62);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-item {
    border-radius: 12px;
    margin: 4px 10px;
    color: rgba(255, 255, 255, 0.85);
}

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

.nav-item.active {
    background: rgba(var(--primary-rgb), 0.2);
    color: #fff;
    border-left-color: var(--primary);
    box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.28);
}

.nav-item-icon {
    background: rgba(255, 255, 255, 0.06);
}

.nav-item.active .nav-item-icon {
    background: rgba(var(--primary-rgb), 0.26);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main-content {
    background: transparent;
}

.header {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.header h1 {
    color: #111;
}

.content {
    background: transparent;
}

.card,
.stat-card,
.chart-card,
.orders-list-panel,
.orders-detail-panel,
.analytics-card,
.stat-mini-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.card:hover,
.stat-card:hover,
.chart-card:hover,
.analytics-card:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.btn-primary,
.btn-save,
.btn-refresh {
    background: #111;
    color: #fff;
    border: 1px solid #111;
    border-radius: 10px;
    box-shadow: none;
}

.btn-primary:hover,
.btn-save:hover,
.btn-refresh:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #fff;
    color: #111;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.language-selector,
.form-group input,
.form-group select,
.form-group textarea,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="time"],
select,
textarea {
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.data-table {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.data-table thead {
    background: #f3f3f3;
}

.data-table th {
    color: #111;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.data-table td {
    color: #444;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.data-table tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.05);
}

.badge,
.status-badge,
.order-status-badge {
    border-radius: 999px;
    font-weight: 700;
}

.order-list-item:hover,
.order-list-item.is-active {
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.18);
}

/* ---------- FASE 2: Dashboard ---------- */
.dashboard-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 22px;
    padding-bottom: 16px;
}

.dashboard-title i,
.section-title i {
    color: var(--primary);
}

.section-title {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 10px;
}

.stat-card {
    border-left: 4px solid var(--primary);
}

.stat-card-content {
    padding: 20px;
}

.stat-card .stat-label,
.stat-card .stat-label i,
.stat-card .stat-change,
.stat-card .stat-footer i {
    color: #4a4a4a;
}

.stat-card .stat-value {
    color: #111;
}

.stat-card .stat-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.stat-growth,
.stat-percentage {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
}

.stat-growth i,
.stat-percentage i {
    color: var(--primary);
}

.stat-mini-card {
    padding: 16px;
}

.analytics-filters .filter-btn {
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #fff;
    color: #222;
}

.analytics-filters .filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.analytics-card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

/* ---------- FASE 2: Pedidos ---------- */
.orders-list-panel,
.orders-detail-panel {
    border-radius: 16px;
    padding: 16px;
}

.orders-list {
    padding-right: 4px;
}

.order-list-item {
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.order-list-item.is-active {
    background: rgba(var(--primary-rgb), 0.05);
}

.order-detail-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.order-detail-item {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: #fff;
}

/* ---------- FASE 2: Menú ---------- */
.menu-grid {
    gap: 14px !important;
}

.menu-category-accordion {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.menu-category-header {
    background: #f6f6f6;
}

.menu-category-header:hover {
    background: #efefef;
}

.menu-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
}

.menu-card img {
    height: 200px;
    object-fit: cover;
}

.menu-card h4 {
    color: #111;
}

.price {
    color: #111;
}

/* ---------- FASE 2: Settings ---------- */
#settingsPage .card {
    border-radius: 14px;
}

#settingsPage h3 {
    color: #111;
}

#settingsPage .form-row {
    gap: 16px;
}

#settingsPage small {
    color: #666;
}

/* ---------- FASE 2: Responsive ---------- */
@media (max-width: 920px) {
    .dashboard-header {
        gap: 12px;
    }

    .dashboard-title {
        font-size: 24px;
    }

    .stat-card-content {
        padding: 16px;
    }

    .stat-card .stat-value {
        font-size: 28px;
    }
}

/* ---------- FASE 2.1: Unificación global por módulos ---------- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px !important;
}

.page-header h2,
.page-header h3 {
    color: #111;
}

.metrics-filters,
.filters-panel,
.filters-container,
.table-section,
.chart-section {
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.filter-group label i,
.table-header h3 i,
.chart-header h3 i {
    color: var(--primary) !important;
}

.filter-select,
.filter-input,
#filterActionType,
#filterEntityType,
#filterDateFrom,
#filterDateTo,
#filterSearch {
    border: 1px solid rgba(0, 0, 0, 0.18) !important;
    border-radius: 10px !important;
    background: #fff !important;
}

.filter-select:focus,
.filter-input:focus,
#filterActionType:focus,
#filterEntityType:focus,
#filterDateFrom:focus,
#filterDateTo:focus,
#filterSearch:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15) !important;
}

.table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.table thead,
.data-table thead {
    background: #f3f3f3 !important;
}

.table th,
.data-table th {
    color: #111 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
}

.table td,
.data-table td {
    color: #444 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.table tbody tr:hover,
.data-table tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.05) !important;
}

.btn,
.btn-small,
.btn-icon {
    border-radius: 10px !important;
    font-weight: 700;
}

.btn-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-success,
.btn-warning,
.btn-danger {
    border: 1px solid transparent;
}

.btn-success:hover,
.btn-warning:hover,
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.tab-button {
    border-radius: 10px 10px 0 0 !important;
    color: #333 !important;
    border-bottom-color: transparent !important;
}

.tab-button.active {
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
    background: rgba(var(--primary-rgb), 0.08) !important;
}

.summary-card,
.summary-card-metrics {
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.summary-icon {
    background: rgba(var(--primary-rgb), 0.16) !important;
    color: var(--primary) !important;
}

.modal,
.modal-overlay .modal-content {
    border-radius: 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header,
.modal-overlay .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.modal-close,
.modal-overlay .modal-close {
    color: #666;
}

.modal-close:hover,
.modal-overlay .modal-close:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .metrics-filters,
    .filters-panel,
    .filters-container {
        padding: 14px !important;
    }
}

/* ---------- FASE 2.2: limpieza inline (menu + orders + levels) ---------- */
.section-header-lg {
    margin-bottom: 30px !important;
}

.section-header-sm {
    margin-bottom: 20px !important;
}

.section-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.section-title-lg {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #111;
}

.section-subtitle {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.section-subtitle-spaced {
    margin: 0 0 15px 0;
}

.info-icon {
    color: var(--primary);
}

.btn-lg-shadow {
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.28);
}

.quick-guide-card {
    background: var(--primary);
    color: #fff;
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 30px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.quick-guide-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    opacity: 0.95;
}

.quick-guide-item {
    background: #fff;
    color: #222;
    padding: 15px;
    border-radius: 10px;
}

.quick-guide-item-title {
    display: block;
    margin-bottom: 5px;
}

.quick-guide-item-text {
    font-size: 13px;
}

.inline-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.orders-status-filter {
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 8px;
    background: #fff;
}

.tabs-strip {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tabs-strip-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    font-weight: 700;
    cursor: pointer;
}

.no-top-margin {
    margin-top: 0 !important;
}

.section-accent-icon {
    color: var(--primary);
}

.users-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.full-grid-span {
    grid-column: 1 / -1;
}

.evidence-filter-actions {
    flex-wrap: wrap;
}

.evidence-filter-btn {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
}

.evidence-filter-btn-warning {
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.evidence-filter-btn-success {
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.evidence-filter-btn-danger {
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.evidence-history-block {
    margin-top: 50px;
    border-top: 3px solid #e0e0e0;
    padding-top: 40px;
}

.evidence-history-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.evidence-history-icon {
    background: var(--primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 20px;
}

.evidence-history-title {
    margin: 0;
    font-size: 22px;
    color: #333;
}

.evidence-history-subtitle {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
}

.btn-instagram {
    background: var(--primary);
    color: #fff;
    border: 2px solid var(--primary);
    font-weight: 600;
}

.referral-settings-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.referral-settings-title {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
}

.referral-settings-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: end;
}

.referral-settings-label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 600;
}

.referral-settings-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

.referral-settings-help {
    display: block;
    margin-top: 6px;
    color: #999;
    font-size: 13px;
}

.referral-settings-btn {
    padding: 12px 24px;
    font-size: 16px;
    white-space: nowrap;
}

.mission-filters-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.mission-filter-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mission-filter-label {
    font-weight: 600;
    white-space: nowrap;
}

.mission-filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

/* ---------- FASE 2.3: settings + toolbars + forms ---------- */
.feature-form-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.feature-form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.feature-form-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

.feature-form-icon-points {
    background: var(--primary);
}

.feature-form-icon-history {
    background: var(--primary);
}

.feature-form-icon-qr {
    background: var(--primary);
}

.feature-form-title {
    margin: 0;
    font-size: 22px;
    color: #333;
    font-weight: 600;
}

.feature-form-subtitle {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
}

.feature-form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.feature-form-section-user {
    border-left: 4px solid var(--primary);
}

.feature-form-section-type {
    border-left: 4px solid var(--primary);
}

.feature-form-section-reason {
    border-left: 4px solid var(--primary);
    margin-bottom: 25px;
}

.feature-form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-size: 15px;
}

.feature-form-label-tight {
    margin-bottom: 8px;
}

.feature-form-help {
    color: #666;
    display: block;
    margin-top: 8px;
    font-size: 13px;
}

.feature-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.feature-option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.feature-option-radio {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.feature-option-content {
    flex: 1;
}

.feature-option-title {
    display: block;
    color: #333;
    margin-bottom: 3px;
}

.feature-option-text {
    color: #666;
    font-size: 12px;
}

.feature-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    transition: all 0.3s;
}

.min-h-200 {
    min-height: 200px;
}

.section-icon-blue {
    color: var(--primary);
}

.section-icon-gold {
    color: var(--primary);
}

.required-red {
    color: var(--primary);
}

/* ===== TOGGLE SWITCH ===== */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-track {
    position: relative;
    width: 36px;
    height: 20px;
    background: #ddd;
    border-radius: 20px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-label input:checked + .toggle-track {
    background: var(--primary);
}

.toggle-label input:checked + .toggle-track .toggle-thumb {
    transform: translateX(16px);
}

/* ===== SETTINGS SECTION TITLE ===== */
.settings-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin: 28px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.settings-block-header {
    margin-bottom: 18px;
}

.settings-block-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-block-header p {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* ===== COLOR PICKERS ===== */
.color-pickers-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.color-picker-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #f8f8f8;
    border-radius: 12px;
    flex: 1;
    min-width: 180px;
}

.color-picker-item input[type="color"] {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 10px;
    padding: 2px;
    cursor: pointer;
    background: none;
    flex-shrink: 0;
}

.color-picker-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.color-picker-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.btn-reset-color {
    background: none;
    border: none;
    font-size: 12px;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    text-align: left;
    transition: color 0.15s;
}

.btn-reset-color:hover {
    color: var(--primary);
}

/* ===== SIDEBAR THEME ===== */
.sidebar-theme-options {
    display: flex;
    gap: 20px;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.theme-option input[type="radio"] {
    display: none;
}

.theme-preview {
    display: flex;
    width: 100px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #ddd;
    transition: border-color 0.2s;
}

.theme-option input:checked + .theme-preview {
    border-color: var(--primary);
}

.tp-sidebar {
    width: 32px;
    height: 100%;
    flex-shrink: 0;
}

.tp-content {
    flex: 1;
}

.theme-preview-dark .tp-sidebar { background: #1a1a1a; }
.theme-preview-dark .tp-content  { background: #f0f0f0; }
.theme-preview-light .tp-sidebar { background: #ffffff; border-right: 1px solid #ddd; }
.theme-preview-light .tp-content { background: #f0f0f0; }

/* ===== SIDEBAR LIGHT THEME ===== */
.sidebar.sidebar-light {
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    border-right: 1px solid #e0e0e0;
}

.sidebar.sidebar-light .sidebar-brand h2,
.sidebar.sidebar-light .sidebar-brand i,
.sidebar.sidebar-light .sidebar-brand-logo + h2 {
    color: #111;
}

.sidebar.sidebar-light .sidebar-user {
    background: rgba(0, 0, 0, 0.05);
}

.sidebar.sidebar-light .sidebar-user > i,
.sidebar.sidebar-light .sidebar-user span {
    color: #444;
}

.sidebar.sidebar-light .sidebar-refresh-btn {
    color: #888;
}

.sidebar.sidebar-light .sidebar-refresh-btn:hover {
    color: #111;
    background: rgba(0, 0, 0, 0.08);
}

.sidebar.sidebar-light .nav-section-title {
    color: #999;
}

.sidebar.sidebar-light .nav-item {
    color: #333;
}

.sidebar.sidebar-light .nav-item:hover,
.sidebar.sidebar-light .nav-item.active {
    background: rgba(0, 0, 0, 0.06);
    color: #111;
}

.sidebar.sidebar-light .sidebar-footer {
    border-top: 1px solid #e0e0e0;
}

/* ===== LOGO UPLOAD ===== */
.settings-logo-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-logo-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-logo-info p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.settings-logo-body {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo-preview {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 2px dashed var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-preview i {
    font-size: 32px;
    color: var(--primary);
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-upload-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-upload-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-upload-logo:hover {
    background: #c93d06;
}

.btn-remove-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: transparent;
    color: #999;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.btn-remove-logo:hover {
    color: #e53e3e;
    border-color: #e53e3e;
}

/* sidebar logo img */
.sidebar-brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}

.settings-language-hero {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border-radius: 16px;
    border: 2px solid var(--primary);
}

.settings-language-hero-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: none;
}

.settings-language-hero-title {
    margin: 0 0 5px 0;
    color: var(--primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.settings-language-hero-subtitle {
    color: #fff;
    margin: 0;
    font-size: 14px;
}

.settings-language-select-wrap {
    margin-bottom: 30px;
}

.settings-language-select-label {
    display: block;
    margin-bottom: 15px;
    font-weight: 400;
    color: #555;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    text-align: left;
    box-shadow: none;
}

.settings-language-preview-wrap {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border-radius: 12px;
    border: 2px solid var(--primary);
}

.settings-language-preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.settings-language-preview-icon,
.settings-language-preview-title {
    color: var(--primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.settings-language-preview-title {
    margin: 0;
}

.card-top-spaced {
    margin-top: 30px;
}

.help-muted {
    color: #666;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-15 {
    margin-top: 15px;
}

.inline-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-checkbox-input {
    width: auto !important;
}

.friendly-urls-card {
    background: #fff3cd;
    border: 1px solid #ffbe95;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.friendly-urls-title {
    margin: 0 0 10px 0;
    color: var(--primary);
}

.friendly-urls-mono {
    font-family: monospace;
    font-size: 12px;
    color: #333;
}

.toolbar-row-lg,
.toolbar-row-sm,
.toolbar-row-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toolbar-row-lg {
    margin-bottom: 30px;
}

.toolbar-row-sm {
    margin-bottom: 20px;
}

.toolbar-row-bottom {
    margin-top: 20px;
}

.table-scroll-x {
    overflow-x: auto;
}

.audit-filters-panel {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.audit-filters-title {
    margin-bottom: 15px;
}

.audit-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.ml-auto {
    margin-left: auto;
}

.u-hidden {
    display: none;
}

.u-center-p40 {
    text-align: center;
    padding: 40px;
}

.feature-input {
    width: 100%;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.feature-input:focus {
    outline: none;
    border-color: var(--primary);
}

.feature-input-mono {
    font-family: monospace;
}

.points-label-icon-green {
    color: var(--primary);
}

.points-label-icon-gold {
    color: var(--primary);
}

.points-preview-box {
    background: #fff3cd;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    border-left: 4px solid var(--primary);
    display: block;
}

.points-preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.points-preview-row-gap {
    margin-bottom: 8px;
}

.points-preview-caption {
    color: var(--primary);
    font-size: 13px;
}

.points-preview-base {
    color: var(--primary);
    font-size: 16px;
}

.points-preview-multiplier {
    margin-bottom: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
}

.points-preview-row-sm {
    margin-bottom: 4px;
}

.points-preview-row-sm:last-child {
    margin-bottom: 0;
}

.points-preview-caption-sm {
    color: var(--primary);
    font-size: 12px;
}

.points-preview-value-sm {
    color: var(--primary);
    font-size: 13px;
}

.points-preview-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 2px solid rgba(var(--primary-rgb), 0.3);
}

.points-preview-total-label {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
}

.points-preview-total-value {
    color: var(--primary);
    font-size: 20px;
    font-weight: 700;
}

.points-preview-help {
    color: #666;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

.th-w-60 { width: 60px; }
.th-w-80 { width: 80px; }
.th-w-100 { width: 100px; }
.th-w-120 { width: 120px; }
.th-w-140 { width: 140px; }
.th-w-180 { width: 180px; }
.th-w-200 { width: 200px; }
.th-center { text-align: center; }

/* ---------- FASE 3.2: Paleta estricta (blanco/negro/naranja) ---------- */
:root {
    --brand-orange: #EB4908;
    --brand-orange-dark: #cc3e07;
}

/* Stats principales: todas en naranja */
.stats-grid .stat-card,
.stats-grid .stat-card-primary,
.stats-grid .stat-card-success,
.stats-grid .stat-card-warning,
.stats-grid .stat-card-info,
.stats-grid .stat-card--primary,
.stats-grid .stat-card--success,
.stats-grid .stat-card--warning,
.stats-grid .stat-card--info,
.stats-grid .stat-card--secondary {
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%) !important;
    border-left: 4px solid var(--brand-orange) !important;
}

.stats-grid .stat-card .stat-value,
.stats-grid .stat-card .stat-label,
.stats-grid .stat-card .stat-change,
.stats-grid .stat-card .stat-footer,
.stats-grid .stat-card .stat-footer i,
.stats-grid .stat-card .stat-label i {
    color: #fff !important;
}

.stats-grid .stat-card .stat-card-background {
    color: #fff !important;
    opacity: 0.12 !important;
}

/* Mini stats: iconos y números en naranja */
.stats-secondary-grid .stat-mini-icon,
.summary-card .summary-icon,
.analytics-icon {
    background: rgba(var(--primary-rgb), 0.14) !important;
    color: var(--brand-orange) !important;
}

.stat-mini-value,
.summary-value {
    color: var(--brand-orange) !important;
}

/* Guías couleur primaire */
.quick-guide-card {
    background: var(--primary) !important;
}

/* Botones de filtro/estado y acentos en naranja */
.filter-btn.active,
.tab-button.active,
.btn-primary {
    border-color: var(--brand-orange) !important;
}

/* Lockdown final: sin verdes/azules/morados en UI */
.analytics-icon-green,
.analytics-icon-blue,
.analytics-icon-purple,
.analytics-icon-orange,
.analytics-icon-teal,
.analytics-icon-pink,
.stat-mini-blue,
.stat-mini-orange,
.stat-mini-purple,
.stat-mini-red,
.stat-mini-green,
.stat-mini-teal,
.summary-icon,
.stat-mini-icon {
    background: rgba(var(--primary-rgb), 0.14) !important;
    color: var(--brand-orange) !important;
}

.stat-mini-value,
.summary-value,
.summary-content .summary-value,
.analytics-summary .summary-value {
    color: var(--brand-orange) !important;
}

.badge,
.status-badge,
.order-status-badge,
.action-type-badge {
    background: rgba(var(--primary-rgb), 0.10) !important;
    color: #111 !important;
    border: 1px solid rgba(var(--primary-rgb), 0.35) !important;
}

.badge.success,
.badge.warning,
.badge.danger,
.badge.info,
.status-badge.pending,
.status-badge.approved,
.status-badge.rejected,
.order-status-badge.is-pending,
.order-status-badge.is-accepted,
.order-status-badge.is-preparing,
.order-status-badge.is-on-route,
.order-status-badge.is-delivered,
.order-status-badge.is-cancelled {
    background: rgba(var(--primary-rgb), 0.10) !important;
    color: #111 !important;
    border-color: rgba(var(--primary-rgb), 0.35) !important;
}

.btn-success,
.btn-warning,
.btn-danger {
    background: var(--brand-orange) !important;
    border-color: var(--brand-orange) !important;
    color: #fff !important;
}

.btn-success:hover,
.btn-warning:hover,
.btn-danger:hover {
    background: var(--brand-orange-dark) !important;
    border-color: var(--brand-orange-dark) !important;
}

.evidence-card.pending,
.evidence-card.approved,
.evidence-card.rejected {
    border-left: 4px solid var(--brand-orange) !important;
    background: #fff !important;
}

.evidence-filter-btn-warning,
.evidence-filter-btn-success,
.evidence-filter-btn-danger {
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25) !important;
}

.stat-percentage,
.stat-growth {
    background: rgba(var(--primary-rgb), 0.14) !important;
    color: #111 !important;
}

.stat-percentage i,
.stat-growth i {
    color: var(--brand-orange) !important;
}

/* ---------- FASE 3: Unificación estructural (listas/cards/paneles) ---------- */
:root {
    --panel-radius: 16px;
    --panel-border: 1px solid rgba(0, 0, 0, 0.10);
    --panel-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    --panel-shadow-hover: 0 12px 26px rgba(0, 0, 0, 0.12);
    --panel-bg: #ffffff;
    --panel-gap: 18px;
    --panel-bg-metrics: #000000;
    --panel-border-metrics: 1px solid rgba(0, 0, 0, 0.10);
    --panel-shadow-metrics: 0 8px 20px rgba(0, 0, 0, 0.08);
    --panel-radius-metrics: 16px;
}

/* Shell visual común para casi todos los paneles */
.card,
.feature-form-card,
.orders-list-panel,
.orders-detail-panel,
.analytics-card,
.banner-card,
.menu-card,
.reward-card,
.evidence-card,
.stat-mini-card,
.summary-card {
    background: var(--panel-bg);
    border: var(--panel-border);
    border-radius: var(--panel-radius);
    box-shadow: var(--panel-shadow);
}
.summary-card-metrics {
    background: var(--panel-bg-metrics);
    border: var(--panel-border-metrics);
    border-radius: var(--panel-radius-metrics);
    box-shadow: var(--panel-shadow-metrics);
}

.card:hover,
.feature-form-card:hover,
.analytics-card:hover,
.banner-card:hover,
.menu-card:hover,
.reward-card:hover,
.evidence-card:hover,
.summary-card:hover,
.summary-card-metrics:hover {
    box-shadow: var(--panel-shadow-hover);
}

/* Listas y grids: misma estructura y separación */
.users-grid-list,
.rewards-grid,
.menu-grid,
.banners-list,
.evidence-grid,
.cards-grid {
    gap: var(--panel-gap);
}

.rewards-grid,
.menu-grid,
.cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.users-grid-list {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

.evidence-grid,
.banners-list {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Items de lista (orders/menu/etc) con lenguaje visual común */
.menu-list-item,
.order-list-item {
    border: var(--panel-border);
    border-radius: 14px;
    background: #fff;
    transition: all 0.2s ease;
}

.menu-list-item:hover,
.order-list-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);
}

/* Encabezado y contenido interno de cards más coherente */
.card h3,
.feature-form-title,
.analytics-card-title h4,
.banner-card h4,
.menu-card h4,
.reward-card h4,
.evidence-history-title {
    letter-spacing: 0.1px;
}

.card h3 {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* ===== EMPRESA LAYOUT ===== */
.empresa-form-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 20px;
}

.empresa-logo-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empresa-label {
    font-size: 13px;
    font-weight: 500;
    color: #444;
}

.empresa-fields-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.empresa-fields-col .form-row {
    margin-bottom: 0;
}

/* Gamification toggle row */
.form-group--narrow {
    max-width: 200px;
}

.form-group--spaced {
    margin-top: 8px;
}

.field-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.field-inline input {
    width: 120px;
    flex-shrink: 0;
}

.field-inline .help-muted {
    white-space: nowrap;
}

.gamif-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gamif-row {
    display: grid;
    grid-template-columns: 220px 100px 1fr;
    align-items: center;
    gap: 12px;
}

.gamif-lbl {
    font-size: 13px;
    font-weight: 500;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gamif-row input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
}
.gamif-row input[type="number"]:disabled {
    background: #f5f5f5;
    color: #bbb;
    border-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.6;
}
#deliveryForm input:disabled,
#deliveryForm select:disabled {
    background: #f5f5f5;
    color: #bbb;
    border-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.6;
}
#deliveryForm .inline-checkbox-input:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}
#deliveryForm .inline-checkbox-input:disabled + span,
#deliveryForm .inline-checkbox-input:disabled ~ small {
    opacity: 0.5;
}

.gamif-row .help-muted {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

/* Fix: .form-group label forces display:block, breaking the toggle flex layout */
.gamif-lbl .toggle-label {
    display: flex !important;
    margin-bottom: 0;
}

/* ===== APPARENCE: ONE LINE ===== */
.aparencia-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}
.aparencia-colors {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}
.aparencia-colors > .aparencia-lbl {
    margin-right: 12px;
}
.aparencia-colors .apc-item + .apc-item {
    margin-left: 20px;
}
.aparencia-theme {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.aparencia-theme > .aparencia-lbl {
    margin-right: 12px;
}
.aparencia-theme .sidebar-theme-options {
    gap: 24px;
}
.aparencia-lbl {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
}
.apc-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
}
.aparencia-row input[type="color"] {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 50%;
}
.aparencia-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
}
.aparencia-row input[type="color"]::-webkit-color-swatch {
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 50%;
}
.aparencia-row input[type="color"]::-moz-color-swatch {
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 50%;
}

/* ===== SETTINGS: SAVE BUTTONS SMALL ===== */
#settingsPage .btn-primary {
    width: auto;
    align-self: center;
}

/* ===== SETTINGS: TYPOGRAPHY UNIFORME ===== */
#settingsPage .card h3 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
}

#settingsPage .form-group label,
#settingsPage .settings-logo-info p,
#settingsPage .color-picker-label,
#settingsPage .settings-block-header h4,
#settingsPage .help-muted,
#settingsPage small {
    font-size: 13px;
    font-weight: 500;
    color: #444;
}

#settingsPage .help-muted,
#settingsPage small {
    font-weight: 400;
    color: #888;
}

#settingsPage .settings-block-header h4 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px;
}

/* Contenedores de tablas/filtros como paneles */
.table-container,
.table-scroll-x,
.filters-panel,
.metrics-filters {
    border-radius: 14px;
}

.table-container,
.table-scroll-x {
    border: var(--panel-border);
    background: #fff;
}

/* Ajustes de densidad para vistas de cards */
.menu-card-content,
.reward-card-content,
.banner-card-content {
    padding: 16px;
}

/* Cohesión visual de paneles de pedido */
.orders-layout {
    gap: var(--panel-gap);
}

.orders-list-panel,
.orders-detail-panel {
    padding: 14px;
}

/* Responsive uniforme */
@media (max-width: 900px) {
    .rewards-grid,
    .menu-grid,
    .cards-grid,
    .users-grid-list,
    .evidence-grid,
    .banners-list {
        grid-template-columns: 1fr;
    }
}

/* ---------- FASE 3.1: Uniformidad extrema entre paneles ---------- */
.card-bottom-spaced {
    margin-bottom: 30px;
}

.btn-full {
    width: 100%;
}

.notif-preview-shell {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.notif-preview-title {
    margin-bottom: 10px;
    color: #666;
    font-size: 12px;
    letter-spacing: 0.4px;
}

.notif-preview-card {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notif-preview-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.notif-preview-icon {
    width: 40px;
    height: 40px;
    background: rgba(var(--primary-rgb), 0.16);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.notif-preview-content {
    flex: 1;
}

.notif-preview-headline {
    font-weight: 700;
    margin-bottom: 4px;
}

.notif-preview-text {
    font-size: 14px;
    color: #666;
}

/* Igualar cards visualmente (quitar variaciones fuertes de settings) */
.settings-language-hero,
.settings-language-preview-wrap {
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.settings-language-hero-title,
.settings-language-preview-title {
    color: #111 !important;
    text-shadow: none !important;
}

.settings-language-hero-subtitle {
    color: #666 !important;
}

.settings-language-hero-icon {
    background: rgba(var(--primary-rgb), 0.16) !important;
    box-shadow: none !important;
}

.settings-language-select-label {
    background: none !important;
    border: none !important;
    color: #555 !important;
    font-size: 14px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 400 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.settings-language-preview-icon {
    color: var(--primary) !important;
    text-shadow: none !important;
}

/* Simplificar botones de idioma */
.language-btn {
    border: 2px solid transparent !important;
    border-radius: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    padding: 12px !important;
}

.language-btn::before,
.language-btn::after {
    display: none !important;
}

.language-btn:hover {
    border-color: rgba(0,0,0,0.15) !important;
    box-shadow: none !important;
    background: transparent !important;
    opacity: 1;
}

.language-btn.active,
.language-btn:focus,
.language-btn:focus-visible {
    border: 2px solid var(--primary) !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.language-btn.active .btn-flag {
    transform: scale(1.15);
}

.language-btn .btn-text {
    display: none !important;
}

.language-btn .btn-check {
    background: var(--primary) !important;
    color: #fff !important;
    border: none !important;
}

/* Imágenes de cards y listas: mismo comportamiento */
.menu-card img,
.reward-card img,
.banner-card img,
.evidence-image img {
    width: 100%;
    height: 210px !important;
    object-fit: cover;
    border-radius: 10px;
}

.evidence-image img:hover,
.menu-card img:hover,
.reward-card img:hover,
.banner-card img:hover {
    transform: none !important;
}

/* Evitar títulos duplicados fuertes en módulos con cabecera de página */
#giftcardsPage > .card > h3,
#flasheventsPage > .card > h3,
#giveawaysPage > .card > .table-header > h3,
#auditPage > .card > h3 {
    font-size: 18px;
    opacity: 0.92;
}

/* Paleta final forzada: solo blanco/negro/naranja */
.stat-card--success,
.stat-card--primary,
.stat-card--warning,
.stat-card--info,
.stat-card--secondary,
.stats-grid .stat-card,
.stats-grid .stats-card,
.stats-grid .metric-card {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

.stats-grid .stat-number,
.stats-grid .metric-value,
.stats-grid .stats-value,
.stats-grid .stat-label,
.stats-grid .metric-label,
.stats-grid .stats-label {
    color: #fff !important;
}

.action-info,
.badge.info,
.badge.success,
.badge.warning,
.badge.danger,
.status-badge.is-pending,
.status-badge.is-accepted,
.status-badge.is-preparing,
.status-badge.is-on-route,
.status-badge.is-delivered,
.status-badge.is-cancelled,
.order-status-badge.is-pending,
.order-status-badge.is-accepted,
.order-status-badge.is-preparing,
.order-status-badge.is-on-route,
.order-status-badge.is-delivered,
.order-status-badge.is-cancelled {
    background: rgba(var(--primary-rgb), 0.10) !important;
    color: #111 !important;
    border-color: rgba(var(--primary-rgb), 0.35) !important;
}

.feature-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15) !important;
}

.points-label-icon-green,
.points-label-icon-gold,
.section-icon-blue,
.required-red,
.stat-mini-blue,
.stat-mini-purple,
.stat-mini-red,
.stat-mini-green,
.stat-mini-teal,
.analytics-icon-green,
.analytics-icon-blue,
.analytics-icon-purple,
.analytics-icon-teal,
.analytics-icon-pink {
    color: var(--primary) !important;
    background: rgba(var(--primary-rgb), 0.12) !important;
}

.points-preview-box {
    background: rgba(var(--primary-rgb), 0.08) !important;
    border-left: 4px solid var(--primary) !important;
}

.points-preview-caption,
.points-preview-base,
.points-preview-caption-sm,
.points-preview-value-sm,
.points-preview-total-label,
.points-preview-total-value {
    color: var(--primary) !important;
}

.points-preview-total {
    border-top: 2px solid rgba(var(--primary-rgb), 0.30) !important;
}

.feature-form-icon-points,
.feature-form-icon-history,
.feature-form-icon-qr,
.evidence-history-icon,
.btn-instagram,
.quick-guide-panel,
.quick-guide-card {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

.feature-form-section-user,
.feature-form-section-type,
.feature-form-section-reason {
    border-left: 4px solid var(--primary) !important;
}

.stat-percentage,
.stat-growth,
.summary-value-green,
.summary-value-red,
.text-success,
.text-danger,
.text-warning,
.text-info {
    color: var(--primary) !important;
}

/* Refuerzo final de paleta (legacy classes) */
.stat-card-primary,
.stat-card-success,
.stat-card-warning,
.stat-card-info,
.stat-card--success,
.stat-card--primary,
.stat-card--warning,
.stat-card--info,
.stat-card--secondary {
    background: var(--primary) !important;
    color: #fff !important;
}

.stat-card-primary .stat-card-background,
.stat-card-success .stat-card-background,
.stat-card-warning .stat-card-background,
.stat-card-info .stat-card-background,
.stat-card-primary .stat-value,
.stat-card-success .stat-value,
.stat-card-warning .stat-value,
.stat-card-info .stat-value {
    color: #fff !important;
    opacity: 1 !important;
}

.evidence-filter-btn-warning,
.evidence-filter-btn-success,
.evidence-filter-btn-danger,
.action-warning,
.action-info,
.action-success,
.action-danger,
.badge.success,
.badge.warning,
.badge.danger,
.badge.info {
    background: rgba(var(--primary-rgb), 0.12) !important;
    color: #111 !important;
    border: 1px solid rgba(var(--primary-rgb), 0.35) !important;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.22) !important;
}

.feature-form-icon,
.feature-form-icon-points,
.feature-form-icon-history,
.feature-form-icon-qr,
.evidence-history-icon,
.btn-instagram,
.section-icon-blue,
.points-label-icon-green,
.points-label-icon-gold,
.required-red {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

.section-icon-blue,
.points-label-icon-green,
.points-label-icon-gold,
.required-red {
    background: transparent !important;
    color: var(--primary) !important;
}

.feature-form-section-user,
.feature-form-section-type,
.feature-form-section-reason,
.points-preview-box {
    border-left-color: var(--primary) !important;
}

.mission-filter-select:focus,
.referral-settings-input:focus,
.feature-input:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15) !important;
}

[class*="analytics-icon-"],
.stat-mini-icon,
.stat-mini-blue,
.stat-mini-orange,
.stat-mini-purple,
.stat-mini-red,
.stat-mini-green,
.stat-mini-teal,
[class*="summary-value-"] {
    color: var(--primary) !important;
}

[class*="analytics-icon-"],
.stat-mini-icon,
.stat-mini-blue,
.stat-mini-orange,
.stat-mini-purple,
.stat-mini-red,
.stat-mini-green,
.stat-mini-teal {
    background: rgba(var(--primary-rgb), 0.12) !important;
}

/* Missions UX redesign */
.missions-group-row td {
    background: #f8f8f8;
    border-top: 2px solid rgba(var(--primary-rgb), 0.35);
    padding: 12px 10px;
}

.missions-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.missions-group-row[draggable="true"],
.missions-item-row[draggable="true"] {
    cursor: grab;
}

.missions-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    color: #666;
}

.missions-order-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.missions-order-stack .btn {
    min-width: 34px;
    padding: 4px 8px;
}

.missions-title-cell {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.missions-subtitle {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    max-width: 380px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.missions-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mission-modal-form {
    max-width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 6px;
}

.mission-modal-section {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}

.mission-modal-title {
    margin: 0 0 6px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mission-modal-help {
    margin: 0 0 12px;
    color: #666;
    font-size: 13px;
}

.mission-lang-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.mission-lang-card {
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 10px;
}

.mission-lang-card label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.mission-lang-card input,
.mission-lang-card textarea,
.mission-modal-section input,
.mission-modal-section select,
.mission-modal-section textarea {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.mission-lang-card textarea,
.mission-modal-section textarea {
    min-height: 80px;
    resize: vertical;
}

.mission-frequency-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.mission-frequency-option {
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mission-check-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.mission-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.mission-submission-modal p {
    margin: 0 0 8px;
}

@media (max-width: 1100px) {
    .mission-lang-grid {
        grid-template-columns: 1fr;
    }

    .mission-frequency-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Actividad de puntos: ganados en verde */
#pointsEarnedSummary,
.summary-earned {
    color: #16a34a !important;
}

/* ── Tab Bar ─────────────────────────────────────────── */
.tab-bar {
    display: flex;
    align-items: flex-end;
    background: linear-gradient(to bottom, #eef0f6, #e4e7f0);
    min-height: 48px;
    padding: 6px 10px 0;
    gap: 3px;
    overflow-x: auto;
    scrollbar-width: none;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.tab-bar::-webkit-scrollbar { display: none; }

.tab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 38px;
    box-sizing: border-box;
    border-radius: 9px 9px 0 0;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    background: rgba(255,255,255,0.45);
    border: 1px solid rgba(0,0,0,0.08);
    border-bottom: none;
    transition: all 0.18s ease;
    user-select: none;
    position: relative;
}
.tab-item:not(.tab-settings):hover {
    background: rgba(255,255,255,0.75);
    color: #374151;
}
.tab-item.active {
    background: #fff;
    color: var(--primary);
    border-color: #dde1ec;
    box-shadow: 0 -3px 0 var(--primary) inset, 0 -1px 6px rgba(0,0,0,0.06);
    z-index: 1;
}
.tab-item i.tab-icon {
    font-size: 12px;
    opacity: 0.7;
    flex-shrink: 0;
}
.tab-item.active i.tab-icon {
    opacity: 1;
}
.tab-item-label {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tab-close {
    background: none;
    border: none;
    cursor: pointer;
    color: transparent;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    margin-left: 2px;
}
.tab-item:hover .tab-close,
.tab-item.active .tab-close { color: #9ca3af; }
.tab-close:hover { background: #fee2e2; color: #e53935 !important; }
.tab-item.tab-settings,
.tab-item.tab-settings:hover,
.tab-item.tab-settings:focus {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transition: color 0.18s ease !important;
}
.tab-item.tab-settings.active,
.tab-item.tab-settings.active:hover {
    background: #fff !important;
    color: var(--primary) !important;
    border-color: #dde1ec !important;
    box-shadow: 0 -3px 0 var(--primary) inset, 0 -1px 6px rgba(0,0,0,0.06) !important;
    transition: color 0.18s ease !important;
}
/* ───────────────────────────────────────────────────── */

/* ── Shifts Grid ──────────────────────────────────────── */
.shifts-week-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 24px 16px;
}
.shifts-week-label {
    font-weight: 600;
    font-size: 15px;
    color: #374151;
    min-width: 180px;
    text-align: center;
}
.shifts-week-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.shifts-grid-wrapper {
    padding: 0 24px 24px;
    overflow-x: auto;
}
.shifts-grid {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.shifts-grid thead tr {
    background: #f8f9fb;
}
.shifts-grid th {
    padding: 12px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}
.shifts-grid th.shifts-worker-col {
    text-align: left;
    padding-left: 16px;
    min-width: 180px;
}
.shifts-date {
    font-weight: 400;
    color: #9ca3af;
    font-size: 11px;
}
.shifts-grid td {
    padding: 8px 6px;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
    min-width: 110px;
}
.shifts-grid tbody tr:last-child td { border-bottom: none; }
.shifts-grid tbody tr:hover { background: #fafafa; }

.shifts-worker-col, .shifts-worker-cell { min-width: 180px; }
.shifts-worker-cell { text-align: left !important; padding-left: 12px !important; }
.shifts-worker-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.shifts-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.shifts-avatar-add {
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 13px;
    cursor: pointer;
}
.shifts-add-worker {
    color: #9ca3af;
    font-size: 13px;
    cursor: pointer;
}
.shifts-total-col { min-width: 60px; }
.shifts-total {
    font-weight: 700;
    color: #374151;
    font-size: 13px;
}

.shift-slot {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}
.shift-slot-morning {
    background: #dbeafe;
    color: #1d4ed8;
}
.shift-slot-evening {
    background: #fef3c7;
    color: #b45309;
}
.shift-slot-night {
    background: #ede9fe;
    color: #6d28d9;
}
.shift-empty {
    color: #d1d5db;
    font-size: 16px;
    cursor: pointer;
}
.shift-empty:hover { background: #f9fafb; }
/* ─────────────────────────────────────────────────────── */

/* ── Training / Formation ─────────────────────────────── */
.training-layout {
    display: grid;
    grid-template-columns: 200px 1fr 340px;
    gap: 0;
    height: calc(100vh - 160px);
    overflow: hidden;
}

/* Sidebar catégories */
.training-sidebar {
    background: #f8f9fb;
    border-right: 1px solid #e5e7eb;
    padding: 12px 8px;
    overflow-y: auto;
}
.training-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 2px;
}
.training-cat:hover { background: #eff0f5; color: #374151; }
.training-cat.active { background: var(--primary); color: #fff; }
.training-cat i { width: 16px; text-align: center; }

/* Contenu central */
.training-content {
    overflow-y: auto;
    padding: 20px;
    background: #f3f4f8;
}
.training-category-block { margin-bottom: 24px; }
.training-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}
.training-category-header i { color: var(--primary); font-size: 16px; }
.training-category-header h3 { font-size: 16px; font-weight: 700; color: #111827; margin: 0; flex: 1; }
.training-cat-count { font-size: 12px; color: #9ca3af; font-weight: 400; }

/* Sous-catégories */
.training-subcat-block { margin-bottom: 20px; }
.training-subcat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    border: 1px solid #e5e7eb;
}
.training-subcat-header i { color: #9ca3af; font-size: 11px; }
.training-subcat-count { margin-left: auto; font-size: 11px; color: #9ca3af; font-weight: 400; }
.training-subcat-collapsed { color: #9ca3af; }

/* Grille de cartes */
.training-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    padding: 0 4px;
}
.training-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 14px;
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.training-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-color: #d1d5db; transform: translateY(-1px); }
.training-card.training-card-expanded {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.15);
}
.training-card-icon { color: var(--primary); font-size: 18px; }
.training-card-body h4 { font-size: 13px; font-weight: 600; color: #111827; margin: 0 0 2px; }
.training-card-body p { font-size: 11px; color: #9ca3af; margin: 0; }
.training-card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.training-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
}
.training-tag-procedure { background: #dbeafe; color: #1d4ed8; }
.training-tag-technique  { background: #fef3c7; color: #b45309; }
.training-tag-controle   { background: #d1fae5; color: #065f46; }
.training-tag-hygiene    { background: #fce7f3; color: #9d174d; }

/* Panneau détail */
.training-detail-panel {
    background: #fff;
    border-left: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.training-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8f9fb;
    gap: 10px;
}
.training-detail-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.training-detail-title i { color: var(--primary); font-size: 16px; }
.training-detail-title h3 { font-size: 14px; font-weight: 700; color: #111827; margin: 0; }
.training-detail-actions { display: flex; gap: 6px; }
.btn-sm { padding: 5px 9px !important; font-size: 12px !important; }

.training-detail-body { overflow-y: auto; padding: 16px 18px; flex: 1; }
.training-detail-section { margin-bottom: 18px; }
.training-detail-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 8px;
}
.training-detail-label i { color: var(--primary); }
.training-detail-body p { font-size: 13px; color: #374151; margin: 0; line-height: 1.5; }

.training-procedure {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: #374151;
    line-height: 1.8;
}

.training-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.training-checklist li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
}
.training-checklist li i { color: #16a34a; font-size: 12px; }

.training-video-placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #f3f4f8;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
    cursor: pointer;
    color: #6b7280;
    font-size: 13px;
    transition: all 0.15s;
}
.training-video-placeholder:hover { background: #e9eaf0; }
.training-video-placeholder i { font-size: 22px; color: var(--primary); }

.training-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.training-img-placeholder {
    aspect-ratio: 1;
    background: #f3f4f8;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    color: #9ca3af;
    font-size: 11px;
    transition: all 0.15s;
}
.training-img-placeholder:hover { background: #e9eaf0; }
.training-img-placeholder i { font-size: 20px; }
/* ─────────────────────────────────────────────────────── */

/* ===== Global Admin hard override (final) ===== */
#global-adminPage .global-admin-card {
    padding: 16px !important;
}

#global-adminPage .global-admin-table {
    width: 100% !important;
    min-width: 1260px !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    table-layout: fixed !important;
}

#global-adminPage .global-admin-table thead th {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #1f1f26 !important;
    padding: 12px 10px !important;
    border: 0 !important;
    background: transparent !important;
}

#global-adminPage .global-admin-table tbody td {
    background: #ffffff !important;
    border-top: 1px solid #ece8e4 !important;
    border-bottom: 1px solid #ece8e4 !important;
    vertical-align: middle !important;
    padding: 10px 10px !important;
}

#global-adminPage .global-admin-table tbody td:first-child {
    border-left: 1px solid #ece8e4 !important;
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
}

#global-adminPage .global-admin-table tbody td:last-child {
    border-right: 1px solid #ece8e4 !important;
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}

#global-adminPage .ga-col-id { width: 80px !important; }
#global-adminPage .ga-col-business { width: 220px !important; }
#global-adminPage .ga-col-slug { width: 170px !important; }
#global-adminPage .ga-col-status { width: 140px !important; }
#global-adminPage .ga-col-domain { width: 300px !important; }
#global-adminPage .ga-col-actions { width: 200px !important; }

#global-adminPage .ga-id-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 46px !important;
    height: 30px !important;
    border-radius: 999px !important;
    border: 1px solid #ffdcbf !important;
    background: #fff8ef !important;
    color: #2a2a31 !important;
    font-weight: 800 !important;
    font-size: 16px !important;
}

#global-adminPage .ga-business-main {
    font-size: 18px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    color: #1e2026 !important;
    word-break: break-word !important;
}

#global-adminPage .ga-slug-pill {
    display: inline-block !important;
    padding: 5px 10px !important;
    border-radius: 10px !important;
    border: 1px solid #ece8e4 !important;
    background: #fafafa !important;
    font-size: 13px !important;
    color: #3b3b44 !important;
}

#global-adminPage .ga-status-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 88px !important;
    padding: 6px 12px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

#global-adminPage .ga-status-badge.is-active {
    background: #e9f9f0 !important;
    color: #1a7a4f !important;
    border: 1px solid #bde6d1 !important;
}

#global-adminPage .ga-status-badge.is-inactive {
    background: #fff0f0 !important;
    color: #a53a3a !important;
    border: 1px solid #f0c2c2 !important;
}

#global-adminPage .ga-domain-stack {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

#global-adminPage .ga-domain-stack strong {
    font-size: 18px !important;
    line-height: 1.2 !important;
    color: #2a2b31 !important;
}

#global-adminPage .ga-domain-stack small {
    font-size: 12px !important;
}

#global-adminPage .ga-modules-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

#global-adminPage .ga-row-modules td {
    border-top: 0 !important;
    padding-top: 0 !important;
}

#global-adminPage .ga-modules-panel {
    background: #fffaf5 !important;
    border: 1px solid #ffe3cc !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
}

#global-adminPage .ga-modules-panel-title {
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #9b6030 !important;
    margin-bottom: 8px !important;
}

#global-adminPage .ga-module-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 5px 10px !important;
    border-radius: 999px !important;
    border: 1px solid #ffbe95 !important;
    background: #fff8f3 !important;
    color: #23242a !important;
    font-weight: 700 !important;
    font-size: 13px !important;
}

#global-adminPage .ga-module-chip input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    accent-color: var(--primary) !important;
}

#global-adminPage .ga-module-chip.is-disabled {
    opacity: 0.75 !important;
}

#global-adminPage .ga-actions-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

#global-adminPage .ga-actions-col .btn-sm {
    width: 100% !important;
    justify-content: center !important;
}
