/* ==========================================================================
   DASHBOARDIA PREMIUM DESIGN SYSTEM (LIGHT & DARK THEMES)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme Variables & Initialization
   -------------------------------------------------------------------------- */
:root {
    /* Color Palette Archetypes (Default Dark Theme) */
    --bg-app: #080c14;
    --bg-card: rgba(17, 24, 39, 0.65);
    --bg-card-hover: rgba(25, 35, 58, 0.75);
    --bg-sidebar: #0b111e;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-color-hover: rgba(255, 255, 255, 0.12);
    
    /* Typography Colors */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-inverse: #0f172a;
    
    /* Interactive Colors & Accents */
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #4f46e5, #06b6d4);
    --primary-glow: rgba(99, 102, 241, 0.3);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.2);
    
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.2);
    
    --info: #06b6d4;
    --info-glow: rgba(6, 182, 212, 0.2);
    
    /* Layout & UI Parameters */
    --sidebar-width: 280px;
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-app: #f3f4f6;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-sidebar: #ffffff;
    --border-color: rgba(0, 0, 0, 0.05);
    --border-color-hover: rgba(0, 0, 0, 0.1);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-inverse: #f8fafc;
    
    --primary: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #4f46e5, #0891b2);
    --primary-glow: rgba(79, 70, 229, 0.15);
    
    --success: #059669;
    --success-glow: rgba(5, 150, 105, 0.15);
    
    --warning: #d97706;
    --warning-glow: rgba(217, 119, 6, 0.15);
    
    --danger: #dc2626;
    --danger-glow: rgba(220, 38, 38, 0.15);
    
    --info: #0891b2;
    --info-glow: rgba(8, 145, 178, 0.15);
}

/* --------------------------------------------------------------------------
   2. Reset & Core Page Layout
   -------------------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Hide elements with class hidden */
.hidden {
    display: none !important;
}

/* --------------------------------------------------------------------------
   3. Theme Transitions & Micro-Interactions
   -------------------------------------------------------------------------- */
a, button, .menu-item, .profile-card, input, select {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* Text Gradient Utility */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.25);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.45);
}

/* --------------------------------------------------------------------------
   4. View Management & Animations
   -------------------------------------------------------------------------- */
.app-view {
    display: none;
    min-height: 100vh;
    width: 100%;
    position: relative;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.app-view.active {
    display: block;
    opacity: 1;
    transform: scale(1);
}

/* Flexbox layout for dashboard view */
#view-dashboard.active {
    display: flex;
}

/* --------------------------------------------------------------------------
   5. Login View & Background Shapes
   -------------------------------------------------------------------------- */
#view-login {
    display: none;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-app);
    padding: 20px;
}

#view-login.active {
    display: flex;
}

.login-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    mix-blend-mode: screen;
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: -50px;
    right: -50px;
    background: #4f46e5;
    animation: floatShape1 15s infinite alternate;
}

.shape-2 {
    width: 350px;
    height: 350px;
    bottom: -50px;
    left: -50px;
    background: #06b6d4;
    animation: floatShape2 18s infinite alternate;
}

@keyframes floatShape1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, 50px) scale(1.2); }
}

@keyframes floatShape2 {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(40px, -40px) scale(0.9); }
}

.login-card-container {
    position: relative;
    z-index: 2;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 50px 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.app-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 25px;
}

.logo-icon {
    font-size: 28px;
    color: var(--primary);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sparkle 4s infinite ease-in-out;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
    50% { transform: scale(1.1) rotate(15deg); opacity: 1; }
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 35px;
}

/* Real Google Button Custom Wrapper */
.google-signin-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    width: 100%;
    min-height: 44px;
}

#google-btn-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 30px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 15px;
    font-weight: 500;
    opacity: 0.8;
}

/* Simulated Login Sandbox Card */
.test-sandbox-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    margin-bottom: 10px;
    transition: var(--transition-smooth);
}

.test-sandbox-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--primary);
}

.sandbox-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--info);
    margin-bottom: 8px;
}

.sandbox-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   6. Form & Input Design System
   -------------------------------------------------------------------------- */
.form-group {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}

.form-group.floating input,
.form-group.floating textarea {
    width: 100%;
    padding: 16px;
    padding-top: 24px;
    padding-bottom: 8px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition-smooth);
}

[data-theme="light"] .form-group.floating input,
[data-theme="light"] .form-group.floating textarea {
    background: rgba(255, 255, 255, 0.6);
}

.form-group.floating input:focus,
.form-group.floating textarea:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.25);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-group.floating label {
    position: absolute;
    left: 16px;
    top: 16px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 400;
    pointer-events: none;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Floating Label Animation Magic */
.form-group.floating input:focus ~ label,
.form-group.floating input:not(:placeholder-shown) ~ label,
.form-group.floating textarea:focus ~ label,
.form-group.floating textarea:not(:placeholder-shown) ~ label {
    top: 6px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    transform: translateY(0);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
}

[data-theme="light"] .color-text-input {
    background: rgba(255, 255, 255, 0.6) !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 28px;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--border-color-hover);
}

[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

.btn-sandbox {
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.btn-sandbox:hover {
    background: rgba(6, 182, 212, 0.22);
    border-color: rgba(6, 182, 212, 0.4);
}

.btn-link {
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    padding: 10px;
    text-decoration: none;
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--border-radius-sm);
}

/* Universal Theme Toggle Utility */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 18px;
    transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="light"] .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* Light theme / Dark theme icon toggling */
[data-theme="dark"] .light-icon { display: none; }
[data-theme="light"] .dark-icon { display: none; }

.login-theme-toggle {
    margin: 25px auto 0;
    display: flex;
}

/* --------------------------------------------------------------------------
   7. Registration Details View
   -------------------------------------------------------------------------- */
#view-register {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

#view-register.active {
    display: flex;
}

.register-card-container {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    max-width: 680px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.user-avatar-badge {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.user-avatar-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.register-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.register-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Profile Selector Cards */
.profile-select-container {
    margin-bottom: 25px;
    text-align: left;
}

.profile-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.profile-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.profile-card {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    user-select: none;
}

[data-theme="light"] .profile-card {
    background: rgba(255, 255, 255, 0.5);
}

.profile-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.profile-icon {
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 10px;
    transition: var(--transition-smooth);
}

.profile-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
    color: var(--text-main);
}

.profile-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Profile Active State */
.profile-card.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px var(--primary-glow);
    transform: scale(1.03);
}

.profile-card.active .profile-icon {
    color: var(--primary);
    transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   8. Status Views (Pending Email, Pending Admin)
   -------------------------------------------------------------------------- */
#view-pending-email, #view-pending-admin {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#view-pending-email.active, #view-pending-admin.active {
    display: flex;
}

.status-card-container {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 50px 40px;
    max-width: 550px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.status-icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    margin-bottom: 10px;
}

.info-glow {
    background: rgba(6, 182, 212, 0.12);
    color: var(--info);
    border: 2px solid rgba(6, 182, 212, 0.25);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
}

.warning-glow {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
    border: 2px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

/* Animations for Status Badges */
.animated-mail {
    animation: letterFlap 3s infinite ease-in-out;
}

@keyframes letterFlap {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
}

.animated-sandglass {
    animation: spinSandglass 4s infinite ease-in-out;
}

@keyframes spinSandglass {
    0%, 100% { transform: rotate(0deg); }
    40%, 60% { transform: rotate(180deg); }
}

.status-card-container h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: -5px;
}

.status-card-container p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.status-instruction {
    font-size: 14px;
    opacity: 0.8;
}

.status-details-box {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: var(--border-radius-md);
    padding: 18px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    margin-top: 10px;
}

.status-details-box i {
    font-size: 18px;
    color: var(--warning);
    margin-top: 2px;
}

.sandbox-debug-action {
    background: rgba(6, 182, 212, 0.04);
    border: 1px dashed rgba(6, 182, 212, 0.25);
    border-radius: var(--border-radius-md);
    padding: 20px;
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 10px 0;
}

.debug-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--info);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sandbox-debug-action p {
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
    margin: 0;
}

/* --------------------------------------------------------------------------
   9. Main Dashboard Shell (Sidebar + Main Grid)
   -------------------------------------------------------------------------- */
#view-dashboard {
    min-height: 100vh;
    width: 100%;
    display: none;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    transition: var(--transition-smooth);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    padding: 0 10px 30px;
}

.brand-icon {
    font-size: 24px;
    color: var(--primary);
}

.user-sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 12px;
    margin-bottom: 30px;
}

[data-theme="light"] .user-sidebar-profile {
    background: rgba(0, 0, 0, 0.02);
}

.user-sidebar-profile .user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.user-sidebar-profile .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-sidebar-profile .user-info {
    flex-grow: 1;
    min-width: 0;
}

.user-sidebar-profile .user-info h4 {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Sidebar Menu navigation */
.sidebar-menu {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
    margin-bottom: 8px;
    padding-left: 10px;
    opacity: 0.7;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--border-radius-md);
    transition: var(--transition-smooth);
}

.menu-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    transition: var(--transition-smooth);
}

.menu-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .menu-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.menu-item.active {
    color: white !important;
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.menu-item.active i {
    color: white;
}

.menu-item.active:hover,
.menu-item.active:hover i {
    color: #0f172a !important;
}

.menu-item-admin {
    border: 1px solid rgba(245, 158, 11, 0.15);
    background: rgba(245, 158, 11, 0.02);
    color: var(--warning);
}

.menu-item-admin:hover {
    background: rgba(245, 158, 11, 0.08);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.3);
}

.menu-item-admin.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white !important;
    box-shadow: 0 4px 12px var(--warning-glow);
    border-color: transparent;
}

.menu-item-admin.active:hover,
.menu-item-admin.active:hover i {
    color: #0f172a !important;
}

/* Sidebar Footer elements */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer .theme-toggle-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 0 14px;
    gap: 12px;
}

.sidebar-footer .theme-text {
    font-size: 14px;
    font-weight: 500;
}

.btn-logout-sidebar {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--danger);
    font-family: inherit;
    font-weight: 500;
    font-size: 14px;
    padding: 12px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.btn-logout-sidebar:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--danger);
}

/* Main Content Panel */
.dashboard-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.dashboard-header {
    height: 90px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-sidebar);
    flex-shrink: 0;
}

.header-left h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.header-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

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

.user-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 182, 212, 0.1);
    color: var(--info);
    border: 1px solid rgba(6, 182, 212, 0.2);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
    background: var(--bg-app);
}

/* Dashboard Virtual Pages container */
.dashboard-sub-view {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.dashboard-sub-view.active {
    display: block;
}

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

/* --------------------------------------------------------------------------
   10. Dashboard Cards, Statistics & Grids
   -------------------------------------------------------------------------- */
/* Universal Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* Stats grid system */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition-bounce);
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.blue-glow { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.cyan-glow { background: rgba(6, 182, 212, 0.1); color: var(--info); }
.green-glow { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.violet-glow { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   11. Sub-view Specific Styles (Giorgio, Blog, Agentic, Admin)
   -------------------------------------------------------------------------- */
/* --- Section GIORGIO --- */
.giorgio-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* --- Giorgio AI Full Form and Results --- */
.giorgio-form-card, .giorgio-result-card {
    transition: all 0.3s ease;
}

.form-row-giorgio {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row-giorgio .form-group-giorgio {
    flex: 1;
    margin-bottom: 0;
}

.form-group-giorgio {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-giorgio label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.85;
}

.form-control-giorgio {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-color);
    font-size: 14px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control-giorgio:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-control-giorgio:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.15);
}

.input-with-tooltip-giorgio {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-tooltip-giorgio .form-control-giorgio {
    padding-right: 40px;
}

.tooltip-icon-giorgio {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
    font-size: 16px;
    cursor: help;
    transition: color 0.2s ease;
}

.tooltip-icon-giorgio:hover {
    color: var(--primary);
}

.form-section-title-giorgio {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    color: var(--primary);
    margin-top: 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
}

.form-section-title-giorgio i {
    color: var(--text-muted);
    font-size: 13px;
    cursor: help;
}

.url-inputs-giorgio {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.url-input-wrapper-giorgio {
    display: flex;
    align-items: center;
    position: relative;
}

.url-badge-giorgio {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.12);
    border: 1px solid rgba(79, 70, 229, 0.25);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    position: absolute;
    left: 10px;
    z-index: 2;
}

.url-input-wrapper-giorgio .form-control-giorgio {
    padding-left: 48px;
}

.file-uploads-giorgio {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.file-upload-box-giorgio {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1.5px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.file-upload-box-giorgio:hover {
    background: rgba(79, 70, 229, 0.03);
    border-color: var(--primary);
}

.file-upload-box-giorgio.file-selected {
    background: rgba(16, 185, 129, 0.03);
    border-color: var(--success);
    border-style: solid;
}

.file-box-icon-giorgio {
    font-size: 24px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.file-upload-box-giorgio:hover .file-box-icon-giorgio {
    color: var(--primary);
}

.file-upload-box-giorgio.file-selected .file-box-icon-giorgio {
    color: var(--success);
}

.file-box-label-giorgio {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}

.file-input-hidden-giorgio {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.textarea-giorgio {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.btn-giorgio-submit {
    width: 100%;
    margin-top: 24px;
    padding: 14px 24px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--border-radius-md);
    color: white;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.25);
    transition: all 0.3s ease;
}

.btn-giorgio-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(79, 70, 229, 0.4);
}

.btn-giorgio-submit:active {
    transform: translateY(0);
}

/* --- Results Panel --- */
.result-body-giorgio {
    position: relative;
    min-height: 380px;
}

.giorgio-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
    padding: 24px;
    transition: all 0.3s ease;
}

.spinner-giorgio {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(79, 70, 229, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.giorgio-loading-overlay h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}

.giorgio-loading-overlay p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 280px;
    margin: 0;
    line-height: 1.5;
}

.giorgio-result-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    gap: 20px;
}

.empty-icon-wrapper-giorgio {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: rgba(79, 70, 229, 0.08);
    border: 1px dashed rgba(79, 70, 229, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--primary);
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.05);
}

.giorgio-result-empty h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.giorgio-result-empty p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 320px;
    margin: 0;
    line-height: 1.6;
}

.giorgio-result-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.4s ease;
}

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

.result-group-header-giorgio {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-group-header-giorgio label {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-copy-giorgio {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-copy-giorgio:hover {
    background: rgba(79, 70, 229, 0.08);
    border-color: var(--primary);
    color: var(--primary);
}

.result-input-giorgio {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
    font-weight: 600;
}

.result-textarea-giorgio {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
    font-family: inherit;
    line-height: 1.6;
    font-size: 13.5px;
    resize: none;
}

/* Tooltip copy confirmation styles */
.btn-copy-giorgio.copied {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: var(--success) !important;
    color: var(--success) !important;
}

/* --- Giorgio Tabs Switcher --- */
.giorgio-tabs-container {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: fit-content;
}

.giorgio-tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-md);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.giorgio-tab-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.04);
}

.giorgio-tab-btn.active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

/* --- Giorgio Tab Content Switcher --- */
.giorgio-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.giorgio-tab-content.active {
    display: block;
}

/* --- Dynamic Giorgio URLs Builder --- */
.giorgio-url-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.giorgio-url-input-group .form-control-giorgio {
    flex: 1;
}

.btn-giorgio-add-url {
    background: rgba(79, 70, 229, 0.12);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: var(--primary-light);
    padding: 10px 18px;
    border-radius: var(--border-radius-md);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.btn-giorgio-add-url:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 12px rgba(79, 70, 229, 0.4);
}

.giorgio-url-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    min-height: 20px;
}

.giorgio-url-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.giorgio-url-tag span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 250px;
}

.giorgio-url-tag:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.giorgio-url-tag .btn-remove-url {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 10px;
    line-height: 1;
}

/* --- Giorgio Glassmorphic Details Modal --- */
.giorgio-modal-card {
    max-width: 900px !important;
    width: 90% !important;
}

.giorgio-modal-body {
    padding: 20px 0 !important;
}

.giorgio-modal-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 25px;
}

@media (max-width: 768px) {
    .giorgio-modal-layout {
        grid-template-columns: 1fr;
    }
}

.giorgio-modal-pane {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--border-radius-lg);
    padding: 20px;
}

.giorgio-modal-pane h4 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 10px;
}

.modal-detail-group {
    margin-bottom: 15px;
}

.modal-detail-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 6px;
}

.detail-value {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    color: var(--text-color);
    font-size: 13.5px;
    word-break: break-all;
}

.modal-detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    min-height: 38px;
    align-items: center;
}

.detail-tag-badge {
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.2);
    color: var(--primary-light);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.detail-file-badge {
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: #00f2fe;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.no-data-tag {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.detail-textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 12px;
    border-radius: var(--border-radius-md);
    color: var(--text-color);
    font-size: 13px;
    max-height: 120px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.5;
}

/* History row action btn */
.btn-detail-history {
    padding: 6px 12px;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: #00f2fe;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-detail-history:hover {
    background: #00f2fe;
    color: #0e1118;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

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

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

/* Custom premium responsive tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.custom-table th {
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

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

.custom-table tbody tr {
    transition: var(--transition-smooth);
}

.custom-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.015);
}

[data-theme="light"] .custom-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.01);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
}

.status-indicator.success { color: var(--success); }
.status-indicator.pending { color: var(--warning); }
.status-indicator.danger { color: var(--danger); }

/* --- Section AGENTIC --- */
.agentic-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 24px;
    align-items: flex-start;
}

.create-agent-card {
    background: var(--bg-card);
}

.create-agent-card .modern-form textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* --- Section BLOG --- */
.blog-welcome-banner {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(6, 182, 212, 0.15));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.blog-welcome-banner h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.blog-welcome-banner p {
    color: var(--text-muted);
    font-size: 14px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition-bounce);
}

.blog-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.blog-img {
    height: 180px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-img img {
    transform: scale(1.06);
}

.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    transition: var(--transition-smooth);
}

.blog-card:hover .blog-body h3 {
    color: var(--primary);
}

.blog-body p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.8;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

/* --- Section ADMIN PANEL --- */
.admin-grid-top {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 24px;
}

.admin-users-card {
    margin-bottom: 0;
}

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

.admin-user-cell img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.admin-user-details {
    display: flex;
    flex-direction: column;
}

.admin-user-name {
    font-weight: 600;
    font-size: 14px;
}

.admin-user-email {
    font-size: 11px;
    color: var(--text-muted);
}

.badge-status {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

.badge-status.pending_registration { background: rgba(156, 163, 175, 0.1); color: #9ca3af; }
.badge-status.pending_email_verification { background: rgba(6, 182, 212, 0.1); color: var(--info); }
.badge-status.pending_admin_approval { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-status.active { background: rgba(16, 185, 129, 0.1); color: var(--success); }

/* Mail logs list */
.mails-log-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 15px;
}

.logged-mails-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.logged-mails-list li {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 12px;
    transition: var(--transition-smooth);
}

[data-theme="light"] .logged-mails-list li {
    background: rgba(0, 0, 0, 0.01);
}

.logged-mails-list li:hover {
    border-color: var(--info);
    background: rgba(6, 182, 212, 0.02);
}

.mail-item-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    width: 100%;
}

.mail-item-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mail-item-email {
    font-weight: 600;
    color: var(--text-main);
}

.mail-item-time {
    font-size: 11px;
    color: var(--text-muted);
}

.mail-item-icon {
    font-size: 16px;
    color: var(--info);
}

/* Action button configurations */
.actions-cell {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-icon-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}
.btn-icon-success:hover {
    background: var(--success);
    color: white;
}

.btn-icon-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}
.btn-icon-warning:hover {
    background: var(--warning);
    color: white;
}

.btn-icon-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}
.btn-icon-danger:hover {
    background: var(--danger);
    color: white;
}

/* --------------------------------------------------------------------------
   12. Notification Engine (Toasts)
   -------------------------------------------------------------------------- */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    color: white;
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    min-width: 300px;
    max-width: 400px;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastFadeOut 0.3s ease-out 4.7s forwards;
}

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

@keyframes toastFadeOut {
    to { opacity: 0; transform: translateY(-10px); visibility: hidden; }
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--info); }
.toast-warning { border-left: 4px solid var(--warning); }

.toast-icon-success { color: var(--success); }
.toast-icon-error { color: var(--danger); }
.toast-icon-info { color: var(--info); }
.toast-icon-warning { color: var(--warning); }

/* --------------------------------------------------------------------------
   13. Responsive Adaptability Rules
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .giorgio-grid, .admin-grid-top, .agentic-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-mails-card {
        margin-top: 24px;
    }
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #view-dashboard.active {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
    }
    
    .sidebar-brand {
        padding-bottom: 15px;
    }
    
    .user-sidebar-profile {
        margin-bottom: 15px;
    }
    
    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .sidebar-footer {
        flex-direction: row;
        margin-top: 15px;
        padding-top: 15px;
    }
    
    .dashboard-main {
        height: auto;
        overflow: visible;
    }
    
    .dashboard-header {
        padding: 20px;
        height: auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .dashboard-content {
        padding: 20px;
        overflow-y: visible;
    }
}

@media (max-width: 768px) {
    .profile-options-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card-container, .register-card-container, .status-card-container {
        padding: 30px 20px;
    }
}

/* ==========================================================================
   14. Agentic RAG Workspace Premium Styling
   ========================================================================== */

.rag-tabs-container {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.02);
    padding: 6px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

[data-theme="light"] .rag-tabs-container {
    background: rgba(0, 0, 0, 0.02);
}

.rag-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.rag-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .rag-tab-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.rag-tab-btn.active {
    color: #ffffff;
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Tab Content Transitions */
.rag-tab-content {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.rag-tab-content.active {
    display: block;
}

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

/* Ingestion Grid & Sources */
.rag-sources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 992px) {
    .rag-sources-grid {
        grid-template-columns: 1fr;
    }
}

.source-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-bounce);
}

.source-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    border-color: var(--primary);
}

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

.source-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.drive-color { background: linear-gradient(135deg, #4285f4, #34a853); }
.s3-color { background: linear-gradient(135deg, #ff9900, #ffb300); }
.rss-color { background: linear-gradient(135deg, #f26522, #ff5500); }
.db-color { background: linear-gradient(135deg, #009688, #00bcd4); }

.source-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.source-info-note {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

[data-theme="light"] .source-info-note {
    background: rgba(0, 0, 0, 0.02);
}

.source-info-note.success {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.source-info-note.success i {
    color: var(--success);
}

.blog-feeds-manager {
    display: flex;
    flex-direction: column;
}

.feed-list-container {
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 8px;
    border: 1px solid var(--border-color);
}

[data-theme="light"] .feed-list-container {
    background: rgba(255, 255, 255, 0.5);
}

.simple-feed-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.simple-feed-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 12px;
}

[data-theme="light"] .simple-feed-list li {
    background: rgba(0, 0, 0, 0.01);
}

.simple-feed-list li span.feed-label {
    font-weight: 600;
    color: var(--text-main);
}

.simple-feed-list li span.feed-url {
    color: var(--text-muted);
    margin-left: 8px;
    font-size: 11px;
    word-break: break-all;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-remove-feed {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.btn-remove-feed:hover {
    background: rgba(239, 68, 68, 0.15);
}

.empty-list-placeholder {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 10px 0;
    width: 100%;
}

/* Orchestration Console CSS */
.sync-orchestration-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 25px;
}

.orchestration-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.sync-status-console {
    margin-top: 20px;
    background: #020617;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.console-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0f172a;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: 'Fira Code', monospace, Courier;
    font-size: 12px;
    color: var(--text-muted);
}

.status-indicator-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.status-indicator-dot.processing::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--warning);
    border-radius: 50%;
    animation: pulseGlow 1.5s infinite ease-in-out;
}

.status-indicator-dot.completed::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.console-output {
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #e2e8f0;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Rich console color highlight tags */
.console-row { margin-bottom: 4px; }
.console-row.info { color: #38bdf8; }
.console-row.success { color: #4ade80; }
.console-row.warning { color: #fbbf24; }
.console-row.error { color: #f87171; }

/* Table styling for knowledge base */
.document-index-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 25px;
}

.table-loader-row {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
    font-size: 15px;
}

.table-loader-row i {
    font-size: 20px;
    margin-bottom: 8px;
}

/* Agent Config Layout */
.agent-config-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 25px;
}

@media (max-width: 992px) {
    .agent-config-layout {
        grid-template-columns: 1fr;
    }
}

.secure-token-container {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 15px;
    margin: 20px 0;
}

[data-theme="light"] .secure-token-container {
    background: rgba(255, 255, 255, 0.4);
}

.token-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.security-lock {
    color: var(--success);
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.token-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
    border: 1px solid var(--border-color);
}

[data-theme="light"] .token-box {
    background: rgba(0, 0, 0, 0.05);
}

.token-box code {
    flex: 1;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: var(--text-main);
    word-break: break-all;
    user-select: all;
}

.code-copier-container {
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin-top: 15px;
}

.code-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #0e1422;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.code-box {
    padding: 15px;
    margin: 0;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    line-height: 1.6;
    color: #a5b4fc;
    text-align: left;
}

/* Chat Simulator Layout */
.rag-chat-simulator-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 25px;
    min-height: 550px;
}

@media (max-width: 992px) {
    .rag-chat-simulator-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
}

.chat-simulator-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.simulator-avatar-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.simulator-conversation {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 300px;
    max-height: 400px;
}

[data-theme="light"] .simulator-conversation {
    background: rgba(255, 255, 255, 0.3);
}

.chat-bubble {
    display: flex;
    gap: 12px;
    max-width: 80%;
    animation: slideUpFade 0.3s ease;
}

.chat-bubble.assistant {
    align-self: flex-start;
}

.chat-bubble.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.bubble-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.chat-bubble.assistant .bubble-avatar {
    background: var(--primary-gradient);
}

.chat-bubble.user .bubble-avatar {
    background: #475569;
}

.bubble-text {
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    color: var(--text-main);
}

.chat-bubble.assistant .bubble-text {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-top-left-radius: 0;
}

[data-theme="light"] .chat-bubble.assistant .bubble-text {
    background: var(--bg-card);
}

.chat-bubble.user .bubble-text {
    background: var(--primary);
    color: white;
    border-top-right-radius: 0;
}

.bubble-text p {
    margin: 0;
}

.bubble-text p + p {
    margin-top: 8px;
}

.simulator-input-form {
    display: flex;
    gap: 10px;
}

.simulator-input-form input {
    flex: 1;
    height: 48px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    padding: 0 16px;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.simulator-input-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Chat Sources Inspector */
.chat-sources-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.source-inspector-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
    flex: 1;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.01);
}

.source-inspector-placeholder i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 12px;
}

.source-inspector-placeholder p {
    font-size: 13px;
    line-height: 1.5;
    max-width: 250px;
}

.realtime-sources-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
}

.inspector-source-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 12px;
    transition: var(--transition-smooth);
    text-align: left;
}

[data-theme="light"] .inspector-source-card {
    background: rgba(0, 0, 0, 0.01);
}

.inspector-source-card:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.04);
}

.inspector-source-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.inspector-source-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.similarity-score-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.similarity-score-badge.high {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.similarity-score-badge.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.inspector-source-body {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.1);
    padding: 8px;
    border-radius: 6px;
    max-height: 80px;
    overflow-y: auto;
    font-family: inherit;
}

[data-theme="light"] .inspector-source-body {
    background: rgba(255, 255, 255, 0.5);
}

/* Typing Indicator Animation */
.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ==========================================================================
   MULTI-DOMAIN SELECTOR & MODAL OVERLAY STYLES
   ========================================================================== */
.domain-selector-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
}

.domain-selector-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.domain-info-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.domain-icon-glow {
    width: 48px;
    height: 48px;
    background: var(--primary-glow);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    box-shadow: 0 0 15px var(--primary-glow);
}

.domain-selector-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.custom-select-wrapper {
    position: relative;
    min-width: 220px;
}

.custom-select {
    width: 100%;
    height: 44px;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    padding: 0 35px 0 15px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: var(--transition-smooth);
}

.custom-select:hover, .custom-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.select-caret {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 12px;
}

/* Modal Overlay container */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 12, 20, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

/* Modal Card */
.modal-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    animation: modalReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    overflow: hidden;
}

[data-theme="light"] .modal-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
}

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

.modal-body {
    padding: 24px;
}

.btn-danger-outline:hover {
    background: var(--danger) !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px var(--danger-glow);
}

@keyframes modalReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Google Drive File List Toggle Styles */
.drive-sync-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.2s ease;
}

[data-theme="light"] .drive-sync-file-item {
    background: rgba(0, 0, 0, 0.01);
}

.drive-sync-file-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(2px);
}

[data-theme="light"] .drive-sync-file-item:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.15);
}

.switch-container {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    margin: 0;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    transition: .3s;
    border-radius: 20px;
}

[data-theme="light"] .slider-round {
    background-color: rgba(0, 0, 0, 0.08);
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .3s;
    border-radius: 50%;
}

.switch-container input:checked + .slider-round {
    background-color: rgba(16, 185, 129, 0.15);
    border-color: var(--success);
}

.switch-container input:checked + .slider-round:before {
    transform: translateX(18px);
    background-color: var(--success);
}

/* Red status style if sync is disabled */
.switch-container input:not(:checked) + .slider-round {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
}

.switch-container input:not(:checked) + .slider-round:before {
    background-color: var(--danger);
}

/* --- Default Onboarding Limits Form Premium Styling --- */
.admin-settings-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
}

.profile-limit-col {
    background: rgba(255, 255, 255, 0.015) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    padding: 24px !important;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.profile-limit-col:hover {
    transform: translateY(-4px);
    border-color: var(--primary-glow) !important;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.06);
}

.profile-limit-col h4 {
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-bottom: 12px;
}

.profile-limit-col .form-group {
    margin-bottom: 16px !important;
}

.profile-limit-col label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.profile-limit-col label i {
    font-size: 0.9rem;
    color: var(--primary);
}

/* Beautiful custom input */
.profile-limit-col .custom-input {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    color: var(--text-main) !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    width: 100%;
}

.profile-limit-col .custom-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
    background: rgba(0, 0, 0, 0.3) !important;
    outline: none;
}

/* Base Badge */
.profile-limit-col h4 .badge-info {
    background: rgba(99, 102, 241, 0.08) !important;
    color: #818cf8 !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

/* Intermedio Badge */
.profile-limit-col h4 .badge-warning {
    background: rgba(245, 158, 11, 0.08) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

/* Avanzato Badge */
.profile-limit-col h4 .badge-success {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

/* --- Onboarding Profile Cards Premium Styling --- */
.profile-card {
    min-height: 250px;
    justify-content: flex-start;
}

.profile-price {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: var(--text-main);
    margin: 8px 0 12px 0;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.profile-features {
    width: 100%;
    margin-top: 10px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 10px !important;
}

.profile-features li {
    font-size: 11px !important;
    line-height: 1.6;
    margin-bottom: 4px;
}


