:root {
    --background: #061310;
    --background-alt: #0a1b17;
    --card-bg: rgba(7, 21, 18, 0.88);
    --border: rgba(20, 190, 124, 0.34);
    --text: #f2f6f4;
    --muted: #90a8a1;
    --input-bg: #081411;
    --input-border: #1a2d28;
    --primary: #22c55e;
    --primary-hover: #1db455;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: var(--text);
}

body {
    background: radial-gradient(circle at top left, #0e2420 0%, transparent 40%),
        radial-gradient(circle at bottom right, #0b1f1b 0%, transparent 42%),
        linear-gradient(135deg, var(--background) 0%, var(--background-alt) 45%, var(--background) 100%);
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.card {
    width: 100%;
    max-width: 430px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45), 0 0 35px rgba(34, 197, 94, 0.07);
    backdrop-filter: blur(2px);
    animation: fadeIn 0.35s ease-out;
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1.75rem 1.75rem 1.4rem;
}

.logo-wrap {
    width: 94px;
    height: 94px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.logo {
    max-width: 84%;
    height: auto;
    display: block;
}

.logo-mark {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f5132;
    line-height: 1;
    user-select: none;
}

.title-wrap h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: 0.02em;
}

.title-wrap p {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.login-form {
    padding: 0 1.75rem 1.75rem;
    display: grid;
    gap: 1rem;
}

.alert-error {
    border: 1px solid rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    border-radius: 10px;
    padding: 0.62rem 0.75rem;
    font-size: 0.87rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field label {
    color: #d9e7e1;
    font-size: 0.95rem;
    font-weight: 600;
}

.field input {
    height: 44px;
    width: 100%;
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 0 0.85rem;
    background: var(--input-bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field input::placeholder {
    color: #6f8780;
}

.field input:focus {
    border-color: #2ca56c;
    box-shadow: 0 0 0 2px rgba(46, 196, 117, 0.2);
    background: #091914;
}

.btn-primary,
.btn-link {
    height: 44px;
    width: 100%;
    border: 0;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    margin-top: 0.35rem;
    background: var(--primary);
    color: #f4fff7;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

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

.btn-link {
    background: transparent;
    color: var(--muted);
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

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

@media (max-width: 480px) {
    .card-header {
        padding: 1.5rem 1.2rem 1.2rem;
    }

    .login-form {
        padding: 0 1.2rem 1.4rem;
    }

    .title-wrap h1 {
        font-size: 1.7rem;
    }

    .title-wrap p {
        font-size: 0.88rem;
    }
}
