/* auth.css – shared styles for all authentication pages */

:root {
    --primary-green: #2c8e22;
    --primary-dark: #1a5c14;
    --primary-hover: #1f6a17;
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray-border: #dee2e6;
    --text-muted: #6c757d;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    --radius: 1rem;
}

/* ---------- Global background ---------- */
body {
    /*background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%); */
    background: var(--gray-border);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

.auth-card {
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: none;
    overflow: hidden;
}

/* ---------- Card header ---------- */
.auth-header {
    text-align: center;
    padding: 2rem 2rem 0.5rem;
    background: transparent;
    border-bottom: none;
}

.auth-logo {
    width: 70px;
    height: 70px;
    margin-bottom: 0.5rem;
}

.auth-title {
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ---------- Card body ---------- */
.auth-body {
    padding: 1.5rem 2rem 2rem;
    overflow-y: auto;      /* only this middle region scrolls */
}

/* ---------- Card footer ---------- */
.auth-footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.75rem 1.5rem 1.25rem;
    background: transparent;
    border-top: 1px solid var(--gray-border);
}

/* ---------- Form controls ---------- */
.form-control {
    border-radius: 0.75rem;
    border: 2px solid var(--gray-border);
    padding: 0.75rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(44, 142, 34, 0.25);
}

/* ---------- Buttons ---------- */
.btn-primary {
    background: var(--primary-green);
    border-color: var(--primary-green);
    border-radius: 0.75rem;
    font-weight: 600;
    padding: 0.75rem;
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-outline-secondary {
    border-color: var(--gray-border);
    border-radius: 0.75rem;
}
.btn-outline-secondary:hover {
    background: var(--primary-hover);
}

/* ---------- Password toggle ---------- */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}
.password-toggle:hover {
    color: var(--primary-green);
}

/* ---------- Password strength meter ---------- */
.strength-meter {
    height: 4px;
    background: var(--gray-border);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}
.strength-meter .meter-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background 0.3s ease;
}

/* ---------- Requirement list ---------- */
.requirement-list {
    list-style: none;
    padding-left: 0;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
.requirement-list li {
    margin-bottom: 0.25rem;
    color: var(--text-muted);
}
.requirement-list li.valid { color: #28a745; }
.requirement-list li.invalid { color: #dc3545; }
.requirement-list li i { width: 1.2rem; }

/* ---------- Alerts ---------- */
.alert {
    border-radius: 0.75rem;
    border-left: 4px solid;
    padding: 0.75rem 1rem;
}
.alert-success { border-left-color: #28a745; }
.alert-error, .alert-danger { border-left-color: #dc3545; color: #dc3545; }
.alert-info { border-left-color: #17a2b8; }
.alert-warning { border-left-color: #ffc107; }

/* ---------- Misc ---------- */
.text-primary { color: var(--primary-green) !important; }
.bg-light-soft { background-color: var(--gray-light); }
.radio-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}
.radio-card:hover { border-color: var(--primary-green); background: #f8fff8; }
.radio-card input[type="radio"] { display: none; }
.radio-card .radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #adb5bd;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}
.radio-card input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary-green);
    background: var(--primary-green);
}
.radio-card input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .auth-card { max-width: 100%; margin: 0 0.5rem; }
    .auth-body { padding: 1.5rem; }
    .auth-header { padding: 1.5rem 1.5rem 0; }
    .auth-title { font-size: 1.3rem; }
}