/* css/login.css */
/* ============================================
   LOGIN PAGE — SOFT PROFESSIONAL / LIGHT CLEAN
   ============================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #c62828;
    --primary-hover: #a61f1f;
    --primary-light: #fff1f1;
    --primary-soft: #ffe0e0;
    --teal: #e05252;
    --teal-light: #ffe4e4;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-soft: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --success: #10b981;
    --danger: #ef4444;
    --danger-soft: #fee2e2;
    --radius-sm: 8px;
    --radius: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ================= BODY / GRID ================= */
.login-body {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 100vh;
    font-family: var(--font-sans);
    background: var(--bg-card);
    overflow: hidden;
}

/* ============================================
   PANEL KIRI — HERO VISUAL (SOFT GRADIENT)
   ============================================ */
.brand-panel {
    position: relative;
    background: linear-gradient(135deg, #c62828 0%, #8f1d1d 42%, #e05252 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 56px;
    overflow: hidden;
}

/* Decorative gradient overlay */
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 180, 180, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

/* Decorative circles */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.deco-circle-1 {
    width: 320px;
    height: 320px;
    top: -100px;
    right: -80px;
    animation: floatSlow 15s ease-in-out infinite;
}

.deco-circle-2 {
    width: 200px;
    height: 200px;
    bottom: -60px;
    left: -60px;
    border-color: rgba(255, 255, 255, 0.1);
    animation: floatSlow 12s ease-in-out infinite reverse;
}

.deco-circle-3 {
    width: 120px;
    height: 120px;
    top: 40%;
    right: 10%;
    border-color: rgba(255, 255, 255, 0.08);
    animation: floatSlow 18s ease-in-out infinite;
}

@keyframes floatSlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(15px, -15px); }
}

/* Dot pattern */
.dot-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.4;
    mask-image: radial-gradient(ellipse at top left, black 40%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at top left, black 40%, transparent 75%);
    pointer-events: none;
}

/* Tower silhouette */
.tower-silhouette {
    position: absolute;
    right: 10%;
    bottom: 0;
    width: 100px;
    height: 55vh;
    color: rgba(255, 255, 255, 0.18);
    z-index: 1;
}

/* Technician silhouette */
.technician-silhouette {
    position: absolute;
    right: 24%;
    bottom: 0;
    width: 90px;
    height: 32vh;
    color: rgba(255, 255, 255, 0.12);
    z-index: 2;
}

/* ================= BRAND CONTENT ================= */
.brand-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    gap: 40px;
}

/* Topbar */
.brand-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brand-topbar-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.75);
}

.brand-code {
    color: #ffffff;
    font-weight: 700;
}

.brand-sep {
    opacity: 0.5;
}

/* Headline Block */
.brand-headline-block {
    max-width: 560px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    letter-spacing: 2.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    margin-bottom: 24px;
}

.kicker-line {
    width: 28px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
}

.brand-headline {
    font-family: var(--font-sans);
    font-size: clamp(48px, 6vw, 88px);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -2.5px;
    margin: 0 0 28px 0;
    color: #ffffff;
    display: flex;
    flex-direction: column;
}

.line-1 { color: #ffffff; }

.line-2 {
    color: #fef08a;
    font-style: italic;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.line-3 {
    color: #ffffff;
    opacity: 0.95;
}

.brand-description {
    font-size: 14.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 32px 0;
    max-width: 460px;
    font-weight: 400;
}

/* Feature pills */
.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.pill-dot-teal { background: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25); }
.pill-dot-blue { background: #fca5a5; box-shadow: 0 0 0 3px rgba(252, 165, 165, 0.25); }

/* Footer */
.brand-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-flag {
    width: 42px;
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.footer-flag svg {
    width: 100%;
    height: 100%;
    display: block;
}

.footer-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffffff;
}

.footer-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.3px;
}

/* ============================================
   PANEL KANAN — FORM (LIGHT / CLEAN)
   ============================================ */
.form-panel {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 32px 56px;
    position: relative;
    overflow-y: auto;
}

/* Topbar */
.form-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-family: var(--font-mono);
    margin-bottom: 40px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

.topbar-indicator {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
    50% { opacity: 0.7; box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.08); }
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.topbar-sep {
    color: var(--text-light);
}

#clockTime {
    color: var(--text-main);
    font-weight: 700;
}

/* Form Wrapper */
.form-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

/* Form Header */
.form-header {
    margin-bottom: 36px;
}

.form-step {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.step-num {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 1px;
}

.step-line {
    width: 20px;
    height: 2px;
    background: var(--border-color);
    border-radius: 2px;
}

.step-text {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.form-title {
    font-family: var(--font-sans);
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--text-main);
    margin: 0 0 10px 0;
    line-height: 1.05;
}

.form-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
}

/* ================= FORM FIELDS ================= */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.1px;
}

.label-req {
    color: var(--danger);
    margin-left: 2px;
}

.field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.field-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-soft);
    font-size: 14px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-weight: 500;
    outline: none;
    transition: all 0.2s ease;
}

.field-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.field-input:hover {
    border-color: var(--border-hover);
    background: #ffffff;
}

.field-input:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.12);
}

/* Password field padding */
.field-group:has(#password) .field-input {
    padding-right: 70px;
}

/* Toggle Show/Hide */
.field-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    letter-spacing: 1px;
    transition: color 0.15s;
    border-radius: 4px;
}

.field-toggle:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* Field options */
.field-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -4px;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: var(--text-main);
    font-weight: 500;
}

.checkbox-wrap input { display: none; }

.checkbox-box {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border-hover);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
    background: #ffffff;
}

.checkbox-wrap input:checked + .checkbox-box {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-wrap input:checked + .checkbox-box::after {
    content: "";
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.forgot-link {
    font-size: 12.5px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ================= SUBMIT BUTTON ================= */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(198, 40, 40, 0.4);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #7f1d1d 100%);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
}

.submit-icon {
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.submit-btn:hover .submit-icon {
    transform: translateX(3px);
}

/* ================= ERROR MESSAGE ================= */
.error-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    font-size: 13px;
    color: #b91c1c;
    font-weight: 500;
    margin-top: 20px;
    border-left: 3px solid var(--danger);
    background: var(--danger-soft);
    border-radius: var(--radius-sm);
    animation: shake 0.4s ease;
}

.error-indicator {
    width: 7px;
    height: 7px;
    background: var(--danger);
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse-red 1.5s infinite;
}

.forgot-panel {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-soft);
}

.forgot-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.forgot-panel h3 {
    color: var(--text-main);
    font-size: 15px;
}

.forgot-panel p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.forgot-close {
    align-self: flex-start;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.forgot-form {
    display: grid;
    gap: 8px;
}

.forgot-form label {
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
}

.forgot-submit {
    margin-top: 4px;
    padding: 12px 16px;
    font-size: 13px;
}

.forgot-submit:disabled {
    cursor: wait;
    opacity: 0.65;
}

.forgot-status {
    margin-top: 12px;
    color: #047857;
    font-size: 12px;
    line-height: 1.5;
}

.forgot-status.is-error {
    color: #b91c1c;
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.hidden { display: none !important; }

/* ================= FORM FOOTER ================= */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    font-size: 11.5px;
    color: var(--text-muted);
    letter-spacing: 0.2px;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.footer-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    animation: pulse 2s infinite;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
    .login-body {
        grid-template-columns: 1fr 1fr;
    }
    .brand-panel,
    .form-panel {
        padding: 32px 40px;
    }
    .form-title { font-size: 36px; }
    .brand-headline { font-size: clamp(40px, 5vw, 64px); }
}

@media (max-width: 900px) {
    .login-body {
        grid-template-columns: 1fr;
    }
    .brand-panel {
        display: none;
    }
    .form-panel {
        padding: 24px;
        min-height: 100vh;
    }
    .form-title { font-size: 32px; }
    .form-wrapper { max-width: 100%; }
    .form-topbar {
        margin-bottom: 24px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .form-panel { padding: 20px 16px; }
    .form-title { font-size: 28px; }
    .submit-btn { padding: 13px 16px; font-size: 14px; }
}