:root {
    --bg-deep: #020512;
    --bg-glow: #122145;
    --brand: #9ff7a9;
    --brand-dark: #072117;
    --text-strong: #f6fbff;
    --text-soft: #99a8c2;
    --panel: rgba(7, 10, 26, 0.8);
    --grid-line: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 60px rgba(2, 12, 22, 0.8);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Sora', sans-serif;
    background: radial-gradient(circle at 15% 10%, rgba(70, 116, 255, 0.35), transparent 45%),
                radial-gradient(circle at 80% 0%, rgba(159, 247, 169, 0.4), transparent 40%),
                var(--bg-deep);
    color: var(--text-strong);
    min-height: 100vh;
    overflow-x: hidden;
}

.grid-overlay::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(transparent 95%, rgba(255, 255, 255, 0.05) 95%),
                linear-gradient(90deg, transparent 95%, rgba(255, 255, 255, 0.05) 95%);
    background-size: 110px 110px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

main {
    width: min(1200px, 92%);
    margin: 0 auto;
    padding: 3rem 0 5rem;
    position: relative;
    z-index: 1;
}

.site-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 2rem;
    border-radius: 999px;
    background: rgba(7, 12, 24, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.brand-glyph {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--brand), #3cf5a0 60%, #0a3d2d);
    color: var(--brand-dark);
    font-family: 'Fraunces', serif;
    font-size: 1.85rem;
    display: grid;
    place-items: center;
    letter-spacing: 0.08em;
}

.brand-text {
    display: flex;
    flex-direction: column;
    font-family: 'Fraunces', serif;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.72rem;
}

.brand-tagline {
    margin: 1rem 0 1.5rem;
    color: var(--text-soft);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.primary-nav {
    display: flex;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.nav-link {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 9, 28, 0.8);
    color: var(--text-strong);
    letter-spacing: 0.13em;
    text-transform: uppercase;
    padding: 0.65rem 1.35rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border 0.3s ease;
}

.nav-link.active {
    background: rgba(159, 247, 169, 0.12);
    border-color: var(--brand);
    color: var(--brand);
    box-shadow: 0 0 18px rgba(159, 247, 169, 0.35);
}

.page {
    display: none;
    animation: fadePage 0.45s ease;
}

.page.active {
    display: block;
}

@keyframes fadePage {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.privacy-msgbox {
    position: fixed;
    inset: 0;
    background: rgba(2, 5, 12, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.privacy-msgbox.visible {
    opacity: 1;
    pointer-events: auto;
}

.privacy-dialog {
    width: min(460px, 95vw);
    background: rgba(5, 12, 25, 0.96);
    border: 1px solid var(--grid-line);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.privacy-dialog h3 {
    margin: 0.5rem 0 1rem;
    font-family: 'Fraunces', serif;
}

.privacy-dialog p {
    color: var(--text-soft);
    line-height: 1.6;
}

.privacy-dialog button {
    margin-top: 1.5rem;
    border-radius: 999px;
    border: none;
    background: var(--brand);
    color: #04150d;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.85rem 2rem;
    cursor: pointer;
}

.page-intro {
    max-width: 720px;
    margin: 0 auto 2rem;
    text-align: center;
}

.page-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    margin: 0.75rem 0;
}

.page-description {
    color: var(--text-soft);
    line-height: 1.8;
}

.hero {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-size: 0.78rem;
    color: var(--brand);
}

.hero-card {
    background: var(--panel);
    padding: 2.5rem;
    border-radius: 2rem;
    border: 1px solid var(--grid-line);
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(159, 247, 169, 0.15), transparent 55%);
    pointer-events: none;
}

.hero-card h1 {
    font-family: 'Fraunces', serif;
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    margin: 0 0 1rem;
}

.hero-card p {
    color: var(--text-soft);
    line-height: 1.7;
}

.cta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
}

.cta-row a {
    text-decoration: none;
    border-radius: 999px;
    padding: 0.85rem 1.5rem;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.cta-row a.primary {
    background: var(--brand);
    color: #032013;
}

.cta-row a.secondary {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-strong);
}

.insight-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(2, 9, 23, 0.85);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 1.5rem;
    padding: 2rem;
}

.insight-card span {
    font-size: 0.82rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brand);
}

.dynamic-panel {
    margin-top: 3.5rem;
    padding: 2.7rem;
    border-radius: 2rem;
    background: rgba(3, 9, 22, 0.9);
    border: 1px solid var(--grid-line);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.dynamic-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(92, 249, 185, 0.18), transparent 55%);
    pointer-events: none;
}

#panel-title {
    font-family: 'Fraunces', serif;
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

#panel-body {
    color: var(--text-soft);
    max-width: 70ch;
    line-height: 1.75;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

#panel-body.reveal {
    opacity: 1;
    transform: translateY(0);
}



.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
}

.service-card {
    background: rgba(4, 11, 24, 0.9);
    border-radius: 1.5rem;
    border: 1px solid var(--grid-line);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.service-card h3 {
    margin-top: 0;
}

.service-card p {
    color: var(--text-soft);
    line-height: 1.6;
}

.service-card ul {
    padding-left: 1.2rem;
    color: var(--text-soft);
    line-height: 1.6;
}

.support-suite {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.support-card {
    background: rgba(4, 11, 24, 0.92);
    border-radius: 1.75rem;
    border: 1px solid var(--grid-line);
    padding: 2.25rem;
    box-shadow: var(--shadow);
}

.support-card h3 {
    margin-top: 0;
}

.support-card ul {
    padding-left: 1.2rem;
    color: var(--text-soft);
}

.support-form label {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 0.35rem;
}

.support-form input,
.support-form select,
.support-form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(5, 7, 18, 0.9);
    color: var(--text-strong);
    margin-bottom: 1rem;
}

.support-form button {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border-radius: 999px;
    border: none;
    background: var(--brand);
    color: #04150d;
    font-weight: 600;
    letter-spacing: 0.15em;
    cursor: pointer;
}

.support-receipt {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(144, 246, 193, 0.08);
    border: 1px solid rgba(144, 246, 193, 0.2);
    font-size: 0.9rem;
    display: none;
}

.support-email-status {
    min-height: 1.5rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.support-email-status.ok {
    color: var(--brand);
}

.support-email-status.error {
    color: #ff9e9e;
}

.support-email-status.pending {
    color: #f6fbff;
}

.human-test {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1rem;
}

.human-test-prompt {
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.human-test input {
    padding: 0.85rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(5, 7, 18, 0.9);
    color: var(--text-strong);
}

.human-test button {
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.2rem;
    background: rgba(159, 247, 169, 0.15);
    color: var(--brand);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease;
}

.human-test button:hover {
    background: rgba(159, 247, 169, 0.3);
}

.human-test-result {
    min-height: 1.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.human-test-result.ok {
    color: var(--brand);
}

.human-test-result.error {
    color: #ff9e9e;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.about-card {
    background: rgba(3, 9, 22, 0.85);
    border-radius: 1.25rem;
    border: 1px solid var(--grid-line);
    padding: 1.75rem;
}

.about-card p {
    color: var(--text-soft);
    line-height: 1.6;
}

footer {
    margin-top: 5rem;
    padding: 2rem 0 3rem;
    text-align: center;
    color: var(--text-soft);
    border-top: 1px solid var(--grid-line);
}

.admin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 5, 12, 0.94);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 2rem;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    transition: opacity 0.3s ease;
}

.admin-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.admin-panel {
    width: min(1180px, 96vw);
    margin: 0 auto;
    background: rgba(3, 9, 22, 0.95);
    border-radius: 1.5rem;
    padding: 2.2rem;
    border: 1px solid var(--grid-line);
    box-shadow: var(--shadow);
    position: relative;
}

.admin-panel--desk {
    margin-bottom: 2rem;
}

.admin-panel h2 {
    margin-top: 0;
}

.admin-login label,
.admin-login input {
    display: block;
    width: 100%;
}

.admin-login input {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(5, 6, 16, 0.9);
    color: var(--text-strong);
}

.admin-login button,
.admin-toolbar button {
    border: none;
    border-radius: 0.75rem;
    padding: 0.8rem 1.4rem;
    background: var(--brand);
    color: #04150d;
    font-weight: 600;
    cursor: pointer;
}

.admin-toolbar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.admin-ticket-controls {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-filter-form,
.admin-action-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.75rem;
    padding: 1.25rem;
    border-radius: 1.25rem;
    border: 1px solid var(--grid-line);
    background: rgba(5, 11, 24, 0.85);
}

.admin-filter-form label,
.admin-action-form label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.admin-filter-form input,
.admin-filter-form select,
.admin-action-form input,
.admin-action-form select,
.admin-action-form textarea {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(3, 7, 18, 0.9);
    color: var(--text-strong);
    padding: 0.6rem 0.8rem;
    font-family: inherit;
}

.admin-action-form textarea {
    grid-column: 1 / -1;
    resize: vertical;
    min-height: 120px;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    grid-column: 1 / -1;
    align-items: flex-end;
}

.filter-actions button,
.ticket-action-buttons button {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--text-strong);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.6rem 1.4rem;
    cursor: pointer;
}

.ticket-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    grid-column: 1 / -1;
}

.ticket-status-message {
    min-height: 1.5rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: var(--text-soft);
}

.ticket-status-message.ok {
    color: var(--brand);
}

.ticket-status-message.error {
    color: #ff9b9b;
}

.ticket-status-message.pending {
    color: #f0c674;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th,
td {
    text-align: left;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table-shell {
    margin-top: 1rem;
    border: 1px solid var(--grid-line);
    border-radius: 1.25rem;
    background: rgba(3, 8, 20, 0.85);
    padding: 1rem;
}

.table-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.table-pager label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.table-pager select {
    border-radius: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(2, 6, 18, 0.9);
    color: var(--text-strong);
    padding: 0.35rem 0.85rem;
}

.table-pager-controls {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.table-pager-controls button {
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    background: rgba(159, 247, 169, 0.15);
    color: var(--brand);
    cursor: pointer;
}

.table-pager-controls button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.table-scroll {
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 360px;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-width: thin;
}

.table-scroll table {
    min-width: 680px;
}

.admin-table-shell tbody tr.active {
    background: rgba(159, 247, 169, 0.18);
    outline: 1px solid rgba(159, 247, 169, 0.55);
    outline-offset: -2px;
}

.admin-table-shell tbody tr:hover {
    background: rgba(159, 247, 169, 0.08);
    cursor: pointer;
}

.case-detail-panel {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid var(--grid-line);
    background: rgba(5, 10, 24, 0.9);
}

.case-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.case-detail-controls {
    display: flex;
    gap: 0.5rem;
}

.case-detail-controls button {
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    background: rgba(159, 247, 169, 0.18);
    color: var(--brand);
    font-size: 1.05rem;
    cursor: pointer;
}

.case-detail-controls button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.case-detail-list {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.case-detail-list div {
    background: rgba(2, 7, 18, 0.8);
    border-radius: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.85rem;
}

.case-detail-list dt {
    margin: 0 0 0.4rem;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.case-detail-list dd {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-strong);
}

.admin-identity {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    background: rgba(159, 247, 169, 0.08);
    border: 1px solid rgba(159, 247, 169, 0.25);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
}

.admin-directory {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-directory h3 {
    margin: 0 0 0.8rem;
    font-size: 1rem;
}

.admin-directory ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.admin-directory-row {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 1fr;
    gap: 0.5rem;
    padding: 0.65rem 0.5rem;
    border-radius: 0.75rem;
    background: rgba(5, 10, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: var(--text-soft);
}

.admin-directory-row.active {
    border-color: var(--brand);
    color: var(--brand);
    background: rgba(159, 247, 169, 0.1);
}

#adminDesk[hidden] {
    display: none !important;
}

#adminDesk.desk-active {
    display: grid;
    gap: 1.25rem;
}

#adminDesk.desk-active > .admin-identity,
#adminDesk.desk-active > .admin-toolbar,
#adminDesk.desk-active > .admin-ticket-controls {
    grid-column: 1 / -1;
}

#adminDesk.desk-active > .admin-table-shell,
#adminDesk.desk-active > .case-detail-panel,
#adminDesk.desk-active > .admin-directory {
    width: 100%;
}

@media (min-width: 1024px) {
    #adminDesk.desk-active {
        grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
        align-items: start;
    }

    #adminDesk.desk-active > .admin-table-shell {
        grid-column: 1 / 2;
    }

    #adminDesk.desk-active > .case-detail-panel,
    #adminDesk.desk-active > .admin-directory {
        grid-column: 2 / 3;
    }

    #adminDesk.desk-active > .case-detail-panel {
        position: sticky;
        top: 0.5rem;
        align-self: start;
    }

    #adminDesk.desk-active > .admin-directory {
        align-self: start;
    }
}

@media (max-width: 1023px) {
    #adminDesk.desk-active {
        grid-template-columns: 1fr;
    }

    #adminDesk.desk-active > .admin-table-shell,
    #adminDesk.desk-active > .case-detail-panel,
    #adminDesk.desk-active > .admin-directory {
        grid-column: 1 / -1;
    }
}

.close-admin {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background: none;
    color: var(--text-soft);
    font-size: 1rem;
    cursor: pointer;
}

@media (max-width: 640px) {
    .brand-text {
        letter-spacing: 0.1em;
        font-size: 0.78rem;
    }

    .hero-card,
    .dynamic-panel,
    .support-card,
    .service-card {
        padding: 1.75rem;
    }

    .admin-filter-form,
    .admin-action-form {
        grid-template-columns: 1fr;
    }

    .filter-actions,
    .ticket-action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .table-pager {
        flex-direction: column;
        align-items: flex-start;
    }

    .case-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

}
