/* ndize.al — sign-up / sign-in pages: night brand panel + form card.
   Also styles the core classes the shared partials use (.form-group,
   .form-label, .form-control, .form-row, .btn, .alert). */

.nd-auth {
    margin: 0; min-height: 100vh;
    font: 400 15px/1.5 "Inter", system-ui, sans-serif !important;
    background: #f5f9fd !important; color: #0e2233;
    display: block !important; padding: 0 !important;
}
.nd-auth *, .nd-auth *::before, .nd-auth *::after { box-sizing: border-box; }
.nd-auth__wrap { display: grid; grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr); min-height: 100vh; }

/* ---------- brand panel ---------- */
.nd-auth__brand {
    position: sticky; top: 0; height: 100vh; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
    padding: 44px clamp(28px, 4vw, 64px);
    background:
        radial-gradient(70% 50% at 100% 0%, rgba(10,106,168,.55), transparent 70%),
        radial-gradient(60% 45% at 0% 100%, rgba(217,96,12,.35), transparent 70%),
        #07111b;
    color: #e8f1f8;
}
.nd-auth__brand::before { /* faint grid */
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image: linear-gradient(rgba(124,200,248,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(124,200,248,.07) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 40% 50%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 40% 50%, #000 20%, transparent 75%);
}
.nd-auth__logo { display: inline-flex; align-self: flex-start; text-decoration: none; color: #ffffff; font: 700 26px "Space Grotesk", system-ui, sans-serif; }
.nd-auth__logo img { height: 40px; width: auto; display: block; }
.nd-auth__pitch h1 {
    margin: 0 0 16px; font: 700 clamp(40px, 4.4vw, 64px)/1 "Space Grotesk", system-ui, sans-serif;
    letter-spacing: -0.035em; color: #ffffff;
}
.nd-auth__pitch h1 em { font-style: normal; color: #ffc21a; }
.nd-auth__pitch p { margin: 0 0 24px; max-width: 440px; font-size: 17px; line-height: 27px; color: #b8cad8; }
.nd-auth__pitch ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.nd-auth__pitch li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #e8f1f8; }
.nd-auth__pitch li::before {
    content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(76,195,138,.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234cc38a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.nd-auth__glow { display: none; }

/* ---------- form side ---------- */
.nd-auth__main { display: flex; justify-content: center; padding: 48px clamp(20px, 5vw, 72px); }
.nd-auth__card { width: 100%; max-width: 560px; }
.nd-auth__head { margin-bottom: 22px; }
.nd-auth__head h2 { margin: 0 0 6px; font: 700 32px/1.1 "Space Grotesk", system-ui, sans-serif; letter-spacing: -0.02em; color: #0e2233; }
.nd-auth__head p { margin: 0; color: #4a5d6e; }
.nd-auth__head a, .nd-auth-link { color: #0a6aa8 !important; font-weight: 600; text-decoration: none; }
.nd-auth__head a:hover, .nd-auth-link:hover { text-decoration: underline; }

.nd-auth-sec { margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid #d5e2ee; }
.nd-auth-sec--first { margin-top: 0; padding-top: 0; border-top: 0; }
.nd-auth-sec__t { font: 500 12.5px "JetBrains Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: #d9600c; }
.nd-auth-sec__hint { margin-top: 4px; font-size: 13.5px; color: #4a5d6e; }

.nd-auth .form-group { margin-bottom: 16px; }
.nd-auth .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nd-auth .form-label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 14px; color: #0e2233; }
.nd-auth .form-label span[style*="color:#c43c35"], .nd-auth .req { color: #b42318 !important; margin-left: 2px; }
.nd-auth .form-control {
    display: block; width: 100%; height: auto; min-height: 50px; padding: 12px 16px;
    border: 1px solid #6f879c !important; border-radius: 12px !important;
    background: #ffffff; color: #0e2233; font: 400 15.5px "Inter", system-ui, sans-serif;
    transition: border-color .2s, box-shadow .2s;
}
.nd-auth select.form-control { height: 50px; }
.nd-auth .form-control:focus { outline: none; border-color: #0a6aa8 !important; box-shadow: 0 0 0 4px rgba(56,168,240,.2); }
.nd-auth .text-danger, .nd-auth .text-sm.text-danger { margin-top: 6px; font-size: 13px; color: #b42318; }
.nd-auth .field-note { margin-top: 6px; font-size: 13px; color: #6f879c; }

/* individual / company: segmented pills */
.nd-auth-seg { display: inline-grid; grid-auto-flow: column; gap: 6px; padding: 5px; margin-bottom: 8px; border-radius: 999px; background: #ffffff; border: 1px solid #d5e2ee; }
.nd-auth-seg__opt {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    min-height: 42px; padding: 0 18px; border-radius: 999px; cursor: pointer;
    font-weight: 600; font-size: 14.5px; color: #4a5d6e;
    transition: background-color .2s, color .2s;
}
.nd-auth-seg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.nd-auth-seg__opt:has(input:checked) { background: #0b1622; color: #ffffff; }
.nd-auth-seg__opt:has(input:focus-visible) { outline: 2px solid #0a6aa8; outline-offset: 2px; }

/* checkboxes (terms, marketing) */
.nd-auth input[type="checkbox"] { width: 18px; height: 18px; accent-color: #0a6aa8; flex: none; }
.nd-auth label:has(> input[type="checkbox"]) { font-size: 14px !important; line-height: 21px; color: #0e2233; }

/* submit */
.nd-auth .btn.nd-auth-submit {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 54px; margin-top: 8px !important; border: 0 !important; border-radius: 999px !important;
    background: #ffc21a !important; color: #1a1405 !important;
    font: 700 16px "Inter", system-ui, sans-serif !important; cursor: pointer;
    box-shadow: 0 14px 34px -14px rgba(217,96,12,.9);
    transition: transform .2s, filter .2s;
}
.nd-auth .btn.nd-auth-submit:hover { transform: translateY(-2px); filter: brightness(1.04); }
.nd-auth .btn.nd-auth-submit::after { content: "→"; font-weight: 700; transition: transform .2s; }
.nd-auth .btn.nd-auth-submit:hover::after { transform: translateX(4px); }

.nd-auth .alert {
    margin-bottom: 18px; padding: 14px 18px; border-radius: 14px;
    background: rgba(180,35,24,.06); border: 1px solid rgba(180,35,24,.35); color: #b42318; font-size: 14px;
}
.nd-auth .alert ul { margin: 0; padding-left: 18px; }

/* dark theme */
[data-theme="dark"] .nd-auth { background: #0b1622 !important; color: #e8f1f8; }
[data-theme="dark"] .nd-auth__head h2, [data-theme="dark"] .nd-auth .form-label, [data-theme="dark"] .nd-auth label:has(> input[type="checkbox"]) { color: #e8f1f8; }
[data-theme="dark"] .nd-auth__head p, [data-theme="dark"] .nd-auth-sec__hint { color: #9fb3c4; }
[data-theme="dark"] .nd-auth .form-control { background: #12212f; color: #e8f1f8; border-color: #4e6a82 !important; }
[data-theme="dark"] .nd-auth-sec { border-top-color: #23384a; }
[data-theme="dark"] .nd-auth-seg { background: #12212f; border-color: #23384a; }
[data-theme="dark"] .nd-auth-seg__opt:has(input:checked) { background: #ffc21a; color: #1a1405; }
[data-theme="dark"] .nd-auth__head a, [data-theme="dark"] .nd-auth-link { color: #7cc8f8 !important; }

/* phones / tablets: brand panel becomes a header */
@media (max-width: 900px) {
    .nd-auth__wrap { grid-template-columns: 1fr; }
    .nd-auth__brand { position: relative; height: auto; padding: 28px 22px 32px; gap: 22px; }
    .nd-auth__pitch h1 { font-size: 36px; margin-bottom: 10px; }
    .nd-auth__pitch p { margin-bottom: 0; font-size: 15.5px; line-height: 24px; }
    .nd-auth__pitch ul { display: none; }
    .nd-auth__main { padding: 28px 18px 48px; }
}
@media (max-width: 520px) {
    .nd-auth .form-row { grid-template-columns: 1fr; gap: 0; }
    .nd-auth-seg { display: grid; width: 100%; }
}

/* sign-in: shorter card, centred vertically */
.nd-auth__main--center { align-items: center; }
.nd-auth__card--narrow { max-width: 440px; }
.nd-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; font-size: 14px; }
.nd-auth-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; color: #0e2233; }
.nd-auth .alert--ok { background: rgba(17,115,74,.08); border-color: rgba(17,115,74,.35); color: #11734a; }
[data-theme="dark"] .nd-auth-row label { color: #e8f1f8; }

/* standalone sign-in pages (forgot / reset / 2FA / invite) */
.nd-auth-foot { margin: 18px 0 0; text-align: center; font-size: 14px; }
.nd-auth-foot--muted { color: #6f879c; font-size: 13px; }
.nd-auth-textbtn { border: 0; background: none; cursor: pointer; color: #4a5d6e; font: 500 14px "Inter", system-ui, sans-serif; text-decoration: underline; }
.nd-auth-note { margin: 0 0 16px; color: #4a5d6e; }
.nd-auth .nd-auth-code { font: 600 24px "JetBrains Mono", ui-monospace, monospace; letter-spacing: .3em; text-align: center; }
a.btn.nd-auth-submit { text-decoration: none; }
[data-theme="dark"] .nd-auth-textbtn, [data-theme="dark"] .nd-auth-note { color: #9fb3c4; }

/* iOS Safari zooms into any form field under 16px when it is tapped, and the
   zoomed page then scrolls sideways. Fields stay at 16px on phones and tablets. */
@media (max-width: 1024px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not(#nd-nozoom),
    select:not(#nd-nozoom), textarea:not(#nd-nozoom) { font-size: 16px !important; }
}

/* dark mode: labels stay light (an !important elsewhere won over the rule above) */
[data-theme="dark"] .nd-auth .form-label { color: #e8f1f8 !important; }
[data-theme="dark"] .nd-auth-seg__opt:not(:has(input:checked)) { color: #cfe7f8; }
