﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Base Colors - Dark Theme (Default) */
    --bg-base: #0f0f23;
    --bg-gradient: linear-gradient(-45deg, #0f0f23, #151530, #1a1a2e, #0f0f23);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --glass-bg: rgba(31, 41, 55, 0.7);
    --glass-border: rgba(75, 85, 99, 0.4);
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: #475569;
    --badge-bg: rgba(255, 255, 255, 0.05);

    /* Constants (Shared) */
    --primary-gradient: linear-gradient(135deg, #4f46e5, #818cf8);
    --accent-gradient: linear-gradient(135deg, #8b5cf6, #ec4899);
    --green-gradient: linear-gradient(135deg, #10b981, #059669);
    --blur-strength: 20px;

    /* Accessibility */
    --focus-ring: 0 0 0 3px rgba(139, 92, 246, 0.5);
    --focus-ring-light: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* ===== ACCESSIBILITY ===== */

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: 8px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* Skip to main content link (for screen readers) */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: #8b5cf6;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --glass-bg: rgba(31, 41, 55, 0.95);
        --glass-border: rgba(75, 85, 99, 0.8);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* --- Animated Background Blobs --- */
.bg-gradient-1,
.bg-gradient-2 {
    position: fixed;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    animation: blobFloat 20s infinite alternate;
}

.bg-gradient-1 {
    top: -10%;
    left: -10%;
    background: var(--accent-gradient);
}

.bg-gradient-2 {
    bottom: -10%;
    right: -10%;
    background: var(--primary-gradient);
    animation-delay: -10s;
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(10vw, 5vh) scale(1.1);
    }

    66% {
        transform: translate(-5vw, 15vh) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

[data-theme="light"] {
    /* Base Colors - Light Theme */
    --bg-base: #f1f5f9;
    --bg-gradient: linear-gradient(-45deg, #f1f5f9, #e2e8f0, #cbd5e1, #f1f5f9);
    --text-primary: #0f172a;
    /* Much darker */
    --text-secondary: #475569;
    /* Much darker */
    --glass-bg: rgba(255, 255, 255, 0.95);
    /* Nearly solid */
    --glass-border: #cbd5e1;
    --input-bg: #ffffff;
    --input-border: #94a3b8;
    --badge-bg: rgba(0, 0, 0, 0.05);

    /* Constant Gradient Overrides for contrast */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
}

body {
    background-color: var(--bg-base);
    background-image: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Background Blurs */
.bg-gradient-1 {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    animation: float 10s infinite alternate;
}

.bg-gradient-2 {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    animation: float 12s infinite alternate-reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 50px);
    }
}

/* Utility */
.container {
    max-width: 1000px;
    /* Tighter container like the reference */
    margin: 0 auto;
    padding: 0 20px;
}

.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-strength)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--blur-strength)) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.glass-effect-sm {
    background: var(--badge-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* Header */
header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: var(--bg-base);
    /* Ensure contrast */
    border-bottom: 1px solid var(--glass-border);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
    /* Branded icon always white */
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.desktop-nav {
    display: none;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
        gap: 30px;
    }
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    font-size: 0.95rem;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.theme-toggle-btn,
.notif-btn,
.lang-btn,
.account-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--badge-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 10px;
    height: 48px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.theme-toggle-btn,
.notif-btn {
    width: 48px;
    position: relative;
    padding: 0;
}

.lang-btn,
.account-btn {
    padding: 0 16px;
    gap: 8px;
}

@media (max-width: 768px) {

    .account-btn span,
    .lang-btn span,
    .logo span {
        display: none;
    }

    .account-btn,
    .lang-btn {
        padding: 0;
        width: 48px;
    }

    .header-actions {
        gap: 8px;
    }
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
}

.notif-btn i,
.account-btn i {
    font-size: 1.1rem;
}

.theme-toggle-btn:hover,
.notif-btn:hover,
.lang-btn:hover,
.account-btn:hover {
    background: var(--glass-border);
    transform: translateY(-1px);
}

/* Notification button now matches other header buttons */

.mobile-only {
    display: block;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
}

.menu-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
.main-content {
    padding-top: 60px;
    padding-bottom: 20px;
    /* Reduced from 60px */
}

.hero-section {
    text-align: center;
    margin-bottom: 40px;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.main-title .highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sub-title {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Email Control Panel */
.email-control-panel {
    padding: 30px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.email-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.input-main-group {
    flex: 2;
    min-width: 400px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#cc-name-input {
    flex: 1.8;
    height: 48px;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    color: var(--text-primary);
    padding: 0 16px;
    font-size: 1rem;
    font-weight: 500;
    min-width: 0;
    outline: none;
    text-align: left;
    border-radius: 8px;
    transition: all 0.3s;
}

#cc-name-input:focus {
    border-color: #6366f1;
}

.at-symbol {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 1.1rem;
    opacity: 0.7;
    margin: 0 8px;
}

.cc-select-wrapper {
    flex: 1.2;
    position: relative;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 8px;
    height: 48px;
    transition: all 0.3s;
}

.cc-select-wrapper:focus-within,
#cc-name-input:focus {
    border-color: #6366f1;
    background: var(--badge-bg);
}

#cc-domain-select {
    appearance: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 100%;
    height: 100%;
    padding: 0 40px 0 16px;
    font-size: 1rem;
    font-weight: 500;
    /* Match username */
    cursor: pointer;
    outline: none;
    font-family: inherit;
}

#cc-domain-select option {
    background-color: var(--bg-base);
    color: var(--text-primary);
    padding: 12px;
}

.inline-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.inline-actions .action-btn {
    padding: 12px 24px;
    height: 48px;
    border-radius: 8px;
}

.new-btn {
    background: #6366f1;
    /* Indigo from reference */
    box-shadow: none;
}

/* Timer Removed */

/* Status Info Bar Dashed */
.status-info-bar-dashed {
    margin-top: 24px;
    padding: 16px;
    border: 2px dashed var(--glass-border);
    border-radius: 8px;
    background: var(--badge-bg);
}

.status-text-dashed {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    user-select: text;
}

/* Merged styles above */

.cc-select-wrapper i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-primary);
    /* Make arrow theme-aware */
    pointer-events: none;
    font-size: 0.8rem;
    opacity: 0.8;
}

@media (max-width: 800px) {
    .input-main-group {
        min-width: 100%;
    }

    #cc-name-input {
        text-align: left;
    }

    .inline-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* Buttons Area */
.control-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 16px;
}

.action-btn {
    position: relative;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    /* Vibrant buttons usually keep white text */
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
    transform: scale(0.98);
}

.copy-btn {
    background: var(--green-gradient);
}

.copy-btn:hover {
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

.refresh-btn:hover {
    background: var(--glass-border);
}

.new-btn {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.new-btn:hover {
    box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.3);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Timer Line */
.timer-line {
    height: 3px;
    background: var(--badge-bg);
    margin-top: -2px;
    /* Pull into border */
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.timer-progress {
    height: 100%;
    width: 100%;
    background: var(--primary-gradient);
    transform-origin: left;
    animation: countdown 10s linear infinite;
}

@keyframes countdown {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

.secondary-actions {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.text-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.text-link:hover {
    color: var(--text-primary);
}

.divider {
    margin: 0 10px;
    color: var(--glass-border);
}

/* --- Inbox Section (Updated Layout) --- */
.inbox-section {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    /* Added spacing */
}

.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    /* width: 100%; Removed explicit width to let flex handle it */
}

.inbox-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inbox-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.inbox-controls {
    display: flex;
    gap: 8px;
}

.icon-btn-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn-small:hover {
    background: var(--text-primary);
    color: var(--bg-base);
}

.icon-btn-small.delete:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.badg-count {
    background: var(--badge-bg);
    padding: 2px 10px;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-primary);
}

.inbox-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.inbox-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Email Item (New Design) */
.email-item {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.email-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.email-item-left {
    flex-shrink: 0;
}

.email-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10b981, #059669);
    /* Default Green */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.email-item-content {
    flex-grow: 1;
    min-width: 0;
    /* Fix truncate */
}

.e-sender {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.e-subject {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.e-snippet {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: #9ca3af;
    position: absolute;
    top: 16px;
    right: 16px;
}


.e-time {
    color: var(--text-secondary);
}

.e-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
    border: 2px dashed var(--glass-border);
    border-radius: 16px;
    background: var(--badge-bg);
}

.empty-icon {
    font-size: 3rem;
    background: rgba(255, 255, 255, 0.03);
}

.email-item .sender {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.email-item .subject {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.email-item .time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.feature-item {
    padding: 24px;
    text-align: center;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: inline-block;
}

.i-shield {
    color: #8b5cf6;
}

.i-flash {
    color: #eab308;
}

.i-globe {
    color: #3b82f6;
}

.feature-item h4 {
    margin-bottom: 8px;
    font-weight: 600;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 1.8rem;
    }

    .control-actions {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .email-display-wrapper {
        margin-bottom: 20px;
    }

    #email-address {
        font-size: 1rem;
        word-break: break-all;
    }

    .status-info-bar-dashed {
        padding: 12px;
    }

    #status-text-dashed {
        font-size: 1.1rem;
    }

    .notif-dropdown {
        width: 90vw;
        right: 5vw;
        top: 60px;
    }

    .email-modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .e-view-header {
        padding: 16px;
    }

    .e-view-alerts {
        padding: 0 16px;
    }

    .e-view-content-wrapper {
        padding: 0 16px 16px 16px;
    }

    .email-white-paper {
        padding: 20px;
    }

    #email-view-subject {
        font-size: 1.2rem;
    }
}




/* Footer */
.glass-effect-footer {
    border-top: 1px solid var(--glass-border);
    background: var(--badge-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 50px 0;
    margin-top: 100px;
    position: relative;
    overflow: hidden;
}

.glass-effect-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
}

.footer-layout {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.footer-links-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.footer-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-card:hover {
    background: var(--glass-bg);
    border-color: var(--primary-gradient);
    transform: translateY(-2px);
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 16px;
    transition: all 0.3s;
}

.i-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* Blue */
.i-book {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

/* Purple */
.i-tele {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

/* Sky */
.i-code {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

/* Pink */

.footer-card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
}

.link-info {
    flex-grow: 1;
}

.link-title {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.link-desc {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.arrow-icon {
    color: var(--text-secondary);
    opacity: 0.5;
    transition: 0.3s;
}

.footer-card:hover .arrow-icon {
    opacity: 1;
    color: var(--text-primary);
    transform: translateX(4px);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.footer-bottom strong {
    color: var(--text-primary);
    font-weight: 600;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.5;
}

.notification-bar {
    margin-bottom: 30px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);

    /* New marquee properties */
    overflow: hidden;
    padding: 0;
    height: 54px;
    display: flex;
    align-items: center;
}

.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    padding-left: 100%;
    animation: marquee 35s linear infinite;
    /* Cháº­m láº¡i má»™t chÃºt Ä‘á»ƒ dá»… Ä‘á»c cÃ¢u dÃ i */
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

.marquee-spacer {
    width: 150px;
    /* Khoáº£ng cÃ¡ch rá»™ng ra Ä‘á»ƒ khÃ´ng bá»‹ sÃ¡t nhau */
    flex-shrink: 0;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Icons */
.notification-bar i.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-right: 8px;
}

.notification-bar .fa-star {
    margin-left: 8px;
}

.divider {
    display: inline-block;
    width: 50px;
}

kbd {
    background: var(--badge-bg);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
}



/* --- Custom Create Section --- */
.custom-create-section {
    width: 100%;
    /* max-width removed to match email-control-panel's full container width */
    margin: 0 auto 30px auto;

    /* Layout */
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px;
    position: relative;
    z-index: 10;
}

/* Integrated styles moved to component section */





/* --- Notification Dropdown --- */
.notif-dropdown {
    position: absolute;
    top: 88px;
    right: 20px;
    width: 380px;
    background: var(--bg-base);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    display: none;
    /* Hidden by default */
    padding: 16px;
    overflow: hidden;
}

.notif-dropdown.show {
    display: block;
    animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notif-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.h-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.h-header h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.mark-read-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s;
}

.mark-read-btn:hover {
    color: #34d399;
    /* Green hover */
    text-decoration: none;
}

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.notif-item {
    background: var(--bg-base);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* Specific styles for notification types */
.item-warning {
    border-color: rgba(234, 179, 8, 0.2);
    /* Yellow tint */
}

.item-warning .n-icon {
    color: #eab308;
    background: rgba(234, 179, 8, 0.1);
}

.item-info {
    border-color: rgba(59, 130, 246, 0.2);
    /* Blue tint */
}

.item-info .n-icon {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.n-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.n-content {
    flex-grow: 1;
}

.n-title {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.n-desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Read State - New Logic */
.notif-item .n-title .fa-check {
    display: none;
    /* Hidden by default */
    color: #10b981;
    /* Green success color */
    opacity: 1 !important;
    /* Override inline styles if any */
}

.notif-item.read .n-title .fa-check {
    display: inline-block;
    /* Show when read */
}

.notif-item.read {
    opacity: 0.6;
    border-color: rgba(255, 255, 255, 0.05);
    /* Dim border */
    background: rgba(15, 17, 26, 0.5);
    /* Dim bg */
}

/* --- Panel Header & Status Badges --- */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Badges Removed */

/* --- Modals & Overlays --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-container {
    width: 500px;
    max-width: 90%;
    background: var(--bg-base);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.show .modal-container {
    transform: scale(1) translateY(0);
}

#confirm-modal {
    z-index: 10005;
    /* Äáº£m báº£o luÃ´n náº±m trÃªn Email Modal (9999) */
}

.confirm-modal-container {
    max-width: 400px;
    text-align: center;
}

.modal-icon-header {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.confirm-icon-danger {
    color: #ef4444;
}

.confirm-icon-success {
    color: #10b981;
}

.confirm-icon-warning {
    color: #f59e0b;
}

.confirm-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.confirm-modal-message {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-actions button {
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-confirm-ok {
    background: #ef4444;
    border: none;
    color: white;
}

.btn-confirm-ok:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    background: var(--badge-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--glass-border);
    color: var(--text-primary);
}

/* Views (Login/Register) */
.auth-view {
    display: none;
    /* Hidden by default */
    animation: fadeIn 0.3s ease;
}

.auth-view.active {
    display: block;
}

.auth-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding-right: 40px;
    /* Space for close button */
}

.auth-header i {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.auth-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-form-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.auth-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.auth-input:focus {
    border-color: #8b5cf6;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    transition: filter 0.2s;
}

.submit-btn:hover {
    filter: brightness(1.1);
}

.btn-purple {
    background: #8b5cf6;
    /* Login Color */
}

.btn-green {
    background: #10b981;
    /* Register Color */
}

.auth-footer-link {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.auth-footer-link a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s;
}

.auth-footer-link a:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

/* --- Email Viewer Modal (Premium Design) --- */
.email-modal-container {
    width: 800px;
    max-width: 95%;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    padding: 0;
    background: var(--bg-base);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Header */
.e-view-header {
    background: var(--bg-base);
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.e-view-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#email-view-subject {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    flex: 1;
    padding-right: 20px;
}

/* Fixed selector */
.cc-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.e-view-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-download {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-delete-mail {
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete-mail:hover {
    background: #ef4444;
    color: white;
}

.modal-close-static {
    width: 36px;
    height: 36px;
    background: var(--badge-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close-static:hover {
    background: var(--glass-border);
    color: var(--text-primary);
}

.e-view-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.meta-line strong {
    color: var(--text-primary);
    margin-right: 6px;
}

/* Alerts */
.e-view-alerts {
    padding: 0 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.alert-box {
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Green Alert */
.green-alert {
    background: rgba(16, 185, 129, 0.1);
    /* Soft Green */
    border: 1px solid #10b981;
}

.green-alert .alert-icon {
    color: #10b981;
    font-size: 1.2rem;
}

.alert-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.green-alert .alert-title {
    color: #059669;
    font-weight: 700;
    font-size: 0.95rem;
}

.green-alert .alert-sub {
    color: #10b981;
    font-size: 0.8rem;
}

/* Yellow Alert */
.yellow-alert {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid #eab308;
    justify-content: space-between;
}

.alert-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.yellow-alert .alert-icon {
    color: #facc15;
    font-size: 1.2rem;
}

.yellow-alert .alert-title {
    color: #854d0e;
    font-weight: 700;
    font-size: 0.95rem;
}

.yellow-alert .alert-sub {
    color: #a16207;
    font-size: 0.8rem;
}

.btn-load-img {
    background: #eab308;
    color: #1a202c;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-load-img:hover {
    background: #facc15;
}

/* Content Wrapper */
.e-view-content-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 32px 32px 32px;
    background: var(--bg-base);
}

.email-white-paper {
    background: white;
    border-radius: 8px;
    padding: 40px;
    color: #1a202c;
    min-height: 400px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Reset text colors inside white paper */
.email-white-paper p,
.email-white-paper h1,
.email-white-paper h2,
.email-white-paper h3,
.email-white-paper li {
    color: #1a202c;
}

/* Custom Scrollbar for white paper if needed */
.email-white-paper::-webkit-scrollbar {
    width: 0;
}



.skeleton {
    background: var(--badge-bg);
    background: linear-gradient(to right,
            var(--badge-bg) 8%,
            var(--glass-border) 18%,
            var(--badge-bg) 33%);
    background-size: 800px 104px;
    animation: shimmer 1.5s infinite linear;
    border-radius: 6px;
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }

    100% {
        background-position: 468px 0;
    }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 100%;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-item {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* --- Profile View --- */
.profile-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 24px;
}

.profile-avatar-box {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.3);
}

.profile-info-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#profile-username {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.profile-badge-vip {
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 8px;
    border-radius: 50px;
    width: fit-content;
}

.profile-content {
    padding-top: 0;
}

.section-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Profile View Fixes --- */
.my-inbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* TÄƒng khoáº£ng cÃ¡ch */
    margin-bottom: 24px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 6px;
}

/* Custom Scrollbar for list */
.my-inbox-list::-webkit-scrollbar {
    width: 4px;
}

.my-inbox-list::-webkit-scrollbar-track {
    background: transparent;
}

.my-inbox-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

.my-inbox-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.saved-inbox-item {
    background: rgba(255, 255, 255, 0.02);
    /* Má» hÆ¡n */
    border: 1px solid transparent;
    /* áº¨n viá»n máº·c Ä‘á»‹nh */
    padding: 12px;
    /* Gá»n hÆ¡n */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.item-left-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    /* Anti overflow */
}

.my-inbox-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    /* TÃ­m Ä‘áº«m giá»‘ng máº«u */
    color: white;
    border-radius: 10px;
    /* Bo gÃ³c vuÃ´ng nhÆ° máº«u */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(139, 92, 246, 0.3);
}

.inbox-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    /* Fix flex overflow */
    margin-right: 12px;
}

.saved-inbox-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(4px);
    /* Hiá»‡u á»©ng trÆ°á»£t nháº¹ sang pháº£i thay vÃ¬ ná»•i lÃªn */
}

.saved-inbox-item.active {
    border-color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

/* Thanh dá»c chá»‰ hiá»‡n khi active */
.saved-inbox-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 3px;
    background: var(--primary-purple);
    border-radius: 0 4px 4px 0;
}

.inbox-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    /* Chiáº¿m pháº§n cÃ²n láº¡i */
    min-width: 0;
    /* Fix flex overflow */
    margin-right: 12px;
}

.inbox-info .email-text {
    font-size: 0.95rem;
    /* To hÆ¡n chÃºt nhÆ° máº«u */
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-info .status-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.inbox-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.btn-item-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    /* Ná»n má» */
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-item-action:hover {
    background: var(--primary-purple);
    color: white;
}

.btn-item-action.delete:hover {
    background: #ef4444;
    color: white;
}

.saved-inbox-item i {
    font-size: 0.9rem;
}

/* --- Fix UI User Request --- */
/* Styling nÃºt 'Äá»•i máº­t kháº©u' cho há»£p theme */
#show-change-pwd {
    width: 100%;
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    backdrop-filter: blur(4px);
}

#show-my-inboxes {
    width: 100%;
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    backdrop-filter: blur(4px);
}

#show-change-pwd:hover {
    background: #8b5cf6;
    color: white;
    transform: scale(1.02);
}

#show-my-inboxes:hover {
    background: #10b981;
    color: white;
    transform: scale(1.02);
}

/* Pagination Styles */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.page-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.logout-btn {
    width: 100%;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.logout-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.02);
}

.auth-view {
    display: none;
}

.auth-view.active {
    display: block;
}

/* Notification Badge */
.notif-btn {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 22px;
    height: 22px;
    background: #ef4444;
    border-radius: 50%;
    /* Make it a perfect circle */
    display: none;
    /* JS will toggle to flex */
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    color: #ffffff !important;
    border: 2px solid var(--bg-base, #0f0f23);
    padding: 0;
    /* padding works against flex centering in fixed dim containers sometimes */
    z-index: 100;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--bg-base);
    /* Faux border for better blending */
}



/* ==========================================================================
   TOAST NOTIFICATIONS (Classic Style - Consolidated)
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    min-width: 320px;
    position: relative;
    animation: toastSlideIn 0.3s ease-out forwards;
}

@media (max-width: 768px) {
    .toast-container {
        bottom: 20px;
        right: 20px;
        left: 20px;
    }

    .toast {
        min-width: auto;
        width: 100%;
        animation: toastSlideInMobile 0.3s forwards;
    }
}

.toast.hiding {
    animation: toastSlideOut 0.3s forwards;
}

.toast-icon {
    width: 36px;
    height: 36px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #3b82f6;
}

.toast.error .toast-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast-content {
    flex: 1;
    padding-right: 20px;
}

.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
    color: #fff;
}

.toast-msg {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.4;
}

.toast-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #fff;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideInMobile {
    from {
        transform: translateY(120%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

@keyframes toastSlideOutMobile {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(120%);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .toast.hiding {
        animation: toastSlideOutMobile 0.3s forwards;
    }
}