:root {
    --bg: #030912;
    --bg-deep: #01050a;
    --panel: rgba(5, 17, 30, 0.88);
    --panel-light: rgba(9, 27, 48, 0.92);
    --panel-hover: rgba(14, 38, 68, 0.96);

    --border: rgba(123, 163, 207, 0.22);
    --border-bright: rgba(72, 155, 255, 0.42);

    --text: #e7eef8;
    --muted: #9eacc0;

    --blue: #46a0ff;
    --blue-deep: #0564d9;
    --blue-soft: #78bcff;

    --gold: #f0b83d;
    --green: #44d27c;
    --red: #ff5a5a;

    --radius: 14px;
    --shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;

    color: var(--text);
    background:
        linear-gradient(
            180deg,
            rgba(0, 5, 12, 0.18) 0%,
            rgba(0, 5, 12, 0.70) 46%,
            #020810 100%
        );

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    overflow-x: hidden;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.sky {
    position: fixed;
    inset: 0;
    z-index: -5;

    background:
        radial-gradient(
            circle at 20% 15%,
            rgba(55, 124, 202, 0.18),
            transparent 24%
        ),
        radial-gradient(
            circle at 70% 9%,
            rgba(66, 116, 189, 0.15),
            transparent 22%
        ),
        radial-gradient(
            circle at 30% 8%,
            rgba(255, 255, 255, 0.65) 0 1px,
            transparent 1.5px
        ),
        radial-gradient(
            circle at 67% 5%,
            rgba(255, 255, 255, 0.55) 0 1px,
            transparent 1.5px
        ),
        radial-gradient(
            circle at 81% 14%,
            rgba(255, 255, 255, 0.52) 0 1px,
            transparent 1.5px
        ),
        radial-gradient(
            circle at 12% 12%,
            rgba(255, 255, 255, 0.42) 0 1px,
            transparent 1.5px
        ),
        linear-gradient(
            180deg,
            #07182b 0%,
            #04101e 38%,
            #020810 100%
        );
}

.mountains {
    position: fixed;
    left: -5%;
    width: 110%;
    z-index: -4;
    pointer-events: none;
}

.mountains-back {
    top: 80px;
    height: 290px;

    opacity: 0.42;

    clip-path: polygon(
        0 70%,
        8% 55%,
        15% 65%,
        25% 35%,
        32% 61%,
        41% 46%,
        49% 70%,
        58% 32%,
        66% 61%,
        74% 39%,
        82% 66%,
        91% 42%,
        100% 70%,
        100% 100%,
        0 100%
    );

    background:
        linear-gradient(
            180deg,
            #0b2845,
            #061423
        );
}

.mountains-front {
    top: 145px;
    height: 320px;

    opacity: 0.78;

    clip-path: polygon(
        0 68%,
        10% 48%,
        17% 64%,
        28% 39%,
        37% 70%,
        48% 52%,
        57% 75%,
        70% 35%,
        80% 64%,
        91% 46%,
        100% 72%,
        100% 100%,
        0 100%
    );

    background:
        linear-gradient(
            180deg,
            #071c31,
            #020912
        );
}

.page-shade {
    position: fixed;
    inset: 0;
    z-index: -3;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.22),
            transparent 30%,
            transparent 70%,
            rgba(0, 0, 0, 0.22)
        );
}

.topbar {
    position: relative;

    width: min(1840px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 170px;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 30px;

    padding-top: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 15px;

    width: fit-content;

    color: var(--text);
    text-decoration: none;
}

.brand-mark,
.modal-mark {
    width: 61px;
    height: 68px;

    display: grid;
    place-items: center;

    color: #d6c7ad;

    border: 2px solid rgba(221, 202, 171, 0.78);

    clip-path: polygon(
        50% 0,
        92% 24%,
        92% 76%,
        50% 100%,
        8% 76%,
        8% 24%
    );

    background:
        linear-gradient(
            145deg,
            rgba(20, 29, 39, 0.96),
            rgba(5, 11, 18, 0.96)
        );

    font-family: Georgia, serif;
    font-size: 34px;
    box-shadow: var(--shadow);
}

.brand-copy {
    display: flex;
    flex-direction: column;
}

.brand-name {
    color: #f0f2f6;
    font-family: Georgia, serif;
    font-size: 29px;
    letter-spacing: 0.10em;
}

.brand-subtitle {
    margin-top: 5px;

    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.30em;
}

.hero-title {
    text-align: center;
}

.hero-title h1 {
    margin: 0;

    font-family: Georgia, serif;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 500;
    letter-spacing: 0.035em;
}

.hero-title > p {
    margin: 5px 0 16px;

    color: #c9d2de;
    font-size: 20px;
}

.privacy-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    padding: 10px 17px;

    color: #cbd6e5;
    background: rgba(7, 21, 37, 0.82);

    border: 1px solid var(--border);
    border-radius: 8px;
}

.lock {
    color: var(--gold);
}

.top-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;

    padding-top: 28px;
}

.button {
    min-height: 45px;
    padding: 0 23px;

    color: var(--text);
    border-radius: 7px;

    transition:
        transform 150ms ease,
        background 150ms ease,
        border-color 150ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button.primary {
    background:
        linear-gradient(
            180deg,
            #0b6fe9,
            #0755ba
        );

    border: 1px solid #2588ff;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 9px 22px rgba(0, 98, 220, 0.22);
}

.button.primary:hover {
    background:
        linear-gradient(
            180deg,
            #1681ff,
            #0862d5
        );
}

.button.secondary {
    background: rgba(5, 14, 24, 0.82);
    border: 1px solid rgba(163, 188, 219, 0.35);
}

.button.secondary:hover {
    border-color: var(--blue);
}

.dashboard {
    width: min(1840px, calc(100% - 40px));
    margin: 0 auto;

    display: grid;
    grid-template-columns:
        minmax(245px, 310px)
        minmax(470px, 1fr)
        minmax(305px, 430px);

    gap: 18px;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel,
.logout-button,
.feature-card {
    background:
        linear-gradient(
            145deg,
            rgba(5, 17, 31, 0.92),
            rgba(3, 12, 22, 0.92)
        );

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.panel {
    padding: 21px;
}

.section-label {
    color: var(--blue);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.section-label.gold {
    color: var(--gold);
}

.profile-row {
    display: flex;
    align-items: center;
    gap: 15px;

    padding-top: 20px;
}

.avatar,
.message-avatar,
.mini-avatar {
    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 50%;

    border: 1px solid rgba(151, 180, 211, 0.40);

    background:
        linear-gradient(
            145deg,
            #10243a,
            #07111e
        );
}

.avatar {
    width: 68px;
    height: 68px;

    font-size: 40px;
}

.profile-name {
    margin-bottom: 5px;

    font-size: 19px;
    font-weight: 700;
}

.text-button {
    padding: 0;

    color: var(--blue);
    background: none;
    border: none;
}

.divider {
    height: 1px;
    margin: 18px 0;

    background: rgba(134, 165, 201, 0.18);
}

.identity-message {
    display: flex;
    gap: 13px;

    color: var(--muted);
    line-height: 1.55;
}

.identity-message p {
    margin: 0;
}

.shield-icon {
    color: var(--blue-soft);
    font-size: 29px;
}

.profile-nav {
    display: grid;
    gap: 8px;

    margin: 20px -8px -6px;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;
    min-height: 47px;

    padding: 0 15px;

    color: var(--text);

    text-align: left;

    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
}

.nav-button:hover {
    background: rgba(28, 72, 122, 0.32);
}

.nav-button.active {
    background:
        linear-gradient(
            90deg,
            rgba(10, 83, 174, 0.74),
            rgba(7, 47, 91, 0.86)
        );

    border-color: rgba(56, 141, 240, 0.25);
}

.about-panel p,
.privacy-panel p,
.admin-header p {
    color: var(--muted);
    line-height: 1.6;
}

.logout-button {
    min-height: 58px;
    padding: 0 20px;

    color: var(--red);
    text-align: left;

    border: 1px solid var(--border);
}

.logout-button:hover {
    border-color: rgba(255, 90, 90, 0.50);
}

.conversation-panel {
    min-height: 730px;

    display: flex;
    flex-direction: column;
}

.conversation-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 17px;
}

.conversation-status {
    padding: 5px 10px;

    color: var(--green);
    font-size: 12px;
    font-weight: 700;

    border: 1px solid rgba(68, 210, 124, 0.28);
    border-radius: 999px;

    background: rgba(68, 210, 124, 0.07);
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 14px;

    max-height: 570px;
    overflow-y: auto;

    padding-right: 5px;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.message-avatar {
    width: 53px;
    height: 53px;

    font-size: 30px;
}

.matthew-avatar {
    color: #c8d7ea;
    font-size: 20px;
    font-weight: 800;

    background:
        linear-gradient(
            145deg,
            #183555,
            #071321
        );
}

.message-bubble {
    flex: 1;

    padding: 14px 17px;

    border-radius: 12px;
    border: 1px solid rgba(99, 145, 196, 0.17);

    background:
        linear-gradient(
            135deg,
            rgba(10, 35, 62, 0.95),
            rgba(7, 25, 45, 0.95)
        );
}

.matthew-message .message-bubble {
    background:
        linear-gradient(
            135deg,
            rgba(21, 33, 49, 0.97),
            rgba(11, 22, 36, 0.97)
        );
}

.message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    color: var(--blue-soft);
}

.matthew-message .message-meta {
    color: var(--text);
}

.message-meta time {
    color: var(--muted);
    font-size: 12px;
}

.message-bubble p {
    margin: 7px 0 0;

    color: #dce5f1;
    line-height: 1.45;
}

.message-composer {
    margin-top: auto;
    padding: 12px;

    border: 1px solid rgba(108, 158, 214, 0.25);
    border-radius: 11px;

    background: rgba(2, 10, 18, 0.82);
}

.message-composer textarea {
    width: 100%;
    min-height: 82px;
    resize: vertical;

    padding: 6px 8px;

    color: var(--text);
    background: transparent;
    border: none;
    outline: none;
}

.message-composer textarea::placeholder {
    color: #6f7f93;
}

.composer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    padding-top: 8px;
}

.attachment-button {
    color: var(--muted);
    background: transparent;
    border: none;
}

.attachment-button:hover {
    color: var(--blue-soft);
}

.send-button {
    display: flex;
    align-items: center;
    gap: 10px;
}

.encryption-note {
    margin-top: 8px;

    color: #7e8d9f;
    font-size: 12px;
    text-align: center;
}

.privacy-icon-large {
    margin-bottom: 14px;

    font-size: 39px;
}

.privacy-panel h2 {
    margin: 13px 0;

    font-family: Georgia, serif;
    font-weight: 500;
}

.privacy-rule {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 13px;

    padding: 13px 0;

    border-top: 1px solid rgba(126, 157, 193, 0.15);
}

.privacy-rule span {
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
}

.privacy-rule strong {
    color: #d9e3ef;
    font-size: 14px;
}

.admin-panel,
.admin-actions {
    display: none;
}

body.admin-preview .public-side {
    display: none;
}

body.admin-preview .admin-panel,
body.admin-preview .admin-actions {
    display: block;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 15px;
}

.admin-header p {
    margin: 5px 0 0;
    font-size: 13px;
}

.admin-badge {
    align-self: flex-start;

    padding: 5px 8px;

    color: var(--gold);

    border: 1px solid rgba(240, 184, 61, 0.30);
    border-radius: 5px;

    font-size: 10px;
    font-weight: 800;
}

.inbox-list {
    display: grid;
}

.inbox-item {
    display: grid;
    grid-template-columns: 41px 1fr auto;
    align-items: center;
    gap: 10px;

    width: 100%;
    min-height: 68px;

    padding: 8px;

    color: var(--text);

    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(126, 157, 193, 0.13);

    text-align: left;
}

.inbox-item:hover,
.inbox-item.unread {
    background: rgba(14, 45, 79, 0.42);
}

.mini-avatar {
    width: 40px;
    height: 40px;

    font-size: 19px;
}

.inbox-copy {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 3px;
}

.inbox-copy small {
    overflow: hidden;

    color: var(--muted);

    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-status {
    padding: 4px 7px;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 700;
}

.inbox-status.new {
    color: var(--blue);
    background: rgba(70, 160, 255, 0.12);
}

.inbox-status.waiting {
    color: var(--gold);
    background: rgba(240, 184, 61, 0.12);
}

.inbox-status.replied {
    color: var(--green);
    background: rgba(68, 210, 124, 0.10);
}

.view-all-button {
    width: 100%;
    min-height: 47px;
    margin-top: 12px;
    padding: 0 13px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: var(--blue-soft);

    border: 1px solid var(--border);
    border-radius: 7px;

    background: rgba(11, 28, 48, 0.74);
}

.admin-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    margin-top: 14px;
}

.admin-action-grid button {
    min-height: 52px;

    color: #cbd8e8;

    background: transparent;
    border: none;

    text-align: left;
}

.admin-action-grid button:hover {
    color: var(--blue-soft);
}

.feature-strip {
    width: min(1790px, calc(100% - 70px));
    margin: 20px auto 35px;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.feature-card {
    min-height: 105px;
    padding: 18px;

    display: flex;
    align-items: center;
    gap: 17px;
}

.feature-icon {
    color: #b6c8de;
    font-size: 35px;
}

.feature-card strong {
    color: var(--gold);
    font-size: 15px;
    text-transform: uppercase;
}

.feature-card p {
    margin: 7px 0 0;

    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: none;
    place-items: center;

    padding: 20px;

    background: rgba(0, 4, 9, 0.78);
    backdrop-filter: blur(10px);
}

.modal-backdrop.open {
    display: grid;
}

.modal {
    display: none;

    width: min(440px, 100%);
    padding: 28px;

    color: var(--text);

    background:
        linear-gradient(
            145deg,
            #091b30,
            #040d18
        );

    border: 1px solid var(--border-bright);
    border-radius: 15px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.65);
}

.modal.active {
    display: block;
}

.modal-close {
    float: right;

    color: var(--muted);
    background: transparent;
    border: none;

    font-size: 28px;
}

.modal-mark {
    width: 48px;
    height: 54px;

    font-size: 25px;
}

.modal h2 {
    margin: 18px 0 7px;

    font-family: Georgia, serif;
    font-size: 31px;
    font-weight: 500;
}

.modal > p {
    color: var(--muted);
    line-height: 1.5;
}

.modal label {
    display: grid;
    gap: 7px;

    margin-top: 16px;

    color: #c8d4e2;
    font-size: 13px;
    font-weight: 600;
}

.modal input {
    width: 100%;
    min-height: 45px;

    padding: 0 13px;

    color: var(--text);

    background: rgba(1, 8, 16, 0.80);

    border: 1px solid var(--border);
    border-radius: 7px;
    outline: none;
}

.modal input:focus {
    border-color: var(--blue);
}

.modal-submit {
    width: 100%;
    margin-top: 20px;
}

.demo-warning {
    margin-top: 15px;

    color: #738399;
    font-size: 11px;
    text-align: center;
}


@media (max-width: 1250px) {

    .topbar {
        grid-template-columns: 1fr 1fr;
    }

    .hero-title {
        grid-column: 1 / -1;
        grid-row: 1;

        margin-bottom: 10px;
    }

    .brand {
        grid-row: 2;
    }

    .top-actions {
        grid-row: 2;
        padding-top: 0;
    }

    .dashboard {
        grid-template-columns: 260px 1fr;
    }

    .right-column {
        grid-column: 1 / -1;

        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .privacy-panel,
    .admin-panel {
        grid-column: 1 / -1;
    }

}


@media (max-width: 820px) {

    .topbar {
        width: min(100% - 24px, 700px);

        display: flex;
        flex-direction: column;
        align-items: center;

        padding-top: 18px;
    }

    .brand {
        align-self: flex-start;
    }

    .brand-mark {
        width: 48px;
        height: 54px;
        font-size: 25px;
    }

    .brand-name {
        font-size: 21px;
    }

    .hero-title {
        order: 2;
    }

    .hero-title > p {
        font-size: 17px;
    }

    .privacy-pill {
        font-size: 12px;
    }

    .top-actions {
        order: 3;

        width: 100%;
    }

    .top-actions .button {
        flex: 1;
    }

    .dashboard {
        width: min(100% - 24px, 700px);
        grid-template-columns: 1fr;
    }

    .left-column {
        order: 2;
    }

    .conversation-panel {
        order: 1;
        min-height: auto;
    }

    .right-column {
        order: 3;

        display: flex;
    }

    .profile-nav {
        display: none;
    }

    .messages {
        max-height: none;
    }

    .message-avatar {
        width: 42px;
        height: 42px;
        font-size: 23px;
    }

    .feature-strip {
        width: min(100% - 24px, 700px);
        grid-template-columns: 1fr 1fr;
    }

}


@media (max-width: 520px) {

    .panel {
        padding: 16px;
    }

    .brand-subtitle {
        letter-spacing: 0.18em;
    }

    .hero-title h1 {
        font-size: 37px;
    }

    .message {
        gap: 8px;
    }

    .message-avatar {
        width: 35px;
        height: 35px;
        font-size: 19px;
    }

    .message-bubble {
        padding: 12px;
    }

    .message-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .composer-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .send-button {
        justify-content: center;
    }

    .feature-strip {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: 90px;
    }

}


/* ===== BLANK CONVERSATION UPDATE ===== */

.profile-login-note {
    margin-top: 4px;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}


.response-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    margin-bottom: 18px;
    padding: 14px 16px;

    color: #d9e5f2;

    background:
        linear-gradient(
            135deg,
            rgba(50, 39, 11, 0.48),
            rgba(16, 21, 29, 0.72)
        );

    border: 1px solid rgba(240, 184, 61, 0.28);
    border-radius: 10px;
}


.response-notice-icon {
    flex: 0 0 auto;

    color: var(--gold);
    font-size: 27px;
}


.response-notice strong {
    color: var(--gold);
}


.response-notice p {
    margin: 5px 0 0;

    color: var(--muted);
    line-height: 1.5;
}


.empty-conversation {
    flex: 1;

    min-height: 330px;

    display: grid;
    place-items: center;
}


.empty-conversation-message {
    max-width: 430px;

    padding: 30px;

    text-align: center;

    color: var(--muted);
}


.empty-conversation-message .empty-icon {
    margin-bottom: 13px;

    color: var(--blue);
    font-size: 42px;
}


.empty-conversation-message h2 {
    margin: 0 0 10px;

    color: #dce8f5;

    font-family: Georgia, serif;
    font-weight: 500;
}


.empty-conversation-message p {
    margin: 0;

    line-height: 1.6;
}

