/*
 * Tebarval Filo Portalı — theme stylesheet (Task 6.1)
 *
 * ============================================================================
 * BRAND PALETTE — SWAP THESE VALUES FOR TEBARVAL'S REAL BRAND PALETTE.
 * ============================================================================
 * Every themeable color in this file is referenced through the CSS custom
 * properties below. The values here are a neutral, professional corporate
 * slate/blue placeholder chosen because the real Tebarval logo/hex palette
 * has not been provided yet (MIMARI.md notes it as pending from Selman).
 *
 * To apply the real brand later:
 *   1. Replace the --brand-* and --logo-* values in :root with Tebarval's
 *      real colors (and update the logo, see resources/views/partials/nav.blade.php).
 *   2. Nothing else in this file (or any view) needs to change — every
 *      component below (nav, buttons, badges, cards, tables, links) reads
 *      color from these variables only.
 * ============================================================================
 */
:root {
    /* --- Brand (swap these) ------------------------------------------- */
    --brand-primary: #1e3a5f;       /* header / primary actions */
    --brand-primary-dark: #142943;  /* hover/active state of primary */
    --brand-secondary: #2f6690;     /* links, secondary accents */
    --brand-accent: #3fa7d6;        /* highlights, focus rings */

    /* --- Logo placeholder (swap for the real mark) ---------------------- */
    --logo-bg: var(--brand-primary);
    --logo-fg: #ffffff;

    /* --- Neutrals (rarely need to change) ------------------------------- */
    --color-bg: #f4f6f8;
    --color-surface: #ffffff;
    --color-border: #dde3ea;
    --color-text: #1f2937;
    --color-text-muted: #5b6b7c;
    --color-text-inverse: #ffffff;

    /* --- Status colors (fleet + ticket badges) -------------------------- */
    --status-active-bg: #e3f6e8;
    --status-active-fg: #1a7d3c;
    --status-passive-bg: #eceef1;
    --status-passive-fg: #5b6b7c;
    --status-no-signal-bg: #fdf0d9;
    --status-no-signal-fg: #a3620a;
    --status-danger-bg: #fbe4e4;
    --status-danger-fg: #b3261e;
    --status-info-bg: #e3edf7;
    --status-info-fg: #1e3a5f;
    --status-uetds-bg: #ece4f7;
    --status-uetds-fg: #5b2a9e;

    /* --- Layout tokens ---------------------------------------------------*/
    --radius-sm: 4px;
    --radius-md: 8px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
    --header-height: 64px;
    --content-max-width: 1180px;
}

/* ============================================================================
 * Reset / base
 * ==========================================================================*/
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    color: var(--color-text);
    line-height: 1.25;
    margin: 0 0 0.6em;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

a {
    color: var(--brand-secondary);
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

p {
    margin: 0 0 1em;
}

ul, dl {
    margin: 0 0 1em;
    padding-left: 1.25em;
}

dl {
    padding-left: 0;
}

dt {
    font-weight: 600;
    color: var(--color-text-muted);
    margin-top: 0.75em;
}

dd {
    margin: 0.15em 0 0;
}

/* ============================================================================
 * Header / brand / nav
 * ==========================================================================*/
.app-header {
    background: var(--brand-primary);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-header__bar {
    max-width: var(--content-max-width);
    margin: 0 auto;
    min-height: var(--header-height);
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-text-inverse);
}

.app-brand:hover,
.app-brand:focus {
    text-decoration: none;
    opacity: 0.92;
}

/*
 * Logo placeholder — a styled text mark standing in for the real Tebarval
 * logo file. To replace with the real asset once provided:
 *   1. Drop the logo file in public/ (e.g. public/img/logo.svg).
 *   2. In resources/views/partials/nav.blade.php, swap the
 *      <span class="app-logo-placeholder"> block for
 *      <img src="{{ asset('img/logo.svg') }}" alt="Tebarval" class="app-logo">.
 * No other markup or CSS needs to change.
 */
.app-logo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--logo-bg);
    color: var(--logo-fg);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
}

.app-logo {
    height: 52px;
    width: auto;
    display: block;
    background: #fff;              /* logo is on a white ground; keep it legible on the dark header */
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.app-brand__name {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.app-brand__tagline {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile nav toggle (checkbox-driven, no JS dependency) */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    color: var(--color-text-inverse);
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.app-nav__links {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-nav__links a {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.3rem 0.1rem;
    border-bottom: 2px solid transparent;
}

.app-nav__links a:hover,
.app-nav__links a:focus {
    color: var(--color-text-inverse);
    text-decoration: none;
    border-bottom-color: var(--brand-accent);
}

.app-nav__links a.is-active {
    color: var(--color-text-inverse);
    border-bottom-color: var(--brand-accent);
}

.app-nav__meta {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

/* ----------------------------------------------------------------------------
 * Header dropdown menus (language + user) — click-to-open, script in layout.
 * One .menu wraps a .menu__trigger button and a .menu__panel popover.
 * ------------------------------------------------------------------------- */
.menu {
    position: relative;
    display: inline-flex;
}

.menu__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font: inherit;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.menu__trigger:hover,
.menu__trigger[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
}

.menu__trigger:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 2px;
}

/* Caret rotates when the menu is open */
.menu__caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.75);
    transition: transform 0.12s ease;
}

.menu__trigger[aria-expanded="true"] .menu__caret {
    transform: rotate(180deg);
}

/* Language trigger shows the short code (TR / EN) in caps */
.lang-trigger__code {
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* User trigger: circular initials avatar + name */
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--brand-accent);
    color: #082033;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
}

.user-trigger__name {
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The popover panel */
.menu__panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 12rem;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(15, 30, 50, 0.18);
    padding: 0.35rem;
    z-index: 40;
    animation: menu-pop 0.12s ease-out;
}

.menu__panel--compact {
    min-width: 8rem;
}

.menu__panel[hidden] {
    display: none;
}

@keyframes menu-pop {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header block: name + role, above the actions */
.menu__header {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.5rem 0.6rem 0.55rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--color-border);
}

.menu__header-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}

.menu__header-role {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.menu__header-email {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    word-break: break-all;
}

/* Menu items — both <a> and <button> render identically */
.menu__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font: inherit;
    font-size: 0.88rem;
    padding: 0.5rem 0.6rem;
    cursor: pointer;
}

.menu__item:hover,
.menu__item:focus {
    background: var(--color-bg);
    text-decoration: none;
    color: var(--color-text);
}

.menu__item.is-active {
    color: var(--brand-secondary);
    font-weight: 600;
}

.menu__item--danger {
    color: var(--status-danger-fg);
}

.menu__item--danger:hover,
.menu__item--danger:focus {
    background: var(--status-danger-bg);
    color: var(--status-danger-fg);
}

.menu__check {
    color: var(--brand-secondary);
    font-size: 0.8rem;
}

.menu__panel form {
    margin: 0;
}

/* ============================================================================
 * Layout shell
 * ==========================================================================*/
.app-main {
    flex: 1;
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 1.75rem 1.25rem 3rem;
}

.app-flash {
    background: var(--status-info-bg);
    color: var(--status-info-fg);
    border: 1px solid var(--brand-accent);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
}

/* Attention-drawing standing reminder that ticket updates are e-mailed and
   to check the spam folder. Shown on the ticket list, each ticket detail
   page and the new-ticket form (<x-mail-notice>). Amber "notice" tone with
   an accent bar so it reads as a call-out, not a passive hint. */
.mail-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    background: var(--status-no-signal-bg);
    color: var(--status-no-signal-fg);
    border: 1px solid var(--status-no-signal-fg);
    border-left-width: 5px;
    border-radius: var(--radius-md);
    padding: 0.85rem 1.1rem;
    margin: 0 0 1.4rem;
    font-size: 0.92rem;
    line-height: 1.55;
}

.mail-notice__icon {
    font-size: 1.25rem;
    line-height: 1.3;
    flex-shrink: 0;
}

.mail-notice__text strong {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.98rem;
}

/* Inline "undo/delete" control under an admin's own message in the thread. */
.message-undo {
    margin: 0.25rem 0 0;
}

.btn-link-danger {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.82rem;
    color: var(--status-danger-fg);
    cursor: pointer;
    text-decoration: underline;
}

.btn-link-danger:hover {
    opacity: 0.8;
}

.app-errors {
    background: var(--status-danger-bg);
    color: var(--status-danger-fg);
    border: 1px solid var(--status-danger-fg);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem 0.7rem 1.5rem;
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
}

.app-errors ul {
    margin: 0;
    padding-left: 1rem;
}

.app-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 1rem 1.25rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.app-footer__inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

/* ============================================================================
 * Cards / surfaces
 * ==========================================================================*/
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card--narrow {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.card--narrow h1 {
    text-align: center;
}

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

.page-header h1 {
    margin: 0;
}

.page-header__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Horizontal filter bar: fields sit side by side, wrapping on narrow screens */
.filter-bar {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.filter-bar__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    min-width: 0;
}

.filter-bar__field input,
.filter-bar__field select {
    min-width: 11rem;
    /* Same fixed height the searchable-select control is pinned to below,
     * so native and Tom Select filters share one baseline (no Y drift). */
    height: calc(0.92rem * 1.4 + 1rem + 2px);
    line-height: 1.4;
}

.filter-bar__actions {
    display: flex;
    align-items: flex-end;
}

/* Deactivated (soft-removed) vehicle rows read as muted */
.is-inactive-row {
    opacity: 0.6;
}

/* Small helper text under a form field / section */
.form-hint {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin: 0.5rem 0 0;
}

/* Inline checkbox + label row (e.g. the UETDS flag on the vehicle form) */
.checkbox-field label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-field .form-hint {
    margin-top: 0.25rem;
}

/* Secondary heading inside a card */
.card__subtitle {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

/* Read-only key/value list (e.g. vehicle device info) */
.detail-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1rem;
    margin: 0;
}

.detail-list dt {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.detail-list dd {
    margin: 0;
    color: var(--color-text);
}

/* Numbered steps (e.g. import instructions) */
.steps {
    margin: 0 0 0.75rem;
    padding-left: 1.2rem;
    color: var(--color-text);
    line-height: 1.7;
}

/* ============================================================================
 * Buttons
 * ==========================================================================*/
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--brand-primary);
    color: var(--color-text-inverse);
    border: 1px solid var(--brand-primary);
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}

.btn:hover,
.btn:focus {
    background: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
    color: var(--color-text-inverse);
    text-decoration: none;
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--brand-primary);
    border-color: var(--color-border);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--color-bg);
    color: var(--brand-primary-dark);
    border-color: var(--brand-secondary);
}

.btn-link {
    background: none;
    border: none;
    color: var(--brand-secondary);
    padding: 0;
    font-weight: 600;
    text-decoration: underline;
}

.btn-danger {
    background: var(--status-danger-fg);
    border-color: var(--status-danger-fg);
}

.btn-danger:hover,
.btn-danger:focus {
    background: #8f1d17;
    border-color: #8f1d17;
}

/* ============================================================================
 * Forms
 * ==========================================================================*/
form .field,
form > div {
    margin-bottom: 1rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 0.3rem;
}

label input[type="checkbox"] {
    margin-right: 0.4rem;
    vertical-align: middle;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="datetime-local"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    max-width: 480px;
    padding: 0.5rem 0.65rem;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

textarea {
    min-height: 5.5rem;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(63, 167, 214, 0.25);
}

fieldset {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin: 0 0 1.25rem;
}

legend {
    font-weight: 700;
    color: var(--brand-primary);
    padding: 0 0.4rem;
}

.help-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.3rem;
}

.form-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
}

/* ============================================================================
 * Tables
 * ==========================================================================*/
.table-wrap {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead th {
    text-align: left;
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

tbody td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--color-bg);
}

/* ============================================================================
 * Status / ticket badges
 * ==========================================================================*/
.status-badge {
    display: inline-block;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.status-active {
    background: var(--status-active-bg);
    color: var(--status-active-fg);
}

.status-passive {
    background: var(--status-passive-bg);
    color: var(--status-passive-fg);
}

.status-no_signal {
    background: var(--status-no-signal-bg);
    color: var(--status-no-signal-fg);
}

.status-uetds {
    background: var(--status-uetds-bg);
    color: var(--status-uetds-fg);
    margin-left: 0.35rem;
}

/* Ticket status badges (workflow states) share the same visual language,
   grouped by meaning rather than one color per code. */
.status-acik,
.status-incelemede {
    background: var(--status-info-bg);
    color: var(--status-info-fg);
}

.status-onaylandi,
.status-randevu {
    background: var(--status-no-signal-bg);
    color: var(--status-no-signal-fg);
}

.status-tamamlandi,
.status-kapali {
    background: var(--status-active-bg);
    color: var(--status-active-fg);
}

.status-reddedildi,
.status-iptal {
    background: var(--status-danger-bg);
    color: var(--status-danger-fg);
}

/* ============================================================================
 * Misc utility
 * ==========================================================================*/
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.visually-hidden:focus {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    width: auto;
    height: auto;
    padding: 0.5rem 0.9rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    background: var(--color-surface);
    color: var(--brand-primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 50;
}

.text-muted {
    color: var(--color-text-muted);
}

.empty-state {
    color: var(--color-text-muted);
    font-style: italic;
}

.pagination-wrap {
    margin-top: 1rem;
}

.timeline {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.timeline li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.88rem;
}

.timeline li:last-child {
    border-bottom: none;
}

.message-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.message-list li {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 0.6rem;
}

.message-list li p {
    margin: 0.4rem 0 0;
}

.badge-internal {
    color: var(--status-danger-fg);
    font-size: 0.78rem;
    font-style: italic;
}

/* ============================================================================
 * Responsive
 * ==========================================================================*/
@media (max-width: 780px) {
    .nav-toggle-label {
        display: inline-flex;
        align-items: center;
    }

    .app-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.9rem;
        padding-top: 0.75rem;
    }

    .nav-toggle:checked ~ .app-nav {
        display: flex;
    }

    .app-nav__links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .app-header__bar {
        padding: 0.6rem 1rem;
    }

    .app-main {
        padding: 1.25rem 1rem 2.5rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="datetime-local"],
    input[type="date"],
    select,
    textarea {
        max-width: 100%;
    }
}

/* ============================================================================
 * Tom Select (searchable-select component) — themed to match native inputs
 * so the searchable firm/opener dropdowns look identical to the plain
 * <select> filters next to them (same border, radius, focus ring, colors).
 * ==========================================================================*/

/* The label wraps <span> + the Tom Select wrapper; make it behave exactly
 * like a native .filter-bar__field (column layout, bottom-aligned) so the
 * searchable dropdown lines up with the plain selects next to it. */
.filter-bar__field.searchable-select {
    justify-content: flex-end;
}

.searchable-select .ts-wrapper {
    min-width: 11rem;
    width: 100%;
    margin: 0;
}

/* Pin the Tom Select control to the EXACT height of a native select in the
 * filter bar so the searchable dropdowns line up on the same baseline as
 * the plain <select>s next to them (no Y-axis drift). A native select here
 * is 0.5rem*2 padding + ~0.92rem*1.4 line + 2px border. We fix that height
 * and vertically-center the inner content instead of relying on padding,
 * which Tom Select's flex input computed slightly taller. */
.searchable-select .ts-wrapper.single .ts-control {
    box-sizing: border-box;
    height: calc(0.92rem * 1.4 + 1rem + 2px);
    min-height: 0;
    padding: 0 0.65rem;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    font-size: 0.92rem;
    font-family: inherit;
    line-height: 1.4;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

.searchable-select .ts-wrapper.single .ts-control > * {
    /* Items and the text input sit on one centered line, no vertical margin
     * that would nudge the box taller. */
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.searchable-select .ts-control input,
.searchable-select .ts-control .item {
    color: var(--color-text);
    font-size: 0.92rem;
}

.searchable-select .ts-control input::placeholder,
.searchable-select .ts-control > input::placeholder {
    color: var(--color-text-muted);
    opacity: 1;
}

/* Focus ring identical to native input/select:focus above. */
.searchable-select .ts-wrapper.focus .ts-control {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(63, 167, 214, 0.25);
}

/* Dropdown panel + options */
.ts-dropdown {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    color: var(--color-text);
    margin-top: 2px;
}

.ts-dropdown .option {
    padding: 0.5rem 0.65rem;
    color: var(--color-text);
}

/* The blank "reset" option (e.g. "Tümü") reads muted — it's the
 * no-filter row, visually distinct from the real choices below it. */
.ts-dropdown .option[data-value=""] {
    color: var(--color-text-muted);
}

.ts-dropdown .option.active {
    background: var(--brand-secondary);
    color: var(--color-text-inverse);
}

.ts-dropdown .no-results {
    color: var(--color-text-muted);
    padding: 0.5rem 0.65rem;
}

/* Placeholder text (empty option) reads muted like a native placeholder. */
.searchable-select .ts-control .ts-placeholder {
    color: var(--color-text-muted);
}
