:root {
    --ink: #17212b;
    --ink-soft: #56616c;
    --paper: #f5f7f2;
    --card: #ffffff;
    --line: #dfe5dc;
    --green: #166534;
    --green-bright: #22c55e;
    --green-soft: #e7f7eb;
    --amber-soft: #fff7dc;
    --amber: #8a5a00;
    --red-soft: #fff0ef;
    --red: #a92722;
    --shadow: 0 20px 60px rgba(27, 52, 38, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

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

a {
    color: inherit;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
    background:
        radial-gradient(circle at 16% 16%, rgba(34, 197, 94, 0.18), transparent 32%),
        linear-gradient(135deg, #10281c 0%, #183b29 46%, #edf4e9 46%, #f7f8f4 100%);
}

.auth-shell {
    width: min(1060px, 100%);
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.auth-intro {
    align-self: center;
    max-width: 570px;
    padding: 68px;
    color: #fff;
}

.auth-intro h1 {
    max-width: 520px;
    margin: 18px 0;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.intro-copy {
    max-width: 520px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.05rem;
}

.brand-mark {
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    border-radius: 18px 18px 18px 5px;
    color: #123820;
    background: #a7f3b7;
    font-size: 1.55rem;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.brand-mark-small {
    width: 42px;
    height: 42px;
    border-radius: 13px 13px 13px 4px;
    font-size: 1.15rem;
}

.eyebrow {
    margin: 0;
    color: var(--green);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-intro .eyebrow {
    margin-top: 30px;
    color: #a7f3b7;
}

.security-note,
.foundation-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 34px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--green-bright);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.auth-card {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px;
    background: rgba(255, 255, 255, 0.96);
}

.card-heading h2 {
    margin: 10px 0 4px;
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.card-heading > p:last-child {
    margin: 0 0 28px;
    color: var(--ink-soft);
}

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

.field {
    display: grid;
    gap: 8px;
    color: #334039;
    font-size: 0.86rem;
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 49px;
    padding: 11px 14px;
    border: 1px solid #ccd5ca;
    border-radius: 11px;
    outline: none;
    color: var(--ink);
    background: #fff;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.12);
}

.field textarea {
    resize: vertical;
}

.field input[type="file"] {
    padding: 8px;
}

.field-error {
    color: var(--red);
    font-weight: 650;
}

.field-hint {
    color: #7a857d;
    font-weight: 500;
}

.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 750;
    transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

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

.button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.button-primary {
    color: #fff;
    background: var(--green);
    box-shadow: 0 8px 20px rgba(22, 101, 52, 0.22);
}

.button-full {
    width: 100%;
    min-height: 51px;
    margin-top: 4px;
}

.button-quiet {
    color: #304039;
    border-color: var(--line);
    background: #fff;
}

.button-small {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.76rem;
}

.button-success {
    color: var(--green);
    border-color: #b9e4c3;
    background: var(--green-soft);
}

.button-warning {
    color: var(--amber);
    border-color: #eed69a;
    background: var(--amber-soft);
}

.button-danger {
    color: var(--red);
    border-color: #edc7c4;
    background: var(--red-soft);
}

.form-footnote {
    margin: 24px 0 0;
    color: #768078;
    font-size: 0.78rem;
    text-align: center;
}

.alert {
    margin: 0 0 18px;
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.86rem;
}

.alert-success {
    color: var(--green);
    border-color: #b9e4c3;
    background: var(--green-soft);
}

.alert-warning {
    color: var(--amber);
    border-color: #eed69a;
    background: var(--amber-soft);
}

.alert-danger {
    color: var(--red);
    border-color: #edc7c4;
    background: var(--red-soft);
}

.error-card {
    width: min(480px, 100%);
    min-height: auto;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.error-card h1 {
    margin-bottom: 4px;
}

.error-card p {
    margin: 0 0 24px;
    color: var(--ink-soft);
}

.dashboard-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 92% 3%, rgba(34, 197, 94, 0.10), transparent 24%),
        var(--paper);
}

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px max(24px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
}

.brand,
.admin-profile {
    display: flex;
    align-items: center;
}

.brand {
    gap: 11px;
    text-decoration: none;
}

.brand > span:last-child,
.profile-copy {
    display: grid;
}

.brand small,
.profile-copy small {
    color: var(--ink-soft);
    font-size: 0.72rem;
}

.admin-profile {
    gap: 11px;
}

.avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--green);
    background: var(--green-soft);
    font-weight: 850;
}

.profile-copy {
    min-width: 120px;
    line-height: 1.3;
}

.profile-copy strong {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.86rem;
}

.profile-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 2px;
}

.role-badge {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.035em;
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
}

.role-badge-compact {
    padding: 3px 6px;
    font-size: 0.57rem;
}

.role-badge-super-admin {
    color: #7c2d12;
    border-color: #fdba74;
    background: #ffedd5;
}

.role-badge-administrator {
    color: #1e3a8a;
    border-color: #93c5fd;
    background: #dbeafe;
}

.dashboard-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 44px 0 54px;
}

.welcome-panel,
.status-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    border-radius: 22px;
}

.welcome-panel {
    margin-bottom: 42px;
    padding: 34px 38px;
    color: #fff;
    background: linear-gradient(120deg, #143e27, #1e6438);
    box-shadow: 0 20px 50px rgba(20, 62, 39, 0.18);
}

.welcome-panel h1 {
    margin: 8px 0 5px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: -0.045em;
}

.welcome-copy > p:last-child {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}

.welcome-panel .eyebrow {
    color: #a7f3b7;
}

.role-access-card {
    width: min(350px, 100%);
    flex: 0 0 auto;
    display: grid;
    gap: 8px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.role-access-card strong {
    margin-top: 2px;
    font-size: 1rem;
}

.role-access-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.78rem;
}

.role-access-card-super-admin {
    border-color: rgba(253, 186, 116, 0.45);
}

.role-access-card-administrator {
    border-color: rgba(147, 197, 253, 0.45);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.section-heading h2,
.status-panel h2 {
    margin: 5px 0 0;
    font-size: 1.55rem;
    letter-spacing: -0.035em;
}

.muted-label {
    color: #7b867e;
    font-size: 0.78rem;
}

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

.menu-card {
    min-height: 118px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 24px rgba(41, 58, 46, 0.04);
}

.menu-card-link {
    color: inherit;
    text-decoration: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.menu-card-link:hover {
    border-color: #a9c7ad;
    box-shadow: 0 12px 30px rgba(41, 58, 46, 0.09);
    transform: translateY(-2px);
}

.menu-symbol {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.menu-card h3,
.menu-card p {
    margin: 0;
}

.menu-card h3 {
    font-size: 0.98rem;
}

.menu-card p {
    margin-top: 3px;
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.soon-label {
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #7d877f;
    font-size: 0.64rem;
    font-weight: 750;
    text-transform: uppercase;
}

.open-label {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-page-shell {
    width: min(1320px, calc(100% - 40px));
}

.admin-form-shell {
    width: min(1080px, calc(100% - 40px));
}

.page-heading,
.panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.page-heading {
    margin-bottom: 24px;
}

.page-heading h1 {
    margin: 7px 0 4px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.05em;
}

.page-heading p:last-child {
    max-width: 720px;
    margin: 0;
    color: var(--ink-soft);
}

.page-actions,
.form-actions,
.table-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.content-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(41, 58, 46, 0.05);
}

.panel-heading {
    padding: 24px 26px;
    border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
    margin: 5px 0 0;
    font-size: 1.45rem;
    letter-spacing: -0.035em;
}

.content-panel > form {
    padding: 26px;
}

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

.form-actions {
    justify-content: flex-end;
    padding-top: 4px;
}

.foundation-note {
    margin: 0 0 18px;
    padding: 12px 15px;
    border: 1px solid #d9dfcf;
    border-radius: 11px;
    color: #596357;
    background: #f8faef;
    font-size: 0.82rem;
}

.foundation-note strong {
    color: #344032;
}

.empty-state {
    display: grid;
    justify-items: start;
    gap: 7px;
    padding: 44px 28px;
}

.empty-state p {
    margin: 0 0 10px;
    color: var(--ink-soft);
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.data-table th,
.data-table td {
    padding: 15px 14px;
    border-bottom: 1px solid #e8ece6;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: #667168;
    background: #fafbf9;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table time {
    white-space: nowrap;
}

.qris-name-cell {
    min-width: 210px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.qris-name-cell > div,
.table-stack {
    display: grid;
    gap: 3px;
}

.qris-name-cell small,
.table-stack small {
    color: var(--ink-soft);
    white-space: nowrap;
}

.qris-thumbnail {
    width: 78px;
    height: 78px;
    flex: 0 0 auto;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    object-fit: contain;
}

.status-badge {
    display: inline-flex;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-badge-active {
    color: var(--green);
    border-color: #b9e4c3;
    background: var(--green-soft);
}

.status-badge-inactive {
    color: #626c64;
    border-color: #d7ddd5;
    background: #f0f2ef;
}

.status-badge-pending {
    color: #765700;
    background: #FFF1B8;
}

.status-badge-paid {
    color: #075B34;
    background: #DDF7E9;
}

.status-badge-rejected {
    color: #962A2A;
    background: #FFE1E1;
}

.withdrawal-admin-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.withdrawal-admin-summary > div {
    display: grid;
    gap: 5px;
    padding: 17px 19px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 10px 28px rgba(27, 52, 38, 0.07);
}

.withdrawal-admin-summary span {
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.withdrawal-admin-summary strong {
    font-size: 1.55rem;
}

.table-actions {
    min-width: 245px;
}

.qris-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 28px;
}

.form-main-column {
    display: grid;
    gap: 18px;
}

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

.qris-preview-panel {
    align-self: start;
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fafbf9;
}

.qris-preview-panel img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    object-fit: contain;
}

.qris-preview-panel > small {
    color: var(--ink-soft);
}

.preview-placeholder {
    min-height: 220px;
    display: grid;
    place-items: center;
    padding: 24px;
    border: 1px dashed #cbd4c9;
    border-radius: 10px;
    color: #7b867e;
    background: #fff;
    font-size: 0.8rem;
    text-align: center;
}

.status-panel {
    margin-top: 36px;
    padding: 28px 32px;
    border: 1px solid var(--line);
    background: #fff;
}

.status-list {
    display: flex;
    gap: 34px;
    margin: 0;
}

.status-list div {
    display: grid;
    gap: 3px;
}

.status-list dt {
    color: #7a857d;
    font-size: 0.7rem;
    font-weight: 750;
    text-transform: uppercase;
}

.status-list dd {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
}

.footer {
    padding: 0 20px 30px;
    color: #7a857d;
    font-size: 0.76rem;
    text-align: center;
}

@media (max-width: 900px) {
    .auth-body {
        padding: 20px;
        background: #143e27;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .auth-intro {
        padding: 42px 44px;
    }

    .auth-intro h1 {
        font-size: 2.6rem;
    }

    .auth-card {
        padding: 44px;
    }

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

    .welcome-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .role-access-card {
        width: 100%;
    }

    .status-panel,
    .status-list {
        align-items: flex-start;
        flex-direction: column;
    }

    .status-list {
        gap: 16px;
    }

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

    .qris-preview-panel {
        max-width: 340px;
    }
}

@media (max-width: 620px) {
    .auth-body {
        padding: 0;
        place-items: stretch;
    }

    .auth-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .auth-intro {
        padding: 34px 24px;
    }

    .auth-intro h1 {
        margin: 12px 0;
        font-size: 2.15rem;
    }

    .auth-intro .eyebrow {
        margin-top: 20px;
    }

    .security-note {
        display: none;
    }

    .auth-card {
        padding: 38px 24px;
    }

    .topbar {
        align-items: flex-start;
        padding: 13px 16px;
    }

    .profile-copy,
    .avatar {
        display: none;
    }

    .dashboard-shell {
        width: min(100% - 28px, 1180px);
        padding-top: 26px;
    }

    .withdrawal-admin-summary {
        grid-template-columns: 1fr;
    }

    .welcome-panel {
        padding: 26px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading,
    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-actions {
        width: 100%;
    }

    .settings-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .content-panel > form,
    .panel-heading {
        padding: 20px;
    }

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

    .menu-card {
        min-height: 104px;
    }
}
