:root {
    --navy-950: #06131f;
    --navy-900: #081824;
    --navy-800: #0f2537;
    --navy-700: #18384f;
    --cyan-500: #22c7a9;
    --cyan-400: #39e1c2;
    --cyan-soft: rgba(34, 199, 169, 0.14);
    --bg-dark: #050b12;
    --bg-soft: #f4f7fb;
    --surface-dark: #0b1b29;
    --surface-light: #ffffff;
    --text-main: #f8fbff;
    --text-dark: #102030;
    --text-muted: #8ea0b3;
    --border-dark: rgba(255,255,255,0.08);
    --border-light: rgba(15,37,55,0.12);
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-soft: 0 10px 28px rgba(0,0,0,0.16);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 400;
    background: var(--bg-dark);
}

body.user-theme {
    background:
        radial-gradient(circle at top center, rgba(34, 199, 169, 0.08), transparent 20%),
        linear-gradient(180deg, var(--bg-dark) 0%, #08111b 48%, #09131c 100%);
    color: var(--text-main);
}

html {
    background-color: var(--bg-dark);
}

body.user-theme,
.site-shell,
.user-shell {
    background-color: var(--bg-dark);
}

body.admin-theme,
body.seller-theme {
    background: var(--bg-soft);
    color: var(--text-dark);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-dark);
    background: rgba(255,255,255,0.04);
    color: var(--text-main);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

body.admin-theme input,
body.admin-theme select,
body.admin-theme textarea,
body.seller-theme input,
body.seller-theme select,
body.seller-theme textarea {
    border: 1px solid var(--border-light);
    background: var(--surface-light);
    color: var(--text-dark);
}

textarea {
    min-height: 108px;
    padding-top: 10px;
    padding-bottom: 10px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(34, 199, 169, 0.72);
    box-shadow: 0 0 0 4px rgba(34, 199, 169, 0.12);
}

label {
    display: grid;
    gap: 8px;
    font-weight: 500;
}

label span {
    font-size: 13px;
    letter-spacing: .02em;
}

.btn,
button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--radius-md);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover,
button[type="submit"]:hover {
    transform: translateY(-1px);
}

.btn-primary,
button[type="submit"] {
    background: var(--cyan-500);
    color: #04201c;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(34, 199, 169, 0.18);
}

.btn-secondary {
    background: rgba(255,255,255,0.04);
    color: var(--text-main);
    border: 1px solid var(--border-dark);
}

body.admin-theme .btn-secondary,
body.seller-theme .btn-secondary {
    background: var(--surface-light);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.flash {
    position: fixed;
    left: 50%;
    top: 18px;
    transform: translateX(-50%);
    z-index: 1000;
    width: min(420px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 22px 50px rgba(0,0,0,0.28);
    backdrop-filter: blur(14px);
    transition: opacity .26s ease, transform .26s ease;
}

.flash-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    font-size: 18px;
}

.flash-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.flash-copy strong {
    font-size: 14px;
    font-weight: 700;
}

.flash-copy p {
    margin: 0;
    color: rgba(255,255,255,0.92);
    font-size: 13px;
    line-height: 1.55;
}

.flash-close {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 10px;
    border: 0;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.88);
    box-shadow: none;
}

.flash-close:hover {
    transform: none;
    background: rgba(255,255,255,0.14);
}

.flash-success {
    background: linear-gradient(180deg, rgba(19, 125, 103, 0.98), rgba(14, 98, 81, 0.98));
}

.flash-error {
    background: linear-gradient(180deg, rgba(196, 69, 69, 0.98), rgba(153, 44, 44, 0.98));
}

.flash-warning {
    background: linear-gradient(180deg, rgba(205, 117, 36, 0.98), rgba(164, 87, 18, 0.98));
}

.flash-info {
    background: linear-gradient(180deg, rgba(41, 104, 167, 0.98), rgba(28, 79, 131, 0.98));
}

.fade-in {
    animation: fadeUp .42s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stack-form {
    display: grid;
    gap: 13px;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-panel {
    padding: 16px 14px 104px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 14px;
}

.section-head h2,
.panel-topbar h1 {
    margin: 6px 0 0;
}

.section-head a {
    color: var(--cyan-400);
    font-weight: 500;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--cyan-soft);
    color: var(--cyan-400);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.empty-box {
    padding: 22px 16px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-dark);
    text-align: center;
    color: var(--text-muted);
    background: rgba(255,255,255,0.02);
}

body.admin-theme .empty-box,
body.seller-theme .empty-box {
    border: 1px dashed var(--border-light);
    background: rgba(15, 37, 55, 0.03);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 11px 10px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    white-space: nowrap;
}

tbody tr:hover {
    background: rgba(15, 37, 55, 0.03);
}

.table-link {
    color: var(--navy-800);
    font-weight: 700;
}

.site-footer-frame {
    margin: 24px 0 92px;
    padding: 0 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.site-footer-grid {
    display: grid;
    gap: 28px;
    padding: 28px 0 0;
}

.footer-brand-block,
.footer-nav-block,
.footer-contact-block {
    display: grid;
    gap: 12px;
}

.footer-brand-image {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.site-footer-frame h3 {
    margin: 0;
    color: rgba(255,255,255,0.44);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .16em;
}

.site-footer-frame p,
.site-footer-frame span {
    margin: 0;
    color: var(--text-muted);
}

.site-footer-frame strong {
    color: var(--cyan-400);
}

.footer-nav-block a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-brand-block strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-dark);
    background: rgba(255,255,255,0.03);
}

.footer-support-box {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(34, 199, 169, 0.2);
    background: rgba(34, 199, 169, 0.06);
}

.footer-bottom-line {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 0 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 24px;
}

.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(14px);
    min-height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(8, 20, 32, 0.94);
    border: 1px solid rgba(47, 212, 192, 0.24);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
    color: #ecfffb;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 9999;
}

.copy-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (min-width: 960px) {
    .page-panel {
        padding: 22px 22px 46px;
    }

    .user-shell .page-panel {
        max-width: 1560px;
        margin: 0 auto;
    }

    .site-footer-frame {
        padding: 0 28px;
        margin-bottom: 40px;
    }

    .site-footer-grid {
        grid-template-columns: 1.2fr .9fr 1fr;
        padding: 28px;
    }

    .footer-bottom-line {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

@media (max-width: 719px) {
    .page-panel {
        padding: 12px 10px 94px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin: 18px 0 14px;
    }

    .section-head h2,
    .panel-topbar h1 {
        font-size: 23px;
        line-height: 1.15;
    }

    .table-wrap {
        margin: 0 -2px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    table th,
    table td {
        padding: 12px 10px;
        font-size: 13px;
    }

    .flash {
        top: 12px;
        width: min(420px, calc(100vw - 20px));
        padding: 12px 14px;
    }

    .site-footer-frame {
        margin: 22px 0 82px;
        padding: 0 12px;
    }

    .site-footer-grid {
        gap: 20px;
        padding-top: 22px;
    }
}
