/* ═══════════════════════════════════════════
   AUTH.CSS — Santra Login  (card-centered style)
   ═══════════════════════════════════════════ */

:root {
    --ink: #0f172a;
    --ink-light: #334155;
    --ink-muted: #64748b;
    --ink-faint: #94a3b8;
    --surface: #ffffff;
    --border: #d6e8da;
    --border-focus: #1a6b34;
    --accent: #1a6b34;
    --accent-hover: #145229;
    --error: #dc2626;
    --radius: 10px;
    --radius-sm: 6px;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ─── Page background ──────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #e8f4ee;
    position: relative;
}

/* When card is taller than viewport, align to top */
@media (max-height: 800px) {
    .auth-page { align-items: flex-start; }
}

/* ─── Background decorative shapes ─────────────── */
.bg-shapes { position: absolute; inset: 0; pointer-events: none; }

.shape {
    position: absolute;
    opacity: 0.18;
}

/* Hexagons — drawn as rotated squares with clip-path */
.shape-hex {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: #1a6b34;
}

.shape-1  { width: 120px; height: 120px; top: 6%;  left: 4%;   opacity: 0.15; }
.shape-2  { width: 80px;  height: 80px;  top: 20%; left: 14%;  opacity: 0.10; }
.shape-3  { width: 160px; height: 160px; bottom: 8%;  right: 5%;  opacity: 0.13; }
.shape-4  { width: 90px;  height: 90px;  bottom: 22%; right: 18%; opacity: 0.10; }

.shape-circle {
    border-radius: 50%;
    background: #1a6b34;
}
.shape-5  { width: 200px; height: 200px; top: -60px;  right: 30%; opacity: 0.08; }
.shape-6  { width: 120px; height: 120px; bottom: -30px; left: 25%; opacity: 0.08; }

.shape-ring {
    border-radius: 50%;
    border: 12px solid #1a6b34;
    background: transparent;
}
.shape-7  { width: 180px; height: 180px; top: 10%;   right: 8%;  opacity: 0.12; }
.shape-8  { width: 100px; height: 100px; bottom: 15%; left: 8%;  opacity: 0.10; }

.shape-line {
    background: #1a6b34;
    border-radius: 99px;
    opacity: 0.08;
}
.shape-9  { width: 2px; height: 260px; top: 20%;  left: 38%;  transform: rotate(20deg); }
.shape-10 { width: 2px; height: 200px; bottom: 5%; right: 38%; transform: rotate(-15deg); }

/* ─── Card ──────────────────────────────────────── */
.auth-card {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 540px;
    background: #fff;
    border-radius: 20px;
    box-shadow:
        0 4px 6px rgba(0,0,0,0.04),
        0 20px 60px rgba(15, 80, 35, 0.12);
    overflow: hidden;
    align-items: stretch;
}

/* ─── Left panel ────────────────────────────────── */
.card-left {
    flex: 1;
    min-width: 320px;
    max-width: 420px;
    background: url('/assets/background_login.png') center center / cover no-repeat;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

/* Green glass overlay */
.card-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(10, 45, 20, 0.78) 0%,
        rgba(18, 70, 35, 0.68) 50%,
        rgba(8, 32, 15, 0.80) 100%
    );
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    pointer-events: none;
}

.card-left-inner {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Logo */
.cl-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2.5rem;
}

.cl-logo img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.cl-logo span {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Headline */
.cl-headline h2 {
    font-size: clamp(1.4rem, 2.2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.cl-headline p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.70);
    max-width: 320px;
}

/* Visual illustration */
.cl-visual {
    flex: 1;
    position: relative;
    margin-top: 2rem;
    min-height: 180px;
}

.vis-card {
    position: absolute;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.vis-card-main {
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 18px;
}

.vis-card-bar {
    height: 8px;
    border-radius: 99px;
    transition: width 0.6s ease;
}

.vis-kpi-row {
    display: flex;
    gap: 16px;
    margin-top: 14px;
}

.vis-kpi {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    color: rgba(255,255,255,0.60);
}

.vis-kpi-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.vis-card-mini {
    padding: 12px 14px;
    width: 100px;
}

.vis-card-a {
    top: 0;
    right: 0;
}

.vis-card-b {
    top: 0;
    right: 115px;
}

/* Footer */
.cl-footer {
    position: relative;
    z-index: 1;
    margin-top: 1.5rem;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.03em;
}

/* ─── Right panel ───────────────────────────────── */
.card-right {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cr-header {
    text-align: center;
    margin-bottom: 2rem;
}

.cr-header img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 12px;
}

.cr-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.cr-header p {
    font-size: 0.8125rem;
    color: var(--ink-muted);
}

/* ─── Alert ─────────────────────────────────────── */
.alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
}
.alert-info { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ─── Form ──────────────────────────────────────── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 5px;
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"] {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #d1d5db;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(26,107,52,0.10);
}

.field input::placeholder { color: var(--ink-faint); }

.field-error {
    display: block;
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 4px;
}

/* Password toggle */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 42px; }

.toggle-pw {
    position: absolute;
    right: 1px; top: 1px; bottom: 1px;
    width: 40px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none;
    color: var(--ink-faint);
    cursor: pointer;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.toggle-pw:hover { color: var(--ink-muted); }
.toggle-pw:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }

/* Options row */
.form-options {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8125rem;
    color: var(--ink-light);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Submit */
.btn-primary {
    width: 100%;
    padding: 11px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 4px;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.985); }
.btn-primary:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 3px; }

/* Footer */
.form-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.form-footer p {
    font-size: 0.75rem;
    color: var(--ink-muted);
}

.form-footer code {
    background: #f4f9f5;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--ink-light);
    border: 1px solid var(--border);
}

.form-footer a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.form-footer a:hover { text-decoration: underline; }

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
    .auth-page { padding: 16px; align-items: flex-start; padding-top: 40px; }

    .auth-card {
        flex-direction: column;
        max-width: 440px;
        margin: 0 auto;
        min-height: auto;
    }

    .card-left { padding: 1.75rem; min-height: 220px; }
    .cl-headline h2 { font-size: 1.25rem; }
    .cl-visual { display: none; }

    .card-right { max-width: 100%; padding: 1.75rem; }
}

@media (max-width: 400px) {
    .card-right { padding: 1.25rem; }
}
