/* =========================================================
   ALMARX TECH ERP - MODERN LOGIN UI V1
   Additive stylesheet. Keeps existing auth logic/forms intact.
========================================================= */
:root {
    --auth-navy-950: #06101f;
    --auth-navy-900: #0a1730;
    --auth-navy-800: #10264a;
    --auth-blue: #2563eb;
    --auth-blue-soft: #60a5fa;
    --auth-cyan: #22d3ee;
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-line: #dbe4ef;
    --auth-card: rgba(255, 255, 255, 0.96);
}

html, body { min-height: 100%; }

body.auth-body {
    position: relative;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--auth-text);
    background:
        radial-gradient(circle at 14% 18%, rgba(37, 99, 235, .34), transparent 30%),
        radial-gradient(circle at 84% 16%, rgba(34, 211, 238, .19), transparent 28%),
        radial-gradient(circle at 72% 82%, rgba(99, 102, 241, .25), transparent 34%),
        linear-gradient(135deg, #04101f 0%, #0b1c38 45%, #071426 100%);
    isolation: isolate;
}

body.auth-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    opacity: .32;
    background-image:
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 92%);
}

body.auth-body::after {
    content: "";
    position: fixed;
    width: 540px;
    height: 540px;
    left: -210px;
    bottom: -230px;
    z-index: -2;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(37, 99, 235, .20);
    filter: blur(18px);
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 18px;
}

.auth-shell::before,
.auth-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    z-index: -1;
}

.auth-shell::before {
    width: 230px;
    height: 230px;
    right: 7%;
    top: 8%;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 0 0 34px rgba(255,255,255,.025), 0 0 0 72px rgba(255,255,255,.018);
}

.auth-shell::after {
    width: 130px;
    height: 130px;
    left: 10%;
    bottom: 10%;
    background: linear-gradient(145deg, rgba(34,211,238,.18), rgba(37,99,235,.05));
    border: 1px solid rgba(255,255,255,.08);
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    padding: 30px;
    overflow: hidden;
    background: var(--auth-card);
    border: 1px solid rgba(255,255,255,.70);
    border-radius: 24px;
    box-shadow: 0 34px 90px rgba(0, 8, 25, .34), 0 3px 12px rgba(0, 8, 25, .12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--auth-blue), var(--auth-cyan), #818cf8);
}

.developer-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 92px;
    margin: -6px -6px 25px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    background: radial-gradient(circle at 90% 10%, rgba(96,165,250,.20), transparent 35%), linear-gradient(135deg, #06162d, #0b254a 72%, #0b3156);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.developer-brand::after {
    content: "DIGITAL SOLUTIONS & SOFTWARE";
    position: absolute;
    right: 12px;
    bottom: 7px;
    color: rgba(255,255,255,.44);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .18em;
}

.developer-brand-image {
    display: block;
    width: min(100%, 330px);
    max-height: 66px;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,.22));
}

.auth-branch-ribbon {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: -8px 0 20px;
    padding: 11px 13px;
    color: #dbeafe;
    background: linear-gradient(135deg, rgba(15, 39, 73, .97), rgba(18, 62, 105, .94));
    border: 1px solid rgba(96,165,250,.22);
    border-radius: 13px;
}

.auth-branch-ribbon .auth-branch-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255,255,255,.09);
    font-size: 18px;
}

.auth-branch-ribbon strong { display:block; color:#fff; font-size:13px; line-height:1.25; }
.auth-branch-ribbon small { display:block; margin-top:2px; color:#9fc8ef; font-size:11px; }

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 23px;
}

.auth-brand h1 {
    margin: 0 0 5px;
    color: #0b1730;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.025em;
}

.auth-brand p { margin:0; color:#6b778a; font-size:.88rem; }

.auth-company-logo,
.auth-logo {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 16px;
    border: 1px solid #dce5f0;
    background: linear-gradient(145deg, #ffffff, #f2f6fb);
    box-shadow: 0 9px 24px rgba(15,23,42,.08);
}

.auth-logo { display:grid; place-items:center; color:#fff; border:0; background:linear-gradient(145deg,#153765,#0a2142); }
.auth-company-logo img { width:100%; height:100%; object-fit:contain; padding:6px; }

.auth-company-context {
    display: grid;
    gap: 4px;
    margin: -3px 0 20px;
    padding: 12px 14px;
    border: 1px solid #dbe7f4;
    border-radius: 13px;
    background: linear-gradient(180deg, #f8fbff, #f3f8fe);
}

.auth-company-context span { color:#64748b; font-size:.69rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.auth-company-context strong { color:#14213a; font-size:.92rem; }
.auth-company-context small { color:#738195; font-size:.78rem; line-height:1.4; }

.auth-form { display:grid; gap:17px; }
.auth-field { display:grid; gap:7px; }
.auth-field label { color:#334155; font-size:.82rem; font-weight:700; }

.auth-input {
    width:100%;
    height:47px;
    padding:0 13px;
    border:1px solid #cfd9e6;
    border-radius:12px;
    outline:none;
    color:#111827;
    background:rgba(255,255,255,.92);
    box-shadow:inset 0 1px 2px rgba(15,23,42,.025);
    transition:border-color .15s ease, box-shadow .15s ease;
}
.auth-input:hover { border-color:#aebed0; }
.auth-input:focus { border-color:#3b82f6; box-shadow:0 0 0 4px rgba(59,130,246,.12), 0 8px 20px rgba(37,99,235,.06); }

.password-wrap { position:relative; }
.password-wrap .auth-input { padding-right:72px; }
.password-toggle {
    position:absolute;
    right:7px;
    top:50%;
    min-width:54px;
    height:32px;
    padding:0 10px;
    transform:translateY(-50%);
    border:1px solid #dbe5ef;
    border-radius:9px;
    color:#1d4ed8;
    background:#f6f9fd;
    font-size:11px;
    font-weight:800;
    cursor:pointer;
}
.password-toggle:hover { background:#edf5ff; }

.auth-options { display:flex; align-items:center; justify-content:space-between; }
.remember-row { display:inline-flex; align-items:center; gap:8px; color:#5d6a7c; font-size:.82rem; }
.auth-check { width:16px; height:16px; accent-color:#2563eb; }

.auth-submit {
    width:100%;
    min-height:47px;
    border:0;
    border-radius:12px;
    padding:11px 15px;
    color:#fff;
    background:linear-gradient(135deg,#123563,#1d4ed8 70%,#2563eb);
    box-shadow:0 12px 28px rgba(37,99,235,.22);
    font:inherit;
    font-weight:800;
    letter-spacing:.01em;
    cursor:pointer;
    transition:transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.auth-submit:hover { transform:translateY(-1px); box-shadow:0 16px 32px rgba(37,99,235,.28); filter:brightness(1.04); }
.auth-submit:active { transform:translateY(0); }

.auth-alert { margin-bottom:16px; padding:11px 12px; border-radius:11px; font-size:.82rem; }
.auth-footnote { margin-top:21px; padding-top:17px; border-top:1px solid #e7edf4; color:#7a8799; text-align:center; font-size:.76rem; line-height:1.5; }
.auth-generic-heading { flex:1; }
.auth-generic-heading h1, .auth-generic-heading p { text-align:center; }

@media (max-width:620px) {
    .auth-shell { padding:22px 12px; }
    .auth-card { max-width:100%; padding:22px 18px; border-radius:20px; }
    .developer-brand { min-height:80px; margin:-2px -2px 21px; padding:14px 12px; border-radius:15px; }
    .developer-brand::after { display:none; }
    .developer-brand-image { max-height:56px; }
    .auth-brand h1 { font-size:1.35rem; }
    .auth-company-logo, .auth-logo { width:52px; height:52px; flex-basis:52px; border-radius:14px; }
}

@media (max-width:380px) {
    .auth-card { padding:18px 14px; }
    .auth-brand { gap:11px; }
    .auth-brand h1 { font-size:1.23rem; }
}
