@font-face {
    font-family: "ITF Qomra Arabic";
    src: url("/fonts/itfQomraArabic-Light.otf") format("opentype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "ITF Qomra Arabic";
    src: url("/fonts/itfQomraArabic-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "ITF Qomra Arabic";
    src: url("/fonts/itfQomraArabic-Bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --forest: #054239;
    --forest-deep: #03302a;
    --forest-soft: #0a5c4f;
    --wheat: #edebe0;
    --wheat-deep: #e2dfd2;
    --sand: #f7f5ef;
    --charcoal: #161616;
    --muted: #5c5c5c;
    --border: #d4d0c8;
    --border-strong: #b8b3a6;
    --danger: #9b1c1c;
    --warning: #92600a;
    --success: #0f5132;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 8px 28px rgba(5, 66, 57, 0.08);
    --shadow-sm: 0 2px 10px rgba(22, 22, 22, 0.05);
    --font: "ITF Qomra Arabic", "Segoe UI", Tahoma, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-weight: 400;
    background:
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(5, 66, 57, 0.08), transparent 55%),
        radial-gradient(ellipse 60% 40% at 0% 100%, rgba(5, 66, 57, 0.05), transparent 50%),
        var(--sand);
    color: var(--charcoal);
    line-height: 1.7;
    min-height: 100vh;
}

h1, h2, h3, strong, .btn, label, th {
    font-family: var(--font);
    font-weight: 700;
}

h1 {
    color: var(--forest);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    margin: 0 0 0.4rem;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

h2 {
    color: var(--forest);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
}

p.lead {
    color: var(--muted);
    margin: 0 0 1.75rem;
    font-size: 1.05rem;
    font-weight: 300;
    max-width: 36rem;
}

a {
    color: var(--forest);
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3rem;
}

.container-wide {
    max-width: 980px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

/* —— Brand hero strip (public) —— */
.page-brand {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.page-brand .brand-mark {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--forest);
    letter-spacing: 0.02em;
}

/* —— Cards —— */
.card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.6rem;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(6px);
}

.card + .card {
    margin-top: 1.25rem;
}

/* —— Forms —— */
.field {
    margin-bottom: 1.15rem;
}

.field:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.45rem;
    color: var(--forest-deep);
    font-size: 0.95rem;
}

.field-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 300;
}

.req {
    color: var(--danger);
    font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font);
    background: #fff;
    color: var(--charcoal);
    margin-bottom: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
select:hover,
textarea:hover {
    border-color: var(--border-strong);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="file"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--forest);
    box-shadow: 0 0 0 3px rgba(5, 66, 57, 0.14);
    background: #fff;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #9a958a;
    font-weight: 300;
}

/* —— Date & time pickers —— */
.datetime-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 560px) {
    .datetime-row {
        grid-template-columns: 1fr;
    }
}

.picker-field {
    position: relative;
}

.picker-shell {
    position: relative;
    display: flex;
    align-items: center;
}

/* LTR numeric fields inside RTL page: keep text left, icon on the right */
.picker-shell input[type="date"],
.picker-shell input[type="time"] {
    min-height: 3rem;
    padding: 0.75rem 2.85rem 0.75rem 0.9rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
    cursor: pointer;
    direction: ltr;
    text-align: left;
    background: linear-gradient(180deg, #ffffff 0%, #faf9f5 100%);
    color-scheme: light;
}

.picker-shell .picker-affordance {
    position: absolute;
    top: 50%;
    right: 0.85rem;
    left: auto;
    width: 1.25rem;
    height: 1.25rem;
    transform: translateY(-50%);
    color: var(--forest);
    pointer-events: none;
    opacity: 0.9;
}

/* Native indicator fills the field so the whole control opens the picker */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit {
    padding: 0.1rem 0;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

input[type="date"]::-webkit-datetime-edit-text,
input[type="time"]::-webkit-datetime-edit-text {
    color: var(--muted);
    padding: 0 0.2rem;
}

input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus,
input[type="time"]::-webkit-datetime-edit-hour-field:focus,
input[type="time"]::-webkit-datetime-edit-minute-field:focus,
input[type="time"]::-webkit-datetime-edit-ampm-field:focus {
    background: rgba(5, 66, 57, 0.12);
    color: var(--forest-deep);
    outline: none;
    border-radius: 3px;
}

/* —— Buttons —— */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.35rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(180deg, var(--forest-soft), var(--forest));
    color: #fff;
    box-shadow: 0 4px 14px rgba(5, 66, 57, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(180deg, var(--forest), var(--forest-deep));
}

.btn-secondary {
    background: #fff;
    color: var(--forest);
    border: 1.5px solid var(--forest);
}

.btn-secondary:hover {
    background: var(--wheat);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.88rem;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.15rem;
}

.import-actions {
    gap: 0.75rem;
}

.import-actions__commit {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.import-actions__label {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
}

.import-actions__select {
    width: 12.5rem;
    margin: 0;
}

.import-actions .btn {
    flex: 0 0 auto;
    white-space: nowrap;
    writing-mode: horizontal-tb;
}

/* —— Alerts —— */
.alert {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.15rem;
    font-weight: 400;
}

.alert-error {
    background: #fde8e8;
    color: var(--danger);
    border: 1px solid #f5c2c2;
}

.alert-warning {
    background: #fef3cd;
    color: var(--warning);
    border: 1px solid #ffe69c;
}

.alert-success {
    background: #d1e7dd;
    color: var(--success);
    border: 1px solid #a3cfbb;
}

/* —— Results —— */
.result-grid {
    display: grid;
    gap: 0;
}

.result-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.65rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.result-row:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 700;
    color: var(--muted);
    font-size: 0.92rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.badge-found {
    background: #d1e7dd;
    color: var(--success);
}

.badge-not-found {
    background: #e9ecef;
    color: var(--muted);
}

.badge-warning {
    background: #fef3cd;
    color: var(--warning);
}

/* —— Tables —— */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th, td {
    padding: 0.75rem 0.65rem;
    text-align: right;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

th {
    background: var(--wheat);
    color: var(--forest);
    font-weight: 700;
}

tr:hover td {
    background: rgba(237, 235, 224, 0.35);
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    margin-bottom: 0.25rem;
}

.table-responsive > table {
    margin: 0;
}

@media (max-width: 900px) {
    .table-responsive:not(.table-responsive--stacked) {
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        background:
            linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) left center / 1.5rem 100% no-repeat,
            linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) right center / 1.5rem 100% no-repeat,
            linear-gradient(to left, rgba(5, 66, 57, 0.12), rgba(255, 255, 255, 0)) left center / 0.75rem 100% no-repeat,
            linear-gradient(to right, rgba(5, 66, 57, 0.12), rgba(255, 255, 255, 0)) right center / 0.75rem 100% no-repeat;
        background-attachment: local, local, scroll, scroll;
    }

    .table-responsive:not(.table-responsive--stacked) th,
    .table-responsive:not(.table-responsive--stacked) td {
        white-space: nowrap;
    }

    .table-responsive:not(.table-responsive--stacked) td.cell-wrap,
    .table-responsive:not(.table-responsive--stacked) th.cell-wrap {
        white-space: normal;
        min-width: 12rem;
        max-width: 18rem;
    }
}

@media (max-width: 700px) {
    .table-responsive--stacked {
        overflow: visible;
        border: none;
        background: none;
    }

    .table-responsive--stacked table,
    .table-responsive--stacked thead,
    .table-responsive--stacked tbody,
    .table-responsive--stacked th,
    .table-responsive--stacked td,
    .table-responsive--stacked tr {
        display: block;
        width: 100%;
    }

    .table-responsive--stacked thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .table-responsive--stacked tr {
        background: #fff;
        border: 1.5px solid var(--border);
        border-radius: var(--radius-sm);
        margin-bottom: 0.75rem;
        padding: 0.35rem 0.85rem;
        box-shadow: 0 2px 8px rgba(5, 66, 57, 0.04);
    }

    .table-responsive--stacked tr:hover td {
        background: transparent;
    }

    .table-responsive--stacked td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.85rem;
        border-bottom: 1px solid var(--border);
        padding: 0.65rem 0;
        text-align: start;
        white-space: normal;
    }

    .table-responsive--stacked td:last-child {
        border-bottom: none;
    }

    .table-responsive--stacked td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--forest);
        flex: 0 1 38%;
        max-width: 9rem;
    }

    .table-responsive--stacked td > :not(.check-label) {
        flex: 1 1 auto;
        text-align: start;
        min-width: 0;
    }

    .table-responsive--stacked td.col-check,
    .table-responsive--stacked td[data-label=""] {
        justify-content: flex-start;
    }

    .table-responsive--stacked td.col-check::before,
    .table-responsive--stacked td[data-label=""]::before {
        content: none;
    }

    .table-responsive--stacked td[colspan] {
        display: block;
        text-align: center;
        color: var(--muted);
    }

    .table-responsive--stacked td[colspan]::before {
        content: none;
    }

    .table-responsive--stacked .btn-group {
        margin-top: 0;
        justify-content: flex-start;
        width: 100%;
    }
}

/* —— Nav / footer —— */
.nav {
    margin-bottom: 1.5rem;
}

.nav a {
    color: var(--forest);
    text-decoration: none;
    font-weight: 700;
}

.nav a:hover {
    text-decoration: underline;
}

.site-footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 300;
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

/* —— Admin shell —— */
.admin-header {
    background: linear-gradient(135deg, var(--forest-deep) 0%, var(--forest) 55%, var(--forest-soft) 100%);
    color: #fff;
    padding: 0.95rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    box-shadow: 0 4px 20px rgba(3, 48, 42, 0.28);
}

.admin-header a {
    color: #fff;
    text-decoration: none;
}

.admin-header .brand {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
}

.admin-header nav {
    display: flex;
    gap: 0.35rem 1.1rem;
    flex-wrap: wrap;
}

.admin-header nav a {
    opacity: 0.88;
    font-weight: 400;
    font-size: 0.95rem;
    padding: 0.2rem 0;
    border-bottom: 2px solid transparent;
}

.admin-header nav a:hover {
    opacity: 1;
    border-bottom-color: rgba(255, 255, 255, 0.55);
}

.admin-header .user-chip {
    background: rgba(255, 255, 255, 0.12);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 400;
}

.admin-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 3rem;
}

.admin-main .card {
    margin-bottom: 1.25rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.stat {
    background: linear-gradient(160deg, #fff 0%, var(--wheat) 100%);
    padding: 1.15rem 1rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--forest);
    line-height: 1.2;
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 300;
    margin-top: 0.2rem;
}

.status {
    font-weight: 700;
}

.status-READY { color: #0d6efd; }
.status-COMPLETED { color: var(--success); }
.status-FAILED { color: var(--danger); }
.status-PROCESSING,
.status-VALIDATING { color: var(--warning); }

dl.meta {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0.45rem 1rem;
    margin: 0;
}

dl.meta dt {
    font-weight: 700;
    color: var(--muted);
}

dl.meta dd {
    margin: 0;
}

form.inline {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    vertical-align: middle;
}

form.inline .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.select2--sm,
.import-actions .select2-container {
    width: 12.5rem !important;
    max-width: 100%;
    flex: 0 0 auto;
}

.select2--sm .select2-selection--single,
.import-actions .select2-container--default .select2-selection--single {
    height: 2.35rem;
    min-height: 2.35rem;
}

.select2--sm .select2-selection--single .select2-selection__rendered,
.import-actions .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(2.35rem - 3px) !important;
    font-size: 0.9rem;
    padding-inline: 0.75rem 2.4rem !important;
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1.5px solid var(--border-strong);
}

.btn-ghost:hover {
    background: var(--wheat);
    color: var(--forest-deep);
    border-color: var(--forest);
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 0.85rem 0.75rem;
    align-items: end;
}

.filter-grid .field {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.filter-grid .field label {
    margin-bottom: 0;
    min-height: 1.35rem;
    line-height: 1.35rem;
}

.filter-grid input[type="text"],
.filter-grid select,
.filter-grid .btn-filter {
    height: 2.75rem;
    min-height: 2.75rem;
    margin: 0;
    box-sizing: border-box;
}

.filter-grid input[type="text"],
.filter-grid select {
    padding-top: 0;
    padding-bottom: 0;
    padding-inline: 0.85rem;
    line-height: 1.25;
}

.filter-actions {
    display: flex;
    align-items: end;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.filter-actions .btn-filter {
    padding-inline: 1.1rem;
    white-space: nowrap;
}

.filter-actions .btn-primary.btn-filter {
    box-shadow: 0 3px 10px rgba(5, 66, 57, 0.2);
}

@media (max-width: 900px) {
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }

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

    .filter-actions .btn-filter {
        width: 100%;
    }
}

.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-toolbar h1 {
    margin: 0;
}

.bulk-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--wheat);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.bulk-count {
    color: var(--forest-deep);
    margin-inline-end: 0.25rem;
}

.col-check {
    width: 2.5rem;
    text-align: center;
    vertical-align: middle;
}

.check-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
}

.check-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    accent-color: var(--forest);
    cursor: pointer;
}

tr:has(.row-check:checked) td {
    background: rgba(5, 66, 57, 0.06);
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.88em;
    background: var(--wheat);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

/* —— Public inquiry composition —— */
.inquiry-page {
    max-width: 640px;
    padding-top: 2.75rem;
    padding-bottom: 3.5rem;
}

.inquiry-hero {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    animation: inquiry-fade-in 0.55s ease both;
}

.inquiry-brand {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.inquiry-logo {
    width: min(100%, 340px);
    height: auto;
    display: block;
    margin-bottom: 0.35rem;
    filter: drop-shadow(0 4px 16px rgba(5, 66, 57, 0.1));
}

.inquiry-eyebrow {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--forest);
    letter-spacing: 0.04em;
}

.inquiry-title {
    margin: 0;
    font-size: clamp(1.55rem, 4vw, 2rem);
    color: var(--forest-deep);
    line-height: 1.35;
    max-width: 18ch;
}

.inquiry-lead {
    margin: 0;
    color: var(--muted);
    font-weight: 300;
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 32rem;
}

.inquiry-card {
    padding: 1.75rem 1.6rem 1.6rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border-color: rgba(5, 66, 57, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 249, 245, 0.98) 100%);
    animation: inquiry-rise 0.6s ease 0.08s both;
    overflow: visible;
}

.inquiry-form {
    overflow: visible;
}

.card {
    overflow: visible;
}

.inquiry-form .field {
    margin-bottom: 1.25rem;
}

.inquiry-form select,
.inquiry-form input[type="text"] {
    min-height: 3rem;
    border-radius: 10px;
    font-size: 1.02rem;
}

.inquiry-actions {
    margin-top: 1.5rem;
}

.btn-inquiry {
    width: 100%;
    min-height: 3.1rem;
    font-size: 1.08rem;
    border-radius: 10px;
    letter-spacing: 0.02em;
}

.inquiry-result {
    margin-top: 1.35rem;
    animation: inquiry-rise 0.45s ease both;
}

.result-header {
    margin-bottom: 1rem;
}

.result-message {
    margin: 0;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.7;
}

@keyframes inquiry-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes inquiry-rise {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .inquiry-hero,
    .inquiry-card,
    .inquiry-result {
        animation: none;
    }
}

@media (max-width: 560px) {
    .inquiry-page {
        padding-top: 1.75rem;
    }

    .inquiry-logo {
        width: min(100%, 260px);
    }

    .inquiry-card {
        padding: 1.35rem 1.15rem;
    }
}

/* —— Select2 theme (matches app design) —— */
.select2-container {
    font-family: var(--font);
    z-index: 1;
}

.select2-container--default .select2-selection--single {
    height: 3rem;
    min-height: 3rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    position: relative;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Vertically center placeholder + selected value via line-height = inner height */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    display: block;
    height: 100%;
    line-height: calc(3rem - 3px) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-inline: 0.9rem 2.9rem !important;
    margin: 0;
    color: var(--charcoal);
    font-size: 1rem;
    text-align: start;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #9a958a;
    font-weight: 300;
    line-height: inherit;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    left: 0.45rem;
    right: auto;
    width: 1.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    top: 50%;
    left: 50%;
    margin: 0;
    border-color: var(--forest) transparent transparent transparent;
    border-width: 6px 5px 0 5px;
    transform: translate(-50%, -35%);
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--forest) transparent;
    border-width: 0 5px 6px 5px;
    transform: translate(-50%, -65%);
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    left: 2rem;
    right: auto;
    top: 50% !important;
    transform: translateY(-50%);
    margin: 0 !important;
    float: none !important;
    height: auto;
    line-height: 1 !important;
    color: var(--muted);
    font-weight: 700;
    font-size: 1.15rem;
    z-index: 2;
}

.select2-container--default .select2-results__option {
    text-align: start;
    padding: 0.7rem 0.9rem;
    line-height: 1.4;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--forest);
    box-shadow: 0 0 0 3px rgba(5, 66, 57, 0.14);
    outline: none;
}

.select2-container--default .select2-dropdown {
    border: 1.5px solid var(--forest);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    overflow: hidden;
    z-index: 99999 !important;
}

.select2-container--open {
    z-index: 99999 !important;
}

.select2-container--open .select2-dropdown {
    z-index: 99999 !important;
}

/* Keep open dropdowns above cards / overlapping content */
.field,
.picker-field,
.filter-grid > div {
    position: relative;
}

.field .select2-container,
.picker-field .select2-container,
.filter-grid .select2-container {
    z-index: 2;
}

.field .select2-container--open,
.picker-field .select2-container--open,
.filter-grid .select2-container--open {
    z-index: 99999 !important;
}

.field .select2-dropdown,
.picker-field .select2-dropdown,
.filter-grid .select2-dropdown {
    z-index: 99999 !important;
}

.select2-container--default .select2-search--dropdown {
    padding: 0.65rem;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    font-family: var(--font);
    outline: none;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--forest);
}

.select2-container--default .select2-results__option {
    padding: 0.65rem 0.9rem;
    font-size: 0.98rem;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--forest);
    color: #fff;
}

.select2-container--default .select2-results__option--selected {
    background: var(--wheat);
    color: var(--forest-deep);
}

.select2-container--default .select2-results__option--selected.select2-results__option--highlighted {
    background: var(--forest);
    color: #fff;
}

/* Filter bar: match 2.75rem control height */
.filter-grid .select2-container--default .select2-selection--single,
.select2--filter .select2-selection--single {
    height: 2.75rem;
    min-height: 2.75rem;
}

.filter-grid .select2-container--default .select2-selection--single .select2-selection__rendered,
.select2--filter .select2-selection--single .select2-selection__rendered {
    line-height: calc(2.75rem - 3px) !important;
    font-size: 0.98rem;
}

.inquiry-form .select2-container--default .select2-selection--single {
    height: 3rem;
    min-height: 3rem;
    border-radius: 10px;
}

.inquiry-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(3rem - 3px) !important;
}

.field .select2-container {
    margin-bottom: 0;
}
