:root {
    --bg: #edf4f1;
    --surface: #ffffff;
    --text: #10211b;
    --muted: #71817a;
    --line: #dfe9e4;
    --primary: #07966a;
    --primary-dark: #057753;
    --soft: #e7f7f0;
    --danger: #bd3b4a;
    --danger-soft: #fff0f2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

button,
input,
select {
    font: inherit;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, .9fr) minmax(420px, .65fr);
    align-items: stretch;
}

.auth-brand {
    padding: clamp(42px, 8vw, 110px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    background:
        radial-gradient(circle at 80% 15%, rgba(75, 224, 170, .25), transparent 28%),
        linear-gradient(135deg, #061b15, #075f43);
}

.logo,
.mobile-logo {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: #42dda6;
    color: #073e2c;
    font-size: 22px;
    font-weight: 900;
}

.mobile-logo {
    display: none;
}

.auth-brand > span,
.eyebrow {
    margin-top: 30px;
    color: #57e7b2;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .18em;
}

.auth-brand h1 {
    max-width: 720px;
    margin: 15px 0;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -.05em;
}

.auth-brand p {
    max-width: 650px;
    margin: 0;
    color: #bdd7cd;
    line-height: 1.7;
}

.auth-card {
    width: min(520px, calc(100% - 40px));
    margin: auto;
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 25px 80px rgba(12, 36, 27, .09);
}

.register-card {
    width: min(720px, calc(100% - 40px));
}

.auth-card h2 {
    margin: 8px 0;
    font-size: 28px;
}

.muted {
    margin: 0 0 25px;
    color: var(--muted);
    font-size: 13px;
}

label {
    display: grid;
    gap: 8px;
    margin-bottom: 17px;
    font-size: 11px;
    font-weight: 800;
}

input,
select {
    width: 100%;
    height: 47px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    color: var(--text);
    background: #fbfdfc;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(7, 150, 106, .1);
}

.remember {
    display: flex;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.remember input {
    width: 16px;
    height: 16px;
}

.primary {
    width: 100%;
    min-height: 47px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-weight: 850;
    cursor: pointer;
}

.primary:hover {
    background: var(--primary-dark);
}

.auth-footer {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

.auth-footer a,
.controller-actions a {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.alert {
    margin: 15px 0;
    padding: 13px 15px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
}

.alert.success {
    background: var(--soft);
    color: var(--primary-dark);
}

.alert.error {
    background: var(--danger-soft);
    color: var(--danger);
}

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

.form-grid .wide {
    grid-column: 1 / -1;
}

.controller-body {
    min-height: 100vh;
}

.controller-topbar {
    padding: 24px clamp(18px, 5vw, 70px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: white;
}

.controller-topbar span,
.section-heading span {
    color: var(--primary);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .16em;
}

.controller-topbar h1,
.section-heading h2 {
    margin: 5px 0 0;
}

.controller-actions,
.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.controller-actions form,
.row-actions form {
    margin: 0;
}

.controller-actions button,
.row-actions button,
.approve,
.reject {
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
}

.controller-main {
    width: min(1450px, calc(100% - 30px));
    margin: 22px auto 60px;
}

.controller-panel {
    margin-bottom: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-heading b {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--soft);
    color: var(--primary);
}

.account-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.account-card {
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fbfdfc;
}

.account-card h3 {
    margin: 10px 0 4px;
}

.account-card p,
.account-card small {
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.approve-form {
    margin-top: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 7px;
}

.approve-form select {
    height: 38px;
}

.approve {
    border: 0;
    background: var(--primary);
    color: white;
}

.reject {
    width: 100%;
    margin-top: 7px;
    color: var(--danger);
    background: var(--danger-soft);
}

.status {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 99px;
    background: #eef2f0;
    color: #5d6b65;
    font-size: 8px;
    font-weight: 900;
}

.status.active {
    background: var(--soft);
    color: var(--primary-dark);
}

.status.pending {
    background: #fff7dd;
    color: #8a6500;
}

.status.rejected,
.status.suspended {
    background: var(--danger-soft);
    color: var(--danger);
}

.table-wrap {
    margin-top: 18px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 11px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 11px;
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
}

td strong,
td small {
    display: block;
}

td small {
    margin-top: 4px;
    color: var(--muted);
}

.empty-controller {
    grid-column: 1 / -1;
    padding: 35px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 900px) {
    .auth-shell {
        display: block;
        padding: 22px 0;
    }

    .auth-brand {
        display: none;
    }

    .mobile-logo {
        display: grid;
        margin-bottom: 24px;
    }

    .auth-card,
    .register-card {
        width: min(620px, calc(100% - 24px));
        padding: 28px 22px;
    }

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

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .wide {
        grid-column: auto;
    }

    .controller-topbar {
        align-items: flex-start;
    }

    .controller-topbar h1 {
        font-size: 21px;
    }

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

/* WA_AUTH_PASSWORD_TOGGLE_START */

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 92px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-width: 70px;
    height: 33px;
    padding: 0 10px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 9px;
    background: #e7f7f0;
    color: #057753;
    font-size: 10px;
    font-weight: 850;
    cursor: pointer;
}

.password-toggle:hover {
    background: #d6f2e6;
}

/* WA_AUTH_PASSWORD_TOGGLE_END */
