/* =========================
   Login UI - Light Mode
   Primary: #287bff
   ========================= */

:root {
    --bg: #f4f7fc;
    --bg-soft: #eef3fb;

    --card: #ffffff;
    --card-soft: #f8fafc;

    --text: #0f172a;
    --muted: #64748b;

    --line: #e2e8f0;
    --line-soft: #edf2f7;

    --primary: #287bff;
    --primary-soft: rgba(40, 123, 255, 0.12);

    --danger: #dc2626;
    --danger-bg: #fee2e2;

    --radius: 18px;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);

    --focus: 0 0 0 4px rgba(40, 123, 255, 0.25);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
        Arial;
    color: var(--text);
    background: radial-gradient(1200px 600px at 10% 0%,
            rgba(40, 123, 255, 0.12),
            transparent 55%),
        linear-gradient(180deg, var(--bg), var(--bg-soft));
}

/* Layout */
.login {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.card {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--line);
}

/* =========================
   Brand panel
   ========================= */
.brand {
    padding: 36px 34px;
    background: radial-gradient(900px 500px at 20% 30%,
            rgba(40, 123, 255, 0.18),
            transparent 60%),
        linear-gradient(180deg, #f8fbff, #eef4ff);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px;
}

.brand h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
}

.brand p {
    margin: 0;
    max-width: 44ch;
    color: var(--muted);
    line-height: 1.6;
}

.brand ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 12px;
}

.brand li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: #1e293b;
}

/* Brand badge + logos */
.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;

    border-radius: 999px;

}

.logo-icon {
    height: 80px;
    width: auto;
    display: block;
}

.logo-name {
    height: 80px;
    width: auto;
    display: block;
}

/* Pastikan image tidak “nge-stretch” / overflow */
.brand-badge img {
    max-width: 100%;
    object-fit: contain;
}

.tick {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--primary-soft);
    border: 1px solid rgba(40, 123, 255, 0.35);
    display: grid;
    place-items: center;
    flex: 0 0 20px;
    margin-top: 2px;
}

.tick svg {
    width: 14px;
    height: 14px;
    fill: var(--primary);
}

/* =========================
   Form panel
   ========================= */
.form {
    padding: 36px 34px;
    background: var(--card);
}

.form h1 {
    margin: 0;
    font-size: 26px;
}

.form .sub {
    margin: 8px 0 18px;
    color: var(--muted);
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--danger-bg);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: #7f1d1d;
    font-size: 14px;
    margin-bottom: 14px;
}

.form form {
    display: grid;
    gap: 14px;
}

/* Fields */
.field {
    display: grid;
    gap: 8px;
}

.field label {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
}

.hint {
    font-weight: 500;
    color: var(--muted);
}

.control {
    position: relative;
}

.input {
    width: 100%;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--card-soft);
    padding: 0 42px;
    font-size: 14.5px;
    outline: none;
    transition: border 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input::placeholder {
    color: #94a3b8;
}

.input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: var(--focus);
}

.input:focus-visible {
    box-shadow: var(--focus);
}

.icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
}

.toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    height: 34px;
    width: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.toggle:hover {
    background: var(--primary-soft);
    border-color: rgba(40, 123, 255, 0.35);
}

.toggle:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

/* Actions */
.actions {
    margin-top: 8px;
}

.btn {
    width: 100%;
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(40, 123, 255, 0.45);
    background: linear-gradient(135deg, #287bff, #5fa0ff);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: transform 0.06s ease, box-shadow 0.15s ease;
    box-shadow: 0 10px 26px rgba(40, 123, 255, 0.35);
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

.is-loading .spinner {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer hint */
.meta {
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--muted);
}

/* Responsive */
@media (max-width: 880px) {
    .card {
        grid-template-columns: 1fr;
    }

    .brand {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}