/* =================================================================
   Mawapres - Auth pages (Login & Register)
   Layout: split-screen, compact, akademik & profesional
   ================================================================= */

:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-primary-light: #60a5fa;
    --color-primary-soft: #eff6ff;
    --color-primary-tint: #dbeafe;

    --color-dark: #0f172a;
    --color-text: #334155;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    --color-white: #ffffff;

    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--color-white);
    color: var(--color-text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: 'Plus Jakarta Sans', sans-serif; color: var(--color-dark); }

/* =====================================================
   Split layout
   ===================================================== */
.auth-page {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    min-height: 100vh;
}

/* =====================================================
   Brand (left)
   ===================================================== */
/* Brand panel pakai biru soft + putih agar TERANG, bukan gradient gelap */
.auth-brand {
    background: linear-gradient(160deg, var(--color-primary-soft) 0%, #ffffff 60%, var(--color-primary-soft) 100%);
    color: var(--color-text);
    position: relative;
    overflow: hidden;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--color-border);
}
.brand-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(30, 64, 175, 0.07) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 45%);
    pointer-events: none;
}
.brand-inner { position: relative; z-index: 2; }

.brand-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 56px;
}
.brand-logo-link img {
    height: 64px;
    width: auto;
    object-fit: contain;
}

.brand-quote { margin-bottom: 36px; }
.brand-quote i {
    font-size: 26px;
    color: var(--color-primary-light);
    opacity: 0.6;
    margin-bottom: 14px;
    display: block;
}
.brand-quote h2 {
    color: var(--color-dark);
    font-size: 28px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -0.4px;
    max-width: 460px;
}

.brand-features { list-style: none; }
.brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    margin-bottom: 14px;
    color: var(--color-text);
    font-weight: 500;
}
.brand-features li i {
    color: var(--color-primary);
    font-size: 16px;
    flex-shrink: 0;
}

.brand-footer {
    position: relative;
    z-index: 2;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* =====================================================
   Form panel (right)
   ===================================================== */
.auth-main {
    padding: 32px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: var(--color-white);
}

.auth-back {
    position: absolute;
    top: 28px;
    right: 32px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 10px;
    transition: 0.2s;
}
.auth-back:hover { background: var(--color-primary-soft); color: var(--color-primary); }

.auth-card {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}
.auth-card.wide { max-width: 560px; }

.auth-head { margin-bottom: 22px; }
.auth-head h1 { font-size: 28px; font-weight: 800; color: var(--color-dark); letter-spacing: -0.5px; margin-bottom: 6px; }
.auth-head p  { font-size: 14px; color: var(--color-text-muted); }

/* Alerts modern: rounded + colored bg + icon */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    margin-bottom: 18px;
    border: 1px solid;
    font-weight: 500;
}
.auth-alert i, .auth-alert svg { flex-shrink: 0; font-size: 18px; width: 20px; height: 20px; }
.auth-alert span { flex: 1; line-height: 1.5; }

.auth-alert.success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}
.auth-alert.success i, .auth-alert.success svg { color: #16a34a; }

.auth-alert.warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}
.auth-alert.warning i, .auth-alert.warning svg { color: #ca8a04; }

.auth-alert.error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}
.auth-alert.error i, .auth-alert.error svg { color: #dc2626; }

/* =====================================================
   Form
   ===================================================== */
.auth-form { display: grid; gap: 16px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-row { display: block; }
.form-row.full { grid-column: 1 / -1; }

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}
.form-label .req { color: var(--color-danger); margin-left: 2px; }

.input-wrap { position: relative; }
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 13.5px;
    pointer-events: none;
}
.input-control {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 40px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fafbfc;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--color-dark);
    transition: 0.18s;
    outline: none;
}
.input-control.has-action { padding-right: 44px; }
.input-control:focus {
    border-color: var(--color-primary-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.input-control:disabled {
    background: #f1f5f9;
    color: var(--color-text-muted);
    cursor: not-allowed;
}
.input-control[type="file"] { padding-left: 14px; }

select.input-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 13px;
    padding-right: 36px;
}
select.input-control[disabled] {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cbd5e1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.input-action {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 14px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.input-action:hover { background: var(--color-primary-soft); color: var(--color-primary); }

/* Password strength */
.pw-strength { display: flex; gap: 4px; margin-top: 6px; }
.pw-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--color-border); transition: 0.3s; }
.pw-bar.weak   { background: var(--color-danger); }
.pw-bar.medium { background: var(--color-warning); }
.pw-bar.strong { background: var(--color-success); }
.pw-text { font-size: 11.5px; color: var(--color-text-muted); margin-top: 4px; }

/* Match indicator */
.match-ind {
    font-size: 11.5px;
    margin-top: 4px;
    display: none;
    align-items: center;
    gap: 4px;
}
.match-ind.show { display: flex; }
.match-ind.ok { color: var(--color-success); }
.match-ind.no { color: var(--color-danger); }

/* Upload area compact */
.upload-compact {
    border: 1.5px dashed var(--color-border);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: 0.18s;
    background: #fafbfc;
    display: flex;
    align-items: center;
    gap: 12px;
}
.upload-compact:hover { border-color: var(--color-primary-light); background: var(--color-primary-soft); }
.upload-compact.has-file { border-style: solid; border-color: var(--color-success); background: #f0fdf4; }
.upload-compact .uc-icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
}
.upload-compact .uc-icon img { width: 100%; height: 100%; object-fit: cover; }
.upload-compact .uc-text { flex: 1; min-width: 0; }
.upload-compact .uc-title { font-size: 13px; font-weight: 600; color: var(--color-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-compact .uc-sub   { font-size: 11px; color: var(--color-text-muted); }

/* Submit button */
.btn-submit {
    width: 100%;
    height: 46px;
    background: var(--color-primary);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.3);
    font-family: inherit;
}
.btn-submit:hover {
    background: var(--color-primary-dark);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.4);
}
.btn-submit i, .btn-submit span { color: #ffffff !important; }

.auth-foot {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}
.auth-foot a {
    color: var(--color-primary);
    font-weight: 600;
}
.auth-foot a:hover { text-decoration: underline; }

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1024px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-main { padding: 28px 24px; }
    .auth-back { position: static; margin-bottom: 18px; align-self: flex-start; }
}

@media (max-width: 540px) {
    .form-grid-2 { grid-template-columns: 1fr; }
    .auth-head h1 { font-size: 24px; }
}
