/* ==========================================================================
   auth.css  —  Standalone styles for all authentication pages
   Login · Forgot Password · Reset Password · Logout · Confirmations
   ========================================================================== */

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 Helvetica, Arial, sans-serif;
    background: #f0f4f8;
    color: #111827;
}

/* ── Shell ───────────────────────────────────────────────────────────────── */
.auth-shell {
    min-height: 100vh;
    display: flex;
}

/* ── Left brand panel ────────────────────────────────────────────────────── */
.auth-brand {
    flex: 0 0 420px;
    background: linear-gradient(155deg, #1a2e4a 0%, #0a5c2f 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 52px 48px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    top: -90px;
    right: -110px;
}

.auth-brand::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    bottom: -70px;
    left: -70px;
}

/* Logo row */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.brand-logo-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    padding: 4px;
    flex-shrink: 0;
}

.brand-logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-logo-name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
}

.brand-logo-tagline {
    font-size: .72rem;
    opacity: .7;
    font-style: italic;
    letter-spacing: .01em;
}

/* Body copy */
.brand-body {
    position: relative;
    z-index: 1;
}

.brand-body h2 {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 14px;
}

.brand-body p {
    font-size: .9rem;
    opacity: .78;
    line-height: 1.65;
}

/* Feature pills */
.brand-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.brand-pill {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 100px;
    padding: 5px 14px;
    font-size: .75rem;
}

/* Footer */
.brand-footer {
    font-size: .74rem;
    opacity: .45;
    position: relative;
    z-index: 1;
}

/* ── Right form panel ────────────────────────────────────────────────────── */
.auth-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #f0f4f8;
}

/* Card */
.auth-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 24px rgba(0, 0, 0, .09), 0 1px 4px rgba(0, 0, 0, .05);
    padding: 44px 48px;
    width: 100%;
    max-width: 440px;
}

/* Card headings */
.auth-card-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.auth-card-subtitle {
    font-size: .86rem;
    color: #6b7280;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* ── Icon header (confirmation / logout pages) ───────────────────────────── */
.auth-icon-header {
    text-align: center;
    margin-bottom: 22px;
}

.auth-icon-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.auth-icon-circle svg {
    width: 30px;
    height: 30px;
}

.auth-icon-circle.green { background: #dcfce7; }
.auth-icon-circle.green svg { stroke: #16a34a; fill: none; }

.auth-icon-circle.blue { background: #dbeafe; }
.auth-icon-circle.blue svg { stroke: #2563eb; fill: none; }

.auth-icon-circle.amber { background: #fef3c7; }
.auth-icon-circle.amber svg { stroke: #d97706; fill: none; }

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

.auth-field label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

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

.auth-input-wrap .field-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.auth-input-wrap .field-icon svg {
    width: 16px;
    height: 16px;
    stroke: #9ca3af;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-input {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px 10px 40px;
    font-size: .92rem;
    font-family: inherit;
    background: #fafafa;
    color: #111827;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
    -webkit-appearance: none;
    appearance: none;
}

.auth-input:focus {
    border-color: #0a5c2f;
    box-shadow: 0 0 0 3px rgba(10, 92, 47, .1);
    background: #fff;
}

.auth-input.no-icon {
    padding-left: 14px;
}

/* Select dropdown — matches auth-input look */
.auth-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
}

/* Show / hide password toggle */
.auth-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #9ca3af;
    line-height: 1;
}

.auth-toggle-pw:hover { color: #374151; }

.auth-toggle-pw svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Validation error */
.field-error {
    font-size: .77rem;
    color: #dc2626;
    margin-top: 4px;
    display: block;
}

/* ── Extras row (remember me + forgot) ───────────────────────────────────── */
.auth-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.auth-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #0a5c2f;
    cursor: pointer;
    flex-shrink: 0;
}

.auth-link {
    font-size: .82rem;
    color: #0a5c2f;
    text-decoration: none;
    font-weight: 600;
}

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

/* ── Primary button ──────────────────────────────────────────────────────── */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: linear-gradient(135deg, #0a5c2f 0%, #0f7a3e 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .94rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: filter .2s, transform .1s;
    letter-spacing: .01em;
}

.auth-btn:hover  { filter: brightness(1.1); color: #fff; text-decoration: none; }
.auth-btn:active { transform: scale(.98); }

.auth-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Outline button ──────────────────────────────────────────────────────── */
.auth-btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: #fff;
    color: #0a5c2f;
    border: 1.5px solid #0a5c2f;
    border-radius: 10px;
    font-size: .94rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}

.auth-btn-outline:hover { background: #f0fdf4; color: #0a5c2f; text-decoration: none; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.auth-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .82rem;
    color: #dc2626;
    margin-bottom: 18px;
    line-height: 1.5;
}

.auth-alert ul {
    margin: 4px 0 0 16px;
    padding: 0;
}

.auth-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .82rem;
    color: #15803d;
    margin-bottom: 18px;
}

/* ── Divider / footer link ───────────────────────────────────────────────── */
.auth-divider {
    text-align: center;
    margin-top: 24px;
    font-size: .82rem;
    color: #9ca3af;
}

.auth-divider a {
    color: #0a5c2f;
    font-weight: 600;
    text-decoration: none;
}

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

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .auth-brand  { display: none; }
    .auth-panel  { background: #fff; align-items: flex-start; padding: 40px 16px; }
    .auth-card   { box-shadow: none; padding: 32px 20px; }
}

@media (max-width: 480px) {
    .auth-card        { padding: 24px 16px; }
    .auth-card-title  { font-size: 1.25rem; }
}
