:root {
    --primary:        #1b5e20;
    --primary-darker: #0d3b13;
    --primary-mid:    #2e7d32;
    --text:           #232733;
    --text-muted:     #6c7280;
    --danger:         #dc3545;
    --success:        #1e8e3e;
}

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

html, body {
    height: 100%;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--primary-darker);
    min-height: 100vh;
    display: flex;
}

/* ── Outer wrapper ──────────────────────────────────────── */
.auth-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ── Brand panel (left) ─────────────────────────────────── */
.brand-panel {
    width: 42%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 3rem 2.5rem;
    flex-shrink: 0;
}

.brand-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInUp 0.7s ease both;
}

.brand-logo-ring {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.25);
    padding: 6px;
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.08);
}

.brand-logo-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.brand-name {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1.1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.25);
    line-height: 1.3;
}

.brand-rule {
    width: 56px;
    height: 2px;
    background: rgba(255,255,255,0.5);
    margin-bottom: 1.1rem;
}

.brand-slogan {
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.4px;
    margin-bottom: 2.25rem;
    line-height: 1.6;
}

.brand-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 0.4rem 1.2rem;
    border-radius: 999px;
}

/* decorative background circles */
.deco {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
}
.deco-tl  { width: 320px; height: 320px; top: -110px; left: -110px; }
.deco-br  { width: 420px; height: 420px; bottom: -160px; right: -160px; }
.deco-mid { width: 180px; height: 180px; top: 58%; left: 8%; }
.deco-sm  { width:  90px; height:  90px; top: 15%; right: 12%; }

/* ── Form panel (right) ─────────────────────────────────── */
.form-panel {
    flex: 1;
    background: #f7f9fc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.form-inner {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.7s ease 0.1s both;
}

/* mobile-only top branding strip */
.mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--primary);
    padding: 0.9rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    color: #fff;
}

.mobile-logo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.mobile-uni  { font-weight: 700; font-size: 0.9rem; letter-spacing: 0.5px; }
.mobile-slogan { font-size: 0.72rem; font-style: italic; opacity: 0.82; }

/* form header */
.form-header { margin-bottom: 2rem; }

.login-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.login-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* labels */
.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 0.4rem;
    display: block;
}

/* input wrapper */
.input-icon-container { position: relative; }

.input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--primary-mid);
    font-size: 1rem;
    pointer-events: none;
}

.form-control {
    display: block;
    width: 100%;
    border-radius: 8px;
    border: 1.5px solid #dde1e8;
    padding: 0.72rem 1rem 0.72rem 2.7rem;
    font-size: 0.93rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: #fff;
    transition: border-color 0.18s, box-shadow 0.18s;
    max-width: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.12);
}

.icon-input { padding-left: 45px; }

/* sign-in button */
.btn-signin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.82rem;
    font-size: 0.97rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.1s, box-shadow 0.18s;
    box-shadow: 0 4px 14px rgba(27, 94, 32, 0.28);
}

.btn-signin:hover:not(:disabled)  { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(27,94,32,0.32); }
.btn-signin:active:not(:disabled) { transform: translateY(0); opacity: 1; }
.btn-signin:disabled { cursor: not-allowed; opacity: 0.85; }

/* ── Legacy single-card layout ──────────────────────────────
   Used by ForgotPassword, ResetPassword, OTPPage and ChangePassword,
   which share this stylesheet but keep the older centered-card look. */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.login-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    width: 100%;
    max-width: 450px;
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.5s ease both;
}

.login-card:hover { transform: translateY(-5px); }

.card-header {
    background-color: #fff;
    padding: 30px 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo-container {
    margin-bottom: 15px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 150px;
    height: 150px;
    background-color: #fff;
    border-radius: 50%;
    padding: 15px;
}

.logo-img {
    max-width: 100%;
    height: auto;
}

.card-body { padding: 30px; }

.btn-success {
    background-color: springgreen;
    border: none;
    border-radius: 30px;
    padding: 12px 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    color: black;
}

.btn-success:hover {
    background-color: limegreen;
    transform: translateY(-2px);
    color: #fff;
}

/* forgot password / join */
.forgot-password {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.18s;
}
.forgot-password:hover { color: var(--primary-mid); text-decoration: underline; }

/* alerts */
.alert {
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 0.86rem;
    margin-top: 1rem;
    font-weight: 500;
    border: none;
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    animation: fadeInUp 0.35s ease both;
}
.alert-danger  { background: rgba(220,53,69,0.08);  border-color: var(--danger);  color: var(--danger);  }
.alert-success { background: rgba(30,142,62,0.08);  border-color: var(--success); color: var(--success); }

/* footer */
.footer-text {
    margin-top: 2.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}
.footer-link { color: var(--primary); text-decoration: none; font-weight: 600; }
.footer-link:hover { color: var(--primary-mid); }

/* modal overrides (keep consistent with rest of app) */
.modal-content { border: none; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 60px rgba(27,94,32,0.18); }
.modal-header  {
    background: var(--primary);
    color: #fff;
    border-bottom: none;
    padding: 1rem 1.25rem;
}
.modal-title   { font-weight: 600; color: #fff; }
.btn-close-white { filter: invert(1) brightness(2); opacity: 0.85; }
.modal-body    { padding: 1.5rem; }

/* ── Animations ─────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .brand-panel { display: none; }
    .form-panel  { padding: 2rem 1.25rem; justify-content: flex-start; padding-top: 2.5rem; }
    .form-inner  { max-width: 100%; }
}

@media (min-width: 769px) {
    .mobile-brand { display: none !important; }
}

@media (max-width: 1100px) {
    .brand-panel { width: 38%; padding: 2rem 1.5rem; }
    .brand-name  { font-size: 1.3rem; }
    .brand-slogan { font-size: 0.95rem; }
    .brand-logo-ring { width: 130px; height: 130px; }
}
