/* === COHESIVE, ELEGANT CSS THEME FOR TIPX WEB MANAGEMENT SYSTEM === */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

html {
    scroll-behavior: smooth;
}

:root {
    --bg-main: #FAFAFA;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FFF5F5;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --border-color: #E5E7EB;
    --border-glow: rgba(6, 182, 212, 0.15);
    --logo-text-color: #1E293B;
    --logo-cross-color-1: #1E293B;
    --logo-cross-color-2: #475569;
    
    /* Dedicated Swiss Red Brand Colors -> Modernized TipX Logo Teal/Cyan */
    --color-brand: #06b6d4;
    --color-brand-light: rgba(6, 182, 212, 0.08);
    --color-brand-dark: #0d9488;
    --color-brand-glow: rgba(6, 182, 212, 0.25);
    
    /* True Professional Teal (Emerald/Mint) for Success, Highlights and Security */
    --color-teal: #06b6d4;
    --color-teal-light: rgba(6, 182, 212, 0.08);
    --color-teal-dark: #0d9488;
    --color-teal-glow: rgba(6, 182, 212, 0.20);
    
    /* True Professional Blue for Information and Accents */
    --color-blue: #0ea5e9;
    --color-blue-light: rgba(14, 165, 233, 0.08);
    --color-blue-dark: #0369a1;
    
    /* True Warning/Danger Red */
    --color-red: #EF4444;
    --color-red-light: rgba(239, 68, 68, 0.08);
    --color-yellow: #E2B93B;
    --color-yellow-light: rgba(226, 185, 59, 0.08);
    
    --text-primary: #1E293B;
    --text-secondary: #475569;
    --text-muted: #64748B;
    
    --text-brand-primary: #06b6d4;
    --text-brand-secondary: #0d9488;
    --text-brand-muted: #0891b2;
    
    --bg-hover: rgba(0, 0, 0, 0.03);
    --bg-input: #FAFAFA;
    
    --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --transition-speed: 0.22s;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    /* 8px Spacing System variables */
    --space-8px-1: 8px;
    --space-8px-1-5: 12px;
    --space-8px-2: 16px;
    --space-8px-3: 24px;
    --space-8px-4: 32px;
    --space-8px-5: 40px;
    --space-8px-6: 48px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-main: #0B0F19 !important;
    --bg-card: #151D30 !important;
    --bg-card-hover: #1E2942 !important;
    --bg-glass: rgba(21, 29, 48, 0.85) !important;
    --border-color: #24314F !important;
    --border-glow: rgba(6, 182, 212, 0.25) !important;
    --logo-text-color: #FFFFFF !important;
    --logo-cross-color-1: #FFFFFF !important;
    --logo-cross-color-2: #cbd5e1 !important;
    
    /* Dedicated Swiss Red Brand Colors in Dark Mode -> TipX Teal/Cyan */
    --color-brand: #06b6d4 !important;
    --color-brand-light: rgba(6, 182, 212, 0.12) !important;
    --color-brand-dark: #0d9488 !important;
    --color-brand-glow: rgba(6, 182, 212, 0.3) !important;
    
    /* Clean Teal/Green Success Colors in Dark Mode for Premium Contrast */
    --color-teal: #06b6d4 !important;
    --color-teal-light: rgba(6, 182, 212, 0.12) !important;
    --color-teal-dark: #0d9488 !important;
    --color-teal-glow: rgba(6, 182, 212, 0.25) !important;
    
    --color-blue: #38bdf8 !important;
    --color-blue-light: rgba(56, 189, 248, 0.1) !important;
    --color-blue-dark: #0284c7 !important;
    
    --color-red: #F87171 !important;
    --color-red-light: rgba(248, 113, 113, 0.12) !important;
    
    /* Highly professional, elegant dark theme color scheme with premium readability and brand-perfect accents */
    --text-primary: #FFFFFF !important;       /* Crisp, bright pure white for titles, headers, and major readable text */
    --text-secondary: #94A3B8 !important;     /* Sleek Slate-Gray for subtitles, labels, unselected options and perfect UI balance */
    --text-muted: #64748B !important;         /* Muted blue-gray for captions, small descriptions, and secondary details */
    
    --text-brand-primary: #F8FAFC !important;   /* Beautiful Pearl White in dark mode */
    --text-brand-secondary: #CBD5E1 !important; /* Elegant Pearl Silver/Gray in dark mode (alternated) */
    --text-brand-muted: #94A3B8 !important;     /* Sleek Slate-Gray in dark mode (alternated) */
    
    --bg-hover: rgba(255, 255, 255, 0.05) !important;
    --bg-input: #101622 !important;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(6, 182, 212, 0.08) !important;
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 12px rgba(6, 182, 212, 0.12) !important;
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.65), 0 4px 24px rgba(6, 182, 212, 0.18) !important;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.02) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-heading);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
[data-theme="dark"] body {
    background-image: 
        radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.06) 0px, transparent 55%),
        radial-gradient(at 100% 100%, rgba(13, 148, 136, 0.03) 0px, transparent 55%);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-md);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Header bar styling */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-img {
    height: 42px;
    width: 42px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--color-brand);
    box-shadow: 0 0 12px var(--color-brand-glow);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #06b6d4, #0d9488);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.05em;
}

.connection-pill {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(16, 185, 129, 0.08);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: var(--shadow-sm);
}

.connection-pill.disconnected {
    background-color: var(--color-red-light);
    color: var(--color-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    animation: pulse 1.6s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0.4; transform: scale(0.9); }
}

/* Layout container */
.main-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: var(--space-8px-5); /* 40px, multiple of 8px */
    display: grid;
    grid-template-columns: 1fr !important; /* Single column layout for modern desktop/mobile with collapsible drawer */
    gap: var(--space-8px-5); /* 40px, multiple of 8px */
}

/* Sidebar navigation */
.sidebar-navigation {
    display: flex;
    flex-direction: column;
    gap: var(--space-8px-1); /* 8px spacing for modern compact density */
    position: fixed !important;
    top: 0 !important;
    left: -320px !important;
    width: 300px !important;
    height: 100vh !important;
    background: var(--bg-card) !important;
    border-right: 1px solid var(--border-color) !important;
    z-index: 1000 !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-y: auto !important;
    padding: 2rem 1.25rem !important;
    box-shadow: var(--shadow-lg) !important;
}

.sidebar-navigation.open {
    left: 0 !important;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-8px-1-5, 12px); /* consistent multiple of 4/8px */
    padding: var(--space-8px-1-5, 12px) var(--space-8px-2); /* 12px top/bottom, 16px left/right */
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    background: transparent;
    text-align: left;
    width: 100%;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item svg {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color var(--transition-speed);
}

.nav-item:hover {
    color: var(--color-brand);
    background-color: var(--color-brand-light);
    transform: translateX(4px);
}

.nav-item:hover svg {
    color: var(--color-brand);
}

.nav-item.active {
    color: var(--text-primary);
    background-color: var(--color-brand-light);
    border-left: 3.5px solid var(--color-brand);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    font-weight: 700;
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.05), 0 0 10px var(--color-brand-glow);
}

.nav-item.active svg {
    color: var(--color-brand);
}

/* Dashboard content manager */
.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Stats Card grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}

.stats-card {
    background-color: var(--bg-card);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-brand), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-brand);
    box-shadow: var(--shadow-md), 0 0 15px var(--color-brand-glow);
}

.stats-card:hover::before {
    opacity: 1;
}

.stats-card .title {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.stats-card .value {
    font-size: 1.85rem;
    font-weight: 800;
    margin-top: 8px;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.stats-card .footer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
}

/* Tab/Section content wrapper */
.content-section {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.content-section.active {
    display: flex !important;
}

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

/* Section elements card */
.section-card {
    background-color: var(--bg-card);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.01) 0%, transparent 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.section-card:hover {
    border-color: rgba(6, 182, 212, 0.25);
    box-shadow: var(--shadow-lg), 0 4px 20px rgba(6, 182, 212, 0.05);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-brand) 0%, #0d9488 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

[data-theme="dark"] .text-gradient {
    background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 6px;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Tables and database listing UI */
.table-scroller, .table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    -webkit-overflow-scrolling: touch;
    transition: box-shadow var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1), border-color var(--transition-speed) ease;
}

.table-scroller:hover, .table-responsive:hover {
    border-color: rgba(20, 184, 166, 0.3);
    box-shadow: var(--shadow-md), 0 4px 15px rgba(20, 184, 166, 0.05);
}

.table-scroller::-webkit-scrollbar, .table-responsive::-webkit-scrollbar {
    height: 6px;
}
.table-scroller::-webkit-scrollbar-track, .table-responsive::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
.table-scroller::-webkit-scrollbar-thumb, .table-responsive::-webkit-scrollbar-thumb {
    background: var(--color-teal);
    border-radius: 3px;
}

table, .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

th {
    padding: 14px 18px;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    background-color: var(--bg-hover);
    text-transform: uppercase;
    font-size: 0.725rem;
    letter-spacing: 0.05em;
}

td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

tr {
    transition: background-color 0.22s ease, transform 0.15s ease;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: var(--bg-hover);
}

tr:hover td:first-child {
    border-left: 3px solid var(--color-brand);
    padding-left: 15px;
}

/* Badges indicators styles */
.badge {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: capitalize;
    transition: all 0.22s ease;
}

.badge.success {
    background-color: rgba(16, 185, 129, 0.12);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.badge.success::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: currentColor;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
    animation: badge-pulse 1.8s infinite ease-in-out;
}

.badge.info {
    background-color: var(--color-blue-light);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
}
.badge.info::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: currentColor;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
    animation: badge-pulse 1.8s infinite ease-in-out;
}

.badge.danger {
    background-color: var(--color-red-light);
    color: #F87171;
    border: 1px solid rgba(248, 113, 113, 0.2);
}
.badge.danger::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: currentColor;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
    animation: badge-pulse 1.8s infinite ease-in-out;
}

.badge.warning {
    background-color: var(--color-yellow-light);
    color: #E2B93B;
    border: 1px solid rgba(226, 185, 59, 0.2);
}
.badge.warning::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: currentColor;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
    animation: badge-pulse 1.8s infinite ease-in-out;
}

@keyframes badge-pulse {
    0% { transform: scale(0.85); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.85); opacity: 0.6; }
}

/* Elegant Buttons UI */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-speed) ease;
    text-decoration: none;
    font-family: var(--font-heading);
}

.btn-primary {
    background-color: var(--color-brand);
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px var(--color-brand-glow);
}
.btn-primary:hover {
    background-color: var(--color-brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--color-brand-glow);
}

.btn-secondary {
    background-color: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--color-teal-light);
    transform: translateY(-1px);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #F87171;
}
.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.45);
    color: white;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Form layouts and style details */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control, select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s ease, box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s ease;
}

.form-control::placeholder {
    color: var(--text-muted);
}

select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
    padding: 10px;
}

.form-control:hover, select:hover {
    border-color: rgba(20, 184, 166, 0.4);
    background-color: var(--bg-hover);
}

.form-control:focus, select:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px var(--color-brand-glow);
    background-color: var(--bg-card);
}

/* Custom switch toggle styling */
.switch-container {
    user-select: none;
}
.switch-container input:checked + .slider-round {
    background-color: var(--color-brand) !important;
    box-shadow: 0 0 10px var(--color-brand-glow);
}
.switch-container .slider-round:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .35s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.switch-container input:checked + .slider-round:before {
    transform: translateX(24px);
}

/* Console details logs */
.console-box {
    background-color: #060913;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    max-height: 250px;
    overflow-y: auto;
    color: #34D399;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.console-line {
    margin-bottom: 6px;
    white-space: pre-wrap;
    line-height: 1.5;
}

.console-line.error { color: #f87171; }
.console-line.info { color: #60a5fa; }

/* Alerts and popups notifications */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    line-height: 1.5;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.12);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.alert-error {
    background-color: var(--color-red-light);
    color: #F87171;
    border: 1px solid rgba(248, 113, 113, 0.25);
}

/* Branding layouts */
.branding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.branding-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.branding-image-preview {
    width: 100%;
    height: 150px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Language Switcher & identifier */
.lang-switcher a {
    transition: all var(--transition-speed) ease;
}
.lang-switcher a:hover {
    color: var(--text-primary) !important;
    background: rgba(255,255,255,0.08) !important;
}

.zone-identifier {
    transition: all var(--transition-speed) ease;
}
.zone-identifier:hover {
    transform: translateY(-1px);
    filter: brightness(1.15);
}

/* Code styling tags */
code {
    font-family: var(--font-mono);
}

/* Minimalist Swiss-inspired TIPX Brand Logo */
.minimal-app-logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    user-select: none;
}

.minimal-app-logo-badge {
    position: relative;
    background-color: var(--color-brand); /* Brand Teal */
    border-radius: 28%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px var(--color-brand-glow);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.minimal-app-logo-badge:hover {
    transform: scale(1.08);
}

.minimal-app-logo-cross {
    position: relative;
    width: 55%;
    height: 55%;
}

.minimal-app-logo-cross::before,
.minimal-app-logo-cross::after {
    content: '';
    position: absolute;
    background-color: #FFFFFF;
    border-radius: 1px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Vertical bar */
.minimal-app-logo-cross::before {
    width: 32%;
    height: 100%;
}

/* Horizontal bar */
.minimal-app-logo-cross::after {
    width: 100%;
    height: 32%;
}

.minimal-app-logo-text {
    font-weight: 850;
    letter-spacing: -0.04em;
    display: flex;
    align-items: center;
}

.minimal-app-logo-text .tip {
    color: var(--color-brand); /* Swiss Red */
}

.minimal-app-logo-text .x {
    color: var(--text-primary); /* Adaptive text primary */
}

/* Responsive Grid Utilities & Custom Dashboard Layouts */
.dashboard-charts-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

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

.grid-240 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
}

.grid-250 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.grid-300 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

/* MÓDULO: Responsive System & Breakpoints */

/* 1️⃣ Breakpoint: Desktop (>1024px) */
@media (min-width: 1025px) {
    /* Main container and sidebar have unified offcanvas styling everywhere */
}

/* 2️⃣ Breakpoint: Tablet (640px to 1024px) & Mobile (<640px) */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr !important;
        padding: 1rem 1.25rem !important;
        gap: 1.25rem !important;
    }

    .top-bar {
        padding: 1rem 1.25rem 1rem 0.6rem !important;
    }

    .mobile-sidebar-header {
        display: flex !important;
    }

    /* Hide text indicators or resize stats grids */
    .stats-grid, .grid-4col {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .dashboard-charts-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    /* Boost touch targets to meet or exceed 44x44px standard */
    .nav-item, .sidebar-group-toggle, .btn, .sub-tab-btn, .service-pill-item {
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column !important;
        gap: 14px !important;
        align-items: stretch !important;
        padding: 1rem 1.25rem !important;
    }
    .logo-container {
        justify-content: space-between !important;
        width: 100% !important;
    }
    .header-actions {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
    }
    .header-actions .zone-identifier,
    .header-actions .lang-switcher,
    .header-actions .theme-toggle-btn {
        margin: 0 !important;
    }
}

/* 3️⃣ Breakpoint: Mobile (<640px) */
@media (max-width: 640px) {
    .stats-grid, .grid-4col, .form-grid {
        grid-template-columns: 1fr !important;
    }

    /* Tablas apiladas como tarjetas en Mobile para evitar scroll horizontal molesto */
    .table-responsive table, 
    .table-responsive thead, 
    .table-responsive tbody, 
    .table-responsive th, 
    .table-responsive td, 
    .table-responsive tr {
        display: block !important;
    }

    .table-responsive thead {
        display: none !important; /* Escondemos cabeceras */
    }

    .table-responsive tr {
        background: rgba(255, 255, 255, 0.015);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: var(--shadow-sm);
    }

    [data-theme="dark"] .table-responsive tr {
        background: rgba(0, 0, 0, 0.15);
    }

    .table-responsive td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 4px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
        font-size: 0.825rem !important;
        text-align: right !important;
    }

    .table-responsive td:last-child {
        border-bottom: none !important;
        justify-content: flex-end !important;
    }

    /* Insertamos el header original vía data-label */
    .table-responsive td::before {
        content: attr(data-label);
        font-weight: 700;
        text-align: left;
        color: var(--text-secondary);
        margin-right: 15px;
        font-size: 0.8rem;
    }
}

/* MÓDULO: Sidebar Accordion */
.sidebar-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    width: 100%;
}

.sidebar-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-speed);
    border-radius: var(--radius-md);
}

.sidebar-group-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.sidebar-group.active .sidebar-group-toggle {
    color: var(--color-teal);
    background: rgba(20, 184, 166, 0.05);
}

.sidebar-group-toggle .chevron-icon {
    transition: transform 0.3s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.sidebar-group.active .sidebar-group-toggle .chevron-icon {
    transform: rotate(180deg);
}

.sidebar-subitems {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding-left: 16px;
    margin-top: 4px;
    border-left: 2px solid rgba(20, 184, 166, 0.15);
}

.sidebar-group.active .sidebar-subitems {
    display: flex;
}

.sidebar-subitems .nav-item {
    font-size: 0.825rem !important;
    padding: 10px 14px !important;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text-secondary);
    font-weight: 500;
}

.sidebar-subitems .nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.sidebar-subitems .nav-item.active {
    color: var(--color-teal) !important;
    background: rgba(20, 184, 166, 0.08) !important;
    font-weight: 700 !important;
}

/* MÓDULO: Expandable Cards & Rows */
.collapsable-card {
    position: relative;
    transition: all 0.3s ease;
}

.card-expandable-content {
    max-height: 120px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-expandable-content.expanded {
    max-height: 2000px !important;
}

.card-expandable-content .fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to top, var(--bg-card), transparent);
    pointer-events: none;
    transition: opacity 0.3s;
}

[data-theme="dark"] .card-expandable-content .fade-overlay {
    background: linear-gradient(to top, #0f172a, transparent);
}

.card-expandable-content.expanded .fade-overlay {
    opacity: 0 !important;
}

.expandable-tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.expandable-tr:hover {
    background-color: rgba(20, 184, 166, 0.03) !important;
}

.details-row {
    background-color: rgba(20, 184, 166, 0.015) !important;
}

.details-container {
    padding: 16px 20px;
    border-top: 1.5px dashed rgba(20, 184, 166, 0.15);
    border-bottom: 1.5px dashed rgba(20, 184, 166, 0.15);
    font-size: 0.85rem;
    animation: slideDownFade 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* === MOBILE-FIRST QR CODE & SERVICE SELECTION OPTIMIZATIONS === */

/* QR Code Display Container */
.qr-display-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-speed) ease;
}

.qr-display-wrapper:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--color-teal);
}

.qr-canvas-holder-custom {
    padding: 1.25rem;
    background: #FFFFFF; /* High contrast white for QR scanning readability */
    border: 3px solid var(--text-primary);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    display: inline-block;
    transition: transform var(--transition-speed) ease;
    max-width: 100%;
    box-sizing: border-box;
}

.qr-canvas-holder-custom:active {
    transform: scale(0.98);
}

.qr-canvas-holder-custom img, 
.qr-canvas-holder-custom canvas {
    max-width: 100%;
    height: auto !important;
    display: block;
}

/* Service Selection Lists (Grid & Pills) */
.service-selection-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.5rem;
}

.service-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    width: 100%;
}

.service-touch-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.75rem;
    background-color: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    user-select: none;
    transition: all var(--transition-speed) ease;
    min-height: 80px; /* Generous touch area */
    box-sizing: border-box;
    gap: 6px;
}

.service-touch-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--color-teal-glow);
}

.service-touch-card.active {
    background-color: var(--color-teal) !important;
    border-color: var(--color-teal) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px var(--color-teal-glow) !important;
    transform: scale(1.03);
}

.service-touch-card.active .service-icon,
.service-touch-card.active .service-label {
    color: #ffffff !important;
}

.service-touch-card .service-icon {
    font-size: 1.5rem;
}

.service-touch-card .service-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Horizontal Scrollable Service Pill Bar for Compact Mobile Views */
.service-pill-bar {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 6px 2px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE10+ */
    width: 100%;
    box-sizing: border-box;
}

.service-pill-bar::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.service-pill-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    height: 38px; /* Comfortable mobile touch size */
}

.service-pill-item:hover {
    border-color: var(--color-teal);
    color: var(--color-teal);
}

.service-pill-item.active {
    background-color: var(--color-teal);
    color: #FFFFFF !important;
    border-color: var(--color-teal);
    box-shadow: 0 4px 10px var(--color-teal-glow);
}

/* Swiss Branding Details & Scan Assist */
.scan-instructions-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(16, 185, 129, 0.05);
    border: 1.5px dashed rgba(16, 185, 129, 0.3);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.scan-instructions-banner .badge-swiss {
    width: 24px;
    height: 24px;
    background-color: #0d9488; /* TipX logo teal background */
    color: #FFFFFF;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.scan-instructions-banner p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    text-align: left;
}

/* Mobile responsive fixes */
@media (max-width: 480px) {
    .qr-display-wrapper {
        padding: 1rem;
    }
    
    .qr-canvas-holder-custom {
        padding: 1rem;
    }
    
    .service-selection-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on small screens */
    }
    
    .service-touch-card {
        min-height: 72px;
        padding: 0.75rem 0.5rem;
    }
}

/* 4️⃣ ESTILOS PREMIUM PARA SPINNER & CARGAS (BASADOS EN EL LOGO) */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(6, 182, 212, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-teal);
    border-right-color: #06b6d4;
    animation: tipx-spin 0.8s linear infinite;
}

.spinner-tipx {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 4px solid rgba(30, 41, 59, 0.5);
    border-radius: 50%;
    border-top: 4px solid #06b6d4;
    border-right: 4px solid #0d9488;
    animation: tipx-spin 0.85s cubic-bezier(0.4, 0.1, 0.2, 0.9) infinite;
    filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.3));
}

@keyframes tipx-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos de tabla expandible y drilldown */
.table-row-hover {
    cursor: pointer;
}
.table-row-hover:hover {
    background: rgba(20, 184, 166, 0.05) !important;
}
[data-theme="dark"] .table-row-hover:hover {
    background: rgba(6, 182, 212, 0.07) !important;
}

.details-row {
    background: rgba(15, 23, 42, 0.02) !important;
}
[data-theme="dark"] .details-row {
    background: rgba(0, 0, 0, 0.2) !important;
}

.details-container {
    animation: slideDownFade 0.25s ease-out;
}

.row-drilldown-card {
    border-left: 4px solid var(--color-teal);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

/* Breadcrumbs fluidos */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.breadcrumbs span {
    transition: color 0.2s;
}
.breadcrumbs span.active {
    color: var(--color-teal);
    font-weight: 700;
}

/* ========================================================== */
/* TIPX LOADER & SKELETON COMPONENT STYLES                  */
/* ========================================================== */
@keyframes tipxHexSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes tipxPulseGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.4));
        opacity: 0.85;
    }
    50% { 
        filter: drop-shadow(0 0 16px rgba(6, 182, 212, 0.95));
        opacity: 1;
    }
}

@keyframes tipxShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.tipx-loading-svg {
    transform-origin: center;
    animation: tipxPulseGlow 2s infinite ease-in-out;
}

.tipx-loading-svg .hexagon {
    transform-origin: 50px 50px;
    animation: tipxHexSpin 6s infinite linear;
}

/* Loader Overlay Container */
.tipx-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 100;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.tipx-loader-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.tipx-loader-text {
    font-size: 0.825rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Skeleton Shimmer Classes */
.tipx-skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 25%, rgba(255, 255, 255, 0.07) 37%, rgba(255, 255, 255, 0.02) 63%);
    background-size: 400% 100%;
    animation: tipxShimmer 1.6s infinite linear;
    border-radius: 6px;
}

.tipx-skeleton-text {
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
}

.tipx-skeleton-title {
    height: 20px;
    width: 60%;
    margin-bottom: 12px;
}

/* KPI Card loading representation */
.tipx-kpi-skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-sizing: border-box;
    min-height: 110px;
}

/* Table loading representation */
.tipx-table-skeleton {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tipx-table-skeleton-row {
    display: flex;
    gap: 15px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.tipx-table-skeleton-cell {
    height: 16px;
    flex: 1;
}

/* Cascade Step Locking on Client Portal */
.client-step-locked {
    opacity: 0.35 !important;
    filter: grayscale(80%) !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Ajustes de centrado y elevación para pestañas desde Configuración hasta Soporte & Control */
@media (min-width: 1025px) {
    #settings, #branding, #plans_sect, 
    #audit_trail_sect, #users, #super_control_sect, 
    #secure_folders_sect, #legal_terms_sect, #legal_privacy_sect, 
    #legal_impressum_sect {
        max-width: 980px !important;
        width: 100% !important;
        margin-top: -30px !important; /* Eleva el contenido */
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Theme Toggle Button Micro-interactions */
.theme-toggle-btn {
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.theme-toggle-btn:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--color-teal) !important;
    box-shadow: 0 0 10px var(--color-teal-glow);
}
.theme-toggle-btn:hover #theme-icon-indicator {
    transform: rotate(35deg);
}
#theme-icon-indicator {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Premium KPI Cards styles */
.kpi-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    padding: 18px !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
    border-color: rgba(6, 182, 212, 0.25) !important;
}

/* Glassmorphism utility for modern headers */
.glass-panel {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Premium Pricing/Subscription Cards */
.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-brand), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(6, 182, 212, 0.1);
    border-color: var(--color-brand);
}

.pricing-card:hover::before {
    opacity: 1;
}

/* Featured/Most Popular Pricing Card */
.pricing-card.featured {
    border: 2px solid var(--color-brand);
    background: linear-gradient(185deg, var(--bg-card) 0%, rgba(6, 182, 212, 0.02) 100%);
    box-shadow: var(--shadow-lg), 0 4px 20px rgba(6, 182, 212, 0.05);
}

.pricing-card.featured::before {
    opacity: 1;
    background: linear-gradient(90deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
}

.pricing-card.featured:hover {
    box-shadow: var(--shadow-lg), 0 15px 35px rgba(6, 182, 212, 0.18);
}

/* Active plan badge and style */
.pricing-card.active-plan {
    border: 2px solid var(--color-teal);
    background: linear-gradient(185deg, var(--bg-card) 0%, rgba(20, 184, 166, 0.04) 100%);
}

.pricing-card .badge-popular {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--color-brand-dark) 0%, var(--color-brand) 100%);
    color: #FFFFFF;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.25);
    z-index: 10;
}

.pricing-card .badge-active {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    color: #FFFFFF;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.25);
    z-index: 10;
}

.pricing-card-header h4 {
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
}

.pricing-card-header .description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.pricing-card-price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.pricing-card-price .period {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pricing-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text-secondary);
}

.pricing-features-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features-list li .check-icon {
    color: var(--color-teal);
    font-weight: bold;
    flex-shrink: 0;
}

.pricing-features-list li .cross-icon {
    color: var(--text-muted);
    opacity: 0.5;
    flex-shrink: 0;
}

.pricing-features-list li.disabled {
    color: var(--text-muted);
    opacity: 0.75;
    text-decoration: line-through;
}


/* ==========================================================================
   MÓDULO PREMIUM: Hamburguesa & Menú de Navegación Alineado a la Perfección
   ========================================================================== */

/* Botón Hamburguesa Premium en Header */
.desktop-hamburger-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(6, 182, 212, 0.06) !important;
    border: 1px solid rgba(6, 182, 212, 0.15) !important;
    color: var(--text-primary) !important;
    border-radius: 10px !important;
    width: 42px !important;
    height: 42px !important;
    cursor: pointer !important;
    flex-shrink: 0;
    margin-right: 15px !important;
    margin-left: 5px !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.05);
}

.desktop-hamburger-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s cubic-bezier(0.1, 0.8, 0.3, 1);
    pointer-events: none;
}

.desktop-hamburger-btn:hover {
    background: rgba(6, 182, 212, 0.12) !important;
    border-color: rgba(6, 182, 212, 0.3) !important;
    color: var(--color-teal) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.desktop-hamburger-btn:hover::before {
    transform: translate(-50%, -50%) scale(1.5);
}

.desktop-hamburger-btn:active {
    transform: scale(0.95);
    background: rgba(6, 182, 212, 0.2) !important;
}

/* Micro-interacciones de las líneas del ícono hamburguesa */
.desktop-hamburger-btn svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-hamburger-btn svg line {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s ease, stroke-width 0.3s ease;
    transform-origin: center;
}

.desktop-hamburger-btn:hover svg line:nth-child(1) {
    transform: translateY(-2px);
    stroke: var(--color-teal) !important;
    stroke-width: 2.5px;
}

.desktop-hamburger-btn:hover svg line:nth-child(2) {
    transform: scaleX(0.85);
    stroke: var(--color-teal) !important;
}

.desktop-hamburger-btn:hover svg line:nth-child(3) {
    transform: translateY(2px);
    stroke: var(--color-teal) !important;
    stroke-width: 2.5px;
}

/* Sidebar Drawer con Efecto Satinado (Glassmorphism) */
.sidebar-navigation {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border-right: 1px solid var(--border-color) !important;
    padding: 1.5rem 1.1rem !important;
    width: 310px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.1) !important;
}

/* Cabecera del Sidebar Drawer */
.mobile-sidebar-header {
    margin-bottom: 25px !important;
    padding-bottom: 18px !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.sidebar-close-btn {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    cursor: pointer;
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sidebar-close-btn:hover {
    color: var(--color-red) !important;
    background: var(--color-red-light) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.15);
}

.sidebar-close-btn:active {
    transform: rotate(90deg) scale(0.95);
}

/* Estructura del Acordeón y Submenús Alineados a la Perfección */
.sidebar-group {
    border-radius: 12px !important;
    margin-bottom: 6px !important;
    border: 1px solid transparent !important;
    transition: all 0.25s ease !important;
}

.sidebar-group.active {
    background: rgba(6, 182, 212, 0.02) !important;
    border-color: rgba(6, 182, 212, 0.08) !important;
}

/* Botón Toggle del Grupo */
.sidebar-group-toggle {
    padding: 12px 14px !important;
    border-radius: 10px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.sidebar-group-toggle::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 0;
    width: 3px;
    height: 70%;
    background: linear-gradient(180deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform: scaleY(0.5);
}

.sidebar-group-toggle:hover {
    color: var(--text-primary) !important;
    background: var(--bg-hover) !important;
    padding-left: 18px !important; /* Slide sutil */
}

.sidebar-group.active .sidebar-group-toggle {
    color: var(--color-teal) !important;
    background: rgba(6, 182, 212, 0.06) !important;
    font-weight: 700 !important;
}

.sidebar-group.active .sidebar-group-toggle::after {
    opacity: 1;
    transform: scaleY(1);
}

/* Línea de Conexión de Submenús */
.sidebar-subitems {
    padding-left: 20px !important;
    margin: 4px 0 10px 14px !important;
    border-left: 2px dashed rgba(6, 182, 212, 0.2) !important;
    position: relative;
    transition: border-color 0.3s ease !important;
}

.sidebar-group.active .sidebar-subitems {
    border-left: 2px solid rgba(6, 182, 212, 0.35) !important;
}

/* Elementos del Submenú Individuales */
.sidebar-subitems .nav-item {
    font-size: 0.85rem !important;
    padding: 10px 14px 10px 12px !important;
    border-radius: 8px !important;
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    position: relative !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Punto indicador alineado con la línea vertical */
.sidebar-subitems .nav-item::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.35;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: -2px; /* Alineación perfecta con el conector */
}

.sidebar-subitems .nav-item:hover {
    color: var(--text-primary) !important;
    background: var(--bg-hover) !important;
    padding-left: 16px !important; /* Desplazamiento orgánico */
}

.sidebar-subitems .nav-item:hover::before {
    background: var(--color-brand) !important;
    opacity: 0.8;
    transform: scale(1.3);
}

.sidebar-subitems .nav-item.active {
    color: var(--color-brand) !important;
    background: rgba(6, 182, 212, 0.08) !important;
    font-weight: 700 !important;
    padding-left: 16px !important;
}

.sidebar-subitems .nav-item.active::before {
    background: var(--color-brand) !important;
    opacity: 1 !important;
    transform: scale(1.4) !important;
    box-shadow: 0 0 8px var(--color-brand-glow) !important;
}

/* Corrección de padding en dispositivos pequeños */
@media (max-width: 768px) {
    .desktop-hamburger-btn {
        margin-right: 8px !important;
        margin-left: 0 !important;
        width: 44px !important; /* Incrementamos para accesibilidad touch */
        height: 44px !important;
    }
}


