/**
 * eProject 2027 — Official Executive Civic Portal
 * Pemerintah Kota Surabaya
 * Bagian Pengadaan Barang/Jasa dan Administrasi Pembangunan (BPBJAP)
 * Anti-Mainstream Typography: Public Sans (Civic Standard) + Space Grotesk (Architectural Headings)
 */

@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
    --bpbjap-navy: #0c2340;
    --bpbjap-navy-hover: #16335a;
    --bpbjap-navy-dark: #07172b;
    --bpbjap-blue: #0284c7;
    --bpbjap-blue-hover: #0369a1;
    --bpbjap-emerald: #059669;
    --bpbjap-emerald-bg: #d1fae5;
    --bpbjap-amber: #d97706;
    --bpbjap-slate-900: #0f172a;
    --bpbjap-slate-800: #1e293b;
    --bpbjap-slate-600: #475569;
    --bpbjap-slate-500: #64748b;
    --bpbjap-slate-300: #cbd5e1;
    --bpbjap-slate-200: #e2e8f0;
    --bpbjap-slate-100: #f1f5f9;
    --bpbjap-slate-50: #f8fafc;
    --bpbjap-bg: #f0f4f9;
    --bpbjap-font-sans: 'Public Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --bpbjap-font-display: 'Space Grotesk', 'Public Sans', sans-serif;
    --bpbjap-font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Base Body */
body.login-page-body {
    margin: 0;
    padding: 0;
    font-family: var(--bpbjap-font-sans) !important;
    background-color: var(--bpbjap-bg);
    background-image: 
        radial-gradient(ellipse at 50% 0%, rgba(2, 132, 199, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 10% 90%, rgba(12, 35, 64, 0.05) 0%, transparent 50%);
    color: var(--bpbjap-slate-900);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Master Layout Wrapper */
.bpbjap-portal-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* ========================================================
   1. TOP OFFICIAL GOVERNMENT BAR
   ======================================================== */
.bpbjap-topbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--bpbjap-slate-200);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.bpbjap-brand-unit {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
}

.bpbjap-brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.bpbjap-brand-meta h5 {
    margin: 0;
    font-family: var(--bpbjap-font-display);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bpbjap-navy);
    line-height: 1.2;
}

.bpbjap-brand-meta p {
    margin: 2px 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bpbjap-slate-600);
    line-height: 1.2;
}

.bpbjap-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bpbjap-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    background: var(--bpbjap-emerald-bg);
    border: 1px solid rgba(5, 150, 105, 0.25);
    border-radius: 9999px;
    font-family: var(--bpbjap-font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--bpbjap-emerald);
    letter-spacing: 0.02em;
}

.bpbjap-pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--bpbjap-emerald);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--bpbjap-emerald);
    animation: bpbjapPulse 2s infinite;
}

@keyframes bpbjapPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.bpbjap-clock {
    font-size: 0.75rem;
    color: var(--bpbjap-slate-500);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ========================================================
   2. MAIN STAGE: SIMPLE BUT EFFECTIVE FOCUSED CARD
   ======================================================== */
.bpbjap-main-stage {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.bpbjap-smart-card {
    background: #ffffff;
    border: 1px solid var(--bpbjap-slate-200);
    border-radius: 14px;
    box-shadow: 
        0 12px 32px -4px rgba(12, 35, 64, 0.08),
        0 4px 12px -2px rgba(12, 35, 64, 0.03);
    max-width: 460px;
    width: 100%;
    padding: 34px 34px 26px;
    position: relative;
}

/* Card Header */
.bpbjap-card-header {
    text-align: center;
    margin-bottom: 22px;
}

.bpbjap-card-tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.2);
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--bpbjap-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.bpbjap-card-title {
    font-family: var(--bpbjap-font-display);
    font-size: 1.95rem;
    font-weight: 800;
    color: var(--bpbjap-navy);
    letter-spacing: -0.03em;
    margin: 0 0 4px;
    line-height: 1.15;
}

.bpbjap-card-title span {
    color: var(--bpbjap-blue);
}

.bpbjap-card-sub {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--bpbjap-slate-500);
    margin: 0;
    line-height: 1.35;
}

/* Form Groups & Inputs */
.bpbjap-form-group {
    margin-bottom: 14px;
}

.bpbjap-form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--bpbjap-slate-800);
    margin-bottom: 5px;
}

.bpbjap-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.bpbjap-input-icon {
    position: absolute;
    left: 14px;
    color: var(--bpbjap-slate-500);
    font-size: 0.88rem;
    pointer-events: none;
    z-index: 4;
}

.bpbjap-input {
    width: 100%;
    height: 46px;
    padding: 8px 12px 8px 40px !important;
    background-color: #ffffff !important;
    border: 1.5px solid var(--bpbjap-slate-200) !important;
    border-radius: 8px !important;
    font-family: var(--bpbjap-font-sans) !important;
    font-size: 0.9rem !important;
    color: var(--bpbjap-slate-900) !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box;
}

.bpbjap-input:focus {
    border-color: var(--bpbjap-navy) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.1) !important;
}

/* Reset placeholder color from legacy custom_css.css */
.bpbjap-smart-card #login::placeholder,
.bpbjap-smart-card #password::placeholder,
.bpbjap-smart-card .bpbjap-input::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.bpbjap-pwd-toggle {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--bpbjap-slate-500);
    font-size: 0.92rem;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: color 0.15s;
    z-index: 4;
}

.bpbjap-pwd-toggle:hover {
    color: var(--bpbjap-slate-900);
}

.bpbjap-caps-alert {
    display: none;
    align-items: center;
    gap: 6px;
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 5px;
}

/* Primary Action Buttons */
.btn-bpbjap-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    background-color: var(--bpbjap-navy);
    border: 1.5px solid var(--bpbjap-navy);
    border-radius: 8px;
    color: #ffffff !important;
    font-family: var(--bpbjap-font-sans);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 6px;
}

.btn-bpbjap-submit:hover {
    background-color: var(--bpbjap-navy-hover);
    border-color: var(--bpbjap-navy-hover);
    box-shadow: 0 4px 12px rgba(12, 35, 64, 0.2);
    transform: translateY(-1px);
}

.btn-bpbjap-submit:active {
    transform: translateY(0);
}

/* SSO Kantorku Action Button (Solid Action Button Style) */
.btn-kantorku-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    background-color: #f8fafc;
    border: 1.5px solid var(--bpbjap-blue);
    border-radius: 8px;
    color: var(--bpbjap-navy) !important;
    font-family: var(--bpbjap-font-sans);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-kantorku-action:hover {
    background-color: #f0f9ff;
    border-color: var(--bpbjap-blue-hover);
    color: var(--bpbjap-blue-hover) !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
    transform: translateY(-1px);
}

.btn-kantorku-action:active {
    transform: translateY(0);
}

.btn-kantorku-action i {
    color: var(--bpbjap-blue);
    font-size: 1rem;
}

/* Elegant Divider */
.bpbjap-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 14px 0;
    color: var(--bpbjap-slate-500);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bpbjap-divider::before,
.bpbjap-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--bpbjap-slate-200);
}

.bpbjap-divider span {
    padding: 0 10px;
}

/* ========================================================
   3. SMART UTILITIES BAR (SHOW BY NEEDED)
   ======================================================== */
.bpbjap-smart-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--bpbjap-slate-200);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bpbjap-smart-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--bpbjap-slate-50);
    border: 1px solid var(--bpbjap-slate-200);
    border-radius: 9999px;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--bpbjap-slate-600) !important;
    text-decoration: none !important;
    transition: all 0.15s ease;
    cursor: pointer;
}

.bpbjap-smart-pill:hover {
    background: #ffffff;
    border-color: var(--bpbjap-blue);
    color: var(--bpbjap-navy) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* ========================================================
   4. BOTTOM OFFICIAL FOOTER
   ======================================================== */
.bpbjap-footer {
    background: #ffffff;
    border-top: 1px solid var(--bpbjap-slate-200);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    color: var(--bpbjap-slate-500);
}

.bpbjap-footer strong {
    color: var(--bpbjap-slate-800);
}

.bpbjap-security-note {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========================================================
   5. SIKLUS GRMS INTERACTIVE MODAL (BY NEEDED)
   ======================================================== */
.modal-grms .modal-content {
    border-radius: 14px;
    border: 1px solid var(--bpbjap-slate-200);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-grms .modal-header {
    background-color: var(--bpbjap-navy);
    color: #ffffff;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-grms .modal-title {
    font-family: var(--bpbjap-font-display);
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-grms .close {
    color: #ffffff;
    opacity: 0.8;
    text-shadow: none;
}

.modal-grms .close:hover {
    opacity: 1;
}

.grms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.grms-card {
    display: block;
    text-decoration: none !important;
    background: #ffffff;
    border: 1.5px solid var(--bpbjap-slate-200);
    border-radius: 10px;
    padding: 12px 14px;
    transition: all 0.15s ease;
}

.grms-card:hover {
    border-color: var(--bpbjap-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}

.grms-card.is-active-card {
    background: #f0f7ff;
    border-color: #38bdf8;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
}

.grms-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.grms-card-num {
    font-family: var(--bpbjap-font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--bpbjap-slate-500);
}

.grms-card.is-active-card .grms-card-num {
    color: var(--bpbjap-blue);
}

.grms-active-badge {
    background: var(--bpbjap-blue);
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.grms-card-title {
    font-family: var(--bpbjap-font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bpbjap-slate-900);
    margin: 0 0 2px;
}

.grms-card-role {
    font-size: 0.72rem;
    color: var(--bpbjap-slate-500);
    margin: 0;
}

/* ========================================================
   6. ARSIP TAUTAN APLIKASI CIVIC MODAL (.modal-civic)
   ======================================================== */
.modal-civic .modal-content {
    border-radius: 14px;
    border: 1px solid var(--bpbjap-slate-200);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-civic .modal-header {
    background-color: var(--bpbjap-navy);
    color: #ffffff;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-civic .modal-title {
    font-family: var(--bpbjap-font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.modal-civic .modal-header small {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.78rem;
    display: block;
    margin-top: 3px;
}

.modal-civic .close {
    color: #ffffff;
    opacity: 0.8;
    text-shadow: none;
    font-size: 1.5rem;
    font-weight: 300;
    padding: 18px 24px;
    margin: -18px -24px -18px auto;
    transition: opacity 0.15s ease;
}

.modal-civic .close:hover {
    opacity: 1;
    color: #ffffff;
}

/* Nav Tabs / Segmented Pill Control */
.civic-archive-nav {
    display: flex;
    background: var(--bpbjap-slate-100);
    padding: 5px;
    border-radius: 10px;
    border: 1px solid var(--bpbjap-slate-200);
    margin-bottom: 20px;
    gap: 6px;
}

.civic-archive-nav .nav-item {
    flex: 1;
    margin: 0;
}

.civic-archive-nav .nav-link {
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--bpbjap-slate-600);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    text-decoration: none !important;
}

.civic-archive-nav .nav-link:hover {
    color: var(--bpbjap-navy);
    background: rgba(255, 255, 255, 0.7);
}

.civic-archive-nav .nav-link.active.nav-link-eproject {
    background: #ffffff;
    color: var(--bpbjap-blue);
    border-color: var(--bpbjap-slate-200);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    font-weight: 700;
}

.civic-archive-nav .nav-link.active.nav-link-econtrolling {
    background: #ffffff;
    color: var(--bpbjap-emerald);
    border-color: var(--bpbjap-slate-200);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    font-weight: 700;
}

.civic-archive-nav .archive-nav-desc {
    font-size: 0.78rem;
    opacity: 0.85;
    font-weight: 500;
}

/* Year Archive Grid & Year Cards */
.civic-archive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.civic-archive-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none !important;
    background: #ffffff;
    border: 1.5px solid var(--bpbjap-slate-200);
    border-radius: 10px;
    padding: 12px 14px;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    color: var(--bpbjap-slate-800);
}

.civic-archive-year {
    font-family: var(--bpbjap-font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--bpbjap-slate-800);
    transition: color 0.18s ease;
}

.civic-archive-icon {
    font-size: 0.72rem;
    opacity: 0.35;
    color: var(--bpbjap-slate-500);
    transition: all 0.18s ease;
}

/* Interactive States: eProject */
#tab-eproject .civic-archive-card:hover {
    border-color: var(--bpbjap-blue);
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.14);
}

#tab-eproject .civic-archive-card:hover .civic-archive-year {
    color: var(--bpbjap-blue);
}

#tab-eproject .civic-archive-card:hover .civic-archive-icon {
    color: var(--bpbjap-blue);
    opacity: 1;
    transform: translate(1px, -1px);
}

/* Interactive States: eControlling */
#tab-econtrolling .civic-archive-card:hover {
    border-color: var(--bpbjap-emerald);
    background: #ecfdf5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.14);
}

#tab-econtrolling .civic-archive-card:hover .civic-archive-year {
    color: var(--bpbjap-emerald);
}

#tab-econtrolling .civic-archive-card:hover .civic-archive-icon {
    color: var(--bpbjap-emerald);
    opacity: 1;
    transform: translate(1px, -1px);
}

/* ========================================================
   7. RESPONSIVENESS (< 576px)
   ======================================================== */
@media (max-width: 575.98px) {
    .bpbjap-topbar {
        padding: 8px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .bpbjap-topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .bpbjap-smart-card {
        padding: 24px 18px 20px;
        border-radius: 12px;
    }

    .bpbjap-card-title {
        font-size: 1.65rem;
    }

    .grms-grid {
        grid-template-columns: 1fr;
    }

    .modal-civic .modal-header {
        padding: 14px 16px;
    }

    .modal-civic .modal-title {
        font-size: 0.98rem;
    }

    .modal-civic .modal-body {
        padding: 16px 14px !important;
    }

    .modal-civic .modal-footer {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
        padding: 12px 14px !important;
        text-align: center;
    }

    .modal-civic .modal-footer .btn {
        width: 100%;
    }

    .civic-archive-nav {
        margin-bottom: 14px;
        padding: 4px;
        gap: 4px;
    }

    .civic-archive-nav .nav-link {
        padding: 8px 10px;
        font-size: 0.78rem;
        gap: 4px;
    }

    .civic-archive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .civic-archive-card {
        padding: 10px 6px;
        border-radius: 8px;
        gap: 5px;
    }

    .civic-archive-year {
        font-size: 0.92rem;
    }

    .civic-archive-icon {
        font-size: 0.65rem;
    }

    .bpbjap-footer {
        flex-direction: column;
        gap: 6px;
        text-align: center;
        padding: 10px 14px;
    }
}

@media (max-width: 360px) {
    .civic-archive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}
