:root {
    --bg: #06020d;
    --panel: #0d0915;
    --panel-soft: #16111f;
    --line: rgba(227, 176, 58, 0.28);
    --text: #f5f2ea;
    --muted: #cbbda1;
    --accent: #f0b647;
    --accent-strong: #cf8a16;
    --accent-red: #ff244c;
    --success: #22c55e;
    --error: #ef4444;
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.48);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top, rgba(240, 182, 71, 0.16), transparent 28%),
        radial-gradient(circle at right top, rgba(255, 36, 76, 0.08), transparent 24%),
        linear-gradient(180deg, #020104 0%, var(--bg) 100%);
    color: var(--text);
}

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

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

.auth-card,
.page-shell {
    width: min(100%, 1040px);
    margin: 0 auto;
    padding: 32px 20px 56px;
}

.page-shell-narrow {
    max-width: 900px;
}

.page-shell-login-support {
    padding-top: 0;
}

.login-shell {
    width: min(1120px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 32px 20px 32px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 460px);
    gap: 28px;
    align-items: center;
}

.login-shell-extended {
    min-height: auto;
    padding-bottom: 12px;
}

.auth-card {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.auth-card-app {
    min-height: auto;
    padding: 30px;
    border: 1px solid rgba(240, 182, 71, 0.24);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(11, 7, 18, 0.96), rgba(8, 5, 14, 0.96));
    box-shadow: var(--shadow);
}

.login-brand-panel {
    padding: 34px;
    border-radius: 34px;
    border: 1px solid rgba(240, 182, 71, 0.18);
    background: linear-gradient(180deg, rgba(8, 5, 15, 0.94), rgba(4, 2, 9, 0.94));
    box-shadow: var(--shadow);
}

.brand-notes {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.brand-notes div {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(240, 182, 71, 0.16);
    background: rgba(255, 255, 255, 0.02);
}

.brand-notes strong,
.brand-notes span {
    display: block;
}

.brand-notes span {
    color: var(--muted);
    margin-top: 6px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo-frame {
    width: 92px;
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(21, 12, 30, 0.96), rgba(9, 6, 15, 0.96));
    border: 1px solid rgba(240, 182, 71, 0.26);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo-frame-lg {
    width: min(100%, 420px);
    height: auto;
    padding: 18px;
    margin-top: 18px;
}

.brand-logo {
    width: 84px;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 28px rgba(240, 182, 71, 0.22));
}

.brand-logo-lg {
    width: min(100%, 360px);
}

.brand-logo-original {
    object-fit: contain;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 700;
}

h1,
h2,
h3 {
    margin: 0;
}

p {
    line-height: 1.6;
}

.muted,
.hint {
    color: var(--muted);
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.portal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 18px 22px;
    border: 1px solid rgba(240, 182, 71, 0.18);
    border-radius: 18px;
    background: rgba(10, 7, 18, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(240, 182, 71, 0.18);
    background: rgba(18, 13, 29, 0.74);
    color: var(--text);
    font-weight: 600;
}

.topbar-nav a:hover {
    border-color: rgba(240, 182, 71, 0.56);
    color: #fff1cf;
}

.hero-copy {
    margin-top: 8px;
    max-width: 560px;
}

.hero-panel {
    margin-bottom: 18px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
    gap: 22px;
    align-items: start;
}

.hero-stats {
    display: grid;
    gap: 12px;
    margin: 0;
}

.hero-stats div {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(17, 11, 24, 0.76);
    border: 1px solid rgba(240, 182, 71, 0.14);
}

.hero-stats dt {
    color: var(--muted);
    margin-bottom: 6px;
}

.hero-stats dd {
    margin: 0;
    font-weight: 700;
    font-size: 18px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.grid-main {
    margin-bottom: 18px;
}

.grid-secondary {
    margin-bottom: 18px;
}

.grid-recovery {
    align-items: stretch;
}

.panel {
    background: rgba(13, 9, 21, 0.92);
    border: 1px solid rgba(240, 182, 71, 0.16);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.panel-wide {
    margin-top: 18px;
}

.notice-panel {
    margin-bottom: 18px;
    background: linear-gradient(180deg, rgba(15, 10, 24, 0.98), rgba(8, 5, 15, 0.98));
    border-color: rgba(240, 182, 71, 0.28);
}

.recovery-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.support-card-inner {
    background: rgba(10, 7, 18, 0.68);
}

.panel-heading {
    margin-bottom: 18px;
}

.details {
    display: grid;
    gap: 14px;
    margin: 18px 0 0;
}

.details div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(240, 182, 71, 0.12);
}

.details dt {
    color: var(--muted);
}

.details dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    color: var(--muted);
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(10, 7, 17, 0.96);
    color: var(--text);
    padding: 14px 16px;
    outline: none;
}

textarea {
    resize: vertical;
}

select:focus,
textarea:focus,
input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(240, 182, 71, 0.18);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #2d1700;
}

.btn-secondary {
    background: rgba(28, 19, 44, 0.92);
    color: var(--text);
    border: 1px solid rgba(240, 182, 71, 0.16);
}

.btn-block {
    width: 100%;
}

.alert {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.32);
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.32);
}

.history-list {
    display: grid;
    gap: 12px;
}

.tutorial-list {
    margin: 0;
    padding-left: 20px;
    color: var(--text);
    display: grid;
    gap: 10px;
}

.tutorial-list li {
    line-height: 1.5;
}

.tutorial-bullets {
    padding-left: 18px;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.history-item {
    border: 1px solid rgba(240, 182, 71, 0.14);
    border-radius: 14px;
    padding: 16px;
    background: rgba(14, 9, 22, 0.72);
}

.history-item p {
    margin: 10px 0 0;
    color: var(--text);
}

.history-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.pill-success {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}

.pill-blocked {
    background: rgba(245, 158, 11, 0.16);
    color: #fcd34d;
}

.pill-failed {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
}

.stack-sm,
.stack-md {
    display: grid;
    gap: 14px;
}

.price-line {
    margin: 0;
    color: #fff1cf;
    font-size: 18px;
}

.actions-inline {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.qr-shell {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(240, 182, 71, 0.14);
    margin-bottom: 16px;
}

.qr-image {
    width: min(100%, 280px);
    height: auto;
    display: block;
    border-radius: 16px;
    background: #ffffff;
    padding: 12px;
}

.support-inline-box {
    margin-top: 18px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(240, 182, 71, 0.18);
    background: rgba(255, 255, 255, 0.03);
    display: grid;
    gap: 10px;
}

.support-inline-box strong {
    font-size: 18px;
}
.success-panel {
    border-color: rgba(34, 197, 94, 0.32);
}

@media (max-width: 640px) {
    .login-shell {
        grid-template-columns: 1fr;
        padding-top: 20px;
    }

    .auth-card-app {
        padding: 22px;
    }

    .brand-lockup {
        align-items: flex-start;
    }

    .brand-logo-frame {
        width: 78px;
        height: 78px;
        border-radius: 20px;
    }

    .portal-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar {
        flex-direction: column;
    }

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

    .details div {
        flex-direction: column;
    }

    .details dd {
        text-align: left;
    }

    .actions-inline {
        flex-direction: column;
    }
}
