/* --- Shared CSS Variables (Email Page Specific Override) --- */
:root {
    --primary: #696cff;
    --primary-dark: #5f61e6;
    --brick: #c1440e;
    --bg-body: #232333;
    --bg-paper: #2b2c40;
    --text-main: #dbdbe0;
    --text-muted: #8c90ad;
    --white: #ffffff;
    --border-color: rgba(255, 255, 255, 0.1);
    --success: #71dd37;
    --warning: #ffab00;
    --info: #03c3ec;
    --danger: #ff3e1d;

    --container-width: 1200px;
    --header-height: 80px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Public Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* --- Utilities --- */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }

@media (min-width: 768px) {
    .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
    .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
    .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

/* --- Components --- */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(105, 108, 255, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--primary-dark); }
.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--white);
    background: rgba(255,255,255,0.05);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }

/* Hero */
.hero { padding: 160px 0 80px; text-align: center; position: relative; }
.hero h1 { font-size: 48px; font-weight: 800; color: white; line-height: 1.1; margin-bottom: 24px; }
.hero p { font-size: 18px; color: var(--text-muted); max-width: 700px; margin: 0 auto 32px; line-height: 1.6; }
.hero-badge {
    background: rgba(105, 108, 255, 0.1); border: 1px solid var(--primary);
    padding: 6px 16px; border-radius: 20px; font-size: 12px; color: #a5b4fc;
    display: inline-flex; align-items: center; gap: 6px; margin-bottom: 32px; font-weight: 600;
}
.hero-cta-group {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* --- MOCKUP CSS --- */
.hero-visual { margin-top: 60px; position: relative; max-width: 1200px; margin-left: auto; margin-right: auto; }

.dashboard-ui {
    background: #2b2c40;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
    height: 700px;
    display: flex;
    overflow: hidden;
    font-family: 'Public Sans', sans-serif;
}

/* Sidebar */
.dash-sidebar {
    width: 260px;
    background: #2b2c40;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
}

.compose-btn {
    background: var(--primary);
    color: white;
    border-radius: 6px;
    padding: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(105, 108, 255, 0.4);
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: 0.2s;
}
.compose-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }

.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: 0 50px 50px 0; /* Rounded right edge */
    color: var(--text-muted);
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.2s;
    margin-left: -16px; /* Extend to edge */
    padding-left: 32px;
    font-weight: 500;
}
.sidebar-item i { margin-right: 12px; width: 18px; stroke-width: 2.5px; }
.sidebar-item:hover { color: white; background: rgba(255,255,255,0.03); }
.sidebar-item.active {
    color: var(--primary);
    background: rgba(105, 108, 255, 0.12);
    border-left: 3px solid var(--primary);
    padding-left: 29px; /* Adjust for border width */
}

.badge-pill {
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    line-height: 1;
}
.badge-primary { color: var(--primary); }
.badge-warning { background: #ffab00; color: #2b2c40; padding: 4px 8px; border-radius: 12px; }
.badge-danger { background: #ff3e1d; color: white; padding: 4px 8px; border-radius: 12px; }

.label-section { margin-top: 32px; }
.label-header { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 12px; padding-left: 16px; letter-spacing: 1px; }
.label-item { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-main); padding: 8px 16px; cursor: pointer; border-radius: 6px; transition: 0.2s; }
.label-item:hover { background: rgba(255,255,255,0.03); color: white; }
.label-dot { width: 10px; height: 10px; border-radius: 50%; }

/* Main Content */
.dash-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #232333;
    position: relative;
}

/* Header */
.dash-header {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
}
.search-icon { color: var(--text-muted); width: 20px; }
.search-input {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 15px;
    width: 100%;
    outline: none;
}

/* Toolbar */
.dash-toolbar {
    height: 52px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    color: var(--text-muted);
}
.toolbar-left { display: flex; gap: 24px; align-items: center; }
.tool-icon { width: 20px; height: 20px; cursor: pointer; transition: 0.2s; }
.tool-icon:hover { color: white; }

/* Email List */
.email-list { flex: 1; overflow-y: auto; }
.email-row {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
}
.email-row:hover { background: #2b2c40; box-shadow: 0 2px 8px rgba(0,0,0,0.2); transform: translateY(-1px); z-index: 2; position: relative; }
.email-row.selected { background: rgba(105, 108, 255, 0.05); border-left: 2px solid var(--primary); padding-left: 22px; }

.row-check {
    width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--text-muted);
    margin-right: 16px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: transparent; transition: 0.2s;
}
.row-check.checked { background: var(--primary); border-color: var(--primary); color: white; }

.row-star { margin-right: 16px; color: var(--text-muted); width: 20px; flex-shrink: 0; transition: 0.2s; }
.row-star.starred { color: var(--warning); fill: var(--warning); }

.row-avatar {
    width: 36px; height: 36px; border-radius: 50%; margin-right: 16px; flex-shrink: 0;
    object-fit: cover; border: 2px solid rgba(255,255,255,0.05);
}
.row-avatar-text {
    width: 36px; height: 36px; border-radius: 50%; margin-right: 16px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
    border: 2px solid rgba(255,255,255,0.05);
}

.row-sender { width: 170px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }

.row-content { flex: 1; display: flex; align-items: center; min-width: 0; padding-right: 24px; color: var(--text-muted); }
.row-subject { color: var(--text-main); font-weight: 500; white-space: nowrap; margin-right: 8px; }

.row-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; justify-content: flex-end; margin-left: auto; font-weight: 500; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.dot-green { background: var(--success); box-shadow: 0 0 8px rgba(113, 221, 55, 0.4); }
.dot-blue { background: var(--primary); box-shadow: 0 0 8px rgba(105, 108, 255, 0.4); }
.dot-orange { background: var(--warning); box-shadow: 0 0 8px rgba(255, 171, 0, 0.4); }
.dot-red { background: var(--danger); box-shadow: 0 0 8px rgba(255, 62, 29, 0.4); }

/* --- END MOCKUP CSS --- */

/* Identity Cards */
.identity-container { margin-top: 60px; max-width: 900px; margin-left: auto; margin-right: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.identity-card { background: #2b2c40; border: 1px solid var(--border-color); border-radius: 12px; padding: 32px; text-align: left; transition: 0.3s; position: relative; overflow: hidden; height: 100%; }
.identity-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.identity-card.pos { border-top: 4px solid var(--success); }
.identity-card.neg { border-top: 4px solid var(--danger); }
.identity-title { font-size: 20px; font-weight: 700; color: white; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }

.id-list li {
    display: flex;
    align-items: flex-start; /* Alignment fix */
    gap: 12px;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-size: 15px;
}
.id-list li i {
    flex-shrink: 0;
    margin-top: 3px; /* Visual alignment correction */
    width: 18px;
    height: 18px;
}
.list-check { color: var(--success); }
.list-x { color: var(--danger); }

/* Section Styling */
.section-title { font-size: 32px; color: white; margin-bottom: 16px; font-weight: 700; }
.section-desc { font-size: 16px; color: var(--text-muted); max-width: 600px; margin: 0 auto 48px; line-height: 1.6; }
.section-box { padding: 80px 0; border-bottom: 1px solid var(--border-color); }

/* Visual Containers */
.product-visual {
    background: var(--bg-paper); border: 1px solid var(--border-color);
    border-radius: 16px; height: 350px; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Feature Row Layout */
.feature-row { padding: 100px 0; border-bottom: 1px solid var(--border-color); }
.feature-row:last-child { border-bottom: none; }
.feature-content h3 { font-size: 28px; color: white; margin-bottom: 16px; font-weight: 700; }
.feature-content p { font-size: 16px; color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; }

/* ALIGNMENT FIX: List items */
.feature-list-item {
    display: flex;
    align-items: flex-start; /* Ensures icon stays top-aligned with multiline text */
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.5;
}
.feature-list-item i {
    flex-shrink: 0;
    margin-top: 3px; /* Visual alignment correction for icon vs text cap-height */
    width: 20px;
    height: 20px;
}

/* Feature Cards (Grid) */
.feature-card { background: var(--bg-paper); border: 1px solid var(--border-color); padding: 32px; border-radius: 12px; transition: 0.3s; }
.feature-card:hover { transform: translateY(-5px); border-color: var(--primary); background: #323249; }
.feature-icon { width: 48px; height: 48px; border-radius: 10px; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; color: var(--primary); margin-bottom: 20px; }
.feature-card h3 { font-size: 18px; color: white; margin-bottom: 12px; }
.feature-card p { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 0; }

/* Mockup: Admin/User Mgmt */
.admin-ui { width: 90%; background: #232333; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.admin-header { background: var(--bg-paper); padding: 16px 24px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.admin-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--border-color); }
.admin-row:last-child { border-bottom: none; }
.usage-bar { width: 80px; height: 6px; background: #444; border-radius: 3px; overflow: hidden; margin-right: 12px; }
.usage-fill { height: 100%; background: var(--success); }

/* FAQ Accordion */
.faq-item { border-bottom: 1px solid var(--border-color); padding: 20px 0; }
.faq-question { display: flex; justify-content: space-between; align-items: center; color: white; font-weight: 600; cursor: pointer; font-size: 16px; }
.faq-answer { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin-top: 12px; display: none; }
.faq-item.active .faq-answer { display: block; }
.faq-icon { transition: 0.3s; }
.faq-item.active .faq-icon { transform: rotate(180deg); }

/* Contact Form */
.contact-form-box { background: var(--bg-paper); border: 1px solid var(--border-color); border-radius: 16px; padding: 40px; max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-label { display: block; color: var(--white); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-input { width: 100%; padding: 12px; background: rgba(0,0,0,0.2); border: 1px solid var(--border-color); border-radius: 8px; color: white; font-size: 14px; outline: none; transition: 0.3s; }
.form-input:focus { border-color: var(--primary); background: rgba(0,0,0,0.4); }
textarea.form-input { min-height: 100px; resize: vertical; }

/* Footer */
.footer { border-top: 1px solid var(--border-color); padding: 80px 0 40px; background: #1b1b29; font-size: 14px; }
.footer h5 { color: white; margin-bottom: 20px; font-size: 16px; font-weight: 700; }
.footer a { color: var(--text-muted); display: block; margin-bottom: 12px; transition: color 0.2s; }
.footer a:hover { color: var(--primary); }
.footer-legal { font-size: 12px; color: #697a8d; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-color); text-align: center; }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { display: flex; flex-direction: column; gap: 32px; }
    .hero h1 { font-size: 32px; }
    .hero-cta-group { flex-direction: column; width: 100%; }
    .hero-cta-group .btn { width: 100%; }
    .dashboard-ui {
        transform: scale(0.65); transform-origin: top center; width: 153%; margin-left: -26.5%; margin-bottom: -150px;
        flex-direction: row;
    }
    .dash-sidebar { display: none; }
    .feature-row { padding: 60px 0; }
    .section-box { padding: 60px 0; }
    .feature-row.reverse .grid-2 { flex-direction: column-reverse; }
    .identity-container { grid-template-columns: 1fr; }
}
