:root {
    --brand-50: #f2f8ec;
    --brand-100: #dfeecf;
    --brand-200: #c0dca6;
    --brand-400: #76a84e;
    --brand-500: #5a8b38;
    --brand-600: #467235;
    --brand-700: #38592a;
    --brand-900: #283f24;
    --brand-950: #162610;
    --accent-500: #ffbf00;
    --surface: #f7faec;
    --neutral-50: #fafafa;
    --neutral-100: #f4f4f5;
    --neutral-200: #e4e4e7;
    --neutral-300: #d4d4d8;
    --neutral-400: #a1a1aa;
    --neutral-500: #71717a;
    --neutral-600: #52525b;
    --neutral-700: #3f3f46;
    --neutral-800: #27272a;
    --neutral-900: #18181b;
    --neutral-950: #0a0a0b;
    --coral-50: #fff3f1;
    --coral-500: #f04e2e;
    --shadow-soft: 0 1px 2px rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.04);
    --shadow-md: 0 8px 20px rgb(22 38 16 / 0.08);
    --shadow-xl: 0 24px 54px rgb(22 38 16 / 0.22);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--neutral-50);
    color: var(--neutral-900);
}

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

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 256px 1fr;
    background: var(--neutral-50);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--brand-900);
    color: white;
    display: flex;
    flex-direction: column;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 58px;
    padding: 14px 16px;
    border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--brand-400), var(--brand-700));
    color: white;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25);
}

.brand-name {
    display: block;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-sub {
    display: block;
    margin-top: 1px;
    color: rgb(255 255 255 / 0.55);
    font-size: 11px;
}

.sidebar-nav {
    padding: 12px 10px;
}

.nav-kicker {
    padding: 14px 10px 7px;
    color: rgb(255 255 255 / 0.58);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    border-radius: 10px;
    padding: 9px 11px;
    color: rgb(255 255 255 / 0.78);
    font-size: 14px;
    font-weight: 650;
    transition: 150ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: white;
    background: var(--brand-600);
}

.sidebar-footer {
    margin-top: auto;
    padding: 14px;
    border-top: 1px solid rgb(255 255 255 / 0.08);
    color: rgb(255 255 255 / 0.55);
    font-size: 12px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 28px;
    border-bottom: 1px solid rgb(228 228 231 / 0.8);
    background: rgb(255 255 255 / 0.84);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-soft);
}

.topbar h1 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main {
    padding: 28px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgb(90 139 56 / 0.28);
    background: rgb(90 139 56 / 0.12);
    color: var(--brand-700);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
}

.page-title {
    margin: 12px 0 0;
    font-size: 26px;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.page-subtitle {
    margin: 7px 0 0;
    color: var(--neutral-500);
    font-size: 14px;
}

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

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

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

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

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

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

.card {
    border: 1px solid var(--neutral-200);
    border-radius: 14px;
    background: white;
    box-shadow: var(--shadow-soft);
    padding: 18px;
}

.card.flush {
    padding: 0;
    overflow: hidden;
}

.card-title {
    margin: 0 0 12px;
    color: var(--neutral-700);
    font-size: 14px;
    font-weight: 800;
}

.stat-card {
    min-height: 124px;
}

.stat-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.stat-label {
    color: var(--neutral-500);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.07em;
}

.stat-icon,
.icon-tile {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--brand-50);
    color: var(--brand-600);
    font-size: 12px;
    font-weight: 900;
}

.stat-value {
    margin-top: 14px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.stat-foot,
.muted {
    color: var(--neutral-500);
    font-size: 13px;
}

.trend-good {
    color: #059669;
}

.trend-warn {
    color: #b45309;
}

.btn {
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 9px 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand-600);
    color: white;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    background: var(--brand-700);
}

.btn-outline {
    background: white;
    color: var(--neutral-700);
    border-color: var(--neutral-300);
}

.btn-dark {
    background: rgb(255 255 255 / 0.1);
    color: white;
    border-color: rgb(255 255 255 / 0.18);
}

.badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--neutral-200);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
}

.badge-success {
    background: #ecfdf5;
    color: #047857;
    border-color: #bbf7d0;
}

.badge-warn {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.badge-danger {
    background: var(--coral-50);
    color: #b32512;
    border-color: #ffcabf;
}

.badge-brand {
    background: var(--brand-50);
    color: var(--brand-700);
    border-color: var(--brand-200);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    color: var(--neutral-500);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
    background: var(--neutral-50);
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--neutral-100);
}

td {
    color: var(--neutral-700);
}

.table-responsive {
    overflow-x: auto;
}

.name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--brand-100);
    color: var(--brand-700);
    display: grid;
    place-items: center;
    font-weight: 800;
}

.actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.icon-btn {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--brand-600);
    border-radius: 8px;
    font-weight: 800;
}

.icon-btn:hover {
    background: var(--brand-50);
}

.chart {
    height: 220px;
    border-radius: 12px;
    background:
        linear-gradient(to top, transparent 0 23%, rgb(228 228 231 / 0.55) 24%, transparent 25% 48%, rgb(228 228 231 / 0.55) 49%, transparent 50% 73%, rgb(228 228 231 / 0.55) 74%, transparent 75%),
        linear-gradient(130deg, rgb(90 139 56 / 0.15), transparent 55%);
    position: relative;
    overflow: hidden;
}

.chart::after {
    content: "";
    position: absolute;
    inset: 34px 26px 36px;
    background: linear-gradient(to top, rgb(90 139 56 / 0.18), transparent);
    clip-path: polygon(0 75%, 16% 58%, 28% 64%, 43% 38%, 58% 48%, 74% 24%, 100% 16%, 100% 100%, 0 100%);
    border-bottom: 2px solid rgb(90 139 56 / 0.45);
}

.bar-chart {
    height: 220px;
    display: flex;
    align-items: end;
    gap: 10px;
    padding: 28px 22px;
    border-radius: 12px;
    background: var(--neutral-50);
}

.bar-chart span {
    flex: 1;
    min-width: 14px;
    border-radius: 9px 9px 3px 3px;
    background: linear-gradient(180deg, var(--brand-400), var(--brand-700));
}

.feature-list {
    display: grid;
    gap: 10px;
}

.feature-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--neutral-600);
    font-size: 13px;
}

.check {
    width: 20px;
    height: 20px;
    border-radius: 7px;
    background: var(--brand-50);
    color: var(--brand-600);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 900;
}

.function-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.function-strip span {
    border-radius: 999px;
    background: var(--neutral-100);
    color: var(--neutral-600);
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
}

.hero {
    color: white;
    background:
        radial-gradient(ellipse 70% 65% at 62% 38%, rgb(118 168 78 / 0.26) 0%, rgb(74 222 128 / 0.08) 40%, transparent 70%),
        var(--brand-950);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgb(255 255 255 / 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}

.public-nav,
.hero-inner,
.site-section,
.footer-inner {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    position: relative;
}

.public-nav {
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.public-nav nav {
    display: flex;
    gap: 18px;
    color: rgb(255 255 255 / 0.76);
    font-size: 13px;
    font-weight: 650;
}

.hero-inner {
    padding: 74px 0 72px;
    text-align: center;
}

.hero-inner h1 {
    max-width: 900px;
    margin: 18px auto 0;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 0.96;
    letter-spacing: -0.075em;
}

.hero-inner p {
    max-width: 670px;
    margin: 22px auto 0;
    color: rgb(255 255 255 / 0.72);
    font-size: 18px;
    line-height: 1.65;
}

.hero-actions {
    margin-top: 34px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    border-top: 1px solid rgb(255 255 255 / 0.08);
    padding: 28px 0 34px;
}

.metrics strong {
    display: block;
    color: var(--brand-400);
    font-size: 30px;
    letter-spacing: -0.04em;
}

.metrics span {
    color: rgb(255 255 255 / 0.56);
    font-size: 13px;
}

.site-section {
    padding: 60px 0;
}

.section-title {
    max-width: 680px;
    margin-bottom: 28px;
}

.section-title h2 {
    margin: 12px 0 0;
    font-size: 34px;
    letter-spacing: -0.055em;
}

.dark-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: 22px;
    padding: 24px;
    background: var(--brand-950);
    color: white;
    box-shadow: var(--shadow-xl);
}

.ticket-card::after,
.dark-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgb(255 255 255 / 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 0.04) 1px, transparent 1px);
    background-size: 34px 34px;
}

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

.event-visual {
    min-height: 190px;
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgb(22 38 16 / 0.42), rgb(22 38 16 / 0.06)),
        radial-gradient(circle at 20% 20%, #ffbf00, transparent 23%),
        radial-gradient(circle at 80% 22%, #76a84e, transparent 26%),
        linear-gradient(135deg, #162610, #467235);
}

.ticket-preview {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.qr {
    width: 112px;
    height: 112px;
    background:
        linear-gradient(90deg, #111 10px, transparent 10px 20px, #111 20px 30px, transparent 30px 40px),
        linear-gradient(#111 10px, transparent 10px 20px, #111 20px 30px, transparent 30px 40px),
        white;
    background-size: 40px 40px;
    border: 8px solid white;
    border-radius: 12px;
}

.phone-scanner {
    max-width: 360px;
    border-radius: 34px;
    padding: 14px;
    background: var(--neutral-950);
    box-shadow: var(--shadow-xl);
}

.phone-screen {
    min-height: 590px;
    border-radius: 25px;
    overflow: hidden;
    color: white;
    background:
        radial-gradient(circle at 50% 35%, rgb(90 139 56 / 0.2), transparent 40%),
        var(--brand-950);
    padding: 18px;
}

.scan-window {
    height: 280px;
    border: 2px solid rgb(255 255 255 / 0.35);
    border-radius: 24px;
    margin: 18px 0;
    display: grid;
    place-items: center;
    background:
        linear-gradient(rgb(255 255 255 / 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

.scan-result {
    border-radius: 18px;
    background: rgb(16 185 129 / 0.18);
    border: 1px solid rgb(16 185 129 / 0.35);
    padding: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    color: var(--neutral-700);
    font-size: 12px;
    font-weight: 750;
}

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

.input {
    width: 100%;
    min-height: 40px;
    border-radius: 9px;
    border: 1px solid var(--neutral-300);
    background: white;
    color: var(--neutral-700);
    padding: 9px 12px;
    font: inherit;
    font-size: 13px;
}

.compact-input {
    width: auto;
    min-height: 32px;
    padding: 6px 9px;
}

.compact-wide-input {
    width: min(360px, 100%);
    min-height: 32px;
    padding: 6px 9px;
}

.ticket-qty {
    width: 86px;
    text-align: center;
    font-weight: 800;
}

.subrow td {
    background: var(--neutral-50);
    padding-top: 8px;
    padding-bottom: 14px;
}

.fedapay-company-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.fedapay-status-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.mini-label {
    display: block;
    color: var(--neutral-500);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.textarea {
    min-height: 96px;
    resize: vertical;
}

.textarea.tall {
    min-height: 150px;
}

.switch-row,
.check-row {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--neutral-600);
    font-size: 13px;
    font-weight: 650;
}

.switch-row input,
.check-row input {
    accent-color: var(--brand-600);
}

.section-form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.permission-grid strong {
    display: block;
    margin-bottom: 8px;
    color: var(--neutral-700);
    font-size: 12px;
}

.topbar-user {
    color: var(--neutral-500);
    font-size: 12px;
    font-weight: 750;
}

.flash {
    margin-bottom: 16px;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
}

.flash-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #bbf7d0;
}

.flash-info {
    background: var(--brand-50);
    color: var(--brand-700);
    border: 1px solid var(--brand-200);
}

.flash-danger {
    background: var(--coral-50);
    color: #b32512;
    border: 1px solid #ffcabf;
}

.secure-note {
    border: 1px solid rgb(90 139 56 / 0.18);
    border-radius: 12px;
    background: rgb(90 139 56 / 0.08);
    color: var(--brand-700);
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 750;
}

.pagination-wrap {
    padding: 14px;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    background: var(--neutral-50);
}

.auth-visual {
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: space-between;
    min-height: 100vh;
    padding: 34px;
    color: white;
    background:
        radial-gradient(ellipse 65% 55% at 70% 30%, rgb(118 168 78 / 0.34), transparent 64%),
        radial-gradient(circle at 18% 78%, rgb(255 191 0 / 0.16), transparent 24%),
        var(--brand-950);
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(ellipse 90% 85% at 55% 20%, black 35%, transparent 100%);
}

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

.auth-visual h1 {
    max-width: 760px;
    margin: 18px 0 0;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.92;
    letter-spacing: -0.08em;
}

.auth-visual p {
    max-width: 600px;
    color: rgb(255 255 255 / 0.66);
    font-size: 17px;
    line-height: 1.65;
}

.auth-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.auth-metrics div {
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 18px;
    padding: 18px;
    background: rgb(255 255 255 / 0.06);
    backdrop-filter: blur(12px);
}

.auth-metrics strong {
    display: block;
    color: var(--brand-400);
    font-size: 26px;
}

.auth-metrics span {
    color: rgb(255 255 255 / 0.58);
    font-size: 12px;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 34px;
}

.auth-card {
    width: min(100%, 430px);
    display: grid;
    gap: 16px;
    border: 1px solid var(--neutral-200);
    border-radius: 24px;
    padding: 28px;
    background: white;
    box-shadow: var(--shadow-xl);
}

.auth-card h2 {
    margin: 0;
    font-size: 32px;
    letter-spacing: -0.055em;
}

.footer {
    background: var(--brand-950);
    color: rgb(255 255 255 / 0.6);
    border-top: 1px solid rgb(255 255 255 / 0.08);
}

.footer-inner {
    padding: 44px 0;
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .cols-5,
    .cols-6,
    .cols-4,
    .cols-3,
    .cols-2,
    .auth-shell {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .main,
    .topbar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .page-header {
        flex-direction: column;
    }

    .cols-5,
    .cols-6,
    .cols-4,
    .cols-3,
    .cols-2,
    .metrics,
    .form-grid,
    .permission-grid,
    .auth-shell,
    .auth-metrics {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: auto;
        gap: 34px;
    }

    .public-nav nav,
    .topbar-actions {
        display: none;
    }
}

.repeater-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.repeater-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.repeater-row input {
    flex: 1;
    min-width: 0;
}

.repeater-row .repeater-remove {
    flex: 0 0 auto;
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    align-items: center;
}

.logo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    border-radius: 14px;
    background: var(--brand-50, #f4f6f2);
    min-height: 72px;
}

.logo-card img {
    max-width: 100%;
    max-height: 40px;
    object-fit: contain;
}

.compact-btn {
    padding: 6px 12px;
    font-size: 12px;
}
