/* ============================================================
   Engine — Login styles
   Plik: wwwroot/css/login.css
   ============================================================ */

/* -- Reset & base ------------------------------------------ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* -- Body -------------------------------------------------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f4f1;
    font-family: 'DM Sans', sans-serif;
    color: #1a1a18;
    padding: 2rem;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .login-body {
        background-color: #111110;
        color: #e8e7e2;
    }
}

/* -- Card -------------------------------------------------- */
.login-root {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 360px;
}

/* -- Brand / logo ------------------------------------------ */
.login-brand {
    margin-bottom: 2.5rem;
}

.login-logo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

/* Waveform animation */
.login-waveform {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 18px;
}

.login-waveform span {
    display: block;
    width: 2px;
    background: #1a1a18;
    border-radius: 1px;
    animation: wv 1.6s ease-in-out infinite;
}

@media (prefers-color-scheme: dark) {
    .login-waveform span { background: #e8e7e2; }
}

.login-waveform span:nth-child(1) { height: 6px;  animation-delay: 0.00s; }
.login-waveform span:nth-child(2) { height: 13px; animation-delay: 0.12s; }
.login-waveform span:nth-child(3) { height: 18px; animation-delay: 0.24s; }
.login-waveform span:nth-child(4) { height: 10px; animation-delay: 0.36s; }
.login-waveform span:nth-child(5) { height: 15px; animation-delay: 0.18s; }
.login-waveform span:nth-child(6) { height: 8px;  animation-delay: 0.30s; }
.login-waveform span:nth-child(7) { height: 4px;  animation-delay: 0.06s; }

@keyframes wv {
    0%, 100% { opacity: 0.25; transform: scaleY(1); }
    50%       { opacity: 1;    transform: scaleY(1.12); }
}

.login-title {
    font-family: 'DM Mono', monospace;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #1a1a18;
}

@media (prefers-color-scheme: dark) {
    .login-title { color: #e8e7e2; }
}

.login-subtitle {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: #888780;
}

/* -- Divider ----------------------------------------------- */
.login-divider {
    width: 24px;
    height: 1px;
    background: #d3d1c7;
    margin: 1.75rem 0;
}

@media (prefers-color-scheme: dark) {
    .login-divider { background: #444441; }
}

/* -- Section heading --------------------------------------- */
.login-heading {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888780;
    margin-bottom: 1.5rem;
}

/* -- Error message ----------------------------------------- */
.login-error {
    font-size: 12px;
    font-family: 'DM Mono', monospace;
    color: #a32d2d;
    background: #fcebeb;
    border: 0.5px solid #f09595;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}

@media (prefers-color-scheme: dark) {
    .login-error {
        color: #f09595;
        background: #1f1010;
        border-color: #501313;
    }
}

/* -- Form fields ------------------------------------------- */
.field {
    margin-bottom: 1.1rem;
}

.field label {
    display: block;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #888780;
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    height: 40px;
    border: 0.5px solid #b4b2a9;
    background: #ffffff;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: #1a1a18;
    transition: border-color 0.15s;
    outline: none;
}

.field input:hover {
    border-color: #888780;
}

.field input:focus {
    border-color: #1a1a18;
    box-shadow: 0 0 0 2px rgba(26, 26, 24, 0.06);
}

@media (prefers-color-scheme: dark) {
    .field input {
        background: #1c1c1a;
        border-color: #444441;
        color: #e8e7e2;
    }

    .field input:hover { border-color: #5f5e5a; }

    .field input:focus {
        border-color: #e8e7e2;
        box-shadow: 0 0 0 2px rgba(232, 231, 226, 0.06);
    }
}

/* -- Submit button ----------------------------------------- */
.login-btn {
    width: 100%;
    height: 40px;
    margin-top: 1.75rem;
    background: #1a1a18;
    color: #f5f4f1;
    border: none;
    border-radius: 4px;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.15s, transform 0.1s;
}

.login-btn:hover  { opacity: 0.8; }
.login-btn:active { transform: scale(0.99); }

.login-btn-arrow {
    font-size: 14px;
    transition: transform 0.2s;
}

.login-btn:hover .login-btn-arrow {
    transform: translateX(3px);
}

@media (prefers-color-scheme: dark) {
    .login-btn {
        background: #e8e7e2;
        color: #1a1a18;
    }
}

/* -- Footer ------------------------------------------------ */
.login-footer {
    margin-top: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-footer-link {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.05em;
    color: #888780;
    text-decoration: none;
    border-bottom: 0.5px solid #d3d1c7;
    padding-bottom: 1px;
    transition: color 0.15s;
}

.login-footer-link:hover { color: #5f5e5a; }

@media (prefers-color-scheme: dark) {
    .login-footer-link {
        border-bottom-color: #444441;
    }
    .login-footer-link:hover { color: #b4b2a9; }
}

.login-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d3d1c7;
}

@media (prefers-color-scheme: dark) {
    .login-dot { background: #444441; }
}
