/* ========================================================
   TEMPMAIL - MODERN GRAY PREMIUM DIGITAL UI
   Palette: Charcoal (#292D32), Slate Gray (#374151), Silver (#D1D5DB), Soft Gray (#F3F4F6), Pure White (#FFFFFF)
   Clean, Professional, No Blue Clutter, 100% Mobile-Friendly
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
    --bg-page: #F3F4F6;          /* Putih keabu-abuan */
    --bg-surface: #FFFFFF;       /* Pure White */
    --navbar-bg: #292D32;        /* Charcoal Navbar */
    --banner-gradient: linear-gradient(135deg, #292D32 0%, #1F2937 100%); /* Gradient Charcoal ke Abu-abu Gelap */
    
    --primary-color: #374151;    /* Abu-abu Gelap */
    --primary-hover: #1F2937;    /* Charcoal Hover */
    --secondary-color: #D1D5DB;  /* Silver */
    --border-color: #E5E7EB;     /* Border Abu-abu Tipis */
    --border-dark: #9CA3AF;      /* Border Accent */
    
    --text-primary: #111827;     /* High Contrast Dark */
    --text-secondary: #374151;   /* Charcoal Secondary */
    --text-muted: #6B7280;       /* Refined Slate Gray */
    --text-silver: #D1D5DB;      /* Silver Text on Charcoal */
    
    --accent-green: #10B981;
    --accent-red: #EF4444;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-soft: 0 4px 20px -2px rgba(41, 45, 50, 0.05);
    --shadow-hover: 0 10px 25px -4px rgba(41, 45, 50, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

.main-content {
    flex: 1 0 auto;
}

/* ========================================================
   NAVBAR: CHARCOAL (#292D32)
   ======================================================== */
.navbar-custom {
    background: var(--navbar-bg) !important;
    border-bottom: 1px solid #374151;
    padding: 0.85rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    font-size: 1.2rem;
    color: #FFFFFF !important;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    background: #374151;
    border: 1px solid #4B5563;
    color: #FFFFFF;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

/* Navbar Pills */
.badge-service-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

/* ========================================================
   HERO BANNER: GRADIENT CHARCOAL KE ABU-ABU GELAP
   ======================================================== */
.tempmail-hero-card {
    background: var(--banner-gradient) !important;
    color: #FFFFFF;
    border: 1px solid #374151;
    border-radius: var(--radius-lg);
    padding: 2.25rem 1.5rem 1.75rem;
    box-shadow: 0 10px 30px -5px rgba(41, 45, 50, 0.15);
}

.tempmail-hero-label {
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--secondary-color);
    margin-bottom: 0.85rem;
}


/* === CHARCOAL & GRAY HARMONIOUS TEMPMAIL INPUT BAR === */
.tempmail-input-wrap {
    background: #FFFFFF !important;
    border: 1.5px solid #4B5563 !important;
    border-radius: 10px !important;
    padding: 0 !important;
    max-width: 680px;
    margin: 0 auto 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    display: flex;
    align-items: stretch;
    min-height: 48px;
    position: relative;
}

/* 1. Ikon Email di Kiri: Latar Abu-abu Halus (#F3F4F6), Ikon Charcoal */
.tempmail-leading-icon {
    background: #F3F4F6 !important;
    color: #374151 !important;
    padding: 0 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1.5px solid #E5E7EB !important;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* 2. Teks Email: Putih Bersih, Font Gelap Tajam, Auto Shrink */
.tempmail-address-text {
    font-family: 'JetBrains Mono', 'Inter', monospace !important;
    font-size: clamp(0.78rem, 2.5vw, 1.05rem) !important;
    font-weight: 700 !important;
    color: #111827 !important;
    text-align: left;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.6rem 0.75rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    user-select: all;
    background: #FFFFFF !important;
}

.tempmail-address-text::-webkit-scrollbar {
    height: 3px;
}
.tempmail-address-text::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

/* 3. Grup Tombol Kanan */
.tempmail-actions-group {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    border-left: 1.5px solid #E5E7EB !important;
    position: relative;
}

/* 4. Tombol Change Domain: Soft Gray Netral (#F9FAFB) */
.btn-tempmail-change {
    background: #F9FAFB !important;
    color: #374151 !important;
    border: none !important;
    border-right: 1px solid #E5E7EB !important;
    padding: 0 0.85rem !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-tempmail-change:hover, .btn-tempmail-change:focus, .btn-tempmail-change:active {
    background: #E5E7EB !important;
    color: #111827 !important;
}

/* 5. Tombol Salin (Copy): Charcoal Elegan (#374151) */
.btn-copy-inline {
    background: #374151 !important;
    color: #FFFFFF !important;
    border: none !important;
    padding: 0 1rem !important;
    width: auto !important;
    height: auto !important;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.15rem !important;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-copy-inline:hover {
    background: #1F2937 !important;
    color: #FFFFFF !important;
}

.btn-copy-inline.copied {
    background: #10B981 !important;
    color: #FFFFFF !important;
}

/* Khusus Mobile Screen: Icon Only untuk Change Domain agar muat dan tidak ketutupan */
@media (max-width: 576px) {
    .tempmail-input-wrap {
        min-height: 44px;
    }
    .tempmail-leading-icon {
        padding: 0 0.6rem;
        font-size: 1.1rem;
    }
    .tempmail-address-text {
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem !important;
    }
    .btn-tempmail-change {
        padding: 0 0.6rem !important;
    }
    .btn-tempmail-change span.change-text {
        display: none !important;
    }
    .btn-copy-inline {
        padding: 0 0.75rem !important;
        font-size: 1.05rem !important;
    }
}

/* Flag & Language Selector in Header */
.lang-dropdown-btn {
    background: #374151;
    color: #FFFFFF;
    border: 1px solid #4B5563;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}
.lang-dropdown-btn:hover {
    background: #4B5563;
    color: #FFFFFF;
}
.flag-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.tempmail-subtext {
    font-size: 0.9rem;
    color: #9CA3AF;
    max-width: 540px;
    margin: 0 auto 1.75rem;
    line-height: 1.5;
}

/* Action Buttons Grid in Hero */
.action-buttons-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    max-width: 680px;
    margin: 0 auto;
}

.btn-action-tile {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #374151;
    border: 1px solid #4B5563;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.65rem 1.2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-action-tile:hover {
    background: #4B5563;
    border-color: var(--secondary-color);
    color: #FFFFFF;
    transform: translateY(-1px);
}

.btn-action-tile.tile-access {
    background: #111827;
    border-color: #4B5563;
    color: #E5E7EB;
}

.btn-action-tile.tile-access:hover {
    background: #1F2937;
    border-color: var(--secondary-color);
    color: #FFFFFF;
}

.btn-action-tile.tile-delete {
    background: #374151;
    border-color: #4B5563;
    color: #FFFFFF;
}

.btn-action-tile.tile-delete:hover {
    background: #4B5563;
    border-color: var(--secondary-color);
    color: #FFFFFF;
}

/* ========================================================
   SPLIT-VIEW CONTAINER (WHITE CARDS + THIN GRAY BORDER)
   ======================================================== */
.split-view-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.25rem;
    min-height: 420px;
    max-height: 520px;
}

/* Left Pane: Inbox Message List */
.inbox-list-pane {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.inbox-list-header {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F9FAFB;
}

.inbox-list-header .title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.inbox-list-header .count-pill {
    background: #E5E7EB;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
}

.inbox-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

/* Clean Row Item */
.email-row-item {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    background: var(--bg-surface);
    transition: all 0.15s ease;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.email-row-item:hover {
    background: #F9FAFB;
    border-color: var(--border-dark);
    transform: translateY(-1px);
}

.email-row-item.active {
    background: #F3F4F6;
    border-color: #374151;
    border-left: 4px solid #374151;
}

.email-row-avatar {
    width: 34px;
    height: 34px;
    background: #E5E7EB;
    color: #374151;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.email-row-item.active .email-row-avatar {
    background: #374151;
    color: #FFFFFF;
}

.email-row-body {
    flex: 1;
    min-width: 0;
}

.email-row-from {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-row-subject {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.1rem;
}

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

/* Right Pane: Reading Panel */
.email-reader-pane {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.reader-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: #F9FAFB;
}

.reader-subject {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.reader-meta-table {
    font-size: 0.84rem;
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 0.35rem 0.75rem;
}

.reader-meta-label {
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.72rem;
    line-height: 1.8;
}

.reader-meta-value {
    color: var(--text-primary);
    word-break: break-all;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
}

.reader-content-body {
    flex: 1;
    padding: 1.75rem;
    overflow-y: auto;
    font-size: 0.92rem;
    line-height: 1.6;
    background: #FFFFFF;
    word-break: break-word;
}

.reader-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    padding: 3rem 1.5rem;
    text-align: center;
}

/* ========================================================
   FAQ SECTION (PREMIUM DIGITAL STORE AESTHETIC)
   ======================================================== */
.faq-section-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 3rem 2rem;
    position: relative;
    z-index: 5;
    margin-top: 1.5rem;
}

.custom-faq-accordion .accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    background: var(--bg-surface);
    overflow: hidden;
}

.custom-faq-accordion .accordion-button {
    background: #F9FAFB;
    color: var(--text-primary);
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    box-shadow: none;
    transition: background 0.2s ease;
}

.custom-faq-accordion .accordion-button:not(.collapsed) {
    background: #F3F4F6;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.custom-faq-accordion .accordion-body {
    padding: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ========================================================
   FOOTER (CHARCOAL #292D32)
   ======================================================== */
.footer-custom {
    background: var(--navbar-bg);
    border-top: 1px solid #374151;
    padding: 2.25rem 0;
    color: var(--text-silver);
    margin-top: auto;
}

.footer-custom .brand-name {
    color: #FFFFFF;
    font-weight: 700;
}

.footer-custom .footer-muted {
    color: #9CA3AF;
}

/* Modal Boxy */
.modal-content.boxy {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Buttons */
.btn-clean {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #FFFFFF;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-clean:hover {
    background: #F3F4F6;
    border-color: #9CA3AF;
    color: var(--text-primary);
}

.btn-clean-primary {
    background: #292D32 !important;
    border-color: #1F2937 !important;
    color: #FFFFFF !important;
}

.btn-clean-primary:hover {
    background: #1F2937 !important;
    color: #FFFFFF !important;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .tempmail-hero-card {
        padding: 1.75rem 1rem;
    }

    .action-buttons-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        gap: 0.5rem;
    }

    .btn-action-tile {
        justify-content: center;
        width: 100%;
    }

    .split-view-container {
        grid-template-columns: 1fr;
        max-height: none !important;
        margin-bottom: 2.5rem !important;
        gap: 1.5rem;
    }

    .inbox-list-pane {
        max-height: 360px;
        margin-bottom: 0.5rem;
    }

    .email-reader-pane {
        min-height: 380px;
        margin-bottom: 1.5rem;
    }

    .faq-section-wrapper {
        padding: 2.25rem 1.25rem;
        margin-top: 2.5rem !important;
        clear: both;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    }
}


/* === COMPACT LAYOUT & FOOTER REFINEMENTS === */
.container-compact {
    max-width: 1140px;
    margin: 0 auto;
    width: 100%;
}

.navbar-compact-wrapper {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.footer-compact-bar {
    background-color: #1f2937;
    color: #9ca3af;
    font-size: 0.85rem;
    margin-top: auto;
    border-top: 1px solid #374151;
}

.footer-copy-text {
    color: #cbd5e1;
    font-size: 0.825rem;
}

.footer-links-wrap {
    font-size: 0.825rem;
}

.footer-nav-link {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-nav-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-nav-sep {
    color: #64748b;
    user-select: none;
}

.btn-scroll-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #374151;
    color: #ffffff;
    border: 1px solid #4b5563;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 1.15rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.btn-scroll-top:hover {
    background: #4b5563;
    color: #ffffff;
    border-color: #6b7280;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* === SPINNING ICON UTILITY (Fixed Desync) === */
.tm-spin {
    animation: tm-rotate 0.75s linear infinite;
    display: inline-block;
}

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





/* ========================================================
   OCEAN WAVE BACKGROUND ANIMATION (Elegan & Halus)
   ======================================================== */
.ocean-bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
}

.ocean-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 480px;
    background-repeat: repeat-x;
    transform: translate3d(0, 0, 0);
}

.ocean-wave.wave-1 {
    background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0,0 C150,90 350,-40 500,45 C650,130 900,10 1200,50 L1200,120 L0,120 Z' fill='%2364748b'></path></svg>");
    animation: oceanDrift 16s linear infinite;
    z-index: 1;
    opacity: 0.22;
}

.ocean-wave.wave-2 {
    background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0,40 C200,110 420,-20 620,50 C820,120 1020,10 1200,60 L1200,120 L0,120 Z' fill='%2394a3b8'></path></svg>");
    animation: oceanDriftReverse 22s linear infinite;
    bottom: 45px;
    z-index: 2;
    opacity: 0.28;
}

.ocean-wave.wave-3 {
    background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0,20 C180,80 380,0 580,60 C780,120 980,20 1200,40 L1200,120 L0,120 Z' fill='%23cbd5e1'></path></svg>");
    animation: oceanDrift 28s linear infinite;
    bottom: 95px;
    z-index: 3;
    opacity: 0.38;
}

@keyframes oceanDrift {
    0% { transform: translateX(0); }
    50% { transform: translateX(-25%); }
    100% { transform: translateX(-50%); }
}

@keyframes oceanDriftReverse {
    0% { transform: translateX(-50%); }
    50% { transform: translateX(-25%); }
    100% { transform: translateX(0); }
}

.tempmail-hero-card {
    position: relative;
    z-index: 2;
}

.split-view-container {
    position: relative;
    z-index: 2;
}


.flag-svg {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
