﻿/* =====================================================
   IAMCoreUI CSS
   Popup + Loader + 3D Logo Loader (ENHANCED)
===================================================== */


/* =====================================================
   POPUP OVERLAY
===================================================== */

.iam-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn .2s ease;
}


/* =====================================================
   POPUP CONTAINER
===================================================== */

.iam-popup {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    animation: iam-popup-show .25s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.iam-popup-big {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 1400px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    animation: iam-popup-show .25s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}


/* =====================================================
   HEADER
===================================================== */

.iam-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
}

    .iam-popup-header h3 {
        font-size: 18px;
        font-weight: 600;
        color: #1f2937;
    }


/* CLOSE BUTTON */

.btn-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #9ca3af;
    transition: .2s;
}

    .btn-close:hover {
        color: #ef4444;
        transform: scale(1.1);
    }


/* =====================================================
   BODY
===================================================== */

.iam-popup-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 70vh;
    overflow-y: auto;
}


/* CODE */

.iam-popup-code {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 6px 10px;
    border-radius: 8px;
    display: inline-block;
}


/* MESSAGE */

.iam-popup-message {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}


/* SUPPORT FORM INSIDE */

.iam-popup-content form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* =====================================================
   FOOTER
===================================================== */

.iam-popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}


/* =====================================================
   BUTTON STYLES
===================================================== */

.btn-primary {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: .2s;
}

    .btn-primary:hover {
        opacity: 0.9;
        transform: translateY(-1px);
    }

.btn-secondary {
    background: #e5e7eb;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: .2s;
}

    .btn-secondary:hover {
        background: #d1d5db;
    }


/* =====================================================
   POPUP TYPE COLORS
===================================================== */

.popup-success {
    border-top-color: #22c55e;
}

.popup-error {
    border-top-color: #ef4444;
}

.popup-warning {
    border-top-color: #f59e0b;
}

.popup-confirm {
    border-top-color: #3b82f6;
}

.popup-delete {
    border-top-color: #dc2626;
}

.popup-info {
    border-top-color: #6366f1;
}

/* =========================================
   POPUP CONFIRM ADVANCED LAYOUT
========================================= */

.iam-popup._popupConfirm {
    display: grid;
    grid-template-columns: 6px 70px 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 0;
    padding: 0;
    overflow: hidden;
}


    /* ================= LEFT COLOR BAR ================= */

    .iam-popup._popupConfirm::before {
        content: "";
        grid-row: 1 / span 3;
        grid-column: 1;
        background: #3b82f6; /* default */
    }


    /* ================= LOGO ================= */

    .iam-popup._popupConfirm .iam-popup-logo {
        grid-column: 2;
        grid-row: 1 / span 3;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 15px;
    }

        .iam-popup._popupConfirm .iam-popup-logo img {
            width: 48px;
            height: 48px;
            object-fit: contain;
        }


    /* ================= CONTENT WRAPPER ================= */

    .iam-popup._popupConfirm .iam-popup-content {
        grid-column: 3;
        grid-row: 1 / span 3;
        display: grid;
        grid-template-rows: auto 1fr auto;
        padding: 15px;
    }


    /* ================= TITLE ================= */

    .iam-popup._popupConfirm .iam-popup-title {
        font-size: 18px;
        font-weight: 600;
        padding-bottom: 8px;
        border-bottom: 1px solid #eee;
    }


    /* ================= MESSAGE ================= */

    .iam-popup._popupConfirm .iam-popup-message {
        padding: 10px 0;
        font-size: 14px;
        color: #333;
    }


    /* ================= BUTTON ================= */

    .iam-popup._popupConfirm .iam-popup-buttons {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        padding-top: 10px;
        border-top: 1px solid #eee;
    }


    /* ================= BUTTON STYLE ================= */

    .iam-popup._popupConfirm .btn-yes {
        background: #2563eb;
        color: #fff;
    }

    .iam-popup._popupConfirm .btn-no {
        background: #e5e7eb;
        color: #333;
    }


    /* ================= TYPE COLORS (LEFT BAR) ================= */

    .iam-popup._popupConfirm.popup-success::before {
        background: #22c55e;
    }

    .iam-popup._popupConfirm.popup-error::before {
        background: #ef4444;
    }

    .iam-popup._popupConfirm.popup-warning::before {
        background: #f59e0b;
    }

    .iam-popup._popupConfirm.popup-confirm::before {
        background: #3b82f6;
    }

    .iam-popup._popupConfirm.popup-delete::before {
        background: #dc2626;
    }

.iam-datagrid {
    width: 100%;
    overflow-x: auto;
}

    .iam-datagrid table {
        min-width: 100%;
        table-layout: auto;
    }

/* ===============================
   IAM GRID LOADER (CENTER UNDER THEAD)
================================= */

.iam-table {
    position: relative;
}

/* Wrapper loader agar posisinya tepat */
.iam-table-wrapper {
    position: relative;
}

/* Loader posisi tengah body */
.iam-table-loader-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

/* Medium size */
.iam-table-loader.loader-md {
    width: 36px;
    height: 36px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: iam-spin 0.8s linear infinite;
}

.iam-table-row-expand {
    background-color: #f9f9f9;
}
/* Animasi */
@keyframes iam-spin {
    to {
        transform: rotate(360deg);
    }
}

.iam-fileuploader-drop-zone {
    width: 100%;
    min-height: 150px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: 0.2s;
    background: #E6F7EC;
}

    .iam-fileuploader-drop-zone:hover {
        border-color: #888;
        background: #B4F0C9;
        border: 2px solid #ccc;
    }

.hover {
    background: #f0fff5;
    border-style: solid;
}

.iam-fileuploader-title {
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
}

.iam-fileuploader-placeholder {
    text-align: center;
    color: #888;
    padding: 20px;
}

.iam-fileuploader-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.iam-fileuploader-item {
    width: 150px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.iam-fileuploader-body {
    height: 100px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .iam-fileuploader-body img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .iam-fileuploader-body iframe {
        width: 100%;
        height: 100%;
        border: none;
    }

.iam-fileuploader-filebox {
    font-size: 30px;
}

.iam-fileuploader-info {
    padding: 6px;
    font-size: 11px;
}

.iam-fileuploader-name {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.iam-fileuploader-error {
    margin-top: 10px;
    background: #ff4d4f;
    color: white;
    padding: 6px;
    border-radius: 6px;
}
/* ================= RESPONSIVE ================= */

@media (max-width: 600px) {

    .iam-popup._popupConfirm {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

        .iam-popup._popupConfirm::before {
            display: none;
        }

        .iam-popup._popupConfirm .iam-popup-logo {
            grid-column: 1;
            grid-row: 1;
        }

        .iam-popup._popupConfirm .iam-popup-content {
            grid-column: 1;
            grid-row: 2;
        }

        .iam-popup._popupConfirm .iam-popup-buttons {
            justify-content: center;
        }
}


/* =====================================================
   ANIMATION
===================================================== */

@keyframes iam-popup-show {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* =====================================================
   LOADER OVERLAY
===================================================== */

.iam-loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11000;
}

/* =========================
   LOGIN SPINNER
========================= */
.iam-login-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.5);
    border-top-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: iam-spin 0.6s linear infinite;
    margin-right: 10px;
    margin-top: 5px;
}

/* ANIMATION */
@keyframes iam-spin {
    to {
        transform: rotate(360deg);
    }
}
/* =====================================================
   SPINNER LOADER
===================================================== */

.iam-loader {
    border-radius: 50%;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6366f1;
    animation: iam-spin 1s linear infinite;
}


/* SIZES */

.loader-sm {
    width: 24px;
    height: 24px;
}

.loader-md {
    width: 40px;
    height: 40px;
}

.loader-lg {
    width: 64px;
    height: 64px;
}


/* ANIMATION */

@keyframes iam-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* =====================================================
   3D LOGO LOADER
===================================================== */

.loader-wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2,6,23,0.55);
    backdrop-filter: blur(4px);
    perspective: 900px;
    z-index: 12000;
}

.logo-loader {
    width: 120px;
    height: 120px;
    position: relative;
    transform-style: preserve-3d;
}

    .logo-loader .layer {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transform-origin: center;
        filter: drop-shadow(0 0 10px #6366f1);
    }

    .logo-loader img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }


/* ROTATION */

.layer1 {
    animation: iam-rotate1 6s linear infinite;
}

.layer2 {
    animation: iam-rotate2 5s linear infinite;
}

.layer3 {
    animation: iam-rotate3 4s linear infinite;
}

@keyframes iam-rotate1 {
    from {
        transform: rotateY(0deg) translateZ(-25px);
    }

    to {
        transform: rotateY(360deg) translateZ(-25px);
    }
}

@keyframes iam-rotate2 {
    from {
        transform: rotateY(0deg);
    }

    to {
        transform: rotateY(-360deg);
    }
}

@keyframes iam-rotate3 {
    from {
        transform: rotateY(0deg) translateZ(25px);
    }

    to {
        transform: rotateY(360deg) translateZ(25px);
    }
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 600px) {

    .iam-popup {
        max-width: 92%;
        border-radius: 12px;
    }

    .iam-popup-header h3 {
        font-size: 16px;
    }

    .iam-popup-content {
        padding: 16px;
    }

    .iam-popup-footer {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/*==================================*/
/*DATEPICKER*/
/*=================================*/
.iam-datetime-picker {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .iam-datetime-picker.two {
        flex-direction: row;
    }

        .iam-datetime-picker.two .iam-datetime-card {
            flex: 1;
        }

.iam-datetime-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

    .iam-datetime-card.error {
        border-color: #dc2626;
        box-shadow: 0 0 0 2px rgba(220,38,38,.15);
    }

.iam-datetime-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
}

.iam-datetime-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.iam-datetime-date-wrapper {
    position: relative;
    flex: 1;
}

.iam-datetime-input {
    width: 100%;
    padding: 10px 30px 10px 10px; /* kanan diperbesar untuk icon */
    border-radius: 10px;
    box-sizing: border-box;
}

.iam-datetime-icon-wrapper {
    position: absolute;
    right: 8px; /* sedikit geser biar tidak mepet */
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
}


.iam-datetime-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: 16px;
    opacity: 0.7;
}

.iam-datetime-icon-wrapper:hover .iam-datetime-icon {
    opacity: 1;
}

/* 🔥 INI KUNCINYA */
.iam-datetime-native-icon {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.iam-datetime-time {
    max-width: 80px;
    text-align: center;
}

.iam-datetime-separator {
    font-weight: 600;
}

.iam-datetime-error-text {
    margin-top: 6px;
    font-size: 12px;
    color: #dc2626;
}

@media (max-width: 576px) {
    /* Start & End jadi atas-bawah */
    .iam-datetime-picker.two {
        flex-direction: column;
    }

        .iam-datetime-picker.two .iam-datetime-card {
            width: 100%;
        }
    /* 🔽 Font diperkecil */
    .iam-datetime-label {
        font-size: 16px;
    }

    .iam-datetime-input {
        font-size: 14px;
    }

    .iam-datetime-time {
        font-size: 14px;
    }

    .iam-datetime-error-text {
        font-size: 14px;
    }
}
/* ===============================
   FORM 2 KOLOM (IAM STYLE)
================================= */

.form-group-2-kolom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

    /* full width (misalnya textarea) */
    .form-group-2-kolom .form-group.full {
        grid-column: span 2;
    }

.form-group-3-kolom {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px 20px;
}

    .form-group-3-kolom .form-group.full {
        grid-column: span 3;
    }

    .form-group-3-kolom .form-group.half {
        grid-column: span 1;
    }

/* default form group */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    /* label */
    .form-group label {
        font-size: 13px;
        font-weight: 600;
        color: #374151;
    }

/* input */
.form-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 14px;
    transition: all 0.2s ease;
}

    .form-input:focus {
        outline: none;
        border-color: #2563eb;
        background: #fff;
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    }

/* checkbox style */
.form-group.checkbox {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

    .form-group.checkbox label {
        font-weight: 500;
        font-size: 13px;
    }

/* validation */
.validation-message {
    font-size: 12px;
    color: #dc2626;
}

/* ===============================
   MOBILE (AUTO JADI 1 KOLOM)
================================= */
@media (max-width: 768px) {
    .form-group-2-kolom {
        grid-template-columns: 1fr;
    }

        .form-group-2-kolom .form-group.full {
            grid-column: span 1;
        }
}

/* ===============================
   FORM 4 KOLOM (IAM STYLE)
================================= */

.form-grid-3-kolom {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
    gap: 20px !important;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hari-kerja-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 kolom checkbox */
    gap: 5px;
}

.hari-kerja-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===============================
   DROPDOWN
================================= */
/* Container utama */
.iamdropdown {
    position: relative;
    width: 100%;
    font-family: 'Segoe UI', sans-serif;
    display: inline-block;
}

    .iamdropdown.disabled {
        pointer-events: none;
        opacity: 0.6;
    }

        .iamdropdown.disabled .iamdropdown-control {
            background-color: #f5f5f5;
            cursor: not-allowed;
        }

        .iamdropdown.disabled input {
            cursor: not-allowed;
        }

/* Select basic */
.iamdropdown-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background-color: #fff;
    color: #111827;
    outline: none;
    appearance: none;
    transition: all 0.2s ease-in-out;
}

    /* Hover */
    .iamdropdown-select:hover {
        border-color: #9ca3af;
    }

    /* Focus */
    .iamdropdown-select:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

    /* Disabled */
    .iamdropdown-select:disabled {
        background-color: #f3f4f6;
        cursor: not-allowed;
        opacity: 0.7;
    }

/* Arrow custom */
.iamdropdown::after {
    content: "▼";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #6b7280;
    pointer-events: none;
}

/* Size variants */
.iamdropdown-sm .iamdropdown-select {
    padding: 6px 10px;
    font-size: 12px;
}

.iamdropdown-lg .iamdropdown-select {
    padding: 12px 16px;
    font-size: 16px;
}

/* Status: error */
.iamdropdown-error .iamdropdown-select {
    border-color: #dc2626;
}

    .iamdropdown-error .iamdropdown-select:focus {
        box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
    }

/* Status: success */
.iamdropdown-success .iamdropdown-select {
    border-color: #16a34a;
}

    .iamdropdown-success .iamdropdown-select:focus {
        box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
    }

/* Label */
.iamdropdown-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

/* Helper text */
.iamdropdown-helper {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}

/* Error text */
.iamdropdown-error-text {
    margin-top: 4px;
    font-size: 12px;
    color: #dc2626;
}

/* Wrapper untuk full width */
.iamdropdown-full {
    width: 100%;
}

/* Rounded lebih besar (optional style) */
.iamdropdown-rounded .iamdropdown-select {
    border-radius: 999px;
}

/* Shadow ringan */
.iamdropdown-shadow .iamdropdown-select {
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.iamdropdown-control {
    position: relative;
    border: 1px solid #ccc;
    padding: 8px 35px 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.iamdropdown-text {
    flex: 1;
}

/* Clear button di dalam */
.iamdropdown-clear {
    position: absolute;
    right: 30px;
    font-size: 14px;
    color: #888;
    cursor: pointer;
}

    .iamdropdown-clear:hover {
        color: #000;
    }

/* Panel */
.iamdropdown-panel {
    position: fixed;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 5px;
    z-index: 1000;
    max-height: 250px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Search */
.iamdropdown-search {
    width: 100%;
    padding: 8px;
    border: none;
    border-bottom: 1px solid #eee;
    outline: none;
}

/* List */
.iamdropdown-list {
    max-height: 200px;
    overflow-y: auto;
}

/* Item */
.iamdropdown-item {
    padding: 10px;
    cursor: pointer;
    transition: 0.2s;
}

    .iamdropdown-item:hover {
        background: #f3f4f6;
    }


/* ===============================
   CHART
================================= */
.iamchart-container {
    position: relative;
    padding: 16px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: 0.3s;
}

    .iamchart-container canvas {
        width: 100% !important;
        height: 100% !important; /* 🔥 penting */
    }

    .iamchart-container:hover {
        box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    }



/* Dark mode ready */
.iamchart-dark {
    background: #1f2937;
}

    .iamchart-dark canvas {
        filter: brightness(0.9);
    }

/* ===============================
   INPUT
================================= */

.iaminput-form-group {
    margin-bottom: 12px;
}

.iaminput-form-label {
    font-weight: 600;
    padding-bottom: 5px;
    display: flex;
    width: 100%;
    gap: 6px;
    align-items: center;
}

.iaminput-form-tooltip {
    cursor: pointer;
    font-size: 12px;
    color: #888;
}

.iaminput-form-error {
    color: red;
    font-size: 12px;
}

.iaminput-form-input {
    margin-top: 1px;
    width: 100%;
    padding: 6px;
    border-radius: 6px;
    height: 40px;
    border: 1px solid #ccc;
}

.iaminput-form-required {
    color: #ef4444;
    font-weight: 700;
    margin-right: 4px;
    font-size: 14px;
}

/*============================*/
/*BAGDE*/
/*===========================*/

.iambadge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    user-select: none;
}

/* SUCCESS (TRUE) */
.iambadge-success {
    background-color: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #b7e4c7;
}

/* DANGER (FALSE) */
.iambadge-danger {
    background-color: #fdecea;
    color: #c82333;
    border: 1px solid #f5c6cb;
}

/* HOVER EFFECT */
.iambadge:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/*===================*/
/*POPUP MENU*/
/*===================*/
.iam-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998;
    background: transparent; /* tidak terlihat */
}

.iam-popup-wrapper {
    position: fixed;
    z-index: 99999;
}

.iam-popup-menu {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-width: 160px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    overflow: hidden;
}

.iam-popup-item {
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

    .iam-popup-item:hover {
        background: #f3f4f6;
    }

.iam-login-side {
    position: relative;
    overflow: hidden;
}

/* BACKGROUND GRADIENT */
.iam-login-box.left .iam-login-side {
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* EFFECT BULAT (BIAR TIDAK KOSONG) */
.iam-login-side::before {
    content: "";
    position: absolute;
    width: 350px;
    height: 350px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.iam-login-side::after {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    bottom: -80px;
    left: -80px;
}



/* TAGLINE */
.iam-login-tagline {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}
/* =========================
   MODE: LEFT (2 KOLOM)
========================= */
.iam-login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================
   LOGIN BOX (BATASI WIDTH)
========================= */
.iam-login-box {
    width: 900px; /* 🔥 kunci agar tidak full */
    max-width: 95%;
    height: 500px; /* optional biar proporsional */
    padding: 25px;
    display: flex;
    overflow: hidden;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

    .iam-login-box.left {
        flex-direction: row;
    }

        /* LEFT SIDE (BACKGROUND AREA) */
        .iam-login-box.left .iam-login-side {
            flex: 1;
            background: linear-gradient(135deg, #2563eb, #4f46e5);
            display: flex;
            justify-content: center;
            align-items: center;
            border-top-left-radius: 16px;
            border-bottom-left-radius: 16px;
        }

        /* FORM AREA */
        .iam-login-box.left .iam-login-card {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

    /* =========================
   MODE: TOP (2 ROW)
========================= */
    .iam-login-box.top {
        flex-direction: column;
        align-items: center;
        height: 800px;
    }


        /* LOGO AREA (TOP MODE) */
        .iam-login-box.top .iam-login-side {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 220px;
            width: 360px;
            background: linear-gradient(135deg, #2563eb, #4f46e5);
        }

        .iam-login-box.top img {
            max-width: 100px;
            padding: -20px !important;
        }
/* =========================
   LOGO
========================= */
/* LOGO CONTAINER */
.iam-login-logo {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeIn 0.8s ease;
    padding: 25px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
}

    /* LOGO SIZE (PERBAIKAN UTAMA) */
    .iam-login-logo img {
        max-width: 180px;
        margin-bottom: 15px;
        filter: brightness(0) invert(1);
        filter: brightness(0) invert(1) drop-shadow(0 10px 25px rgba(0,0,0,0.3));
    }
/* =========================
   FORM CARD
========================= */
.iam-login-card {
    width: 360px;
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* TITLE */
.iam-login-title {
    text-align: center;
    margin-bottom: 20px;
}

/* =========================
   FORM
========================= */
.iam-form-login-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 300px;
}

    .iam-form-login-group label {
        font-size: 13px;
        display: block;
        margin-bottom: 5px;
    }

.iam-form-login-child {
    gap: 4px;
}

.iam-login-input {
    min-width: 300px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
    transition: 0.2s;
}

    .iam-login-input:focus {
        border-color: #4f46e5;
        outline: none;
    }

/* =========================
   REMEMBER
========================= */
.iam-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 15px;
}

/* =========================
   BUTTON
========================= */
.iam-btn-login {
    width: 100%;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    height: 50px;
}

    .iam-btn-login:hover {
        opacity: 0.9;
    }

/* =========================
   LINKS
========================= */
.iam-login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 13px;
    gap: 80px;
    width:300px;
}

    .iam-login-links a {
        color: #2563eb;
        text-decoration: none;
    }

/* =========================
   FOOTER
========================= */
.iam-login-footer {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
}
    .iam-login-footer a {
        color: #2563eb;
        text-decoration: none;
    }

    @keyframes fadeIn {
        from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {

    /* paksa jadi top mode */
    .iam-login-box.left {
        flex-direction: column;
    }

        .iam-login-box.left .iam-login-side {
            height: 200px;
        }

    .iam-login-card {
        width: 90%;
        max-width: 320px;
    }
}
