.sidebar {
    width: 270px;
    min-width: 270px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    overflow: hidden;
    position: relative;
    background-image: radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.03) 0%, transparent 40%);
}

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); position: fixed; inset: 0 auto 0 0; box-shadow: 20px 0 50px rgba(0,0,0,0.4); }
    .sidebar.mobile-open { transform: translateX(0); }
}

/* -- BRAND LOGO & ROLE -- */
.sidebar-brand {
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.brand-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

.brand-name {
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    display: block;
}

.role-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 0;
    margin-top: 2px;
    border-left: 2px solid transparent;
    padding-left: 6px;
}

/* -- NAVIGATION SCROLL AREA -- */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Space between sections */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.05) transparent;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0 12px 8px;
    opacity: 0.7;
}

/* -- NAV ITEMS -- */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item svg {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.1) 0%, rgba(124, 58, 237, 0.02) 100%);
    color: #a78bfa;
    font-weight: 600;
    border-left: 3px solid #7c3aed;
    border-radius: 4px 10px 10px 4px;
}

.nav-item.active svg {
    color: #a78bfa;
    transform: scale(1.1);
}

/* -- GROUP LOGIC -- */
.nav-group { margin-bottom: 2px; }
.nav-group-header {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; background: transparent; border: none; padding: 10px 12px;
    cursor: pointer; cursor: pointer; color: var(--text-secondary);
    font-size: 0.8rem; font-weight: 600; border-radius: 8px;
}

.nav-group-header:hover { background: rgba(255, 255, 255, 0.03); }
.nav-group-header.has-active { color: #a78bfa; background: rgba(124, 58, 237, 0.03); }

.nav-group-items {
    padding-left: 1rem;
    margin-left: 1.1rem;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 4px;
}

.nav-group-items .nav-item { font-size: 0.82rem; padding: 8px 12px; }

/* -- FOOTER -- */
.sidebar-bottom {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
}

.sender-relay {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding: 6px 10px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.06);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

.mobile-close {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .mobile-close { display: flex; }
}
.credit-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

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

.credit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
}

.credit-info {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.credit-val {
    font-size: 0.85rem;
    font-weight: 800;
}

.credit-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.credit-badge.healthy {
    border-color: rgba(59, 130, 246, 0.3);
}

.credit-badge.warning {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.05);
}

.credit-badge.warning .credit-val { color: #f59e0b; }

.credit-badge.critical {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
    animation: pulse-red 2s infinite;
}

.credit-badge.critical .credit-val { color: #ef4444; }

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.header {
    height: 66px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 800;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.product-switcher {
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
}

.product-tab {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.product-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.product-tab.active {
    color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0 0.75rem;
    width: 100%;
    font-size: 0.85rem;
    outline: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 12px;
    transition: background-color 0.2s;
}

.user-profile:hover {
    background-color: var(--bg-hover);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--text-primary);
}

.icon-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--primary);
    color: white;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
    }

    .header-actions {
        gap: 0.75rem;
    }

    .user-name {
        display: none;
    }
}
.ai-assistant-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px -5px rgba(59, 130, 246, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-assistant-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px -5px rgba(59, 130, 246, 0.6);
}

.ai-assistant-trigger.active {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.trigger-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sparkle-icon {
    animation: sparkle-float 3s ease-in-out infinite;
}

@keyframes sparkle-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.ai-assistant-trigger .badge {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid var(--bg-card);
}

.ai-assistant-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

.ai-header {
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-theme='dark'] .ai-header {
    background: rgba(15, 23, 42, 0.8);
}

.ai-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.ai-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.model-selector {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    color: var(--text-secondary);
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.model-selector:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: #10b981;
    font-weight: 700;
    text-transform: uppercase;
}

.status-indicator {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

.ai-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message-wrapper {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

.message-wrapper.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    border: 1px solid var(--border-color);
}

.user .message-avatar {
    background: var(--primary);
    color: white;
}

.message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

.user .message-content {
    background: var(--primary);
    color: white;
    border: none;
    border-bottom-right-radius: 4px;
}

.assistant .message-content {
    border-bottom-left-radius: 4px;
}

.ai-suggestions {
    padding: 0 1.5rem 1rem;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-suggestions button {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-suggestions button:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.ai-input-area {
    padding: 1.5rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.ai-input-area input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
}

.send-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    align-items: center;
}

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

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

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@media (max-width: 480px) {
    .ai-assistant-window {
        width: calc(100vw - 40px);
        height: 80vh;
        bottom: 90px;
        right: 20px;
    }
}.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    gap: 10px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.ui-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ui-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 8px 24px rgba(147, 51, 234, 0.4);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary:hover:not(:disabled)::after {
    opacity: 1;
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-danger {
    background: rgba(2ef, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

/* Base button sizes */
.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-md {
    padding: 10px 20px;
    font-size: 0.95rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.05rem;
    border-radius: 10px;
}

.btn-full {
    width: 100%;
}
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

.layout-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.layout-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    animation: fadeIn 0.3s ease;
}

@media (max-width: 768px) {
    .layout-content {
        padding: 1rem;
    }
}
.monetization-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    margin-bottom: 2rem;
    animation: slideUp 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.monetization-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.monetization-banner.high {
    border-color: rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(139, 92, 246, 0.05));
}

.monetization-banner.high::before {
    background: #ef4444;
}

.banner-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

.banner-icon {
    width: 44px;
    height: 44px;
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.banner-text h4 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.banner-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.banner-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-upgrade {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Credit Low Alert */
.monetization-alert {
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.monetization-alert.high {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.alert-title {
    font-weight: 700;
    font-size: 0.8rem;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.monetization-alert.high .alert-title {
    color: #ef4444;
}

.alert-msg {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-topup-sm {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

/* Feature Teaser Card */
.feature-teaser-card {
    background: linear-gradient(to bottom right, var(--bg-surface), rgba(139, 92, 246, 0.05));
    border: 2px dashed rgba(139, 92, 246, 0.2);
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.teaser-badge {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 1rem;
}

.feature-teaser-card h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.feature-teaser-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Retention Modal */
.retention-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.retention-modal {
    background: #121216;
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    padding: 2.5rem;
    position: relative;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.retention-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.retention-icon {
    width: 80px;
    height: 80px;
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.retention-modal h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #9ca3af);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.retention-modal p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.offer-box {
    background: rgba(16, 185, 129, 0.05);
    border: 1px dashed #10b981;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.offer-title {
    color: #10b981;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.offer-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.offer-timer {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
}

.offer-timer span {
    color: #ef4444;
}

.retention-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-stay {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-stay:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}

.btn-skip {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
}/* ---------------------------------------------------------------
   DREAM REFLECTION SOFTWARE � Global Design System
   index.css  �  DO NOT import Google Fonts here (handled in HTML)
   --------------------------------------------------------------- */

/* -- Design Tokens (CSS Variables) ------------------------------- */
:root {
  /* Brand palette */
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --secondary: #2563eb;
  --accent: #06b6d4;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-pink: #ec4899;

  /* Aliases used across old code */
  --primary-blue: #2563eb;
  --primary-purple: #9333ea;
  --primary-color: #7c3aed;
  --primary-glow: rgba(124, 58, 237, 0.45);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  --gradient-brand: linear-gradient(135deg, #2563eb, #7c3aed, #06b6d4);
  --gradient-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);

  /* -- Background surfaces -- */
  --bg-base: #030305;
  --bg-page: #030305;
  /* alias for components */
  --bg-surface: #0a0a0f;
  --bg-surface-elevated: #12121a;
  --bg-card: #12121a;
  /* alias for cards */
  --bg-hover: #1a1a28;
  --bg-glass: rgba(10, 10, 15, 0.70);
  --bg-glass-light: rgba(255, 255, 255, 0.03);

  /* -- Text -- */
  --text-primary: #ffffff;
  --text-secondary: #c4c4cc;
  --text-muted: #71717a;
  --text-subtle: #52525b;

  /* -- Borders -- */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(124, 58, 237, 0.30);

  /* -- Shadows -- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-neon: 0 0 20px rgba(124, 58, 237, 0.15);

  /* -- Radius -- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* -- Transitions -- */
  --transition-fast: all 0.1s ease;
  --transition-normal: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* -- Reset ------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* -- Scrollbar ---------------------------------------------------- */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* -- Base HTML ---------------------------------------------------- */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  /* Hardware acceleration for smooth scrolling */
  -webkit-overflow-scrolling: touch;
  /* Subtle ambient gradients */
  background-image:
    radial-gradient(ellipse 60% 50% at 15% 50%, rgba(37, 99, 235, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 85% 30%, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
  background-attachment: fixed;
}

/* -- Typography --------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

p {
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

/* -- Selection ---------------------------------------------------- */
::selection {
  background: rgba(124, 58, 237, 0.35);
  color: #fff;
}

/* -- Focus visible ------------------------------------------------ */
:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.6);
  outline-offset: 2px;
}

/* -- Utility: text colors ----------------------------------------- */
.text-primary {
  color: var(--text-primary) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-purple {
  color: var(--primary-light) !important;
}

.text-blue {
  color: var(--secondary) !important;
}

.text-green {
  color: var(--accent-green) !important;
}

.text-amber {
  color: var(--accent-amber) !important;
}

.text-red {
  color: var(--accent-red) !important;
}

.text-pink {
  color: var(--accent-pink) !important;
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-center {
  text-align: center;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

/* -- Utility: spacing --------------------------------------------- */
.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mr-1 {
  margin-right: 0.25rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.pt-4 {
  padding-top: 1rem;
}

.pt-8 {
  padding-top: 2rem;
}

.p-0 {
  padding: 0 !important;
}

/* -- Utility: layout ---------------------------------------------- */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.w-full {
  width: 100%;
}

.d-block {
  display: block;
}

/* -- Glass card --------------------------------------------------- */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  /* Optimization: Disable blur on low-end mobile if needed, but for now hardware accelerate */
  transform: translateZ(0);
  will-change: transform;
}

/* -- Interactive Polish -- */
.interactive-lift {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.interactive-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(124, 58, 237, 0.1);
}

.glow-on-hover {
  position: relative;
  overflow: hidden;
}

.glow-on-hover::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.glow-on-hover:hover::after {
  opacity: 1;
}

/* -- Gradient text ------------------------------------------------ */
.text-gradient {
  background: var(--gradient-brand);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* -- Animations --------------------------------------------------- */
.fadeIn {
  animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slideUp {
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slideDown {
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.scaleIn {
  animation: scaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95)
  }

  to {
    opacity: 1;
    transform: scale(1)
  }
}

/* -- App Container ------------------------------------------------ */
.app-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* -- Shared input style ------------------------------------------- */
.premium-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.premium-input:focus {
  border-color: var(--primary);
}

.premium-input::placeholder {
  color: var(--text-muted);
}

/* -- Shared spinner ----------------------------------------------- */
.spinner,
.spinner-large {
  border-radius: 50%;
  border: 3px solid rgba(124, 58, 237, 0.18);
  border-top-color: var(--primary);
  animation: spin 0.7s linear infinite;
}

.spinner {
  width: 28px;
  height: 28px;
}

.spinner-large {
  width: 52px;
  height: 52px;
  border-width: 4px;
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

/* -- Modal overlay ------------------------------------------------ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 1rem;
}

.modal-content {
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.modal-header h2 {
  font-size: 1.15rem;
  margin: 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* -- Status badges ------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-green {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-blue {
  background: rgba(37, 99, 235, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-purple {
  background: rgba(124, 58, 237, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-red {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* -- Page titles -------------------------------------------------- */
.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
}

.page-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* -- Table utilities ---------------------------------------------- */
.table-responsive {
  overflow-x: auto;
}

/* -- Field shared styles for HRMS -------------------------------- */
.icon-btn-small {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-btn-small:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* -- Responsive helpers ------------------------------------------- */
@media (max-width: 1024px) {

  .dashboard-grid,
  .features-grid,
  .policy-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .page-title {
    font-size: 1.3rem;
  }

  .dashboard-stats {
    grid-template-columns: 1fr !important;
  }

  .modal-content {
    padding: 1rem !important;
    margin: 0;
    max-height: 100vh;
    border-radius: 0;
  }

  /* Mobile container padding */
  .layout-content,
  .hrms-dashboard-container,
  .dashboard-container {
    padding: 1rem !important;
  }
}

/* -- Container Containment (Performance) -------------------------- */
.layout-main {
  contain: content;
  content-visibility: auto;
  contain-intrinsic-size: 1px 1000px;
}

/* -- Utilities: Display ------------------------------------------ */
@media (max-width: 768px) {
  .hidden-mobile {
    display: none !important;
  }

  .visible-mobile {
    display: block !important;
  }
}

@media (min-width: 769px) {
  .visible-mobile {
    display: none !important;
  }
}
.notification-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.notification-toast {
    pointer-events: auto;
    min-width: 300px;
    background: rgba(18, 18, 32, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    color: white;
}

.notification-toast.success {
    border-left: 4px solid #10b981;
}

.notification-toast.error {
    border-left: 4px solid #ef4444;
}

.notification-toast.info {
    border-left: 4px solid #8b5cf6;
}

.notification-icon {
    display: flex;
    align-items: center;
}

.notification-toast.success .notification-icon {
    color: #10b981;
}

.notification-toast.error .notification-icon {
    color: #ef4444;
}

.notification-toast.info .notification-icon {
    color: #8b5cf6;
}

.notification-message {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.notification-close:hover {
    color: white;
}

.slideInRight {
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}
