:root {
    color-scheme: light;
    --bg: #eef5ef;
    --surface: rgba(255, 255, 255, 0.68);
    --surface-strong: rgba(255, 255, 255, 0.84);
    --surface-muted: rgba(237, 242, 232, 0.72);
    --glass: rgba(255, 255, 255, 0.58);
    --glass-strong: rgba(255, 255, 255, 0.74);
    --glass-border: rgba(255, 255, 255, 0.68);
    --text: #101513;
    --muted: #63716a;
    --border: rgba(17, 20, 18, 0.1);
    --accent: #111412;
    --accent-dark: #205b44;
    --accent-bright: #b7f34a;
    --cyan: #7ee7d4;
    --aqua: #c4fff3;
    --mint: #e7ffd2;
    --violet: #dcd2ff;
    --danger: #b42318;
    --success: #067647;
    --shadow: 0 24px 70px rgba(17, 20, 18, 0.14);
    --glass-shadow: 0 24px 70px rgba(17, 20, 18, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(183, 243, 74, 0.38), transparent 30%),
        radial-gradient(circle at 88% 4%, rgba(126, 231, 212, 0.34), transparent 28%),
        radial-gradient(circle at 84% 78%, rgba(220, 210, 255, 0.42), transparent 26%),
        linear-gradient(135deg, #f5faee 0%, #eef7f4 44%, #f7f2ff 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.24) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), transparent 72%);
    z-index: -1;
}

a {
    color: var(--accent-dark);
}

.page {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0;
}

.page > h1:first-child,
.page-heading {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 20px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.38);
    box-shadow: 0 18px 44px rgba(17, 20, 18, 0.08);
    backdrop-filter: blur(20px) saturate(1.3);
}

.page > h1:first-child + .muted,
.page > h1:first-child + p {
    margin: 14px 20px 0;
}

.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.panel {
    width: min(520px, 100%);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(24px) saturate(1.35);
    padding: 28px;
}

.panel-wide {
    width: min(760px, 100%);
}

.topbar {
    background: rgba(255, 255, 255, 0.54);
    border-bottom: 1px solid rgba(255, 255, 255, 0.66);
    box-shadow: 0 14px 42px rgba(17, 20, 18, 0.07);
    backdrop-filter: blur(24px) saturate(1.45);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
}

.brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
}

.nav a {
    border: 1px solid rgba(17, 20, 18, 0.08);
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(255, 255, 255, 0.44);
    color: var(--text);
    text-decoration: none;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.76);
}

h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

p {
    margin: 0 0 16px;
}

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

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.two-column {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
    position: relative;
    overflow: hidden;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(22px) saturate(1.35);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.card::before,
.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.08) 42%, rgba(255, 255, 255, 0.28));
    opacity: 0.85;
}

.card > *,
.panel > * {
    position: relative;
}

.grid .card:hover {
    border-color: rgba(255, 255, 255, 0.86);
    box-shadow: 0 28px 78px rgba(17, 20, 18, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.74);
    transform: translateY(-2px);
}

.stat {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    border-radius: 999px;
    padding: 4px 12px;
    background: rgba(17, 20, 18, 0.92);
    color: #ffffff;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
}

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

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

label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(17, 20, 18, 0.1);
    border-radius: 12px;
    padding: 11px 13px;
    font: inherit;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(183, 243, 74, 0.88);
    border-color: rgba(17, 20, 18, 0.24);
}

input,
select {
    min-height: 42px;
}

textarea {
    resize: vertical;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.check-row input {
    width: auto;
    min-height: auto;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
    background: linear-gradient(135deg, #101513, #27332e);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(17, 20, 18, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

button:hover,
.button:hover {
    background: linear-gradient(135deg, #1a241f, #2f6b4f);
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(17, 20, 18, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.58);
    color: var(--text);
    box-shadow: 0 10px 24px rgba(17, 20, 18, 0.08);
    backdrop-filter: blur(16px);
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.82);
}

.alert {
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
    box-shadow: 0 14px 30px rgba(17, 20, 18, 0.08);
    backdrop-filter: blur(18px);
}

.alert-error {
    background: rgba(254, 243, 242, 0.76);
    color: var(--danger);
    border: 1px solid #fecdca;
}

.alert-success {
    background: rgba(236, 253, 243, 0.76);
    color: var(--success);
    border: 1px solid #abefc6;
}

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

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th,
td {
    border-bottom: 1px solid rgba(17, 20, 18, 0.08);
    padding: 12px 10px;
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.28);
}

th:first-child {
    border-top-left-radius: 14px;
}

th:last-child {
    border-top-right-radius: 14px;
}

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

.table-actions {
    white-space: nowrap;
    text-align: right;
}

.table-actions a {
    margin-left: 10px;
}

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

.inline-form button {
    min-height: 34px;
    padding: 6px 10px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.54);
    background: rgba(255, 255, 255, 0.48);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.badge-active {
    background: rgba(236, 253, 243, 0.72);
    color: var(--success);
}

.badge-disabled {
    background: rgba(254, 243, 242, 0.72);
    color: var(--danger);
}

.badge-pending_setup {
    background: rgba(255, 250, 235, 0.72);
    color: #b54708;
}

.badge-pending {
    background: rgba(255, 250, 235, 0.72);
    color: #b54708;
}

.badge-approved {
    background: rgba(236, 253, 243, 0.72);
    color: var(--success);
}

.badge-rejected,
.badge-cancelled {
    background: rgba(254, 243, 242, 0.72);
    color: var(--danger);
}

.details-list {
    display: grid;
    gap: 10px;
    margin: 16px 0 0;
}

.details-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.details-list dt {
    color: var(--muted);
    font-weight: 700;
}

.details-list dd {
    margin: 0;
    text-align: right;
}

.appearance-preview {
    width: 120px;
    max-height: 80px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(12px);
}

.landing {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(circle at 11% 14%, rgba(183, 243, 74, 0.52), transparent 28%),
        radial-gradient(circle at 82% 8%, rgba(126, 231, 212, 0.42), transparent 30%),
        radial-gradient(circle at 74% 72%, rgba(220, 210, 255, 0.48), transparent 28%),
        linear-gradient(135deg, #f8fcef 0%, #f4fbf8 44%, #f8f3ff 100%);
    color: var(--text);
    overflow: hidden;
}

.landing::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.38) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), transparent 70%);
}

.landing-nav {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 0;
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
}

.landing-brand,
.brand {
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: 0 12px 28px rgba(17, 20, 18, 0.07);
    backdrop-filter: blur(16px);
}

.landing-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: calc(100vh - 92px);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 48px;
    align-items: center;
    padding: 28px 0 70px;
    position: relative;
    z-index: 1;
}

.landing-hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    margin: 0 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.48);
    color: #315746;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(17, 20, 18, 0.08);
    backdrop-filter: blur(14px);
}

.landing-hero h1 {
    margin: 0 0 18px;
    max-width: 760px;
    font-size: clamp(48px, 8vw, 92px);
    line-height: 0.94;
    letter-spacing: 0;
}

.landing-hero p {
    max-width: 620px;
    color: #4d5b54;
    font-size: 19px;
}

.phone-scene {
    display: grid;
    place-items: center;
}

.phone-card {
    width: min(360px, 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 34px;
    padding: 22px;
    background: linear-gradient(150deg, rgba(17, 20, 18, 0.92), rgba(32, 48, 41, 0.86));
    color: #ffffff;
    box-shadow: 0 30px 70px rgba(17, 20, 18, 0.28);
    backdrop-filter: blur(24px) saturate(1.4);
}

.phone-topline {
    width: 74px;
    height: 5px;
    margin: 0 auto 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

.wallet-balance {
    border-radius: 24px;
    padding: 22px;
    background: linear-gradient(135deg, rgba(183, 243, 74, 0.98), rgba(126, 231, 212, 0.9));
    color: #111412;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 18px 40px rgba(183, 243, 74, 0.18);
}

.wallet-balance span,
.wallet-row span {
    display: block;
    color: rgba(17, 20, 18, 0.62);
    font-size: 13px;
    font-weight: 800;
}

.wallet-balance strong {
    display: block;
    margin-top: 10px;
    font-size: 44px;
    line-height: 1;
}

.wallet-pill,
.wallet-row {
    margin-top: 14px;
    border-radius: 18px;
    padding: 14px 16px;
    font-weight: 800;
}

.wallet-pill-green {
    background: rgba(183, 243, 74, 0.18);
    color: #dfff9b;
}

.wallet-pill-blue {
    background: rgba(126, 231, 212, 0.18);
    color: #b9fff3;
}

.wallet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(14px);
}

.wallet-row span {
    color: rgba(255, 255, 255, 0.58);
}

.landing-sections {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 0 0 56px;
    position: relative;
    z-index: 1;
}

.landing-sections article {
    min-height: 220px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 20px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.48);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(22px) saturate(1.35);
}

.landing-sections span {
    display: inline-flex;
    margin-bottom: 28px;
    color: #2f6b4f;
    font-weight: 900;
}

.landing-sections h2 {
    font-size: 24px;
}

.landing-sections p {
    color: #52605a;
}

.setup-steps {
    margin: 20px 0;
    padding-left: 20px;
}

@media (max-width: 640px) {
    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .panel {
        padding: 22px;
    }

    .stat {
        font-size: 24px;
    }

    .landing-hero h1 {
        font-size: 46px;
    }
}

@media (max-width: 860px) {
    .landing-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .landing-sections {
        grid-template-columns: 1fr;
    }
}
