:root {
    --line: #06c755;
    --line-dark: #04a946;
    --ink: #14201a;
    --muted: #6c7a72;
    --panel: #ffffff;
    --bg: #eef4f0;
    --border: #dce7e1;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

.front {
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #e9f8ef 0%, #f7faf8 100%);
}

.phone-shell {
    width: min(92vw, 420px);
    min-height: min(760px, 88vh);
    display: grid;
    place-items: center;
    padding: 24px;
    border-radius: 32px;
    background: #f8fbf9;
    box-shadow: 0 28px 80px rgba(11, 56, 30, .16);
}

.line-hero {
    width: 100%;
    min-height: 420px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 22px;
    border-radius: 28px;
    background: var(--line);
    color: #fff;
}

.brand-dot {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: #fff;
    color: var(--line);
    font-weight: 900;
    font-size: 26px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .12);
}

.line-hero h1,
.auth-panel h1 {
    margin: 0;
    font-size: 42px;
    letter-spacing: 0;
}

.quiet-link {
    color: inherit;
    opacity: .82;
    text-decoration: none;
    font-weight: 700;
}

.auth-panel {
    width: min(92vw, 420px);
    margin: 10vh auto;
    display: grid;
    gap: 18px;
    justify-items: start;
    padding: 28px;
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 18px 60px rgba(20, 32, 26, .11);
}

.auth-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.small-help {
    font-size: 14px;
}

.copy-box {
    width: 100%;
    overflow-wrap: anywhere;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 13px;
    background: #f6faf7;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.4;
}

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

.primary-button,
.ghost-button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    display: inline-grid;
    place-items: center;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    background: var(--line);
    color: #fff;
}

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

.ghost-button {
    background: #eef4f0;
    color: var(--ink);
}

.topbar {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 max(18px, calc((100vw - 1040px) / 2));
    background: var(--line);
    color: #fff;
}

.logo {
    font-weight: 900;
    text-decoration: none;
    font-size: 22px;
}

.topbar nav {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 14px;
}

.topbar nav a {
    font-weight: 800;
    text-decoration: none;
}

.admin-layout {
    width: min(1040px, 100%);
    margin: 0 auto;
    padding: 24px 18px 48px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
    gap: 18px;
}

.notice {
    grid-column: 1 / -1;
    padding: 14px 16px;
    border-radius: 8px;
    background: #e8fff0;
    color: #09662e;
    font-weight: 700;
}

.notice.error {
    background: #fff0f0;
    color: #a31d1d;
}

.next-card,
.panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 14px 34px rgba(20, 32, 26, .07);
}

.next-card {
    min-height: 270px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 28px;
    background: var(--line);
    color: #fff;
}

.next-card p,
.next-card h1 {
    margin: 0;
}

.next-card p {
    font-weight: 800;
    opacity: .88;
}

.next-card h1 {
    font-size: clamp(36px, 7vw, 64px);
    letter-spacing: 0;
    line-height: 1;
}

.next-card strong {
    font-size: 24px;
}

.panel {
    padding: 20px;
}

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

.panel-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.panel-title h2 {
    margin: 0;
    font-size: 20px;
}

.panel-title span,
.mini-row span,
.user-row span {
    color: var(--muted);
    font-size: 14px;
}

.mini-list,
.user-list {
    display: grid;
    gap: 10px;
}

.mini-row,
.user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f6faf7;
}

.mini-row div,
.user-row div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.mini-row b {
    flex: 0 0 auto;
    color: var(--line-dark);
}

form {
    display: grid;
    gap: 12px;
}

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

textarea {
    min-height: 220px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.user-form {
    grid-template-columns: 1.2fr 1.2fr .8fr auto auto;
    align-items: center;
    margin-bottom: 18px;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

.check input {
    width: auto;
}

@media (max-width: 780px) {
    .topbar {
        min-height: auto;
        padding: 14px 18px;
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar nav {
        width: 100%;
        justify-content: space-between;
    }

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

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

    .user-row,
    .mini-row {
        align-items: flex-start;
        flex-direction: column;
    }
}
