/* ============================================
   Login Page — RouteLINK SIM
   ============================================ */

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

body {
    font-family:
        "Plus Jakarta Sans",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    min-height: 100vh;
    background: #f1f5f9;
}

/* ============================================
   WRAPPER
   ============================================ */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   BRAND PANEL (Kiri)
   ============================================ */
.login-brand {
    flex: 1.05;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, #f17375 0%, #e94446 55%, #c62828 100%);
    position: relative;
    overflow: hidden;
    padding: 48px 40px;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    pointer-events: none;
}
.deco-circle-1 {
    width: 340px;
    height: 340px;
    top: -90px;
    left: -90px;
}
.deco-circle-2 {
    width: 220px;
    height: 220px;
    bottom: -60px;
    right: -60px;
    background: rgba(255, 255, 255, 0.05);
}
.deco-circle-3 {
    width: 130px;
    height: 130px;
    bottom: 32%;
    left: 8%;
    background: rgba(255, 255, 255, 0.04);
}

.brand-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
}

/* ============================================
   LOGO — besar, bersih, tanpa bingkai
   ============================================ */
.brand-logo-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    margin-bottom: 28px;
    /* subtle glow agar tidak flat di atas gradien */
    filter: brightness(0) invert(1)
        drop-shadow(0 4px 20px rgba(255, 255, 255, 0.25));
    animation: logo-breathe 4s ease-in-out infinite;
}

@keyframes logo-breathe {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.88;
        transform: scale(0.97);
    }
}

/* ============================================
   CORE VALUES BUBBLE CLUSTER
   ============================================ */
.core-values-area {
    position: relative;
    width: 400px;
    height: 400px;
    margin-bottom: 32px;
    flex-shrink: 0;
}

.cv-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.cv-bubble {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(6px);
    gap: 4px;
    text-align: center;
    transition:
        transform 0.3s ease,
        background 0.3s ease;
    cursor: default;
    z-index: 1;
    opacity: 0;
}

.cv-bubble:hover {
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    z-index: 10;
}

.cv-icon {
    font-size: 26px;
    color: #fff;
    line-height: 1;
}

.cv-number {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #e94446;
    font-family: "Poppins", sans-serif;
    font-size: 10px;
    font-weight: 800;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 3;
    line-height: 1;
}

.cv-label {
    font-family: "Poppins", sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1.3;
}

/* Core Value Modal */
.cv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s;
}

.cv-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cv-modal {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px 32px;
    width: 340px;
    max-width: calc(100vw - 40px);
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.85) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-modal-overlay.active .cv-modal {
    transform: scale(1) translateY(0);
}

.cv-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.cv-modal-close:hover {
    color: #e94446;
}

.cv-modal-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #e94446, #c62828);
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 800;
    border-radius: 50%;
    margin-bottom: 14px;
}

.cv-modal-icon {
    font-size: 40px;
    color: #e94446;
    margin-bottom: 12px;
}

.cv-modal-title {
    font-family: "Poppins", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cv-modal-desc {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 0.9rem;
    color: #53535f;
    line-height: 1.7;
    font-weight: 500;
}

/* Center bubble */
.cv-center {
    width: 115px;
    height: 115px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.07);
    z-index: 2;
    animation:
        cv-center-pop 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both,
        pulse-center 3.5s ease-in-out 1.2s infinite;
}
.cv-center:hover {
    transform: translate(-50%, -50%) scale(1.06) !important;
}
.cv-center .cv-icon {
    font-size: 30px;
}
.cv-center .cv-label {
    font-size: 10px;
    letter-spacing: 1px;
}

@keyframes cv-center-pop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    60% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    80% {
        transform: translate(-50%, -50%) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes pulse-center {
    0%,
    100% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.07);
    }
    50% {
        box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.04);
    }
}

/* Satellite bubbles */
.cv-1,
.cv-2,
.cv-3,
.cv-4,
.cv-5 {
    width: 96px;
    height: 96px;
}

.cv-1 {
    top: 0;
    left: 50%;
    animation:
        cv-fly-1 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both,
        f1 4s ease-in-out 2s infinite;
}
.cv-2 {
    top: 20%;
    right: 0;
    animation:
        cv-fly-2 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both,
        f2 4.4s ease-in-out 2s infinite;
}
.cv-3 {
    bottom: 5%;
    right: 4%;
    animation:
        cv-fly-3 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both,
        f3 3.8s ease-in-out 2s infinite;
}
.cv-4 {
    bottom: 5%;
    left: 4%;
    animation:
        cv-fly-4 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.85s both,
        f4 4.6s ease-in-out 2s infinite;
}
.cv-5 {
    top: 20%;
    left: 0;
    animation:
        cv-fly-5 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1s both,
        f5 4.2s ease-in-out 2s infinite;
}

.cv-1:hover {
    transform: translateX(-50%) scale(1.1) !important;
}
.cv-2:hover,
.cv-3:hover,
.cv-4:hover,
.cv-5:hover {
    transform: scale(1.1) !important;
}

@keyframes f1 {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-9px);
    }
}
@keyframes f2 {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}
@keyframes f3 {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}
@keyframes f4 {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}
@keyframes f5 {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Staggered entrance animation for center bubble */
@keyframes cv-appear {
    0% {
        opacity: 0;
        clip-path: circle(0% at 50% 50%);
        filter: brightness(1.5);
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        clip-path: circle(150% at 50% 50%);
        filter: brightness(1);
    }
}

@keyframes cv-spin-in {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    60% {
        opacity: 1;
        transform: scale(1.1) rotate(15deg);
    }
    80% {
        transform: scale(0.95) rotate(-5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Fly-out from center — straight to final position */
@keyframes cv-fly-1 {
    0% {
        opacity: 0;
        transform: translate(0, 152px) scale(0.3);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}
@keyframes cv-fly-2 {
    0% {
        opacity: 0;
        transform: translate(-152px, 80px) scale(0.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes cv-fly-3 {
    0% {
        opacity: 0;
        transform: translate(-120px, -132px) scale(0.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes cv-fly-4 {
    0% {
        opacity: 0;
        transform: translate(136px, -132px) scale(0.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes cv-fly-5 {
    0% {
        opacity: 0;
        transform: translate(152px, 80px) scale(0.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes cv-line-fade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* SVG connection lines & dots — fade in when bubbles arrive at final position */
.cv-lines > * {
    opacity: 0;
}
.cv-lines > :nth-child(11) {
    animation: cv-line-fade 0.3s ease-out 0.2s both;
}
.cv-lines > :nth-child(1),
.cv-lines > :nth-child(6) {
    animation: cv-line-fade 0.6s ease-out 0.8s both;
}
.cv-lines > :nth-child(2),
.cv-lines > :nth-child(7) {
    animation: cv-line-fade 0.6s ease-out 0.95s both;
}
.cv-lines > :nth-child(3),
.cv-lines > :nth-child(8) {
    animation: cv-line-fade 0.6s ease-out 1.1s both;
}
.cv-lines > :nth-child(4),
.cv-lines > :nth-child(9) {
    animation: cv-line-fade 0.6s ease-out 1.25s both;
}
.cv-lines > :nth-child(5),
.cv-lines > :nth-child(10) {
    animation: cv-line-fade 0.6s ease-out 1.4s both;
}

/* ============================================
   BRAND TEXT
   ============================================ */
.brand-text {
    text-align: center;
}

.brand-title {
    font-family: "Poppins", sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 6px;
    line-height: 1;
    margin-bottom: 12px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    display: flex;
    justify-content: center;
    gap: 2px;
}

.brand-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) scale(0.5);
    animation-name: letter-in;
    animation-duration: 0.6s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: both;
}

@keyframes letter-in {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translateY(-6px) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.brand-tagline {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.36);
    border-radius: 30px;
    padding: 8px 22px;
    opacity: 0;
    animation: tagline-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
}

@keyframes tagline-in {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   FORM PANEL (Kanan)
   ============================================ */
.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 44px;
    background: #f8fafc;
}

.form-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 40px 36px;
    width: 100%;
    max-width: 420px;
    border: 1px solid #e9eef5;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

.form-top-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.form-logo-img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}

.form-header {
    margin-bottom: 28px;
    text-align: center;
}

.form-header h1 {
    font-family: "Poppins", sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
    line-height: 1.3;
}

.form-header p {
    font-size: 0.88rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.input-icon-wrap {
    position: relative;
}

.input-prefix-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 13px;
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s;
}

.input-suffix-icon {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1;
}

.input-suffix-icon:hover {
    color: #e94446;
}

.form-control {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 0.92rem;
    color: #1a1a2e;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition:
        border-color 0.2s,
        background 0.2s,
        box-shadow 0.2s;
    appearance: none;
}

.form-control.has-prefix {
    padding-left: 40px;
}
.form-control.has-suffix {
    padding-right: 46px;
}

.form-control:focus {
    border-color: #e94446;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(233, 68, 70, 0.12);
}

.input-icon-wrap:focus-within .input-prefix-icon {
    color: #e94446;
}

.form-control::placeholder {
    color: #b0b8c4;
    font-size: 0.88rem;
}
.form-control[readonly] {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

/* ============================================
   BUTTON
   ============================================ */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    font-family: "Poppins", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    margin-top: 4px;
}

.btn-primary {
    background: linear-gradient(135deg, #53535f 0%, #3d3d47 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #63636f 0%, #53535f 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(83, 83, 95, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-icon {
    font-size: 12px;
    opacity: 0.85;
    transition: transform 0.2s;
}
.btn-primary:hover .btn-icon {
    transform: translateX(3px);
}

.btn-loading .btn-text,
.btn-loading .btn-icon {
    opacity: 0;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   FOOTER & FORGOT LINK
   ============================================ */
.form-footer {
    text-align: center;
    margin-top: 24px;
}

.forgot-link {
    font-size: 0.82rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
}

.forgot-link i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.forgot-link:hover {
    color: #e94446;
    background: rgba(233, 68, 70, 0.06);
}
.forgot-link:hover i {
    transform: rotate(-15deg);
}

/* ============================================
   ALERT
   ============================================ */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 22px;
    font-size: 0.84rem;
    line-height: 1.5;
}

.alert-warning {
    background: #fff8e6;
    border: 1px solid #fcd34d;
    color: #92400e;
}
.alert-warning i {
    flex-shrink: 0;
    color: #d97706;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #34d399;
    color: #065f46;
}
.alert-success i {
    flex-shrink: 0;
    color: #10b981;
}

.close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.6;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
}
.close:hover {
    opacity: 1;
}

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */
@media (max-width: 1024px) {
    .login-brand {
        flex: 0.9;
        padding: 40px 24px;
    }

    .brand-logo-img {
        width: 76px;
        height: 76px;
    }

    .core-values-area {
        width: 340px;
        height: 340px;
    }
    .cv-center {
        width: 100px;
        height: 100px;
    }
    .cv-1,
    .cv-2,
    .cv-3,
    .cv-4,
    .cv-5 {
        width: 82px;
        height: 82px;
    }
    .cv-icon {
        font-size: 22px;
    }
    .cv-center .cv-icon {
        font-size: 26px;
    }
    .cv-label {
        font-size: 10px;
    }
    .brand-title {
        font-size: 2.4rem;
    }
}

@media (max-width: 900px) {
    .login-brand {
        flex: 0.8;
    }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 768px) {
    body {
        background: linear-gradient(
            150deg,
            #f17375 0%,
            #e94446 55%,
            #c62828 100%
        );
    }

    .login-wrapper {
        flex-direction: column;
        min-height: 100vh;
        justify-content: center;
        align-items: center;
        padding: 32px 20px;
    }

    .login-brand {
        display: none;
    }

    .login-form-section {
        width: 100%;
        max-width: 440px;
        padding: 0;
        background: transparent;
    }

    .form-card {
        padding: 32px 26px 28px;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .form-top-logo {
        margin-bottom: 12px;
    }
    .form-logo-img {
        width: 72px;
        height: 72px;
    }
    .form-header h1 {
        font-size: 1.35rem;
    }
}

@media (max-width: 400px) {
    .form-card {
        padding: 28px 20px 24px;
        border-radius: 16px;
    }
}
