/* =============================================================================
   SVSS Client Portal — Auth pages (OTP login, OTP verify, email login)
   Two-panel split design, mirrored from the ESS login (ess/login.php).
   Standalone (not loaded inside the portal layout).
   ============================================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #1a0a1e 0%, #2d1236 25%, #5A1740 50%, #8B3565 75%, #C4962E 100%);
    background-size: 400% 400%;
    animation: caGradient 15s ease infinite;
    color: #1f2937;
}
@keyframes caGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---- Left branding panel ---- */
.ca-branding {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}
.ca-branding::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='1.5' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E");
    pointer-events: none;
}
.ca-branding-content { position: relative; z-index: 1; text-align: center; max-width: 430px; }
.ca-logo {
    width: 110px; height: 110px; border-radius: 24px;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 28px; border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.ca-logo img { width: 80px; height: 80px; object-fit: contain; }
.ca-logo i { font-size: 36px; color: #C4962E; }
.ca-title { font-size: 28px; font-weight: 800; color: #fff; margin-bottom: 12px; letter-spacing: -0.5px; }
.ca-subtitle { font-size: 15px; color: rgba(255,255,255,0.65); line-height: 1.7; margin-bottom: 40px; }
.ca-features { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.ca-feature { display: flex; align-items: center; gap: 14px; color: rgba(255,255,255,0.85); font-size: 14px; }
.ca-feature-icon {
    width: 40px; height: 40px; border-radius: 10px; background: rgba(196,150,46,0.2);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ca-feature-icon i { color: #C4962E; font-size: 16px; }

/* ---- Right form panel ---- */
.ca-panel {
    width: 480px; min-height: 100vh; background: #fff;
    display: flex; flex-direction: column; justify-content: center;
    padding: 56px 50px; position: relative;
}
.ca-panel::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: linear-gradient(180deg, #5A1740, #C4962E);
}
.ca-head { margin-bottom: 30px; text-align: left; }
.ca-head .ca-head-icon {
    width: 56px; height: 56px; border-radius: 16px; margin-bottom: 18px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #5A1740, #8B3565); color: #fff; font-size: 22px;
}
.ca-head h1 { font-size: 26px; font-weight: 700; color: #1a1a2e; margin-bottom: 6px; }
.ca-head p { font-size: 14px; color: #888; line-height: 1.6; }
.ca-head p strong { color: #5A1740; }

/* Alerts */
.ca-alert { border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ca-alert i { font-size: 16px; }
.ca-alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.ca-alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.ca-alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #b45309; }

/* Form fields */
.ca-group { margin-bottom: 20px; }
.ca-group label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 7px; }
.ca-input { position: relative; display: flex; align-items: center; }
.ca-input > i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: #9ca3af; font-size: 15px; transition: color 0.2s; pointer-events: none;
}
.ca-input input {
    width: 100%; padding: 13px 14px 13px 42px; border: 1.5px solid #e5e7eb; border-radius: 10px;
    font-size: 14px; font-family: inherit; color: #1f2937; background: #fafafa; transition: all 0.2s; outline: none;
}
.ca-input input:focus { border-color: #5A1740; background: #fff; box-shadow: 0 0 0 3px rgba(90,23,64,0.1); }
.ca-input input:focus ~ i { color: #5A1740; }
.ca-input .ca-prefix {
    position: absolute; left: 0; top: 0; bottom: 0; width: 56px; display: flex; align-items: center; justify-content: center;
    border-right: 1.5px solid #e5e7eb; color: #374151; font-weight: 600; font-size: 14px; pointer-events: none;
}
.ca-input.ca-has-prefix input { padding-left: 70px; }
.ca-input .toggle-password { position: absolute; right: 14px; left: auto; cursor: pointer; color: #9ca3af; pointer-events: auto; }
.ca-input .toggle-password:hover { color: #5A1740; }

/* OTP code input */
.ca-otp-input input {
    text-align: center; letter-spacing: 12px; font-size: 24px; font-weight: 700; padding-left: 14px;
}

.ca-extras { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.ca-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7280; cursor: pointer; }
.ca-remember input[type="checkbox"] { width: 16px; height: 16px; accent-color: #5A1740; cursor: pointer; }
.ca-link { font-size: 13px; color: #5A1740; text-decoration: none; font-weight: 500; }
.ca-link:hover { text-decoration: underline; }

/* Buttons */
.ca-btn {
    width: 100%; padding: 13px; border: none; border-radius: 10px; font-size: 15px; font-weight: 600;
    font-family: inherit; cursor: pointer; transition: all 0.25s; display: flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none;
}
.ca-btn-primary { background: linear-gradient(135deg, #5A1740, #8B3565); color: #fff; }
.ca-btn-primary:hover { background: linear-gradient(135deg, #4a0f33, #722750); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(90,23,64,0.3); color: #fff; }
.ca-btn-primary:active { transform: translateY(0); }
.ca-btn-secondary { background: #fff; border: 1.5px solid #e5e7eb; color: #374151; }
.ca-btn-secondary:hover { border-color: #5A1740; color: #5A1740; background: #fdf7fb; }

.ca-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; color: #cbd5e1; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.ca-divider::before, .ca-divider::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }

.ca-foot { margin-top: 30px; text-align: center; font-size: 12px; color: #bbb; }
.ca-back { text-align: center; margin-top: 18px; font-size: 13px; }
.ca-back a { color: #6b7280; text-decoration: none; }
.ca-back a:hover { color: #5A1740; }

/* Floating shapes */
.ca-shape { position: absolute; border-radius: 50%; opacity: 0.06; pointer-events: none; }
.ca-shape-1 { width: 300px; height: 300px; background: #C4962E; top: -80px; left: -100px; }
.ca-shape-2 { width: 200px; height: 200px; background: #fff; bottom: -60px; right: 20%; }
.ca-shape-3 { width: 150px; height: 150px; background: #C4962E; top: 40%; right: -50px; }

/* Responsive */
@media (max-width: 900px) {
    body { flex-direction: column; }
    .ca-branding { padding: 40px 24px 30px; min-height: auto; }
    .ca-features { display: none; }
    .ca-subtitle { margin-bottom: 0; }
    .ca-panel { width: 100%; min-height: auto; padding: 36px 24px 40px; border-radius: 24px 24px 0 0; margin-top: -20px; }
    .ca-panel::before { display: none; }
}
