:root {
    --grey-900: rgb(37, 31, 25);
    --grey-800: rgb(104, 97, 90);
    --grey-600: rgb(148, 139, 129);
    --grey-400: rgb(212, 205, 199);
    --grey-200: rgb(228, 224, 221);
    --grey-100: rgb(235, 232, 228);
    --brand-500: rgb(0, 69, 178);
    --brand-600: rgb(0, 58, 145);
    --background: rgb(247, 247, 244);
    --footer: rgb(238, 237, 230);
    --white: rgb(255, 255, 255);
    --border: rgba(37, 31, 25, 0.08);
    --shadow-soft: 0 16px 36px rgba(37, 31, 25, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Geist", "Segoe UI", sans-serif;
    background: var(--background);
    color: var(--grey-900);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

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

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

.container {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
}

.page-shell {
    min-height: calc(100vh - 180px);
    padding-top: 88px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(247, 247, 244, 0.8);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--grey-900);
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand-500), #0b74ff);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0, 69, 178, 0.18);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-menu > a,
.nav-menu .btn-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--grey-900);
    transition: opacity 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.nav-menu > a:hover,
.nav-menu .btn-link:hover {
    opacity: 0.72;
}

.nav-form {
    display: inline-flex;
    margin: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 0.82rem 1.2rem;
    font-weight: 600;
    line-height: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    color: var(--white);
    box-shadow: 0 12px 24px rgba(0, 69, 178, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 16px 28px rgba(0, 69, 178, 0.24);
}

.btn-secondary {
    background: var(--white);
    color: var(--grey-900);
    border: 1px solid var(--border);
}

.btn-block {
    width: 100%;
}

.site-footer {
    background: var(--footer);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.25rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand p,
.footer-section li,
.footer-section a,
.footer-bottom {
    color: var(--grey-800);
}

.footer-logo {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--grey-900);
}

.footer-section h4 {
    margin: 0 0 1rem;
    color: var(--grey-900);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.footer-section a {
    transition: opacity 0.2s ease;
}

.footer-section a:hover {
    opacity: 0.72;
}

.powered-by {
    margin-top: 0.75rem;
    color: var(--grey-600);
    font-size: 0.82rem;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    font-size: 0.9rem;
}

.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.25rem;
    background: radial-gradient(circle at top, rgba(0, 69, 178, 0.08), transparent 30%), var(--background);
}

.auth-box {
    width: min(520px, 100%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: clamp(1.6rem, 2vw, 2.5rem);
}

.auth-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-header h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(2rem, 4vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.06em;
    color: var(--grey-900);
}

.auth-header p {
    margin: 0;
    color: var(--grey-800);
}

.auth-form {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--grey-900);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border: 1px solid var(--grey-200);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--grey-900);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(0, 69, 178, 0.55);
    box-shadow: 0 0 0 4px rgba(0, 69, 178, 0.08);
}

.form-group small {
    color: var(--grey-600);
    font-size: 0.75rem;
}

.alert {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.alert-error {
    background: rgba(251, 56, 88, 0.08);
    border-color: rgba(251, 56, 88, 0.25);
    color: #8a1639;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: #0d5e48;
}

.auth-footer {
    text-align: center;
    color: var(--grey-800);
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--brand-500);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .nav {
        min-height: 68px;
    }

    .nav-menu {
        gap: 0.8rem;
        font-size: 0.85rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

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