/* ── LBI Auth Pages — Shared Styles ────────────────────────────────────────── */
:root {
    --lbil-green:       #09A35B;
    --lbil-green-dark:  #077a44;
    --lbil-green-light: #e6f7ef;
    --lbil-dark:        #313737;
    --lbil-dark-light:  #444a4a;
    --lbil-gray:        #f4f5f7;
    --lbil-border:      #e2e6ea;
    --lbil-text:        #2c3e50;
    --lbil-muted:       #6c757d;
    --lbil-danger:      #dc3545;
    --lbil-warning:     #ffc107;
    --lbil-success:     #09A35B;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--lbil-gray);
    color: var(--lbil-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Auth wrapper ─────────────────────────────────────────────────────────── */
.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #f0faf5 0%, #f4f5f7 60%, #eef0f2 100%);
}

/* ── Auth card ────────────────────────────────────────────────────────────── */
.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
}

.auth-card-wide { max-width: 880px; }

/* ── Auth header (green strip) ────────────────────────────────────────────── */
.auth-header {
    background: var(--lbil-dark);
    padding: 28px 36px 24px;
    text-align: center;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 4px;
}

.auth-logo-mark {
    width: 44px;
    height: 44px;
    background: var(--lbil-green);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.auth-logo-text { text-align: left; }
.auth-logo-name { color: #fff; font-size: 15px; font-weight: 600; line-height: 1.2; }
.auth-logo-sub  { color: rgba(255,255,255,0.5); font-size: 11px; }

.auth-title {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin-top: 16px;
    line-height: 1.3;
}

.auth-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    margin-top: 4px;
}

/* ── Auth body ────────────────────────────────────────────────────────────── */
.auth-body { padding: 32px 36px 28px; }

/* ── Form elements ────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--lbil-text);
    margin-bottom: 6px;
}

.form-label span { color: var(--lbil-danger); margin-left: 2px; }

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--lbil-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--lbil-text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    appearance: none;
}

.form-control:focus {
    border-color: var(--lbil-green);
    box-shadow: 0 0 0 3px rgba(9,163,91,0.12);
}

.form-control.is-invalid {
    border-color: var(--lbil-danger);
    box-shadow: 0 0 0 3px rgba(220,53,69,0.1);
}

.form-control::placeholder { color: #adb5bd; }

.input-group { position: relative; }
.input-group .form-control { padding-right: 44px; }
.input-group-append {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--lbil-muted);
    font-size: 18px;
    line-height: 1;
    user-select: none;
}
.input-group-append:hover { color: var(--lbil-dark); }

.invalid-feedback {
    display: block;
    font-size: 12px;
    color: var(--lbil-danger);
    margin-top: 4px;
}

.form-text {
    font-size: 12px;
    color: var(--lbil-muted);
    margin-top: 4px;
}

/* ── Select ───────────────────────────────────────────────────────────────── */
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ── Divider ──────────────────────────────────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── Checkbox ─────────────────────────────────────────────────────────────── */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.form-check-input {
    width: 16px;
    height: 16px;
    accent-color: var(--lbil-green);
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-label {
    font-size: 13px;
    color: var(--lbil-muted);
    cursor: pointer;
}

/* ── Submit button ────────────────────────────────────────────────────────── */
.btn-auth {
    width: 100%;
    padding: 12px;
    background: var(--lbil-green);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    letter-spacing: 0.2px;
}

.btn-auth:hover   { background: var(--lbil-green-dark); }
.btn-auth:active  { transform: scale(0.99); }
.btn-auth:disabled { opacity: 0.65; cursor: not-allowed; }

/* ── Auth footer links ────────────────────────────────────────────────────── */
.auth-footer {
    text-align: center;
    padding: 16px 36px 24px;
    border-top: 1px solid var(--lbil-border);
    font-size: 13px;
    color: var(--lbil-muted);
}

.auth-footer a {
    color: var(--lbil-green);
    text-decoration: none;
    font-weight: 500;
}

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

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--lbil-muted);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--lbil-border);
}

/* ── Alert messages ───────────────────────────────────────────────────────── */
.alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.alert i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.alert-danger  { background: #fff5f5; border: 1px solid #fcc; color: #a94442; }
.alert-success { background: var(--lbil-green-light); border: 1px solid #b8e8cf; color: #1a6b3c; }
.alert-warning { background: #fffbf0; border: 1px solid #ffe082; color: #856404; }
.alert-info    { background: #f0f6ff; border: 1px solid #b3d1f5; color: #1a4a7a; }

/* ── Admin login — split layout ───────────────────────────────────────────── */
.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
}

.auth-split-panel {
    background: var(--lbil-dark);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 16px 0 0 16px;
}

.auth-split-panel .panel-logo { margin-bottom: 32px; }
.auth-split-panel .panel-logo-mark {
    width: 52px; height: 52px;
    background: var(--lbil-green);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 22px; color: #fff;
    margin-bottom: 20px;
}

.auth-split-panel h1 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.auth-split-panel p {
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 28px;
}

.auth-split-features { list-style: none; }
.auth-split-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    margin-bottom: 10px;
}

.auth-split-features li i { color: var(--lbil-green); font-size: 16px; }

.auth-split .auth-form-side {
    padding: 48px 40px;
    border-radius: 0 16px 16px 0;
    background: #fff;
}

.auth-split .auth-form-side .auth-title {
    color: var(--lbil-dark);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-split .auth-form-side .auth-subtitle {
    color: var(--lbil-muted);
    font-size: 13px;
    margin-bottom: 28px;
}

/* ── Role tabs (register page) ────────────────────────────────────────────── */
.role-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 24px;
}

.role-tab {
    padding: 12px;
    border: 2px solid var(--lbil-border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}

.role-tab:hover { border-color: var(--lbil-green); background: var(--lbil-green-light); }
.role-tab.active { border-color: var(--lbil-green); background: var(--lbil-green-light); }
.role-tab i { font-size: 22px; color: var(--lbil-muted); display: block; margin-bottom: 5px; }
.role-tab.active i { color: var(--lbil-green); }
.role-tab span { font-size: 13px; font-weight: 500; color: var(--lbil-text); }

.role-section { display: none; }
.role-section.active { display: block; }

/* ── Strength meter ───────────────────────────────────────────────────────── */
.password-strength {
    height: 4px;
    border-radius: 2px;
    background: var(--lbil-border);
    margin-top: 6px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    border-radius: 2px;
    width: 0;
    transition: width 0.3s, background 0.3s;
}

/* ── Lockout badge ────────────────────────────────────────────────────────── */
.lockout-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 16px;
    width: 100%;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
    .auth-body       { padding: 24px 20px 20px; }
    .auth-header     { padding: 24px 20px 20px; }
    .auth-footer     { padding: 14px 20px 20px; }
    .form-row        { grid-template-columns: 1fr; gap: 0; }
    .auth-split      { grid-template-columns: 1fr; }
    .auth-split-panel{ display: none; }
    .auth-split .auth-form-side { border-radius: 16px; padding: 32px 24px; }
}
