:root {
    --bg: #090909;
    --bg-soft: rgba(17, 17, 17, 0.9);
    --panel: rgba(17, 17, 17, 0.92);
    --panel-alt: rgba(255, 255, 255, 0.04);
    --line: rgba(232, 184, 75, 0.18);
    --line-soft: rgba(255, 255, 255, 0.08);
    --gold: #e8b84b;
    --gold-soft: rgba(232, 184, 75, 0.12);
    --white: #ffffff;
    --text: rgba(255, 255, 255, 0.86);
    --muted: rgba(255, 255, 255, 0.62);
    --danger: #ff7676;
    --warning: #ffca62;
    --success: #67e8a2;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top, rgba(232, 184, 75, 0.16), transparent 28%),
        linear-gradient(180deg, #050505 0%, #0f0f0f 46%, #070707 100%);
    min-height: 100vh;
}

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

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

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

button {
    cursor: pointer;
}

code {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.15rem 0.35rem;
    border-radius: 0.45rem;
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.narrow {
    width: min(840px, calc(100% - 2rem));
}

.page-main {
    padding: 2rem 0 4rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8, 8, 8, 0.78);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.brand img {
    width: 50px;
    height: 50px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(232, 184, 75, 0.46);
}

.brand strong {
    display: block;
    font-size: 0.98rem;
    letter-spacing: 0.18em;
    color: var(--gold);
}

.brand span {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--gold);
    border-radius: 999px;
    padding: 0.8rem 1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-links a,
.link-button {
    color: var(--muted);
    background: transparent;
    border: 0;
    padding: 0;
}

.nav-links a:hover,
.nav-links a.active,
.link-button:hover,
.text-link:hover {
    color: var(--gold);
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.flash-wrapper {
    display: grid;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.flash {
    border-radius: 18px;
    padding: 0.95rem 1.1rem;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: var(--shadow);
}

.flash-success {
    border-color: rgba(103, 232, 162, 0.25);
    background: rgba(103, 232, 162, 0.1);
}

.flash-error {
    border-color: rgba(255, 118, 118, 0.25);
    background: rgba(255, 118, 118, 0.1);
}

.flash-warning {
    border-color: rgba(255, 202, 98, 0.25);
    background: rgba(255, 202, 98, 0.1);
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.panel-soft {
    background: var(--panel-alt);
}

.centered-panel {
    text-align: center;
    padding: 2.2rem;
}

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.78rem;
    color: var(--gold);
    margin-bottom: 0.65rem;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.15;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.45rem, 3.5vw, 2.2rem);
}

h3 {
    font-size: 1.08rem;
}

p {
    color: var(--muted);
    line-height: 1.7;
}

.lead {
    font-size: 1.15rem;
    color: var(--text);
}

.muted,
.meta,
.helper-text,
small {
    color: var(--muted);
}

.section-stack {
    display: grid;
    gap: 1.4rem;
    margin-top: 2rem;
}

.stack-sm,
.stack-md,
.stack-lg {
    display: grid;
    gap: 1rem;
}

.stack-lg {
    gap: 1.4rem;
}

.hero-grid,
.grid-2,
.profile-grid,
.confirm-grid,
.photo-grid,
.qr-grid,
.footer-grid {
    display: grid;
    gap: 1.4rem;
}

.hero-grid {
    grid-template-columns: 1.3fr 0.9fr;
    align-items: start;
}

.hero-panel {
    position: relative;
    overflow: hidden;
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: 0.25;
    pointer-events: none;
}

.hero-panel > * {
    position: relative;
}

.hero-logo-wrap {
    width: 180px;
    height: 180px;
    padding: 0.85rem;
    border-radius: 40px;
    border: 1px solid rgba(232, 184, 75, 0.3);
    background: rgba(0, 0, 0, 0.36);
    box-shadow: 0 0 42px rgba(232, 184, 75, 0.16);
    margin-bottom: 1.2rem;
}

.hero-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
}

.stat-card strong {
    display: block;
    font-size: 2.2rem;
    color: var(--gold);
    margin-top: 0.4rem;
}

.label {
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: rgba(255, 255, 255, 0.46);
}

.text-success {
    color: var(--success);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1rem;
}

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

.button-row.split {
    align-items: center;
    justify-content: space-between;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border-radius: 999px;
    padding: 0.9rem 1.2rem;
    border: 1px solid var(--line);
    transition: 0.2s ease;
    min-height: 48px;
}

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

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--gold-soft);
    color: var(--gold);
}

.btn-primary:hover {
    box-shadow: 0 10px 30px rgba(232, 184, 75, 0.18);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
}

.text-link {
    color: var(--gold);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.card-grid {
    display: grid;
    gap: 1.2rem;
}

.card-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 20px;
}

.card {
    display: grid;
    gap: 1rem;
}

.badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(232, 184, 75, 0.08);
    color: var(--gold);
    padding: 0.35rem 0.7rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.badge-success {
    border-color: rgba(103, 232, 162, 0.28);
    background: rgba(103, 232, 162, 0.12);
    color: var(--success);
}

.badge-warning {
    border-color: rgba(255, 202, 98, 0.28);
    background: rgba(255, 202, 98, 0.12);
    color: var(--warning);
}

.badge-danger {
    border-color: rgba(255, 118, 118, 0.28);
    background: rgba(255, 118, 118, 0.12);
    color: var(--danger);
}

.member-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 78px;
    height: 78px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(232, 184, 75, 0.3);
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    flex: 0 0 auto;
    box-shadow: 0 0 0 7px rgba(255,255,255,0.03);
}

.status-dot.online {
    background: var(--success);
}

.status-dot.offline {
    background: rgba(255, 255, 255, 0.26);
}

.qr-grid,
.photo-grid,
.confirm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.qr-image,
.profile-photo,
.preview-box img,
.id-card img {
    border-radius: 22px;
}

.preview-box {
    border: 1px dashed rgba(232, 184, 75, 0.28);
    border-radius: 24px;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-box img {
    max-height: 320px;
    object-fit: cover;
}

.form-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.2rem;
}

.form-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label {
    display: grid;
    gap: 0.45rem;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.input {
    width: 100%;
    border-radius: 18px;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(232, 184, 75, 0.22);
    background: rgba(0, 0, 0, 0.35);
    color: var(--white);
    outline: none;
}

.input:focus {
    border-color: rgba(232, 184, 75, 0.6);
}

.input-file {
    width: 100%;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text);
}

.check-row input {
    width: 18px;
    height: 18px;
}

.upload-box {
    border-radius: 24px;
    border: 1px dashed rgba(232, 184, 75, 0.38);
    padding: 1.3rem;
    background: rgba(255,255,255,0.03);
}

.rules-list {
    display: grid;
    gap: 1rem;
    max-height: 460px;
    overflow: auto;
    padding-right: 0.2rem;
}

.rule-card {
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.33);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 1rem;
    line-height: 1.8;
}

.join-wizard {
    margin-top: 1.4rem;
}

.stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.3rem;
}

.step-pill {
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    padding: 0.85rem 0.75rem;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

.step-pill.active {
    border-color: rgba(232, 184, 75, 0.4);
    background: rgba(232, 184, 75, 0.12);
    color: var(--gold);
}

.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
}

.summary-list {
    display: grid;
    gap: 0.75rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.7rem;
}

.summary-row strong {
    color: var(--white);
    text-align: right;
}

.success-card {
    display: grid;
    gap: 1.15rem;
    text-align: center;
    margin-top: 1.4rem;
}

.success-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--gold);
    border: 1px solid rgba(232, 184, 75, 0.4);
    background: rgba(232, 184, 75, 0.1);
    font-weight: 700;
}

.id-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 24px;
    border: 1px solid rgba(232, 184, 75, 0.22);
    background: rgba(0, 0, 0, 0.28);
    text-align: left;
}

.id-card img {
    width: 94px;
    height: 94px;
    object-fit: cover;
}

.profile-grid {
    grid-template-columns: 0.82fr 1.18fr;
    align-items: start;
}

.profile-photo {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.table-wrap {
    overflow: auto;
    margin-top: 1.2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.9rem 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: top;
}

.data-table th {
    color: rgba(255,255,255,0.48);
    font-weight: 600;
}

.empty-cell,
.empty-state {
    color: var(--muted);
    text-align: center;
    padding: 1rem;
}

.action-stack {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    align-items: center;
}

.danger {
    color: var(--danger);
}

.card-list-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    padding: 1rem;
}

.notice {
    margin-top: 1rem;
    border-radius: 18px;
    padding: 0.95rem 1rem;
}

.notice.warning {
    border: 1px solid rgba(255, 202, 98, 0.28);
    background: rgba(255, 202, 98, 0.12);
}

.otp-input {
    text-align: center;
    letter-spacing: 0.55em;
    font-size: 1.1rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.anchor-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.anchor-nav a {
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(232, 184, 75, 0.2);
    background: rgba(232, 184, 75, 0.06);
    color: var(--gold);
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.divider {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.07);
    margin: 1.2rem 0;
}

.detail-card {
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    padding: 1rem 1.1rem;
}

.detail-card summary {
    cursor: pointer;
    color: var(--gold);
    font-weight: 600;
}

.announcement-bar {
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding: 0.85rem 0;
    background: rgba(0, 0, 0, 0.42);
}

.announcement-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold);
    animation: marquee 24s linear infinite;
}

.site-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0, 0, 0, 0.45);
    padding: 2rem 0;
}

.footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-copy {
    text-align: right;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@media (max-width: 960px) {
    .hero-grid,
    .profile-grid,
    .grid-2,
    .card-grid.three,
    .card-grid.two,
    .confirm-grid,
    .photo-grid,
    .footer-grid,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .form-grid.compact {
        grid-template-columns: 1fr;
    }

    .stepper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 0.4rem);
        right: 1rem;
        left: 1rem;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        border: 1px solid var(--line);
        border-radius: 24px;
        background: rgba(8, 8, 8, 0.96);
    }

    .nav-links.open {
        display: flex;
    }

    .card-list-item {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .container,
    .narrow {
        width: min(100% - 1rem, 100%);
    }

    .panel {
        padding: 1.1rem;
        border-radius: 22px;
    }

    .hero-logo-wrap {
        width: 140px;
        height: 140px;
        border-radius: 32px;
    }

    .id-card {
        flex-direction: column;
        text-align: center;
    }

    .summary-row {
        flex-direction: column;
    }

    .footer-copy {
        text-align: left;
    }
}
