:root {
    --font: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-display: Montserrat, var(--font);
    --ink: #0c1b2a;
    --ink-muted: #5a6b7c;
    --surface: rgba(255, 255, 255, 0.82);
    --border: rgba(12, 27, 42, 0.1);
    --accent: #0f766e;
    --accent-hover: #0d5f59;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --danger-border: #fecdca;
    --focus: rgba(15, 118, 110, 0.28);
    --radius: 14px;
    --shadow: 0 24px 48px rgba(12, 27, 42, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

.btn {
    appearance: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.85rem;
    padding: 0 1.35rem;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-family: inherit;
    font-size: 0.925rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.28);
}

.btn:active {
    transform: translateY(0);
}

.btn--sm {
    height: 2.25rem;
    padding: 0 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    box-shadow: none;
}

.btn--sm:hover {
    transform: none;
    box-shadow: none;
}

.link {
    color: var(--ink-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.18s ease;
}

.link:hover {
    color: var(--accent);
}

.alert {
    margin-bottom: 1.25rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

.panel {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
    padding: 1.75rem;
}

.brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.brand__name {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.15rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--ink);
}

.brand__tagline {
    margin-top: 0.45rem;
    font-size: 0.975rem;
    color: var(--ink-muted);
    font-weight: 400;
}

.field {
    margin-bottom: 1.1rem;
}

.field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink);
}

.field input {
    width: 100%;
    height: 2.85rem;
    padding: 0 0.95rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    outline: none;
}

.field input::placeholder {
    color: #94a3b8;
}

.field input:hover {
    border-color: rgba(12, 27, 42, 0.22);
}

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus);
}

.field input.is-invalid {
    border-color: var(--danger);
}

.field input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.18);
}

.error {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--danger);
    font-weight: 500;
}

.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

/* Login page */


body.login-page {
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(15, 118, 110, 0.12), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 80%, rgba(37, 99, 235, 0.1), transparent 50%),
        linear-gradient(160deg, #eef3f7 0%, #e4ecef 45%, #dfe8ed 100%);
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

body.login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(12, 27, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(12, 27, 42, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black, transparent);
    pointer-events: none;
    z-index: 0;
}

.login {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    animation: rise 0.55s ease-out both;
}

.login .brand {
    animation: rise 0.55s ease-out 0.08s both;
}

.login .panel {
    animation: rise 0.55s ease-out 0.14s both;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 420px) {
    .panel {
        padding: 1.35rem;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .actions .btn {
        width: 100%;
    }

    .actions .link {
        text-align: center;
    }
}

/* Docs page */

.docs-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.docs-bar__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.docs-bar__meta {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--ink-muted);
    font-weight: 500;
}
