/* gsm-dashboard — single-file stylesheet. Mobile-first, no framework. */

:root {
    --green: #2f6f3e;
    --green-dark: #245631;
    --ink: #1a1a1a;
    --ink-muted: #6b7280;
    --bg: #f7f7f5;
    --card: #ffffff;
    --border: #e5e7eb;
    --error: #b03030;
    --radius: 8px;
    --shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green-dark); }
a:hover { color: var(--green); }

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

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 20px 64px;
}

/* Top bar */
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.topbar-inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}
.topbar-left { color: var(--ink); }
.topbar-right .back-link { text-decoration: none; font-weight: 500; }

/* Page heading */
.page-title {
    margin: 8px 0 16px;
    font-size: 24px;
    line-height: 1.2;
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}
.card.centred { margin-top: 48px; }
.card h1 { margin: 0 0 8px; font-size: 22px; }
.card h2 { margin: 0 0 6px; font-size: 18px; }
.card p.sub { margin: 0 0 16px; color: var(--ink-muted); }

/* Forms */
form label {
    display: block;
    font-weight: 500;
    margin: 14px 0 6px;
    font-size: 14px;
}
form label.consent {
    font-weight: 400;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
}
form label.consent input { margin-top: 4px; flex: 0 0 auto; }

form input[type="text"],
form input[type="email"],
form input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
}
form input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(47,111,62,.15);
}
form input[aria-invalid="true"] {
    border-color: var(--error);
}

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

.field-error,
.form-error {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--error);
}

/* Buttons */
.button,
button.button,
a.button {
    display: inline-block;
    width: 100%;
    margin-top: 20px;
    padding: 12px 18px;
    background: var(--green);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: var(--green-dark); }
.button:disabled,
.button[disabled] {
    background: #c8cdc9;
    color: #fff;
    cursor: not-allowed;
}

/* Recently-added list */
.recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.recent-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}
.recent-list li:last-child { border-bottom: 0; }

/* Admin client cards */
.client-card h2 { margin-bottom: 2px; }
.client-card .slug { margin: 0 0 12px; font-size: 13px; }
.client-card .links { margin: 0; }

/* Success state after add */
.success {
    padding: 8px 0;
}
.success p { margin: 0 0 14px; }

/* Remember-me row */
.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}
.remember-row .remember-label {
    margin: 0;
    font-weight: 400;
    font-size: 14px;
}

/* Helper text under controls */
.helper-text {
    color: var(--ink-muted);
    font-size: 0.9em;
    margin: 4px 0 16px;
}

/* Forgot link — small, right-aligned, muted */
.forgot-link {
    display: block;
    text-align: right;
    margin-top: 8px;
    font-size: 0.9em;
    color: var(--ink-muted);
    text-decoration: none;
}
.forgot-link:hover { color: var(--green-dark); text-decoration: underline; }

/* Success banner (e.g. after password reset) */
.success-banner {
    background: #e5f4e8;
    color: #1f4a2a;
    border: 1px solid #c2e2cb;
    padding: 10px 14px;
    border-radius: var(--radius);
    margin: 0 0 16px;
    font-size: 14px;
}

/* Password field eye toggle (placeholder, no JS yet) */
.pw-toggle {
    background: transparent;
    border: 0;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 6px;
}
.pw-toggle:hover { color: var(--ink); }

/* Tablet+ */
@media (min-width: 640px) {
    .button { width: auto; min-width: 200px; }
}
