@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-app: #f7f8fa;
    --bg-surface: #ffffff;
    --bg-surface-muted: #f2f4f7;
    --border: #e2e5ea;
    --border-strong: #cdd3dd;
    --text-primary: #101828;
    --text-muted: #475569;
    --text-inverse: #ffffff;

    --brand: #0f6e8c;
    --brand-dark: #0b566d;
    --brand-soft: #e5f1f5;

    --success: #166534;
    --success-soft: #e8f5ec;
    --warning: #b45309;
    --warning-soft: #fdf1de;
    --danger: #b91c1c;
    --danger-soft: #fdecec;

    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-full: 999px;

    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 8px 20px -6px rgba(16, 24, 40, 0.12);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    background: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
}

a { color: inherit; text-decoration: none; }

/* Brand lockup with kidney-bean glyph */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--brand);
}

.brand-mark svg { width: 22px; height: 22px; }

/* Card primitive (flat, bordered, minimal elevation) */
.glass-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Forms */
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap svg {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.input-wrap input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface-muted);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap input::placeholder { color: #98a2b3; }

.input-wrap input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.toggle-visibility {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 4px;
    border-radius: 6px;
}

.toggle-visibility:hover { color: var(--text-primary); }
.toggle-visibility:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.toggle-visibility svg { position: static; width: 18px; height: 18px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    border-radius: var(--radius-md);
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
    background: var(--brand);
    color: var(--text-inverse);
}

.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

.btn-ghost {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-ghost:hover { background: var(--bg-surface-muted); }
.btn-ghost:focus-visible, .btn-primary:focus-visible { outline-offset: 2px; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert-error {
    background: var(--danger-soft);
    border-color: rgba(220, 38, 38, 0.25);
    color: #991b1b;
}

.alert-success {
    background: var(--success-soft);
    border-color: rgba(21, 128, 61, 0.25);
    color: #14532d;
}

.muted-link { color: var(--text-muted); font-size: 0.88rem; }
.muted-link a { color: var(--brand); font-weight: 600; }
.muted-link a:hover { text-decoration: underline; }

::selection { background: var(--brand-soft); }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
