/* ============================================================
   🌌 ETERNIX MAIL - Design System & Stylesheet (eternix.site)
   Aesthetic: Obsidian Cosmic / Glassmorphism / Superhuman-grade
   ============================================================ */

:root {
    --bg-base: #06070c;
    --bg-surface: #0b0d18;
    --bg-surface-elevated: #111424;
    --bg-glass: rgba(14, 17, 32, 0.72);
    --bg-card: rgba(18, 22, 42, 0.6);
    --bg-card-hover: rgba(28, 34, 64, 0.65);

    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(139, 92, 246, 0.35);
    --border-active: rgba(139, 92, 246, 0.7);

    --primary: #8b5cf6;
    --primary-rgb: 139, 92, 246;
    --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --primary-glow: 0 0 25px rgba(139, 92, 246, 0.45);

    --accent-cyan: #06b6d4;
    --accent-cyan-glow: 0 0 20px rgba(6, 182, 212, 0.4);

    --success: #10b981;
    --success-rgb: 16, 185, 129;
    --success-glow: 0 0 20px rgba(16, 185, 129, 0.4);

    --warning: #f59e0b;
    --danger: #f43f5e;

    --text-main: #f8fafc;
    --text-muted: #8491a5;
    --text-dim: #475569;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    --sidebar-w: 260px;
    --list-w: 390px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Ambient Cosmic Glow Orbs */
.ambient-glow-1 {
    position: fixed;
    top: -15vw;
    right: -10vw;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
    animation: floatGlow 14s ease-in-out infinite alternate;
}

.ambient-glow-2 {
    position: fixed;
    bottom: -15vw;
    left: -10vw;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
    animation: floatGlow 18s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.12) translate(3vw, 2vh); }
}

/* Custom Scrollbars */
::-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(139, 92, 246, 0.4);
}

/* ============================================================
   HEADER / TOP BAR
   ============================================================ */
.topbar {
    height: 64px;
    background: rgba(11, 13, 24, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 50;
    position: relative;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    width: var(--sidebar-w);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.28rem;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
    cursor: pointer;
}

.logo-icon-orb {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--primary-glow);
    color: #fff;
    font-size: 0.95rem;
}

.domain-pill {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.2px;
}

.topbar-center {
    flex: 1;
    max-width: 580px;
    margin: 0 20px;
    position: relative;
}

.search-box {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.search-input {
    width: 100%;
    height: 38px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 40px 0 38px;
    color: var(--text-main);
    font-size: 0.88rem;
    transition: all 0.25s ease;
    outline: none;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.search-kbd {
    position: absolute;
    right: 10px;
    font-size: 0.72rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

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

/* Status Indicators */
.live-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 5px 12px;
    border-radius: var(--radius-full);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.btn-autoverify-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-autoverify-toggle.active {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: var(--primary-glow);
}

.btn-autoverify-toggle.inactive {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: var(--border);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--primary-glow);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.btn-icon-subtle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon-subtle:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
}

/* ============================================================
   MAIN 3-COLUMN APP WORKSPACE
   ============================================================ */
.app-container {
    flex: 1;
    display: flex;
    height: calc(100vh - 64px);
    position: relative;
    z-index: 10;
}

/* ------------------------------------------------------------
   COLUMN 1: SIDEBAR
   ------------------------------------------------------------ */
.col-sidebar {
    width: var(--sidebar-w);
    background: rgba(11, 13, 24, 0.6);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    gap: 20px;
    overflow-y: auto;
}

.sidebar-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.8px;
    padding: 0 10px 6px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}

.nav-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item-left i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--text-dim);
    transition: color 0.18s ease;
}

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

.nav-item:hover i {
    color: var(--primary);
}

.nav-item.active {
    color: #fff;
    background: rgba(139, 92, 246, 0.14);
    font-weight: 600;
    border: 1px solid rgba(139, 92, 246, 0.28);
}

.nav-item.active i {
    color: var(--primary);
}

.nav-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.nav-badge.glow-green {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.nav-badge.glow-purple {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Alias List In Sidebar */
.alias-card-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alias-mini-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.alias-mini-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.alias-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.alias-address {
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.alias-label {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.alias-copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.alias-copy-btn:hover {
    color: var(--accent-cyan);
}

.btn-new-alias {
    width: 100%;
    padding: 7px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-new-alias:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-profile-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
}

.user-avatar-initial {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.85rem;
}

.user-details {
    flex: 1;
    overflow: hidden;
}

.user-name-text {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge {
    font-size: 0.65rem;
    color: var(--accent-cyan);
}

/* ------------------------------------------------------------
   COLUMN 2: MAIL INBOX LIST
   ------------------------------------------------------------ */
.col-mail-list {
    width: var(--list-w);
    background: rgba(11, 13, 24, 0.45);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mail-list-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mail-list-title {
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}

.filter-pills {
    display: flex;
    gap: 6px;
}

.filter-pill {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-pill.active {
    background: rgba(139, 92, 246, 0.16);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.35);
}

.email-cards-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.email-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.email-card.active {
    background: rgba(139, 92, 246, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

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

.email-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sender-info {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.sender-avatar {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sender-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-time {
    font-size: 0.72rem;
    color: var(--text-dim);
    flex-shrink: 0;
}

.email-subject {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-card.unread .email-subject {
    font-weight: 700;
    color: #fff;
}

.email-preview-snippet {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Feature Badges On Card */
.email-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    gap: 6px;
}

.badge-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.card-otp-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.45);
    color: #c4b5fd;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}

.card-verify-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.card-verify-pill.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.card-verify-pill.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.star-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 2px;
    font-size: 0.82rem;
    transition: color 0.15s ease;
}

.star-btn:hover, .star-btn.starred {
    color: #eab308;
}

/* Empty State */
.empty-state-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: var(--text-dim);
    gap: 12px;
}

.empty-state-icon {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.08);
}

/* ------------------------------------------------------------
   COLUMN 3: DETAIL READING & ACTION PANEL
   ------------------------------------------------------------ */
.col-reader-panel {
    flex: 1;
    background: var(--bg-base);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.reader-empty-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    gap: 16px;
}

.reader-empty-orb {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    box-shadow: var(--primary-glow);
}

.reader-empty-title {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}

.reader-empty-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 420px;
    line-height: 1.6;
}

.reader-shortcuts-hint {
    margin-top: 15px;
    display: flex;
    gap: 16px;
    font-size: 0.78rem;
    color: var(--text-dim);
}

.reader-shortcuts-hint kbd {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 7px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

/* Active Email View */
.reader-active-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.reader-toolbar {
    height: 52px;
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(11, 13, 24, 0.5);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reader-content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.email-headline {
    font-size: 1.45rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.35;
    letter-spacing: -0.3px;
}

.email-meta-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.meta-sender-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-avatar-large {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.meta-text-lines {
    display: flex;
    flex-direction: column;
}

.meta-sender-full {
    font-weight: 600;
    font-size: 0.95rem;
}

.meta-recipient-alias {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.meta-time-passed {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ------------------------------------------------------------
   ⚡ VIP VERIFICATION HERO CARD (Auto-Verify Banner)
   ------------------------------------------------------------ */
.vip-verify-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.14) 0%, rgba(6, 182, 212, 0.08) 100%);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), var(--primary-glow);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.vip-verify-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.vip-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vip-tag-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vip-otp-showcase {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
    padding: 14px 20px;
}

.otp-number-display {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 6px;
    color: #fff;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}

.btn-copy-otp-large {
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-copy-otp-large:hover {
    filter: brightness(1.2);
    transform: scale(1.03);
}

.vip-url-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.verify-status-log {
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.verify-status-log.success {
    color: var(--success);
}

.verify-status-log.pending {
    color: var(--warning);
}

.verify-status-log.failed {
    color: var(--danger);
}

.btn-trigger-verify-manual {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-trigger-verify-manual:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Mail Body Rendering */
.email-body-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    min-height: 250px;
    overflow-x: auto;
}

.html-content-frame {
    width: 100%;
    border: none;
    min-height: 400px;
    background: #ffffff;
    border-radius: var(--radius-sm);
}

.plain-text-display {
    white-space: pre-wrap;
    font-size: 0.92rem;
    line-height: 1.7;
    color: #e2e8f0;
    font-family: inherit;
}

/* ============================================================
   MODALS & OVERLAYS (Glassmorphic)
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 4, 8, 0.75);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.modal-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), var(--primary-glow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.15s ease;
}

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

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input {
    height: 42px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 14px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.form-textarea {
    min-height: 120px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    resize: vertical;
    transition: all 0.2s ease;
}

.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
}

/* ============================================================
   COMMAND PALETTE (Ctrl + K)
   ============================================================ */
.palette-box {
    background: var(--bg-surface);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), var(--primary-glow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.palette-input-wrap {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.palette-input-wrap i {
    color: var(--primary);
    font-size: 1.1rem;
}

.palette-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.05rem;
    outline: none;
}

.palette-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.palette-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.15s ease;
}

.palette-item:hover, .palette-item.active {
    background: rgba(139, 92, 246, 0.15);
    color: #fff;
}

.palette-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.palette-kbd {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: rgba(17, 20, 36, 0.94);
    border: 1px solid var(--border-hover);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    color: #fff;
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--primary-glow);
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto;
}

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

/* Responsive adjustments */
@media (max-width: 1024px) {
    .col-sidebar { width: 220px; }
    .col-mail-list { width: 330px; }
}

@media (max-width: 768px) {
    .col-sidebar { display: none; }
    .col-mail-list { width: 100%; }
    .col-reader-panel { display: none; }
    .col-reader-panel.mobile-open {
        display: flex;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
    }
}
