:root {
    --bg: #06111f;
    --bg-soft: #0c1d31;
    --card: rgba(17, 28, 44, 0.9);
    --card-strong: #10233d;
    --text: #ebf3ff;
    --muted: #9fb5d0;
    --primary: #4fa5ff;
    --primary-strong: #2d7df2;
    --accent: #8d7ef5;
    --border: rgba(255,255,255,0.08);
    --danger: #ff5768;
    --success: #2ad899;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(180deg, #071522 0%, #0d1a2a 25%, #0f1d2d 100%);
    color: var(--text);
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(5, 12, 22, 0.78);
    border-bottom: 1px solid var(--border);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 700;
}

.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); }

.main-nav {
    display: flex;
    gap: 22px;
    color: var(--muted);
}

.main-nav a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 600;
    transition: 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-strong)); color: #fff; }
.btn-secondary { background: rgba(255,255,255,0.06); color: var(--text); }
.btn-outline-light { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }

.hero {
    padding: 88px 0 56px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 36px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    padding: 8px 12px;
    background: rgba(116,164,255,0.18);
    border: 1px solid rgba(116,164,255,0.28);
    border-radius: 999px;
    color: #d4e5ff;
    margin-bottom: 18px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    font-size: clamp(2.6rem, 5vw, 4.5rem);
    line-height: 1.05;
    margin: 0 0 18px;
}

.hero-copy p {
    color: var(--muted);
    font-size: 1.08rem;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 26px 0 20px;
}

.trust-points {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--muted);
}

.hero-card .mail-panel {
    background: linear-gradient(180deg, rgba(20,35,52,0.9), rgba(17,32,49,0.95));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 24px 50px rgba(0,0,0,0.22);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
}

.address-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
}

.address-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mini-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 7px 10px;
}

.panel-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.inbox-meta {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.9rem;
}

.inbox-section {
    padding-top: 30px;
    padding-bottom: 60px;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.inbox-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    min-height: 420px;
}

.mail-list, .message-detail {
    background: rgba(11, 20, 32, 0.8);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
}

.mail-item {
    padding: 14px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.02);
    cursor: pointer;
}

.mail-item.active {
    background: rgba(79,165,255,0.08);
    border-color: rgba(79,165,255,0.2);
}

.mail-item small, .message-metadata { color: var(--muted); }

.empty-state, .message-placeholder {
    color: var(--muted);
    padding: 18px 10px;
}

.feature-section, .faq-section, .info-section {
    padding: 80px 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 32px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.feature-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px 22px;
}

.admin-shell {
    min-height: 100vh;
    background: linear-gradient(180deg, #031422 0%, #071a2d 38%, #0b1f32 100%);
    color: var(--text);
}

.admin-panel {
    padding-top: 72px;
    padding-bottom: 60px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 36px;
}

.admin-title {
    margin: 0;
    font-size: clamp(2.5rem, 4vw, 4rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 700;
    color: rgba(240, 247, 255, 0.96);
}

.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-chip {
    border: 1px solid rgba(172, 190, 214, 0.22);
    background: rgba(255,255,255,0.02);
    color: rgba(233, 240, 247, 0.9);
    border-radius: 10px;
    padding: 9px 16px;
    font-size: 0.95rem;
}

.admin-chip.active {
    background: rgba(79, 165, 255, 0.12);
    border-color: rgba(79, 165, 255, 0.25);
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

.admin-stat-card {
    min-height: 146px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(17, 28, 42, 0.72);
    border: 1px solid rgba(160, 186, 212, 0.18);
    border-radius: 16px;
    padding: 28px 22px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.admin-stat-number {
    font-size: clamp(2rem, 2vw, 3rem);
    font-weight: 600;
    color: rgba(239, 246, 255, 0.94);
    line-height: 1.2;
    margin-bottom: 10px;
}

.admin-stat-label {
    font-size: 1.05rem;
    color: rgba(202, 216, 232, 0.88);
    line-height: 1.5;
}

.admin-lower-panel {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 26px;
}

.admin-card {
    background: rgba(18, 31, 46, 0.82);
    border: 1px solid rgba(160, 186, 212, 0.18);
    border-radius: 18px;
    padding: 22px 20px;
}

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.card-header-row h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(42, 216, 153, 0.15);
    color: #7ef0bd;
    font-size: 0.8rem;
    border: 1px solid rgba(42, 216, 153, 0.25);
}

.badge-pill.muted {
    background: rgba(255,255,255,0.05);
    color: rgba(226, 233, 242, 0.8);
    border-color: rgba(255,255,255,0.1);
}

.domain-card ul,
.provider-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 16px;
}

.domain-card li,
.provider-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(230, 240, 250, 0.9);
}

.domain-card li:last-child,
.provider-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.status {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
}

.status.ok {
    background: rgba(42, 216, 153, 0.12);
    color: #7ef0bd;
}

.status.warn {
    background: rgba(255, 170, 62, 0.12);
    color: #ffbd63;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(232, 240, 247, 0.9);
}

.setting-row:last-child {
    border-bottom: 0;
}

.setting-row strong {
    color: rgba(255,255,255,0.96);
    font-weight: 600;
}

.admin-form-card {
    padding: 24px;
}

.form-label {
    color: rgba(223, 233, 245, 0.9);
    margin-bottom: 8px;
}

.admin-input {
    background: rgba(6, 17, 28, 0.7);
    border: 1px solid rgba(165, 187, 211, 0.18);
    color: #eef5ff;
    border-radius: 12px;
    padding: 12px 14px;
}

.admin-input:focus {
    background: rgba(6, 17, 28, 0.7);
    border-color: rgba(105, 165, 255, 0.58);
    box-shadow: 0 0 0 0.2rem rgba(92, 155, 255, 0.15);
    color: #eef5ff;
}

.admin-check {
    color: rgba(230, 240, 250, 0.9);
    margin-bottom: 10px;
}

.admin-save-btn {
    background: linear-gradient(135deg, #4fa5ff, #2d7df2);
    border: 0;
    color: #fff;
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 600;
}

.admin-table-card {
    overflow: hidden;
}

.admin-table {
    color: rgba(236, 245, 255, 0.9);
    margin-bottom: 0;
}

.admin-table thead th {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: rgba(200, 213, 228, 0.9);
}

.admin-table td,
.admin-table th {
    padding: 16px 12px;
    border-color: rgba(255,255,255,0.06);
}

.provider-card,
.admin-list-card {
    padding: 22px 20px;
}

.feature-card h3 { margin-top: 0; }

@media (max-width: 992px) {
    .admin-stat-grid, .admin-lower-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .admin-panel {
        padding-top: 48px;
    }

    .admin-stat-grid, .admin-lower-panel {
        grid-template-columns: 1fr;
    }
}

.split-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
    align-items: center;
}

.glass-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
}

.accordion {
    display: grid;
    gap: 20px;
}

.faq-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
}

.faq-item h4 { margin-bottom: 8px; }

.site-footer {
    background: rgba(3,10,19,0.9);
    border-top: 1px solid var(--border);
    padding: 32px 0 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.footer-grid a { display: block; color: var(--muted); margin: 8px 0; }

.install-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top, rgba(96, 165, 250, 0.28), transparent 30%),
        linear-gradient(135deg, #06131d 0%, #0a1b2d 38%, #091a2a 100%);
    color: #edf6ff;
}

.install-page {
    padding: 40px 0;
}

.install-card {
    max-width: 780px;
    margin: 0 auto;
    padding: 30px 28px 22px;
    background: rgba(12, 23, 36, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(14px);
}

.install-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.brand-pill {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: rgba(96, 165, 250, 0.12);
    color: #9ed0ff;
    border: 1px solid rgba(96, 165, 250, 0.32);
    margin-bottom: 10px;
}

.install-header h1 {
    margin: 0;
    font-size: clamp(2rem, 2vw, 2.6rem);
    letter-spacing: -0.05em;
}

.wizard-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 28px;
}

.wizard-progress .step {
    padding: 12px 8px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    background: rgba(148, 163, 184, 0.08);
    color: rgba(237, 246, 255, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.wizard-progress .step.active {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: #fff;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.38);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0 0 6px;
    font-size: 1.6rem;
    letter-spacing: -0.04em;
}

.section-heading p {
    color: rgba(210, 225, 243, 0.75);
    margin: 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.install-form label {
    display: block;
}

.install-form label span {
    display: block;
    margin-bottom: 8px;
    color: rgba(225, 233, 245, 0.88);
    font-weight: 600;
}

.install-form input,
.install-form select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(10, 18, 28, 0.55);
    color: #edf6ff;
    border-radius: 12px;
    padding: 12px 14px;
}

.install-form input:focus,
.install-form select:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.8);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
}

.full-width {
    grid-column: 1 / -1;
}

.review-panel {
    display: grid;
    gap: 12px;
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.review-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #d9ecff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    padding-bottom: 10px;
}

.review-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.install-actions {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.btn {
    border-radius: 12px;
    padding: 12px 18px;
    border: none;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: #fff;
}

.btn-secondary {
    background: rgba(148, 163, 184, 0.12);
    color: #edf6ff;
}

.hidden { display: none !important; }

#installResult .alert {
    border-radius: 12px;
}

@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .install-card { padding: 24px 18px 18px; }
    .install-header, .install-actions { flex-direction: column; align-items: stretch; }
    .wizard-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-grid, .inbox-layout, .feature-grid, .split-layout, .footer-grid {
        grid-template-columns: 1fr;
    }

    .main-nav { display: none; }
    .nav-wrap { flex-wrap: wrap; }
    .hero { padding-top: 50px; }
}
