:root {
    --green: #087a3d;
    --green-dark: #053d26;
    --red: #d3112a;
    --ink: #101915;
    --muted: #66736c;
    --line: #dfe7e2;
    --surface: #ffffff;
    --soft: #f3f7f5;
    --shadow: 0 22px 60px rgba(7, 25, 18, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "Tahoma", "Arial", sans-serif;
    background:
        radial-gradient(circle at 15% 12%, rgba(8, 122, 61, 0.18), transparent 34%),
        linear-gradient(145deg, #f7faf8 0%, #eaf2ed 52%, #ffffff 100%);
}

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

button {
    border: 0;
    border-radius: 12px;
    padding: 13px 18px;
    color: #fff;
    background: var(--green);
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(8, 122, 61, 0.24);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.62;
    transform: none;
    box-shadow: none;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 14px;
    background: #fff;
    color: var(--ink);
    outline: none;
}

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

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(8, 122, 61, 0.12);
}

.app-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 32px 0 52px;
}

.login-card,
.dashboard,
.admin-card,
.status-card,
.notes-card {
    border: 1px solid rgba(8, 122, 61, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.login-card {
    width: min(560px, 100%);
    margin: 72px auto 0;
    padding: 28px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-lockup img {
    width: 132px;
    max-height: 72px;
    object-fit: contain;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--green);
    font-weight: 900;
}

h1,
h2 {
    margin: 0;
    line-height: 1.3;
}

.lead {
    margin: 18px 0 24px;
    color: var(--muted);
    line-height: 1.9;
}

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

.form-message {
    min-height: 24px;
    margin: 0;
    color: var(--green);
    font-weight: 800;
}

.form-message.error {
    color: var(--red);
}

.dashboard {
    padding: 22px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--green-dark), #07130f 68%, #2a0d12);
}

.dashboard-header p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.78);
}

.ghost-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.member-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.status-card,
.notes-card {
    padding: 20px;
}

.status-card span {
    display: block;
    color: var(--muted);
    font-weight: 800;
    margin-bottom: 8px;
}

.status-card strong {
    font-size: clamp(24px, 4vw, 38px);
    color: var(--green);
}

.notes-card {
    grid-column: 1 / -1;
}

.notes-card p {
    margin: 12px 0;
    line-height: 1.9;
}

.admin-view {
    margin-top: 20px;
}

.admin-actions {
    display: grid;
    grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
    gap: 18px;
    align-items: start;
}

.admin-card {
    padding: 20px;
}

.credentials-box {
    border: 1px dashed rgba(8, 122, 61, 0.45);
    border-radius: 14px;
    padding: 14px;
    background: rgba(8, 122, 61, 0.08);
    line-height: 1.9;
    font-weight: 800;
}

.search-input {
    margin-top: 6px;
}

.member-list {
    display: grid;
    gap: 10px;
    max-height: 560px;
    overflow: auto;
    padding-inline-end: 4px;
}

.member-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: var(--soft);
}

.member-row strong,
.member-row span {
    display: block;
}

.member-row small {
    color: var(--muted);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.badge {
    border-radius: 999px;
    padding: 5px 9px;
    background: #fff;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 900;
}

.badge.danger {
    color: #fff;
    background: var(--red);
}

.evaluation-panel {
    margin-top: 18px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.permission-box {
    border: 1px solid rgba(8, 122, 61, 0.14);
    border-radius: 16px;
    padding: 14px;
    background: rgba(8, 122, 61, 0.06);
}

.permission-box[hidden] {
    display: none;
}

.secondary-button {
    margin-top: 10px;
    background: var(--ink);
}

.danger-button {
    background: var(--red);
}

@media (max-width: 820px) {
    .app-shell {
        width: min(100% - 18px, 680px);
        padding-top: 16px;
    }

    .login-card {
        margin-top: 24px;
        padding: 20px;
    }

    .dashboard {
        padding: 14px;
    }

    .dashboard-header,
    .admin-actions,
    .member-view {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        display: grid;
    }

    .brand-lockup {
        align-items: flex-start;
    }

    .brand-lockup img {
        width: 104px;
    }

    .member-row {
        grid-template-columns: 1fr;
    }

    .member-row button,
    .ghost-button {
        width: 100%;
    }
}
