/* Isolated login styles — do not load dashboard CSS on these pages */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html, body {
    min-height: 100%;
    min-height: 100dvh;
    font-family: 'Montserrat', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.auth {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: #F15A51;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 32px 28px;
    box-shadow: 0 20px 50px rgba(35, 50, 71, 0.22);
}

.auth-top {
    text-align: center;
    margin-bottom: 28px;
}

.auth-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 14px;
    background: #F15A51;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.auth-top h1 {
    font-size: 26px;
    font-weight: 800;
    color: #233247;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(241, 90, 81, 0.10);
    color: #233247;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(241, 90, 81, 0.12);
    color: #233247;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.auth-field { margin-bottom: 14px; }

.auth-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #233247;
}

.auth-field input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(35, 50, 71, 0.16);
    border-radius: 10px;
    background: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px; /* prevents iOS zoom on focus */
    font-weight: 500;
    color: #233247;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.auth-field input:focus {
    border-color: #F15A51;
    box-shadow: 0 0 0 3px rgba(241, 90, 81, 0.15);
}

.auth-pass { position: relative; }
.auth-pass input { padding-right: 48px; }
.auth-eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: rgba(35, 50, 71, 0.45);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.auth-eye:hover,
.auth-eye:active { color: #F15A51; }

.auth-submit {
    width: 100%;
    height: 50px;
    margin-top: 8px;
    border: 0;
    border-radius: 10px;
    background: #F15A51;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.auth-submit:hover,
.auth-submit:active { background: #233247; }

.auth-links {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: rgba(35, 50, 71, 0.65);
    line-height: 1.5;
}
.auth-links a {
    color: #F15A51;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    padding: 4px 2px;
}
.auth-links a:hover { text-decoration: underline; }

.auth-note {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(35, 50, 71, 0.10);
    text-align: center;
    font-size: 11px;
    color: rgba(35, 50, 71, 0.45);
    font-weight: 500;
}

@media (max-width: 480px) {
    body.auth {
        align-items: flex-start;
        padding-top: max(24px, env(safe-area-inset-top));
    }
    .auth-card {
        padding: 28px 20px 22px;
        border-radius: 14px;
        max-width: 100%;
    }
    .auth-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        border-radius: 12px;
    }
    .auth-top { margin-bottom: 22px; }
    .auth-top h1 { font-size: 22px; }
    .auth-submit { height: 48px; }
}

@media (max-height: 640px) and (orientation: landscape) {
    body.auth {
        align-items: flex-start;
        padding-top: 12px;
        padding-bottom: 12px;
    }
    .auth-card { padding: 20px 22px 16px; }
    .auth-top { margin-bottom: 14px; }
    .auth-icon { width: 40px; height: 40px; font-size: 16px; margin-bottom: 8px; }
    .auth-top h1 { font-size: 20px; }
}
