/* ==========================================================================
   Clean PKP Theme Overrides - Bedah Rumah Project
   Inspirasi: myPKP (my.pkp.go.id) & GoPKP (go.pkp.go.id)
   ========================================================================== */

:root {
    --pkp-primary: #085d75;
    --pkp-primary-hover: #05485c;
    --pkp-primary-light: #e6f4f8;
    --pkp-secondary: #e6aa28;
    --pkp-accent: #025f73;
    --pkp-bg-body: #f8fafc;
    --pkp-bg-surface: #ffffff;
    --pkp-text-dark: #1e293b;
    --pkp-text-muted: #64748b;
    --pkp-border-color: #e2e8f0;
    --pkp-input-bg: #f1f5f9;
    --pkp-radius-sm: 8px;
    --pkp-radius-md: 12px;
    --pkp-radius-lg: 16px;
    --pkp-radius-xl: 24px;
    --pkp-shadow-sm: 0 2px 8px rgba(8, 93, 117, 0.04);
    --pkp-shadow-md: 0 10px 25px rgba(8, 93, 117, 0.06);
    --pkp-shadow-lg: 0 20px 40px rgba(8, 93, 117, 0.1);
}

body {
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    background-color: var(--pkp-bg-body) !important;
    color: var(--pkp-text-dark);
}

/* ==========================================================================
   LOGIN PAGE - SPLIT CARD CLEAN LAYOUT (100vh NO PAGE SCROLLBAR)
   ========================================================================== */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Mencegah scrollbar pada jendela browser */
}

.clean-login-wrapper {
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #06475a 0%, #085d75 50%, #033442 100%);
    position: relative;
    box-sizing: border-box;
}

.clean-login-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern-mypkp.png') repeat center center;
    background-size: 300px;
    opacity: 0.18;
    z-index: 0;
}

.clean-login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    background: #ffffff;
    border-radius: var(--pkp-radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Split Layout Grid */
.clean-login-grid {
    display: grid;
    grid-template-columns: 40% 60%;
    height: 100%;
    flex: 1;
    min-height: 0;
}

/* Left Brand Panel */
.clean-login-brand {
    background: linear-gradient(155deg, #053b4b 0%, #085d75 60%, #022b37 100%);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

/* Fluid Wavy Background Container di Panel Kiri Bawah */
.wave-bg-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 260px;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.wavy-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    opacity: 0.85;
}

.wave-1 {
    animation: waveMove1 12s linear infinite;
}

.wave-2 {
    animation: waveMove2 8s linear infinite;
    opacity: 0.6;
}

@keyframes waveMove1 {
    0% {
        transform: translateX(0) scaleY(1);
    }
    50% {
        transform: translateX(-25%) scaleY(1.15);
    }
    100% {
        transform: translateX(-50%) scaleY(1);
    }
}

@keyframes waveMove2 {
    0% {
        transform: translateX(-50%) scaleY(1.1);
    }
    50% {
        transform: translateX(-25%) scaleY(0.9);
    }
    100% {
        transform: translateX(0) scaleY(1.1);
    }
}

.brand-header-logo, .brand-main-content, .brand-footer {
    position: relative;
    z-index: 2;
}

.brand-mobile-divider {
    display: none;
}

.brand-header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.brand-header-logo img {
    height: 40px;
    width: auto;
}

.brand-header-text h6 {
    font-size: 0.68rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #e6aa28;
    font-weight: 700;
    margin: 0;
}

.brand-header-text h5 {
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.brand-main-content {
    margin: auto 0;
}

.brand-main-content h3 {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
    color: #ffffff;
}

.brand-main-content p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.55;
    margin: 0;
}

.brand-footer {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Right Form Panel */
.clean-login-form-panel {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-panel-header {
    margin-bottom: 20px;
}

.form-panel-header h4 {
    font-weight: 700;
    color: var(--pkp-primary);
    font-size: 1.45rem;
    margin-bottom: 4px;
}

.form-panel-header p {
    color: var(--pkp-text-muted);
    font-size: 0.88rem;
    margin: 0;
}

/* Form Control Styling */
.clean-form-group {
    margin-bottom: 14px;
}

.clean-form-group label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    display: block;
}

.clean-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--pkp-input-bg);
    border: 1.5px solid transparent;
    border-radius: var(--pkp-radius-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.clean-input-group:focus-within {
    background: #ffffff;
    border-color: var(--pkp-primary);
    box-shadow: 0 0 0 4px rgba(8, 93, 117, 0.12);
}

.clean-input-icon {
    padding-left: 16px;
    color: #94a3b8;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.clean-form-control {
    width: 100%;
    height: 42px;
    border: none !important;
    background: transparent !important;
    padding: 0 16px 0 12px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--pkp-text-dark);
}

.clean-form-control:focus {
    outline: none !important;
    box-shadow: none !important;
}

.clean-form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.clean-password-toggle {
    padding-right: 16px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.clean-password-toggle:hover {
    color: var(--pkp-primary);
}

/* Captcha Layout */
.clean-captcha-box {
    display: flex;
    gap: 12px;
    align-items: center;
}

.clean-captcha-img-wrapper {
    flex: 0 0 120px;
    height: 42px;
    border-radius: var(--pkp-radius-md);
    overflow: hidden;
    border: 1px solid var(--pkp-border-color);
    background: #ffffff;
    cursor: pointer;
}

.clean-captcha-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Clean Button Styling */
.btn-pkp-primary {
    width: 100%;
    height: 42px;
    background: var(--pkp-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--pkp-radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(8, 93, 117, 0.2);
}

.btn-pkp-primary:hover {
    background: var(--pkp-primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(8, 93, 117, 0.28);
}

.btn-pkp-sso {
    height: 38px;
    background: #ffffff;
    border: 1px solid var(--pkp-border-color);
    border-radius: var(--pkp-radius-md);
    color: #334155;
    font-weight: 600;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.btn-pkp-sso:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--pkp-primary);
    transform: translateY(-1px);
}

.sso-divider {
    display: flex;
    align-items: center;
    margin: 14px 0 10px;
}

.sso-divider::before,
.sso-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--pkp-border-color);
}

.sso-divider span {
    padding: 0 10px;
    font-size: 0.75rem;
    color: var(--pkp-text-muted);
    font-weight: 500;
    text-transform: uppercase;
}

/* Content Wrapper */
.clean-login-content-wrapper {
    width: 100%;
    max-width: 680px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Mobile Logo Outside Card */
.clean-login-mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 14px;
    width: 100%;
}

.mobile-brand-logo {
    max-width: 145px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Mobile Panel Title Inside Card */
.mobile-panel-brand {
    display: none;
}

.mobile-panel-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--pkp-primary);
    line-height: 1.25;
    margin: 0;
}

.mobile-panel-subtitle {
    color: #c99a22;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Responsive adjustments (Mobile / Tablet) */
@media (max-width: 840px) {
    html, body {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .clean-login-wrapper {
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px 14px 40px;
        overflow-y: auto;
    }

    .clean-login-content-wrapper {
        max-width: 440px;
        margin: auto;
    }

    .clean-login-container {
        max-width: 440px;
        max-height: none;
        height: auto;
        margin: auto;
        border-radius: var(--pkp-radius-xl);
        overflow: hidden;
    }

    .clean-login-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        height: auto;
    }

    .clean-login-brand {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 14px !important;
        padding: 16px 18px !important;
        background: linear-gradient(155deg, #053b4b 0%, #085d75 60%, #022b37 100%) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    }

    .brand-header-logo-wrap {
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }

    .brand-header-logo {
        margin: 0 !important;
    }

    .brand-header-logo img {
        max-width: 155px !important;
        height: auto !important;
        display: block;
    }

    .brand-mobile-divider {
        display: block !important;
        width: 1px !important;
        height: 40px !important;
        background: rgba(255, 255, 255, 0.25) !important;
        flex-shrink: 0;
    }

    .brand-main-content {
        margin: 0 !important;
        text-align: left !important;
    }

    .brand-main-content h3 {
        font-size: 1.15rem !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        color: #ffffff !important;
    }

    .brand-main-content h3 span {
        font-size: 1.05rem !important;
        color: #d5c58a !important;
        font-weight: 600 !important;
    }

    .brand-description,
    .brand-footer,
    .wave-bg-container {
        display: none !important;
    }

    .clean-login-form-panel {
        padding: 22px 20px 24px !important;
        height: auto !important;
    }

    .clean-login-form-panel .form-panel-header {
        margin-bottom: 16px !important;
    }

    .clean-login-form-panel .form-panel-header h4 {
        font-size: 1.25rem !important;
        color: var(--pkp-primary) !important;
        margin-top: 0 !important;
    }

    .clean-login-form-panel .form-panel-header p {
        font-size: 0.84rem !important;
    }

    .btn-pkp-sso {
        font-size: 0.78rem !important;
        gap: 5px !important;
        padding: 0 4px !important;
        height: 36px !important;
    }
}

/* Fit-Screen Compression for Short Laptop Screens */
@media (min-width: 841px) and (max-height: 780px) {
    .clean-login-wrapper {
        padding: 12px 12px;
    }
    .clean-login-form-panel {
        padding-top: 16px;
        padding-bottom: 16px;
    }
    .clean-login-brand {
        padding: 24px;
    }
    .form-panel-header {
        margin-bottom: 10px;
    }
    .clean-form-group {
        margin-bottom: 8px;
    }
    .sso-divider {
        margin-top: 8px;
        margin-bottom: 6px;
    }
    .btn-pkp-sso {
        height: 36px;
        margin-bottom: 4px;
    }
    .app-download-section {
        display: none; /* Sembunyikan bagian download aplikasi jika layar laptop pendek agar Card 100% Fit tanpa Scroll */
    }
}

/* ==========================================================================
   OFFICIAL HUT RI 81 BADGE & HOUSING ANIMATION
   ========================================================================== */

/* 1. Official HUT RI 81 Logo Badge (Pojok Kanan Atas Top-Right Wrapper) */
.hut-ri-81-badge {
    position: absolute;
    top: 18px;
    right: 24px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
    animation: gentlePulse 3s infinite ease-in-out;
}

.hut-ri-81-badge:hover {
    transform: scale(1.05);
}

.hut-ri-81-badge img {
    height: 38px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

@keyframes gentlePulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    }
    50% {
        box-shadow: 0 8px 30px rgba(230, 170, 40, 0.4);
    }
}

/* 2. Animasi Bertema Perumahan Swadaya di Pojok Kiri Bawah Panel Kiri */
.left-bottom-housing-anim {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: auto;
    margin-bottom: 16px;
    width: fit-content;
    animation: floatHousing 4s ease-in-out infinite alternate;
}

.house-badge-icon {
    width: 36px;
    height: 36px;
    background: #e6aa28;
    color: #06475a;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(230, 170, 40, 0.3);
    animation: bounceHouse 2.5s infinite cubic-bezier(0.28, 0.84, 0.42, 1);
}

.housing-text {
    display: flex;
    flex-direction: column;
}

.housing-text span {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.housing-text small {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

@keyframes floatHousing {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-6px);
    }
}

@keyframes bounceHouse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

/* 3. Live Server Status Indicator */
.live-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.12);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-dot {
    width: 7px;
    height: 7px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
    animation: pulseDot 1.8s infinite ease-in-out;
}

@keyframes pulseDot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.75);
    }
}

/* ==========================================================================
   UNIFIED PROFESSIONAL PKP THEME OVERRIDES (Modal, Buttons, Card Headers)
   Warna Utama: GoPKP Deep Teal (#085d75) & Dark Slate Teal (#06475a)
   ========================================================================== */

/* 1. Modal Header Professional Styling */
.modal-header.bg-primary,
.modal-header.bg-info {
    background: linear-gradient(135deg, #06475a 0%, #085d75 100%) !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.modal-header.bg-dark {
    background: linear-gradient(135deg, #033442 0%, #06475a 100%) !important;
    color: #ffffff !important;
}

/* 2. Unified Primary Buttons (.btn-primary & .btn-info) */
.btn-primary,
.btn-info {
    background-color: var(--pkp-primary, #085d75) !important;
    border-color: var(--pkp-primary, #085d75) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(8, 93, 117, 0.2);
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-info:hover, .btn-info:focus, .btn-info:active {
    background-color: var(--pkp-primary-hover, #05485c) !important;
    border-color: var(--pkp-primary-hover, #05485c) !important;
    color: #ffffff !important;
    box-shadow: 0 5px 15px rgba(8, 93, 117, 0.35);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--pkp-primary, #085d75) !important;
    border-color: var(--pkp-primary, #085d75) !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: var(--pkp-primary, #085d75) !important;
    border-color: var(--pkp-primary, #085d75) !important;
    color: #ffffff !important;
}

/* 3. Card Header & Card Outline Theme Consistency */
.card-outline.card-info,
.card-outline.card-primary {
    border-top: 3px solid var(--pkp-primary, #085d75) !important;
}

.card-header.bg-primary,
.card-header.bg-info {
    background: linear-gradient(135deg, #06475a 0%, #085d75 100%) !important;
    color: #ffffff !important;
}

/* 4. Dashed Upload Box Active State */
.border-dashed {
    border: 2px dashed #cbd5e1 !important;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.border-dashed:hover {
    border-color: var(--pkp-primary, #085d75) !important;
    background-color: var(--pkp-primary-light, #e6f4f8) !important;
}

/* 5. Outline Danger Button PDF Icon Hover Fix */
.btn-outline-danger {
    transition: all 0.2s ease-in-out;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:active,
.btn-outline-danger.active {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

.btn-outline-danger:hover i,
.btn-outline-danger:hover .fas,
.btn-outline-danger:hover .far,
.btn-outline-danger:hover .fa,
.btn-outline-danger:hover .text-danger,
.btn-outline-danger:focus i,
.btn-outline-danger:focus .fas,
.btn-outline-danger:focus .far,
.btn-outline-danger:focus .fa,
.btn-outline-danger:focus .text-danger,
.btn-outline-danger:active i,
.btn-outline-danger:active .fas,
.btn-outline-danger:active .far,
.btn-outline-danger:active .fa,
.btn-outline-danger:active .text-danger {
    color: #ffffff !important;
}





