/* Bhargavi Studio — login */
:root {
    --pine: #004a4a;
    --ink: #0d2218;
    --gold: #c8922a;
    --gold2: #e8671a;
    --sage: #4caf7d;
    --cream: #fdfbf7;
    --text: #111e17;
    --muted: rgba(255, 255, 255, 0.62);
    --card-shadow: 0 32px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

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

html {
    height: 100%;
    overflow: hidden;
}

body.auth-page {
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
    color: var(--text);
    background: var(--ink);
    -webkit-font-smoothing: antialiased;
}

/* ── Full-screen brand backdrop ── */
.auth-backdrop {
    position: fixed;
    inset: 0;
    background: linear-gradient(155deg, #0d2218 0%, #004a4a 48%, #1a4035 100%);
    z-index: 0;
}

.auth-backdrop::before,
.auth-backdrop::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-backdrop::before {
    width: 520px;
    height: 520px;
    background: rgba(255, 255, 255, 0.04);
    top: -160px;
    right: -120px;
}

.auth-backdrop::after {
    width: 360px;
    height: 360px;
    background: rgba(200, 146, 42, 0.08);
    bottom: -100px;
    left: -80px;
}

.auth-backdrop-accent {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold2), transparent);
    z-index: 2;
}

.auth-backdrop-glow {
    position: fixed;
    width: 640px;
    height: 640px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 175, 125, 0.14) 0%, transparent 68%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

/* ── Layout ── */
.auth-wrap {
    position: relative;
    z-index: 1;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    overflow: hidden;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    background: var(--cream);
    border-radius: 20px;
    padding: 32px 32px 24px;
    box-shadow: var(--card-shadow);
    animation: auth-rise 0.55s ease-out both;
    scrollbar-width: none;
}

.auth-card::-webkit-scrollbar {
    display: none;
}

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

/* ── Brand header ── */
.auth-brand {
    text-align: center;
    margin-bottom: 20px;
}

.auth-logo {
    display: block;
    margin: 0 auto 12px;
    max-height: 72px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.auth-studio {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--gold);
    margin: 0 0 12px;
    text-transform: uppercase;
}

.auth-portal {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pine);
    background: rgba(0, 74, 74, 0.08);
    border: 1px solid rgba(0, 74, 74, 0.15);
}

.auth-portal.is-employee {
    color: #2d6b44;
    background: rgba(76, 175, 125, 0.12);
    border-color: rgba(76, 175, 125, 0.28);
}

.auth-heading {
    font-size: 24px;
    font-weight: 900;
    color: var(--pine);
    margin: 16px 0 4px;
    letter-spacing: -0.02em;
    text-align: center;
}

.auth-lead {
    font-size: 13px;
    color: #5a7a6a;
    text-align: center;
    margin: 0 0 22px;
    line-height: 1.5;
}

/* ── Form ── */
.auth-field {
    margin-bottom: 14px;
}

.auth-field-error {
    min-height: 0;
}

.auth-field-error .field-error-message,
.auth-field .field-error-message,
.auth-field label.error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    color: #dc3545;
}

.auth-input.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.14) !important;
}

.auth-input.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2) !important;
}

.auth-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b8a7a;
    margin-bottom: 7px;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-inner {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    font-size: 17px;
    color: #8aa898;
    pointer-events: none;
    line-height: 1;
    z-index: 1;
}

.auth-input {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 42px;
    border: 1.5px solid rgba(0, 74, 74, 0.14);
    border-radius: 11px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(76, 175, 125, 0.15);
}

.auth-input::placeholder {
    color: #a8bdb2;
    font-weight: 500;
}

.auth-toggle-pw {
    position: absolute;
    right: 12px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0 4px;
    cursor: pointer;
    color: #8aa898;
    font-size: 18px;
    line-height: 1;
    z-index: 1;
}

.auth-toggle-pw:hover { color: var(--pine); }

.auth-submit {
    width: 100%;
    margin-top: 6px;
    padding: 14px 20px;
    border: none;
    border-radius: 11px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
    box-shadow: 0 8px 24px rgba(200, 146, 42, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(200, 146, 42, 0.42);
}

.auth-submit:active { transform: translateY(0); }

.auth-foot {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #8aa898;
}

.auth-portal-switch {
    margin: 10px 0 0;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #8aa898;
}

.auth-portal-switch a {
    color: var(--pine);
    font-weight: 800;
    text-decoration: none;
}

.auth-portal-switch a:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .auth-wrap { padding: 12px 16px; }
    .auth-card { padding: 24px 20px 20px; border-radius: 16px; }
    .auth-heading { font-size: 20px; }
    .auth-logo { max-height: 60px; }
    .auth-studio { font-size: 17px; }
}

@media (max-height: 680px) {
    .auth-brand { margin-bottom: 12px; }
    .auth-logo { max-height: 56px; margin-bottom: 8px; }
    .auth-heading { font-size: 20px; margin-top: 10px; }
    .auth-lead { margin-bottom: 16px; font-size: 12px; }
    .auth-field { margin-bottom: 10px; }
    .auth-input { height: 44px; }
    .auth-submit { padding: 12px 20px; }
    .auth-foot { margin-top: 12px; }
}

/* ── Flash / toast errors ── */
body.auth-page .swal2-toast:has(.swal2-icon-error) .swal2-title {
    color: #dc3545 !important;
    font-weight: 700;
}

body.auth-page .swal2-toast .swal2-icon.swal2-error {
    border-color: #dc3545;
    color: #dc3545;
}

body.auth-page .swal2-toast .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #dc3545;
}
