@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap");

:root {
    --bg: #08111f;
    --bg-soft: #0f1d33;
    --panel: rgba(10, 20, 37, 0.88);
    --panel-strong: rgba(8, 16, 29, 0.94);
    --panel-light: rgba(255, 255, 255, 0.05);
    --card: rgba(11, 20, 35, 0.9);
    --card-2: rgba(16, 29, 51, 0.86);
    --text: #ebf2ff;
    --muted: #9cb0cf;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);
    --brand: #ff7a1a;
    --brand-soft: rgba(255, 122, 26, 0.16);
    --brand-strong: #ff9347;
    --brand-dark: #c95505;
    --accent: #6ee7f9;
    --success-bg: rgba(34, 197, 94, 0.18);
    --success-text: #94f6b5;
    --danger: #ff8d8d;
    --danger-bg: rgba(255, 102, 102, 0.14);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 122, 26, 0.2), transparent 28%),
        radial-gradient(circle at top right, rgba(110, 231, 249, 0.16), transparent 24%),
        linear-gradient(180deg, #0a1424 0%, #08111f 48%, #060d18 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: 0;
    border-radius: 999px;
    filter: blur(12px);
}

body::before {
    top: 88px;
    right: -140px;
    width: 320px;
    height: 320px;
    background: rgba(255, 122, 26, 0.12);
}

body::after {
    bottom: 60px;
    left: -120px;
    width: 280px;
    height: 280px;
    background: rgba(110, 231, 249, 0.08);
}

a {
    color: #ffd0ad;
    text-decoration: none;
}

a:hover {
    color: #fff2e8;
}

.wrap {
    position: relative;
    z-index: 1;
    width: min(1240px, calc(100% - 32px));
    margin: 28px auto 56px;
}

.hero,
.card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.hero {
    padding: 34px;
    margin-bottom: 24px;
    background:
        linear-gradient(135deg, rgba(255, 122, 26, 0.22), transparent 36%),
        radial-gradient(circle at 85% 18%, rgba(110, 231, 249, 0.14), transparent 20%),
        linear-gradient(145deg, rgba(16, 31, 57, 0.96), rgba(7, 14, 26, 0.98));
}

.hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -90px;
    width: 280px;
    height: 280px;
    border-radius: 42px;
    background:
        linear-gradient(135deg, rgba(255, 122, 26, 0.2), rgba(255, 122, 26, 0.03)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
    transform: rotate(22deg);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero-badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.brand-badge,
.hero-chip,
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #fff4ea;
}

.brand-badge::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffb26b, var(--brand));
    box-shadow: 0 0 18px rgba(255, 122, 26, 0.55);
}

.hero-chip,
.status-chip {
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.hero h1,
.card h2,
.card h3,
.qr h1 {
    margin: 0;
    font-family: "Sora", "Manrope", sans-serif;
    letter-spacing: -0.03em;
}

.hero h1 {
    max-width: 720px;
    font-size: clamp(2.2rem, 5vw, 4.3rem);
    line-height: 0.96;
    margin-bottom: 16px;
}

.hero p {
    max-width: 760px;
    margin: 0 0 14px;
    color: #d6e3fb;
    font-size: 1.02rem;
    line-height: 1.7;
}

.hero .muted {
    color: #a6bddc;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.hero-metric {
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-metric span {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.hero-metric strong {
    display: block;
    margin-top: 6px;
    font-size: 1.7rem;
    color: #fff;
}

.grid {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(300px, 0.78fr);
    gap: 24px;
}

.card {
    padding: 26px;
    margin-bottom: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
        linear-gradient(180deg, rgba(14, 24, 43, 0.94), rgba(10, 18, 32, 0.96));
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.card h3 {
    font-size: 1rem;
    margin: 0 0 12px;
}

.login-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 34px;
    background:
        linear-gradient(135deg, rgba(255, 122, 26, 0.13), transparent 42%),
        linear-gradient(180deg, rgba(12, 23, 41, 0.96), rgba(8, 15, 26, 0.98));
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    color: #d9e7ff;
}

.stat strong {
    display: block;
    margin-top: 10px;
    font-size: 1.55rem;
    color: #fff;
}

form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: #f7fbff;
}

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

input,
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: #7f95b5;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(255, 122, 26, 0.65);
    box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

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

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 16px;
    border: 0;
    cursor: pointer;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

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

button,
.button.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 14px 30px rgba(255, 122, 26, 0.24);
}

.button.secondary {
    color: #e8f0ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.button.danger {
    color: #ffd2d2;
    background: var(--danger-bg);
    border: 1px solid rgba(255, 141, 141, 0.16);
}

.table-wrap {
    overflow-x: auto;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: top;
}

thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #98accd;
    background: rgba(255, 255, 255, 0.02);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.035);
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.pill.active {
    background: var(--success-bg);
    color: var(--success-text);
}

.pill.inactive {
    background: var(--danger-bg);
    color: #ffb4b4;
}

.flash {
    padding: 16px 18px;
    border-radius: 18px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.flash.success {
    background: rgba(22, 163, 74, 0.15);
    color: #baf4ce;
}

.flash.error {
    background: rgba(220, 38, 38, 0.14);
    color: #ffc4c4;
}

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

.danger-form {
    margin-top: 10px;
}

.qr {
    display: grid;
    justify-items: center;
    gap: 14px;
    text-align: center;
}

.qr-card {
    max-width: 600px;
    margin: 40px auto;
    padding: 32px;
}

.qr img {
    max-width: 100%;
    width: 280px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #fff;
    padding: 18px;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.28);
}

ul {
    margin: 0;
    padding-left: 18px;
}

li + li {
    margin-top: 8px;
}

code {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff1e6;
}

@media (max-width: 1040px) {
    .grid,
    .stats,
    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .wrap {
        width: min(100% - 24px, 980px);
    }
}

@media (max-width: 720px) {
    body {
        background:
            radial-gradient(circle at top left, rgba(255, 122, 26, 0.16), transparent 26%),
            linear-gradient(180deg, #0a1424 0%, #08111f 48%, #060d18 100%);
    }

    .wrap {
        width: calc(100% - 18px);
        margin: 18px auto 34px;
    }

    .hero,
    .card,
    .login-card,
    .qr-card {
        padding: 22px;
        border-radius: 24px;
    }

    .hero h1 {
        font-size: 2.15rem;
    }

    th,
    td {
        padding: 14px 12px;
    }
}
