:root {
    --da-green: #0f3d24;
    --da-green-mid: #1b5e32;
    --da-gold: #c9a227;
    --da-gold-light: #e8d48b;
}

.portal-body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #f7f4ea;
    background-color: #0c2a1a;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.04) 50%, rgba(0, 0, 0, 0.12) 100%),
        url('../images/da-portal-bg.png?v=bensol13');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.portal-body.portal-body-custom {
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.04) 50%, rgba(0, 0, 0, 0.12) 100%),
        var(--portal-custom-bg);
}

.portal-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.25rem 1.5rem;
}

.portal-header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.portal-seal {
    width: 118px;
    height: 118px;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 42%, #1f6b3a 0%, #0d3b24 70%);
    border: 4px solid var(--da-gold);
    box-shadow: 0 0 0 6px rgba(15, 61, 36, 0.85), 0 10px 28px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--da-gold-light);
    font-size: 2.6rem;
}

.portal-kicker {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: var(--da-gold-light);
    margin-bottom: 0.35rem;
}

.portal-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    color: #f3e3a0;
    margin: 0 0 0.35rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.portal-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.02rem;
}

.portal-cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 1.15rem;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    align-content: start;
}

.portal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: #fff;
    min-height: 280px;
    padding: 1.75rem 1.1rem;
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.portal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.35);
    color: #fff;
}

.portal-card .icon-circle {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    margin-bottom: 1.15rem;
}

.portal-card h2 {
    font-size: 1.28rem;
    font-weight: 800;
    margin: 0 0 0.55rem;
}

.portal-card p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    opacity: 0.95;
}

.portal-card.staff { background: #2e7d32; }
.portal-card.admin { background: #d4a017; color: #1f2a12; }
.portal-card.admin h2,
.portal-card.admin p { color: #1f2a12; }
.portal-card.register-farmer { background: #1565c0; }
.portal-card.register-user { background: #00838f; }
.portal-card.super-admin { background: #6a1b2b; }

.portal-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.82rem;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

.portal-footer p {
    margin: 0;
}

.portal-footer-reserved {
    margin-top: 0.25rem !important;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.92);
}

.portal-panel {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    color: #1f2a1f;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

.portal-panel.wide {
    max-width: 920px;
}

.portal-panel-header {
    background: #1b5e20;
    color: #fff;
    padding: 1.35rem 1.5rem 1.15rem;
    text-align: center;
    border-bottom: 3px solid #ffb300;
}

.portal-panel-header h1 {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0 0 0.2rem;
}

.portal-panel-header p {
    margin: 0;
    font-size: 0.92rem;
    opacity: 0.95;
}

.portal-panel-body {
    padding: 1.5rem 1.4rem 1.35rem;
}

.portal-panel-body .form-floating > .form-control {
    border-radius: 8px;
    border-color: #ced4da;
    height: calc(3.2rem + 2px);
}

.portal-panel-body .form-floating > label {
    color: #6c757d;
}

.portal-panel-body .form-label {
    color: #1f2a12;
    font-size: 0.9rem;
}

.portal-back {
    display: inline-flex;
    align-items: center;
    color: var(--da-gold-light);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1rem;
}

.portal-back:hover {
    color: #fff;
}

.btn-da {
    background: #1b5e20;
    border: none;
    color: #fff;
    font-weight: 700;
}

.btn-da:hover {
    background: #145218;
    color: #fff;
}

.btn-da:disabled {
    background: #6c757d;
    color: #fff;
    opacity: 0.75;
    cursor: not-allowed;
}

.btn-da-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #1b5e32;
    color: #1b5e32 !important;
    font-weight: 700;
}

.btn-da-outline:hover,
.btn-da-outline:focus {
    background: #1b5e32;
    border-color: #1b5e32;
    color: #fff;
    text-decoration: none;
}

.btn-da-outline:disabled,
.btn-da-outline:disabled:hover {
    background: #fff;
    border-color: #8aa592;
    color: #8aa592;
    cursor: not-allowed;
}

.portal-panel-body a.btn {
    text-decoration: none;
}

.otp-display {
    display: inline-block;
    letter-spacing: 0.35em;
    font-size: 1.8rem;
    font-weight: 800;
    color: #1b5e32;
    background: #f3f8f4;
    border: 1px dashed #1b5e32;
    border-radius: 10px;
    padding: 0.65rem 1.1rem;
}

.reset-steps {
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 1.15rem;
}

.reset-step {
    flex: 1;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #6c757d;
    line-height: 1.25;
}

.reset-step span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin: 0 auto 0.35rem;
    border-radius: 50%;
    background: #e9eee9;
    color: #4a5248;
    font-size: 0.78rem;
}

.reset-step.is-active,
.reset-step.is-done {
    color: #1b5e32;
}

.reset-step.is-active span,
.reset-step.is-done span {
    background: #1b5e32;
    color: #fff;
}

.reset-approval {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.1rem;
}

.reset-approval-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border: 1px solid #d7e4d9;
    border-radius: 10px;
    background: #f7fbf8;
}

.reset-approval-item.is-done {
    border-color: #1b5e32;
    background: #eef7f0;
}

.reset-approval-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9eee9;
    color: #4a5248;
    flex-shrink: 0;
}

.reset-approval-item.is-done .reset-approval-icon {
    background: #1b5e32;
    color: #fff;
}

.login-lock-notice {
    background: #fff6e8;
    border: 1px solid #e0b35a;
    border-left: 5px solid #c9a227;
    border-radius: 12px;
    padding: 1.1rem 1rem 1.2rem;
    margin-bottom: 1.15rem;
    text-align: center;
}

.login-lock-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 0.6rem;
    border-radius: 50%;
    background: #1b5e32;
    color: #e8d48b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.login-lock-notice h2 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
    color: #1f2a1f;
}

.login-lock-notice p {
    margin: 0 0 0.65rem;
    color: #4a5248;
    font-size: 0.92rem;
}

.login-countdown {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    color: #1b5e32;
    font-variant-numeric: tabular-nums;
}

.login-countdown-label {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c757d;
    margin-top: 0.3rem;
}

.login-attempts-hint {
    margin: 0.75rem 0 0;
    text-align: center;
    font-size: 0.82rem;
    color: #6c757d;
}

.login-form-locked .form-control {
    background: #f1f3f2;
    cursor: not-allowed;
}

.btn-da:disabled,
.btn-da:disabled:hover {
    background: #8aa592;
    color: #fff;
    cursor: not-allowed;
}

.login-form-locked {
    opacity: 0.72;
    pointer-events: none;
}

.login-lock-notice {
    border-left: 4px solid #c9a227;
}

#lockCountdown {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.portal-panel-body a {
    color: #1b5e32;
    font-weight: 600;
    text-decoration: none;
}

.portal-panel-body a:hover {
    color: #134e32;
    text-decoration: underline;
}

@media (max-width: 1199.98px) {
    .portal-cards {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }
}

@media (max-width: 767.98px) {
    .portal-cards {
        grid-template-columns: 1fr;
        max-width: 380px;
    }
    .portal-card {
        min-height: 220px;
    }
}

@media (max-width: 575.98px) {
    .portal-wrap {
        padding: 1rem 0.75rem 1.25rem;
    }
    .portal-title {
        font-size: 1.45rem;
    }
    .portal-seal {
        width: 88px;
        height: 88px;
        font-size: 2rem;
    }
    .portal-panel {
        width: 100%;
    }
}
