/* =========================================================
   CyberForja – Admin Panel Styles
   Redesign: Glassmorphism + Flat Monochromatic + Glow
   ========================================================= */

/* ─── CSS VARIABLES ────────────────────────────────────── */
:root {
    --abismo: #0B0E14;
    --abismo-light: #0f1319;
    --panel: rgba(14, 18, 27, 0.65);
    --panel-solid: #0e121b;
    --acero: rgba(255, 255, 255, 0.06);
    --acero-solid: #1a1f2e;
    --acero-claro: rgba(255, 255, 255, 0.1);
    --fuego: #FF6B00;
    --fuego-hover: #FF8A3D;
    --fuego-glow: rgba(255, 107, 0, 0.35);
    --cian: #00D4FF;
    --cian-glow: rgba(0, 212, 255, 0.3);
    --reven: #a855f7;
    --brasa: #ea580c;
    --priora: #0f766e;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --sidebar-w: 220px;
    --topbar-h: 60px;
    --radius: 14px;
    --radius-sm: 10px;
}

.relative { position: relative !important; }
.hidden { display: none !important; }

/* ─── DROPDOWNS ────────────────────────────────────────── */
#user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 220px;
    background: #161B22;
    border: 1px solid var(--acero);
    border-radius: 12px;
    box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow: hidden;
    padding: 6px;
    transform-origin: top right;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    text-decoration: none;
    box-sizing: border-box;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.dropdown-item i {
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
    color: #4b5563;
    transition: color 0.2s;
}

.dropdown-item:hover i {
    color: white;
}

.dropdown-divider {
    height: 1px;
    background: var(--acero);
    margin: 6px 8px;
}

.dropdown-item.logout {
    color: #ef4444;
}

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
}

.dropdown-item.logout i {
    color: #ef4444;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ─── LAYOUT ───────────────────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--abismo);
}

/* ─── SIDEBAR ──────────────────────────────────────────── */
.admin-sidebar {
    width: var(--sidebar-w);
    background: #0c0f16;
    border-right: 1px solid var(--acero);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 22px 20px;
    border-bottom: 1px solid var(--acero);
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--topbar-h);
}

.sidebar-header img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.sidebar-brand {
    font-family: 'Exo 2', sans-serif;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.sidebar-brand .text-cian {
    color: var(--cian);
}

.sidebar-brand .text-fuego {
    color: var(--fuego);
}

.sidebar-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #475569;
    font-weight: 600;
    margin-left: 2px;
}

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

.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--acero-solid);
    border-radius: 3px;
}

/* ─── NAV SECTION LABELS ──────────────────────────────── */
.nav-section-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #3f4656;
    padding: 20px 20px 8px;
    user-select: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 20px;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
    border-left: 3px solid transparent;
}

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

.nav-item.active {
    color: var(--cian);
    font-weight: 700;
    background: rgba(0, 212, 255, 0.05);
    border-left-color: var(--cian);
    box-shadow: inset 10px 0 20px -10px rgba(0, 212, 255, 0.1);
}

.nav-item .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-item .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--acero);
    font-size: 0.65rem;
    color: #2d3344;
    text-align: center;
}

/* ─── MAIN CONTENT ─────────────────────────────────────── */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ─── TOPBAR ───────────────────────────────────────────── */
.admin-topbar {
    height: var(--topbar-h);
    background: rgba(11, 14, 20, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--acero);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--acero);
    background: transparent;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.topbar-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: white;
}

.topbar-btn .badge-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--abismo);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 5px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}

.topbar-user:hover {
    background: rgba(255, 255, 255, 0.03);
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--fuego), #e04300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.7rem;
    color: white;
}

.topbar-user-info {
    line-height: 1.3;
}

.topbar-user-name {
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
}

.topbar-user-role {
    color: #6b7280;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.btn-hamburger {
    display: none;
    background: none;
    border: 1px solid var(--acero);
    color: #6b7280;
    font-size: 1.1rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* ─── CONTENT AREA ─────────────────────────────────────── */
.admin-content {
    flex: 1;
    padding: 32px 36px;
    overflow: hidden;
    /* Prevent main scroll */
    display: flex;
    flex-direction: column;
}

/* ─── SECTION HEADINGS ─────────────────────────────────── */
.section-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--fuego) 0%, rgba(255, 107, 0, 0.1) 70%, transparent 100%) 1;
    flex-shrink: 0;
}

.section-header h2 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.section-header p {
    color: var(--cian);
    font-size: 0.8rem;
    margin-top: 4px;
    font-weight: 500;
    opacity: 0.7;
}

/* ─── STAT CARDS ───────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 32px;
    flex-shrink: 0;
}

.stat-card {
    background: var(--panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--acero);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    border-color: var(--acero-claro);
    box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.6);
    transform: translateY(-2px);
}

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

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.stat-icon.fuego {
    background: rgba(255, 107, 0, 0.12);
    color: var(--fuego);
    box-shadow: 0 0 12px rgba(255, 107, 0, 0.15);
}

.stat-icon.cian {
    background: rgba(0, 212, 255, 0.1);
    color: var(--cian);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.12);
}

.stat-icon.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.12);
}

.stat-icon.warning {
    background: rgba(234, 179, 8, 0.1);
    color: var(--warning);
    box-shadow: 0 0 12px rgba(234, 179, 8, 0.12);
}

.stat-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.12);
}

.stat-icon.reven {
    background: rgba(168, 85, 247, 0.1);
    color: var(--reven);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.12);
}

.stat-trend {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.stat-trend.up {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.stat-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-value {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: white;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.75rem;
    color: #4b5563;
    margin-top: 6px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* ─── GRADIENT DIVIDER ─────────────────────────────────── */
.gradient-divider {
    height: 1px;
    background: linear-gradient(90deg, var(--fuego) 0%, rgba(255, 107, 0, 0.15) 50%, transparent 100%);
    margin: 24px 0;
}

/* ─── DATA TABLES ──────────────────────────────────────── */
.table-container {
    background: var(--panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--acero);
    border-radius: var(--radius);
    overflow: hidden;
    flex: 1;
    /* Take remaining space */
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* Important for nested scrolling */
}

.table-toolbar {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    border-bottom: 1px solid var(--acero);
}

.table-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--acero);
    border-radius: 8px;
    padding: 9px 16px;
    flex: 1;
    max-width: 380px;
    transition: border-color 0.2s;
}

.table-search:focus-within {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.06);
}

.table-search i {
    color: #3f4656;
    font-size: 0.82rem;
}

.table-search input {
    background: none;
    border: none;
    outline: none;
    color: white;
    font-size: 0.82rem;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.table-search input::placeholder {
    color: #3f4656;
}

.table-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 7px 14px;
    border-radius: 6px;
    border: 1px solid var(--acero);
    background: transparent;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #c9cdd5;
}

.filter-btn.active {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.25);
    color: var(--cian);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    /* Required for sticky header */
    border-spacing: 0;
}

.table-body-wrapper {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #111827;
    /* Solid color to prevent blur transparency issues on scroll */
}

.data-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #4b5563;
    border-bottom: 1px solid var(--acero);
    white-space: nowrap;
}

.data-table td {
    padding: 16px 20px;
    font-size: 0.82rem;
    color: #9ca3af;
    border-bottom: 1px solid var(--acero);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.15s;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
    box-shadow: inset 0 0 15px rgba(0, 212, 255, 0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.table-pagination {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--acero);
    font-size: 0.78rem;
    color: #4b5563;
}

.pagination-btns {
    display: flex;
    gap: 4px;
}

.page-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--acero);
    background: transparent;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.page-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: white;
}

.page-btn.active {
    background: var(--fuego);
    border-color: var(--fuego);
    color: white;
    box-shadow: 0 0 10px var(--fuego-glow);
}

/* ─── STATUS BADGES ────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge.active {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.badge.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge.warning {
    background: rgba(234, 179, 8, 0.1);
    color: var(--warning);
}

.badge.pending {
    background: rgba(0, 212, 255, 0.1);
    color: var(--cian);
}

.badge.info {
    background: rgba(168, 85, 247, 0.1);
    color: var(--reven);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.badge.active .badge-dot {
    background: var(--success);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.badge.inactive .badge-dot {
    background: var(--danger);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.badge.warning .badge-dot {
    background: var(--warning);
    box-shadow: 0 0 6px rgba(234, 179, 8, 0.6);
}

.badge.pending .badge-dot {
    background: var(--cian);
    box-shadow: 0 0 6px rgba(0, 212, 255, 0.6);
}

/* ─── BUTTONS ──────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    border: 1px solid transparent;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--fuego);
    color: white;
    border-color: var(--fuego);
}

.btn-primary:hover {
    background: var(--fuego-hover);
    box-shadow: 0 0 20px var(--fuego-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: #6b7280;
    border-color: var(--acero-solid);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    color: white;
    border-color: var(--acero-claro);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.3);
}

.btn-cian {
    background: rgba(0, 212, 255, 0.08);
    color: var(--cian);
    border-color: rgba(0, 212, 255, 0.2);
}

.btn-cian:hover {
    background: var(--cian);
    color: var(--abismo);
    box-shadow: 0 0 16px var(--cian-glow);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.72rem;
}

.btn-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    border: 1px solid var(--acero);
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.78rem;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.04);
    color: white;
}

.btn-icon.view:hover {
    color: var(--cian);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.15);
}

.btn-icon.edit:hover {
    color: var(--fuego);
    border-color: rgba(255, 107, 0, 0.3);
    box-shadow: 0 0 8px rgba(255, 107, 0, 0.15);
}

.btn-icon.delete:hover {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}

.action-btns {
    display: flex;
    gap: 6px;
}

/* ─── DETAIL PANELS ────────────────────────────────────── */
.detail-panel {
    background: var(--panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--acero);
    border-radius: var(--radius);
    overflow: hidden;
}

.detail-header {
    padding: 22px 26px;
    border-bottom: 1px solid var(--acero);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.detail-header h3 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-body {
    padding: 26px;
}

.detail-section {
    margin-bottom: 28px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4b5563;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--acero);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    font-size: 0.82rem;
}

.detail-row .label {
    color: #4b5563;
    font-weight: 500;
}

.detail-row .value {
    color: #d1d5db;
    font-weight: 600;
}

/* ─── MODAL DIALOG ─────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: #10141e;
    border: 1px solid var(--acero);
    border-radius: 16px;
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.7);
}

.modal-overlay.visible .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 22px 26px;
    border-bottom: 1px solid var(--acero);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.modal-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--acero);
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.modal-body {
    padding: 26px;
}

.modal-footer {
    padding: 18px 26px;
    border-top: 1px solid var(--acero);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ─── FORM ELEMENTS ────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--acero);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.06);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%234b5563' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

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

.form-radio-group,
.form-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.form-radio,
.form-check {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 500;
    transition: color 0.2s;
}

.form-radio:hover,
.form-check:hover {
    color: white;
}

.form-radio input[type="radio"],
.form-check input[type="checkbox"] {
    accent-color: var(--fuego);
    width: 15px;
    height: 15px;
}

.form-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    color: #4b5563;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.form-file-btn:hover {
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--cian);
    background: rgba(0, 212, 255, 0.03);
}

/* ─── ACTIVITY FEED ────────────────────────────────────── */
.activity-feed {
    background: var(--panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--acero);
    border-radius: var(--radius);
    overflow: hidden;
}

.activity-feed-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--acero);
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.activity-item {
    padding: 15px 24px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-bottom: 1px solid var(--acero);
    transition: background 0.15s;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.015);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-dot.green {
    background: var(--success);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.activity-dot.red {
    background: var(--danger);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.activity-dot.yellow {
    background: var(--warning);
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.5);
}

.activity-dot.blue {
    background: var(--cian);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.activity-text {
    flex: 1;
    font-size: 0.8rem;
    color: #9ca3af;
    line-height: 1.4;
}

.activity-text strong {
    color: white;
}

.activity-time {
    font-size: 0.7rem;
    color: #374151;
    white-space: nowrap;
    margin-top: 1px;
}

/* ─── CHART CONTAINER ──────────────────────────────────── */
.chart-container {
    background: var(--panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--acero);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    min-height: 300px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.chart-canvas {
    width: 100%;
    height: 220px;
}

/* ─── MESSAGE CARDS ────────────────────────────────────── */
.message-card {
    background: var(--panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--acero);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 14px;
    transition: all 0.2s;
    cursor: pointer;
}

.message-card:hover {
    border-color: var(--acero-claro);
    background: rgba(14, 18, 27, 0.8);
}

.message-card.unread {
    border-left: 3px solid var(--danger);
}

.message-card.read {
    border-left: 3px solid rgba(255, 255, 255, 0.04);
}

.message-card.replied {
    border-left: 3px solid var(--success);
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.message-from {
    font-weight: 600;
    color: white;
    font-size: 0.88rem;
}

.message-status-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.message-subject {
    color: #9ca3af;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.message-preview {
    color: #4b5563;
    font-size: 0.78rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.message-actions {
    margin-top: 14px;
    display: flex;
    gap: 8px;
}

/* ─── PRODUCT CARDS ────────────────────────────────────── */
.product-card {
    background: var(--panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--acero);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: var(--acero-claro);
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.5);
}

.product-card-banner {
    height: 3px;
}

.product-card-banner.reven {
    background: linear-gradient(90deg, var(--reven), #c084fc);
}

.product-card-banner.brasa {
    background: linear-gradient(90deg, var(--brasa), var(--fuego));
}

.product-card-banner.priora {
    background: linear-gradient(90deg, var(--priora), #2dd4bf);
}

.product-card-body {
    padding: 26px;
}

.product-name {
    font-family: 'Exo 2', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.product-desc {
    color: #4b5563;
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 22px;
}

.product-plans-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 22px;
}

.product-plans-table th {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #374151;
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid var(--acero);
}

.product-plans-table td {
    font-size: 0.8rem;
    color: #9ca3af;
    padding: 8px 10px;
    border-bottom: 1px solid var(--acero);
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 20px;
}

.product-meta-item {
    font-size: 0.75rem;
    color: #4b5563;
}

.product-meta-item span {
    color: #9ca3af;
    font-weight: 600;
}

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

/* ─── CONFIG SECTIONS ──────────────────────────────────── */
.config-section {
    background: var(--panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--acero);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
}

.config-title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-title i {
    color: var(--fuego);
    font-size: 0.9rem;
}

.password-field {
    position: relative;
}

.password-field .toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #374151;
    cursor: pointer;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.password-field .toggle-pw:hover {
    color: var(--cian);
}

/* ─── REPORT TABLES ────────────────────────────────────── */
.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.report-metric {
    background: var(--panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--acero);
    border-radius: var(--radius-sm);
    padding: 18px;
    text-align: center;
}

.report-metric .value {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: white;
}

.report-metric .label {
    font-size: 0.68rem;
    color: #4b5563;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ─── TWO-COL DASHBOARD ────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.dashboard-grid .full-width {
    grid-column: 1 / -1;
}

/* ─── CONTENT SECTIONS (tab-like views) ────────────────── */
.admin-section {
    display: none;
    height: 100%;
    flex-direction: column;
}

.admin-section.active {
    display: flex;
    animation: fadeInSection 0.35s ease forwards;
}

@keyframes fadeInSection {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

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

    .admin-sidebar.open {
        transform: translateX(0);
    }

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

    .btn-hamburger {
        display: flex;
    }

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

    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .table-search {
        max-width: 100%;
    }

    .section-header {
        flex-direction: column;
    }

    .admin-content {
        padding: 18px;
    }

    .topbar-user-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── SIDEBAR OVERLAY (mobile) ─────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
}

.sidebar-overlay.visible {
    display: block;
}

/* ─── SCROLLBAR STYLING ────────────────────────────────── */
.admin-content::-webkit-scrollbar,
.modal::-webkit-scrollbar {
    width: 5px;
}

.admin-content::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track {
    background: transparent;
}

.admin-content::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
}

.admin-content::-webkit-scrollbar-thumb:hover,
.modal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ─── UTILITY ──────────────────────────────────────────── */
.text-fuego {
    color: var(--fuego);
}

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

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

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

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

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

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

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

.text-muted {
    color: #4b5563;
}

.text-light {
    color: #6b7280;
}

.text-white {
    color: white;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.gap-16 {
    gap: 16px;
}

.gap-20 {
    gap: 20px;
}

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

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

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

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

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

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

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

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