/* =============================================
   LOGIN PAGE — login.css
   Link: <link rel="stylesheet" href="{{ asset('css/login.css') }}">
   ============================================= */

:root {
    --blue:       #1e3a5f;
    --blue-dark:  #162c49;
    --blue-soft:  rgba(30,58,95,0.08);
    --blue-glow:  rgba(30,58,95,0.15);
    --bg:         #f0f4ff;
    --card:       #ffffff;
    --ink:        #111827;
    --body:       #374151;
    --muted:      #9ca3af;
    --border:     #e5e7eb;
    --danger:     #dc2626;
    --success:    #059669;
    --sidebar:    #1e3a5f;
}

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

body {
    min-height: 100vh;
    font-family: Inter, "Segoe UI", sans-serif;
    background: var(--bg);
    display: flex;
    overflow: hidden;
}

/* ══════════════════════════════
   LEFT SIDEBAR
══════════════════════════════ */
.sidebar {
    width: 42%;
    min-height: 100vh;
    background: var(--sidebar);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem 4rem;
    overflow: hidden;
}

/* Mesh gradient blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
.blob-1 {
    width: 400px; height: 400px;
    background: rgba(26,86,219,0.35);
    top: -100px; right: -100px;
    animation: drift 14s ease-in-out infinite alternate;
}
.blob-2 {
    width: 300px; height: 300px;
    background: rgba(139,92,246,0.2);
    bottom: -80px; left: -80px;
    animation: drift 18s ease-in-out infinite alternate-reverse;
}
.blob-3 {
    width: 200px; height: 200px;
    background: rgba(56,189,248,0.12);
    top: 45%; left: 30%;
    animation: drift 22s ease-in-out infinite alternate;
}

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, 20px) scale(1.08); }
}

/* Fine grid overlay */
.sidebar-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
}

/* Brand / Logo */
.s-brand {
    position: relative;
    z-index: 5;
    animation: fromLeft 0.7s ease both;
}

.s-logo img {
    height: 52px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

/* Main copy */
.s-body {
    position: relative;
    z-index: 5;
    animation: fromLeft 0.8s 0.1s ease both;
}

.s-kicker {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #60a5fa;
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.s-kicker::before {
    content: '';
    width: 28px; height: 1.5px;
    background: #60a5fa;
    border-radius: 2px;
    display: block;
}

.s-headline {
    font-size: clamp(1.9rem, 2.8vw, 2.6rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.22;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.s-headline span { color: #60a5fa; }

.s-desc {
    font-size: 0.88rem;
    font-weight: 300;
    color: rgba(255,255,255,0.45);
    line-height: 1.85;
    max-width: 320px;
}

/* Bottom footer bar */
.s-footer {
    position: relative;
    z-index: 5;
    animation: fromLeft 0.8s 0.2s ease both;
}

.s-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin-bottom: 1.5rem;
}

.s-info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.s-info-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.38);
}

.s-info-item i {
    color: #60a5fa;
    font-size: 0.75rem;
}

.s-dot {
    width: 3px; height: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
}

/* ══════════════════════════════
   RIGHT FORM PANEL
══════════════════════════════ */
.form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    background: var(--bg);
    position: relative;
}

/* Top gradient bar */
.form-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue) 0%, #818cf8 100%);
}

.form-wrap {
    width: 100%;
    max-width: 400px;
    animation: fromRight 0.7s 0.15s ease both;
}

/* Form card */
.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.75rem 2.5rem 2.25rem;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.04),
        0 10px 40px rgba(0,0,0,0.07);
}

.fc-head { margin-bottom: 2rem; }

.fc-head .greeting {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.fc-head h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.025em;
    line-height: 1.25;
    margin-bottom: 0.4rem;
}

.fc-head p {
    font-size: 0.83rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.6;
}

/* ── Form Fields ── */
.fld { margin-bottom: 1rem; }

.fld label {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--body);
    letter-spacing: 0.03em;
    margin-bottom: 0.45rem;
}

.fld-inner { position: relative; }

.fld-inner .fld-ico {
    position: absolute;
    left: 0.95rem; top: 50%;
    transform: translateY(-50%);
    color: #d1d5db;
    font-size: 0.8rem;
    pointer-events: none;
    transition: color 0.2s;
}

.fld-inner input {
    width: 100%;
    background: #f9fafb;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    color: var(--ink);
    font-family: Inter, "Segoe UI", sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    padding: 0.78rem 0.9rem 0.78rem 2.5rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.fld-inner input::placeholder { color: #d1d5db; font-weight: 300; }

.fld-inner input:focus {
    background: #fff;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.fld-inner input:focus + .fld-ico { color: var(--blue); }

.fld-inner input.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
}

.fld-inner.has-eye input { padding-right: 2.75rem; }

.eye-btn {
    position: absolute;
    right: 0.9rem; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: #d1d5db; cursor: pointer;
    font-size: 0.8rem; padding: 0;
    transition: color 0.2s;
}
.eye-btn:hover { color: var(--blue); }

.fld-err {
    display: flex; align-items: center; gap: 0.35rem;
    font-size: 0.74rem; color: var(--danger);
    margin-top: 0.35rem;
}

/* ── Remember / Forgot row ── */
.row-mid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.2rem 0 1.6rem;
}

.chk {
    display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
}

.chk input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 15px; height: 15px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    background: #f9fafb;
    cursor: pointer;
    display: grid; place-items: center;
    transition: all 0.18s;
    flex-shrink: 0;
}

.chk input[type="checkbox"]:checked {
    background: var(--blue); border-color: var(--blue);
}

.chk input[type="checkbox"]:checked::after {
    content: '';
    width: 4px; height: 7px;
    border: 1.5px solid #fff;
    border-top: none; border-left: none;
    transform: rotate(45deg) translate(-1px,-1px);
    display: block;
}

.chk span { font-size: 0.8rem; color: var(--muted); font-weight: 400; }

.reset-btn {
    font-size: 0.8rem; font-weight: 500;
    color: var(--blue);
    background: none; border: none; cursor: pointer; padding: 0;
    transition: color 0.2s;
}
.reset-btn:hover { color: var(--blue-dark); text-decoration: underline; }

/* ── Submit Button ── */
.btn-submit {
    width: 100%;
    background: var(--blue);
    border: none; border-radius: 8px;
    color: #fff;
    font-family: Inter, "Segoe UI", sans-serif;
    font-size: 0.875rem; font-weight: 600;
    padding: 0.85rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.55rem;
    letter-spacing: 0.01em;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    position: relative; overflow: hidden;
}

.btn-submit::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s;
}

.btn-submit:hover {
    background: var(--blue-dark);
    box-shadow: 0 6px 22px rgba(26,86,219,0.35);
    transform: translateY(-1px);
}
.btn-submit:hover::after { opacity: 1; }
.btn-submit:active { transform: none; }

/* ── Secure note ── */
.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1.25rem;
    font-size: 0.73rem;
    color: #c9d0da;
}
.secure-note i { color: #a3b0c2; font-size: 0.7rem; }

/* ── Alerts ── */
.alert-row {
    display: flex; align-items: flex-start; gap: 0.65rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.83rem;
    margin-bottom: 1.25rem; line-height: 1.5;
}

.alert-row.err {
    background: rgba(220,38,38,0.06);
    border: 1px solid rgba(220,38,38,0.18);
    color: var(--danger);
}

.alert-row.ok {
    background: rgba(5,150,105,0.06);
    border: 1px solid rgba(5,150,105,0.18);
    color: var(--success);
}

@keyframes fadeOut {
    to { opacity: 0; height: 0; padding: 0; margin: 0; overflow: hidden; }
}
.fade-out { animation: fadeOut 0.5s forwards; }

/* ── Bottom meta ── */
.form-meta {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.73rem;
    color: var(--muted);
}
.form-meta a { color: var(--blue); text-decoration: none; }
.form-meta a:hover { text-decoration: underline; }

/* ── Modal ── */
.modal-content {
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.modal-header {
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
    border-radius: 14px 14px 0 0;
    padding: 1.35rem 1.6rem;
}

.modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
}

.modal-body { padding: 1.6rem; }

.modal-body p {
    font-size: 0.83rem;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.modal-send {
    width: 100%;
    background: var(--blue); border: none; border-radius: 8px; color: #fff;
    font-family: Inter, "Segoe UI", sans-serif;
    font-size: 0.85rem; font-weight: 600; padding: 0.82rem; cursor: pointer;
    margin-top: 1.1rem;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.modal-send:hover {
    background: var(--blue-dark);
    box-shadow: 0 5px 18px rgba(26,86,219,0.3);
    transform: translateY(-1px);
}

#fgtMsg {
    padding: 0.8rem 1rem; border-radius: 8px;
    font-size: 0.83rem; display: none; margin-bottom: 1rem;
}

/* ── Animations ── */
@keyframes fromLeft {
    from { opacity: 0; transform: translateX(-22px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fromRight {
    from { opacity: 0; transform: translateX(22px); }
    to   { opacity: 1; transform: translateX(0); }
}

.erp-export-spin {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    display: inline-block;
    vertical-align: -2px;
    margin-right: 6px;
    animation: erp-export-spin 0.7s linear infinite;
}

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

button:disabled {
    cursor: wait;
    opacity: 0.75;
}

/* ── Responsive ── */
@media (max-width: 860px) {
    .sidebar { display: none; }
    body { overflow: auto; }
}