/* ============================================================
   assets/css/auth.css
   Styling Halaman Register & Login — Kenco Manufactur
   ============================================================ */

/* ── IMPORT FONT ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #f0f4f8;
    min-height: 100vh;
    color: #1e293b;
}

/* ============================================================
   LEFT PANEL
   ============================================================ */
.auth-left {
    background: linear-gradient(145deg, #1a3c5e 0%, #0d2137 60%, #061524 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 52px;
    position: sticky;
    top: 0;
    overflow: hidden;
}

/* Dekorasi lingkaran background */
.auth-left::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(232, 184, 75, 0.05);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.auth-left::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    bottom: -80px;
    left: -60px;
    pointer-events: none;
}

/* Logo */
.auth-brand-logo {
    width: 54px;
    height: 54px;
    background: #e8b84b;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a3c5e;
    margin-bottom: 36px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.auth-left-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.auth-left h1 {
    font-size: 1.9rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 14px;
}

.auth-left .auth-left-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.75;
    margin-bottom: 40px;
}

/* Feature list */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(232, 184, 75, 0.12);
    border: 1px solid rgba(232, 184, 75, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e8b84b;
    font-size: 1rem;
    flex-shrink: 0;
    transition: background 0.2s;
}

.feature-item:hover .feature-icon {
    background: rgba(232, 184, 75, 0.2);
}

.feature-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 500;
    line-height: 1.4;
}

/* Bottom badge */
.auth-left-badge {
    margin-top: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    z-index: 1;
}

.auth-left-badge .badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulse-dot 2s infinite;
    flex-shrink: 0;
}

.auth-left-badge span {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ============================================================
   RIGHT PANEL
   ============================================================ */
.auth-right {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: #f0f4f8;
}

.auth-card {
    width: 100%;
    max-width: 490px;
}

/* Header teks */
.auth-card-header {
    margin-bottom: 28px;
}

.auth-card-header h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0d2137;
    margin-bottom: 6px;
    line-height: 1.3;
}

.auth-card-header .subtitle {
    font-size: 0.875rem;
    color: #64748b;
}

.auth-card-header .subtitle a {
    color: #1a3c5e;
    font-weight: 700;
    text-decoration: none;
}

.auth-card-header .subtitle a:hover {
    text-decoration: underline;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-control {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding: 11px 16px;
    font-size: 0.875rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #ffffff;
    color: #0d2137;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.form-control::placeholder {
    color: #b0bec5;
    font-size: 0.85rem;
}

.form-control:focus {
    outline: none;
    border-color: #1a3c5e;
    box-shadow: 0 0 0 3.5px rgba(26, 60, 94, 0.1);
    background: #ffffff;
}

.form-control.is-invalid {
    border-color: #ef4444;
    box-shadow: none;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3.5px rgba(239, 68, 68, 0.1);
}

.form-control.is-valid {
    border-color: #22c55e;
}

/* Input group password */
.input-group-password {
    position: relative;
    display: flex;
}

.input-group-password .form-control {
    border-right: none;
    border-radius: 10px 0 0 10px;
    flex: 1;
}

.input-group-password .form-control.is-invalid {
    border-right: none;
}

.btn-toggle-password {
    border: 1.5px solid #e2e8f0;
    border-left: none;
    border-radius: 0 10px 10px 0;
    background: #ffffff;
    color: #94a3b8;
    padding: 0 15px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.btn-toggle-password:hover {
    color: #1a3c5e;
}

.input-group-password.is-invalid .form-control,
.input-group-password.is-invalid .btn-toggle-password {
    border-color: #ef4444;
}

/* Error & valid feedback */
.invalid-feedback {
    font-size: 0.775rem;
    color: #ef4444;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.valid-feedback {
    font-size: 0.775rem;
    color: #22c55e;
    margin-top: 5px;
}

/* Password strength */
.password-strength-wrap {
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    border-radius: 4px;
    background: #e2e8f0;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 0.35s ease, background-color 0.35s ease;
}

.password-strength-text {
    font-size: 0.72rem;
    margin-top: 5px;
    font-weight: 500;
    min-height: 16px;
    transition: color 0.3s;
}

/* ============================================================
   BUTTON
   ============================================================ */
.btn-auth {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, #1a3c5e 0%, #0d2137 100%);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 60, 94, 0.35);
}

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

.btn-auth:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading spinner di button */
.btn-auth .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-auth.loading .spinner { display: block; }
.btn-auth.loading .btn-text { display: none; }

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

/* ============================================================
   DIVIDER
   ============================================================ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    font-size: 0.78rem;
    margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* ============================================================
   ALERT
   ============================================================ */
.alert {
    border-radius: 10px;
    font-size: 0.85rem;
    border: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding: 12px 16px;
}

.alert-danger  { background: #fef2f2; color: #991b1b; }
.alert-success { background: #f0fdf4; color: #166534; }
.alert-warning { background: #fffbeb; color: #92400e; }
.alert-info    { background: #eff6ff; color: #1e40af; }

/* ============================================================
   TERMS TEXT
   ============================================================ */
.auth-terms {
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.6;
}

.auth-terms a {
    color: #1a3c5e;
    font-weight: 600;
    text-decoration: none;
}

.auth-terms a:hover {
    text-decoration: underline;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .auth-right {
        padding: 40px 20px;
        min-height: 100vh;
    }

    .auth-card {
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .auth-right {
        padding: 32px 16px;
    }

    .auth-card-header h2 {
        font-size: 1.4rem;
    }
}