/* =========================
   Navo Forms Domain
   Inputs, selects, textareas, filters, form cards, inline forms, auth pages

   Domain-only form styling.
   Global cards, buttons, tables, badges live in components.css.
========================= */

/* =========================
   Base Form Structure
========================= */

form {
    margin: 0;
}

.form-card {
    max-width: 980px;
    overflow: visible;
    padding: 28px;
}

.form-grid,
.form-grid.two-col,
.filter-form,
.search-filter-form {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.form-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group,
.field-group,
.input-group {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
}

.form-group:last-child,
.field-group:last-child,
.input-group:last-child {
    margin-bottom: 0;
}

/* =========================
   Labels + Inputs
========================= */

label {
    color: var(--component-muted-strong, #cbd5e1);
    display: block;
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 7px;
}

input,
select,
textarea {
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 15px;
    box-sizing: border-box;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    min-height: 46px;
    min-width: 0;
    outline: none;
    padding: 12px 13px;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
    width: 100%;
}

textarea {
    line-height: 1.5;
    min-height: 118px;
    resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
    background: rgba(2, 6, 23, 0.84);
    border-color: rgba(148, 163, 184, 0.30);
}

input:focus,
select:focus,
textarea:focus {
    background: rgba(2, 6, 23, 0.94);
    border-color: rgba(45, 212, 191, 0.72);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #64748b;
    opacity: 1;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: #64748b;
    opacity: 1;
}

input::-moz-placeholder,
textarea::-moz-placeholder {
    color: #64748b;
    opacity: 1;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: #64748b;
    opacity: 1;
}

select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #94a3b8 50%),
        linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 13px) 50%;
    background-repeat: no-repeat;
    background-size:
        5px 5px,
        5px 5px;
    padding-right: 38px;
}

select option {
    background: #0f172a;
    color: #ffffff;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: #2dd4bf;
    background: transparent;
    border-radius: 5px;
    cursor: pointer;
    flex: 0 0 auto;
    height: 18px;
    margin: 0;
    min-height: 18px;
    padding: 0;
    width: 18px;
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.16);
    outline: 2px solid rgba(45, 212, 191, 0.72);
    outline-offset: 2px;
}

input[type="date"],
input[type="month"],
input[type="number"],
select {
    min-width: 0;
}

/* =========================
   Checkbox + Radio Rows
========================= */

.checkbox-group label,
.checkbox-row,
.radio-row {
    align-items: center;
    color: var(--component-muted-strong, #cbd5e1);
    display: flex;
    gap: 9px;
}

.checkbox-row label,
.radio-row label,
.checkbox-group label {
    margin: 0;
}

/* =========================
   Search + Filter Bars
========================= */

.filter-card,
.search-filter-card,
.report-filter-card,
.financial-filter-card {
    margin-bottom: 24px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 18px;
}

.filter-form,
.search-filter-form {
    align-items: end;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    max-width: 100%;
}

.filter-form .form-group,
.search-filter-form .form-group {
    margin-bottom: 0;
}

.filter-form label,
.search-filter-form label {
    color: var(--component-muted, #94a3b8);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.filter-form input,
.filter-form select,
.search-filter-form input,
.search-filter-form select {
    box-sizing: border-box;
    height: 46px;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.filter-actions,
.search-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.filter-actions .button,
.filter-actions .btn,
.filter-actions button,
.filter-actions a,
.search-actions .button,
.search-actions .btn,
.search-actions button,
.search-actions a {
    min-height: 46px;
    white-space: nowrap;
}

.filter-summary {
    color: var(--component-muted, #94a3b8);
    font-size: 13px;
    font-weight: 850;
    margin: 10px 0 0;
}

/* =========================
   Form Actions + Help Text
========================= */

.form-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.form-help,
.form-help-text,
.help-text,
.field-help {
    color: var(--component-muted, #94a3b8);
    display: block;
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}

.form-error,
.error-message,
.field-error {
    color: #fca5a5;
    font-size: 13px;
    font-weight: 850;
    margin: 0;
}

/* =========================
   Goal Update + Inline Editing Forms
========================= */

.goal-update-form,
.goal-edit-form {
    margin-top: 12px;
}

.goal-update-row {
    align-items: center;
    display: flex;
    gap: 8px;
}

.goal-update-row input {
    flex: 1;
    font-size: 13px;
    min-height: 38px;
    padding: 9px 10px;
}

.goal-edit-form {
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    padding-top: 12px;
}

.goal-edit-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 10px;
}

.goal-edit-grid input {
    font-size: 13px;
    min-height: 38px;
    padding: 9px 10px;
}

.inline-edit-form {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns:
        130px
        minmax(120px, 1fr)
        120px
        140px
        minmax(140px, 1fr)
        auto;
}

.inline-edit-form input,
.inline-edit-form select {
    font-size: 12px;
    min-height: 34px;
    padding: 8px 9px;
}

.edit-row td {
    background: rgba(15, 23, 42, 0.72);
}

/* =========================
   Inline Forms
========================= */

.inline-form {
    display: inline-flex;
    margin: 0;
}

.inline-payment-form {
    align-items: stretch;
    background:
        linear-gradient(
            145deg,
            rgba(45, 212, 191, 0.05),
            rgba(129, 140, 248, 0.04)
        ),
        rgba(2, 6, 23, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    display: grid;
    gap: 8px;
    grid-template-columns: 96px 132px 140px auto;
    margin: 0;
    max-width: 100%;
    padding: 8px;
}

.inline-payment-form input,
.inline-payment-form select {
    border-radius: 11px;
    font-size: 12px;
    min-height: 34px;
    padding: 8px 9px;
}

.inline-payment-form button {
    min-height: 34px;
    white-space: nowrap;
}

.invoice-list .inline-payment-form,
.invoice-table .inline-payment-form,
.invoices-table .inline-payment-form {
    width: 100%;
}

/* =========================
   Admin Small Inputs
========================= */

.admin-small-input {
    border-radius: 10px;
    font-size: 12px;
    max-width: 76px;
    min-height: 34px;
    padding: 8px 10px;
}

.admin-reference-input {
    border-radius: 10px;
    font-size: 12px;
    min-height: 34px;
    min-width: 130px;
    padding: 8px 10px;
}

.admin-payment-form {
    align-items: stretch;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    margin-top: 2px;
    padding-top: 8px;
}

/* =========================
   Auth Split Shell
========================= */

.auth-layout {
    align-items: center;
    background:
        radial-gradient(
            circle at 18% 10%,
            rgba(45, 212, 191, 0.16),
            transparent 30%
        ),
        radial-gradient(
            circle at 86% 16%,
            rgba(129, 140, 248, 0.14),
            transparent 32%
        ),
        #020617;
    color: #e5e7eb;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    padding: 42px;
    position: relative;
}

.auth-layout::before {
    background:
        linear-gradient(
            rgba(148, 163, 184, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(148, 163, 184, 0.035) 1px,
            transparent 1px
        );
    background-size: 44px 44px;
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.auth-shell {
    align-items: center;
    display: grid;
    gap: 26px;
    grid-template-columns:
        minmax(360px, 0.95fr)
        minmax(420px, 0.78fr);
    max-width: 1180px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.auth-brand-panel,
.auth-page-content {
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow:
        0 36px 100px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    position: relative;
}

.auth-brand-panel {
    align-self: center;
    background:
        radial-gradient(
            circle at 88% 12%,
            rgba(45, 212, 191, 0.18),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            rgba(15, 23, 42, 0.98),
            rgba(30, 41, 59, 0.96) 48%,
            rgba(49, 46, 129, 0.88)
        );
    border-radius: 38px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 720px;
    padding: 42px;
}

.auth-brand-mark {
    color: #ffffff;
    display: inline-flex;
    font-family: Outfit, Inter, sans-serif;
    font-size: 20px;
    font-weight: 950;
    letter-spacing: -0.04em;
    text-decoration: none;
}

.auth-brand-copy {
    max-width: 620px;
    padding: 46px 0 34px;
    position: relative;
    z-index: 1;
}

.auth-brand-copy .eyebrow {
    color: #2dd4bf;
    display: inline-flex;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.14em;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.auth-brand-copy h1 {
    color: #ffffff;
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(44px, 4.8vw, 68px);
    font-weight: 950;
    letter-spacing: -0.08em;
    line-height: 0.98;
    margin: 0;
}

.auth-brand-copy p {
    color: #94a3b8;
    font-size: 18px;
    font-weight: 650;
    line-height: 1.6;
    margin: 22px 0 0;
    max-width: 560px;
}

.auth-feature-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 28px;
    position: relative;
    z-index: 1;
}

.auth-feature-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 22px;
    padding: 18px;
}

.auth-feature-card span {
    color: #2dd4bf;
    display: block;
    font-size: 12px;
    font-weight: 950;
    margin-bottom: 12px;
}

.auth-feature-card strong {
    color: #ffffff;
    display: block;
    font-size: 15px;
    font-weight: 950;
    margin-bottom: 8px;
}

.auth-feature-card p {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
    margin: 0;
}

/* =========================
   Auth Form Content
========================= */

.auth-page-content {
    align-self: center;
    background:
        radial-gradient(
            circle at 92% 8%,
            rgba(45, 212, 191, 0.12),
            transparent 28%
        ),
        radial-gradient(
            circle at 8% 92%,
            rgba(129, 140, 248, 0.10),
            transparent 30%
        ),
        rgba(15, 23, 42, 0.94);
    border-radius: 34px;
    color: #e5e7eb;
    max-width: 520px;
    padding: 52px;
    width: 100%;
}

.auth-page-content::before {
    background: linear-gradient(
        90deg,
        #2dd4bf,
        #3b82f6,
        #818cf8
    );
    content: "";
    height: 6px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.auth-page-content::after {
    background: radial-gradient(
        circle,
        rgba(45, 212, 191, 0.16),
        transparent 68%
    );
    content: "";
    height: 260px;
    pointer-events: none;
    position: absolute;
    right: -96px;
    top: -110px;
    width: 260px;
}

.auth-page-content > * {
    position: relative;
    z-index: 1;
}

.auth-form-header {
    margin-bottom: 30px;
}

.auth-mini-mark {
    background: linear-gradient(
        135deg,
        #2dd4bf,
        #3b82f6
    );
    border-radius: 13px;
    box-shadow: 0 0 28px rgba(45, 212, 191, 0.26);
    color: #020617;
    display: grid;
    font-family: Outfit, Inter, sans-serif;
    font-size: 13px;
    font-weight: 950;
    height: 40px;
    letter-spacing: -0.04em;
    margin-bottom: 22px;
    place-items: center;
    width: 40px;
}

.auth-form-header h1 {
    color: #ffffff;
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(42px, 4.2vw, 58px);
    font-weight: 950;
    letter-spacing: -0.08em;
    line-height: 0.96;
    margin: 0 0 16px;
}

.auth-form-header p {
    color: #94a3b8;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.65;
    margin: 0;
}

.auth-form {
    display: grid;
    gap: 18px;
    margin: 0;
}

.auth-form .form-group {
    margin: 0;
}

.auth-form label {
    color: #cbd5e1;
    display: block;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.01em;
    margin: 0 0 9px;
}

.auth-form input:not([type="checkbox"]):not([type="radio"]),
.auth-form select {
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    color: #ffffff;
    font-size: 16px;
    font-weight: 750;
    min-height: 54px;
    padding: 0 18px;
}

.auth-form input:not([type="checkbox"]):not([type="radio"])::placeholder {
    color: #64748b;
}

.auth-form input:not([type="checkbox"]):not([type="radio"]):hover,
.auth-form select:hover {
    border-color: rgba(148, 163, 184, 0.30);
}

.auth-form input:not([type="checkbox"]):not([type="radio"]):focus,
.auth-form select:focus {
    background: rgba(2, 6, 23, 0.94);
    border-color: rgba(45, 212, 191, 0.72);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12);
    outline: none;
}

.auth-submit-button {
    align-items: center;
    background: #2dd4bf;
    border: 1px solid rgba(45, 212, 191, 0.50);
    border-radius: 18px;
    box-shadow:
        0 18px 44px rgba(45, 212, 191, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    color: #020617;
    cursor: pointer;
    display: inline-flex;
    font-size: 15px;
    font-weight: 950;
    justify-content: center;
    margin-top: 4px;
    min-height: 52px;
    padding: 0 26px;
    transition:
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
    width: fit-content;
}

.auth-submit-button:hover {
    background: #5eead4;
    box-shadow:
        0 22px 50px rgba(45, 212, 191, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.auth-submit-button:focus-visible {
    outline: 3px solid rgba(45, 212, 191, 0.42);
    outline-offset: 3px;
}

.auth-secondary-actions {
    color: #94a3b8;
    display: grid;
    font-size: 14px;
    font-weight: 700;
    gap: 8px;
    line-height: 1.5;
    margin-top: 18px;
}

.auth-secondary-actions p {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
}

.auth-secondary-actions a {
    color: #2dd4bf;
    font-weight: 900;
    text-decoration: none;
}

.auth-secondary-actions a:hover {
    color: #5eead4;
}

/* =========================
   Auth Consent + Legal Acceptance
========================= */

.auth-consent-group {
    background:
        linear-gradient(
            145deg,
            rgba(45, 212, 191, 0.045),
            rgba(59, 130, 246, 0.035)
        ),
        rgba(2, 6, 23, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    display: grid;
    gap: 0;
    overflow: hidden;
}

.auth-consent-row {
    align-items: flex-start;
    color: #94a3b8;
    cursor: pointer;
    display: grid;
    font-size: 12px;
    font-weight: 700;
    gap: 12px;
    grid-template-columns: 18px minmax(0, 1fr);
    line-height: 1.55;
    margin: 0;
    padding: 15px 16px;
    transition:
        background 0.18s ease,
        color 0.18s ease;
}

.auth-consent-row + .auth-consent-row {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-consent-row:hover {
    background: rgba(255, 255, 255, 0.035);
    color: #cbd5e1;
}

.auth-consent-row input[type="checkbox"] {
    accent-color: #2dd4bf;
    cursor: pointer;
    height: 18px;
    margin: 2px 0 0;
    min-height: 18px;
    width: 18px;
}

.auth-consent-row span {
    min-width: 0;
}

.auth-consent-row a {
    color: #2dd4bf;
    font-weight: 900;
    text-decoration: underline;
    text-decoration-color: rgba(45, 212, 191, 0.40);
    text-underline-offset: 3px;
}

.auth-consent-row a:hover {
    color: #5eead4;
    text-decoration-color: currentColor;
}

.auth-consent-row a:focus-visible {
    outline: 2px solid rgba(45, 212, 191, 0.48);
    outline-offset: 3px;
}

.auth-form .form-help-text {
    color: #64748b;
    display: block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    margin-top: 7px;
}

/* =========================
   Responsive Forms
========================= */

@media (max-width: 1100px) {
    .filter-form,
    .search-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 720px;
    }

    .auth-brand-panel {
        height: auto;
        min-height: auto;
    }

    .auth-brand-copy {
        padding: 34px 0;
    }

    .auth-feature-grid {
        grid-template-columns: 1fr;
    }

    .auth-page-content {
        max-width: 100%;
    }
}

@media (max-width: 980px) {
    .form-grid.two-col,
    .inline-payment-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .inline-edit-form,
    .goal-edit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .auth-layout {
        padding: 22px;
    }

    .auth-brand-panel,
    .auth-page-content {
        border-radius: 26px;
        padding: 28px;
    }

    .auth-brand-copy h1,
    .auth-page-content h1,
    .auth-page-content h2,
    .auth-form-header h1 {
        font-size: 38px;
    }

    .auth-submit-button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .form-grid,
    .filter-form,
    .search-filter-form {
        grid-template-columns: 1fr;
    }

    .filter-actions,
    .search-actions,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-actions .button,
    .filter-actions .btn,
    .filter-actions button,
    .filter-actions a,
    .search-actions .button,
    .search-actions .btn,
    .search-actions button,
    .search-actions a,
    .form-actions .button,
    .form-actions .btn,
    .form-actions button {
        width: 100%;
    }

    .auth-consent-row {
        padding: 14px;
    }
}