/* DECA386 — small layer over Filament (no build step: plain CSS). */
:root { --deca-btn-radius: 4px; }
.fi-btn, .fi-icon-btn, .deca-btn { border-radius: var(--deca-btn-radius) !important; }

.deca-link { color: var(--primary-600); text-decoration: underline; font-size: .85rem; }
.deca-pw-checklist { list-style: none; margin: .25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .8rem; font-weight: 600; }

/* Superadmin acting inside an account */
.deca-acting { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .5rem 1rem; color: #111827; font-weight: 600; font-size: .9677rem;
  background: repeating-linear-gradient(-45deg, #facc15, #facc15 14px, #fde047 14px, #fde047 28px); border-bottom: 2px solid #a16207; }
.deca-acting form { display: inline; margin: 0; }
.deca-acting .deca-btn { display: inline-block; padding: .25rem .75rem; font-size: .8rem; font-weight: 700; color: #fff; border: 0; cursor: pointer; text-decoration: none; }
.deca-btn-purple { background: #6b21a8; }
.deca-btn-dark { background: #111827; }

/* Cards and tables of the custom pages */
.deca-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.deca-grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .deca-grid-2 { grid-template-columns: 1fr; } }
.deca-stat { background: var(--deca-surface, #fff); border-radius: .75rem; padding: 1rem; box-shadow: 0 1px 2px rgb(0 0 0 / .06); border: 1px solid rgb(0 0 0 / .06); }
.dark .deca-stat { background: rgb(255 255 255 / .05); border-color: rgb(255 255 255 / .1); }
.deca-stat-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.deca-stat-value { font-size: 1.6rem; font-weight: 700; }
.deca-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.deca-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; opacity: .7; padding: .4rem .5rem; border-bottom: 1px solid rgb(0 0 0 / .1); }
.deca-table td { padding: .4rem .5rem; border-bottom: 1px solid rgb(0 0 0 / .06); vertical-align: middle; }
.deca-table td.num, .deca-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.deca-table tr.total td { font-weight: 700; border-top: 2px solid rgb(0 0 0 / .15); }
.dark .deca-table th, .dark .deca-table td { border-color: rgb(255 255 255 / .1); }
.deca-muted { opacity: .65; font-size: .8rem; }
.deca-badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.deca-badge-red { background: #fee2e2; color: #991b1b; }
.deca-badge-amber { background: #fef3c7; color: #92400e; }
.deca-badge-green { background: #dcfce7; color: #166534; }
.deca-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.deca-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }

/* Usage bars of the plan limits */
.deca-usage { display: grid; gap: .6rem; }
.deca-usage-row { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr auto; gap: .75rem; align-items: center; font-size: .85rem; }
.deca-bar { height: .6rem; border-radius: 999px; background: rgb(0 0 0 / .08); overflow: hidden; }
.deca-bar > span { display: block; height: 100%; border-radius: 999px; }
.deca-bar-green { background: #16a34a; } .deca-bar-amber { background: #f59e0b; } .deca-bar-red { background: #dc2626; }

/* Logo of the access screens: shown at 75 % (max 165×72 px) */
.deca-login-logo { max-width: 165px; max-height: 72px; width: auto; height: auto; }

/* Active company (top bar) */
.deca-switcher { display: flex; align-items: center; gap: .5rem; margin-inline-end: .75rem; font-size: .85rem; }
.deca-switcher-label { opacity: .65; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.deca-switcher select { border: 1px solid rgb(0 0 0 / .15); border-radius: .5rem; padding: .3rem 2rem .3rem .6rem; background-color: transparent; font-weight: 600; max-width: 260px; }
.dark .deca-switcher select { border-color: rgb(255 255 255 / .2); color: #fff; }
.dark .deca-switcher select option { color: #111; }
.deca-switcher-one { font-weight: 700; }
@media (max-width: 640px) { .deca-switcher-label { display: none; } .deca-switcher select { max-width: 150px; } }

/* ---------- Theme (variables written per account / user by ThemeCss) ---------- */
.fi-body { background: var(--deca-body, var(--gray-50)) !important; color: var(--deca-text, inherit); }
.fi-simple-layout, .fi-simple-main-ctn { background: var(--deca-body, transparent); }
.fi-simple-main { background: var(--deca-surface, #fff) !important; }
.fi-sidebar, .fi-sidebar-header, .fi-sidebar.fi-sidebar-open { background: var(--deca-sidebar-bg, #fff) !important; }
.fi-sidebar .fi-sidebar-header, .fi-sidebar .fi-sidebar-nav { background: transparent !important; box-shadow: none !important; }
.fi-sidebar .fi-sidebar-item-label, .fi-sidebar .fi-sidebar-group-label, .fi-sidebar .fi-sidebar-item-icon,
.fi-sidebar .fi-icon, .fi-sidebar .fi-logo, .fi-sidebar .fi-sidebar-group-btn, .fi-sidebar .fi-icon-btn { color: var(--deca-sidebar-text) !important; }
.fi-sidebar .fi-sidebar-group-label { opacity: .75; }
.fi-sidebar .fi-sidebar-item-btn:hover { background: color-mix(in srgb, var(--deca-sidebar-text) 10%, transparent) !important; }
.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background: var(--deca-sidebar-active) !important; }
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label, .fi-sidebar .fi-sidebar-item.fi-active .fi-icon { color: var(--deca-sidebar-active-text) !important; }
.fi-sidebar .fi-badge { box-shadow: none; }
.fi-topbar, .fi-topbar-ctn > .fi-topbar { background: var(--deca-topbar) !important; color: var(--deca-topbar-text); }
.fi-topbar .fi-icon-btn, .fi-topbar .fi-icon, .fi-topbar .fi-logo, .fi-topbar .deca-switcher, .fi-topbar .deca-switcher select { color: var(--deca-topbar-text) !important; }
.fi-topbar .deca-switcher select { border-color: color-mix(in srgb, var(--deca-topbar-text) 30%, transparent); }
.fi-topbar .deca-switcher select option { color: #111; background: #fff; }
.fi-topbar .fi-global-search-field .fi-input-wrp { background: color-mix(in srgb, var(--deca-topbar-text) 6%, var(--deca-topbar)) !important; }
.fi-section, .fi-ta-ctn, .fi-modal-window, .fi-dropdown-panel, .fi-wi-stats-overview-stat, .fi-tabs:not(.fi-contained),
.fi-fo-tabs, .fi-sc-tabs, .fi-in-entry-wrp, .fi-pagination-records-per-page-select .fi-input-wrp { background-color: var(--deca-surface) !important; }
.fi-section, .fi-ta-ctn, .fi-modal-window, .fi-dropdown-panel { --tw-ring-color: var(--deca-border) !important; border-color: var(--deca-border) !important; }
.fi-ta-header-ctn, .fi-ta-content, .fi-ta-row, .fi-ta-header-cell, .fi-ta-cell { border-color: var(--deca-border) !important; }
.fi-ta-row:nth-child(even) { background: color-mix(in srgb, var(--deca-text) 2.5%, transparent); }
.fi-section-header-heading, .fi-header-heading, .fi-ta-header-heading { color: var(--deca-text); }
.fi-section-header-description, .fi-header-subheading, .fi-fo-field-wrp-helper-text { color: var(--deca-muted) !important; }
.fi-link, .deca-link { color: var(--deca-link, var(--primary-600)) !important; }

/* Action icons of the lists (colours of the account) */
.deca-ic { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--deca-btn-radius); }
.deca-ic-view { background: var(--color-view-bg, #1d4ed8); color: var(--color-view-fg, #fff); }
.deca-ic-edit { background: var(--color-edit-bg, #16a34a); color: var(--color-edit-fg, #fff); }
.deca-ic-delete { background: var(--color-delete-bg, #dc2626); color: var(--color-delete-fg, #fff); }
.deca-ic-print { background: var(--color-print-bg, #374151); color: var(--color-print-fg, #fff); }
.fi-icon-btn.deca-ic { width: 30px !important; height: 30px !important; }
.fi-icon-btn.deca-ic-view { background: var(--color-view-bg, #1d4ed8) !important; color: var(--color-view-fg, #fff) !important; }
.fi-icon-btn.deca-ic-edit { background: var(--color-edit-bg, #16a34a) !important; color: var(--color-edit-fg, #fff) !important; }
.fi-icon-btn.deca-ic-delete { background: var(--color-delete-bg, #dc2626) !important; color: var(--color-delete-fg, #fff) !important; }
.deca-ic-dup { background: #7c3aed; color: #fff; }
.fi-icon-btn.deca-ic-dup { background: #7c3aed !important; color: #fff !important; }
.fi-icon-btn.deca-ic-print { background: var(--color-print-bg, #374151) !important; color: var(--color-print-fg, #fff) !important; }
.fi-icon-btn.deca-ic .fi-icon { color: inherit !important; }

/* Transport sheets lists */
.deca-mark { font-size: 1.05rem; text-decoration: none; }
.deca-sent-mail { color: #dc2626; font-weight: 700; } .deca-sent-wa { color: #16a34a; font-weight: 700; }
.deca-changed { color: #d97706; font-weight: 700; }
.deca-old { color: #dc2626; text-decoration: line-through; font-size: .78rem; font-weight: 400; }
.deca-status-draft { background: #e5e7eb; color: #374151; } .deca-status-issued { background: #dbeafe; color: #1e40af; } .deca-status-completed { background: #111827; color: #fff; }
.deca-doc-done { color: #1d4ed8 !important; }
.deca-totals { font-weight: 700; padding: .5rem .75rem; font-size: .9677rem; }
.deca-issue-info ul { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .3rem .6rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.deca-issue-info li { display: flex; align-items: center; gap: .5rem; border: 1px solid rgb(0 0 0 / .08); border-radius: .5rem; padding: .35rem .6rem; line-height: 1.25; }
.deca-issue-info .deca-feat-dot { width: .6rem; height: .6rem; flex: none; border-radius: 2px; background: var(--deca-accent, #2563eb); }
.deca-issue-info .deca-callout-2 { margin-top: .5rem; }
.deca-red { color: #dc2626; font-weight: 800; }
.deca-callout { background: #fef3c7; color: #78350f; border-radius: .5rem; padding: .6rem .75rem; font-size: .85rem; }

/* Sheet view: green «DADES DEL TRANSPORT» block */
.deca-sheet { border: 2px solid #16a34a; border-radius: .75rem; background: var(--deca-surface, #fff); overflow: hidden; }
.dark .deca-sheet { background: rgb(255 255 255 / .03); }
.deca-sheet-band { background: #16a34a; color: #fff; font-weight: 800; letter-spacing: .04em; padding: .5rem 1rem; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.deca-kv { width: 100%; border-collapse: collapse; font-size: .9677rem; }
.deca-kv th { text-align: left; width: 38%; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; opacity: .7; padding: .35rem .5rem; vertical-align: top; border-bottom: 1px solid rgb(0 0 0 / .06); }
.deca-kv td { padding: .35rem .5rem; border-bottom: 1px solid rgb(0 0 0 / .06); }
.deca-danger { border: 3px solid #dc2626; border-radius: .75rem; padding: 1.5rem; background: var(--deca-surface, #fff); }
.dark .deca-danger { background: rgb(255 255 255 / .03); }
.deca-danger-title { color: #dc2626; font-weight: 900; font-size: 1.6rem; margin: .5rem 0; }
.deca-input { color: inherit; border: 1px solid color-mix(in srgb, var(--deca-text, #000) 25%, transparent); border-radius: .5rem; padding: .55rem .75rem; font-size: 1.05rem; background: transparent; }

/* Dashboard */
.deca-big-buttons { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.deca-big { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; border-radius: var(--deca-btn-radius); color: #fff; text-decoration: none; font-size: 1.05rem; box-shadow: 0 2px 6px rgb(0 0 0 / .12); }
.deca-big:hover { filter: brightness(1.08); }
.deca-big small { opacity: .85; font-size: .82rem; }
.deca-big-icon { font-size: 2rem; line-height: 1; }
.deca-big-new { background: var(--deca-accent, #dc2626); }
.deca-big-sheets { background: var(--primary-600, #1d4ed8); }
.deca-big-decas { background: #16a34a; }

/* Notices: preview and WhatsApp bubble */
.deca-alert { padding: .75rem 1rem; border-radius: .6rem; font-size: .9677rem; }
.deca-alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.deca-preview-title { font-size: .8rem; font-weight: 600; color: #64748b; margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .04em; }
.deca-mail-preview { border: 1px solid var(--deca-border, #e2e8f0); border-radius: .6rem; padding: .8rem 1rem; font-size: .9677rem; }
.deca-mail-preview div { white-space: pre-wrap; margin-top: .4rem; }
.deca-wa-mode { margin: .6rem 0 .35rem; font-size: .85rem; }
.deca-wa-bubble { background: #dcf8c6; color: #111b21; border-radius: 10px 10px 10px 2px; padding: .6rem .8rem; box-shadow: 0 1px 1px rgba(0,0,0,.08); font-size: .9677rem; white-space: pre-wrap; }
.deca-tpl-buttons { font-size: .8rem; border-top: 1px solid rgba(0,0,0,.12); margin-top: .4rem; padding-top: .3rem; }

/* ---------- Statistics ---------- */
.tone-blue { --tone: #2563eb; --tone-soft: #e8efff; } .tone-green { --tone: #16a34a; --tone-soft: #e5f6ea; }
.tone-violet { --tone: #7c3aed; --tone-soft: #f0e9ff; } .tone-amber { --tone: #d97706; --tone-soft: #fdf1dc; }
.tone-teal { --tone: #0d9488; --tone-soft: #dff5f2; } .tone-rose { --tone: #e11d48; --tone-soft: #fde7ec; }
.dark .tone-blue, .dark .tone-green, .dark .tone-violet, .dark .tone-amber, .dark .tone-teal, .dark .tone-rose { --tone-soft: rgba(255,255,255,.07); }
.st-wrap { display: flex; flex-direction: column; gap: 1.5rem; --st-bg: var(--deca-surface, #fff); --st-border: var(--deca-border, #e2e8f0); --st-muted: var(--deca-muted, #64748b); --st-soft: color-mix(in srgb, var(--deca-text, #000) 5%, transparent); }
.st-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; background: var(--st-bg); border: 1px solid var(--st-border); border-radius: .9rem; padding: .8rem 1rem; }
.st-dates { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.st-dates .deca-input { width: auto; padding: .3rem .5rem; }
.st-period { font-size: .85rem; color: var(--st-muted); border: 1px solid var(--st-border); border-radius: 999px; padding: .2rem .75rem; }
.st-seg { display: inline-flex; flex-wrap: wrap; gap: .25rem; background: var(--st-soft); border-radius: .7rem; padding: .25rem; }
.st-seg button { padding: .35rem .8rem; border-radius: .55rem; font-weight: 500; font-size: .9677rem; white-space: nowrap; }
.st-seg button:hover { background: var(--st-bg); }
.st-seg button.active { background: #16a34a; color: #fff; }
.st-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.st-kpi { background: var(--st-bg); border: 1px solid var(--st-border); border-left: 4px solid var(--tone); border-radius: 1rem; padding: 1.1rem 1.25rem; }
.st-kpi-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.st-kpi-lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--st-muted); font-weight: 600; }
.st-kpi-val { font-size: 1.9rem; font-weight: 800; line-height: 1.1; margin: .6rem 0 .5rem; white-space: nowrap; }
.st-kpi-help { font-size: .8rem; color: var(--st-muted); margin-top: .35rem; }
.st-delta { font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; }
.st-delta.up { background: #e5f6ea; color: #15803d; } .st-delta.down { background: #fde7ec; color: #be123c; } .st-delta.flat { background: var(--st-soft); color: var(--st-muted); }
.st-bar { height: 6px; border-radius: 999px; background: var(--st-soft); overflow: hidden; }
.st-bar-lg { height: 8px; }
.st-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--tone, #2563eb); }
.st-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.25rem; }
.st-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.st-card { background: var(--st-bg); border: 1px solid var(--st-border); border-radius: 1rem; }
.st-card-head { display: flex; align-items: center; gap: .85rem; padding: 1.1rem 1.25rem .7rem; border-top: 3px solid var(--tone); border-radius: 1rem 1rem 0 0; }
.st-card-title { font-weight: 700; }
.st-card-sub { font-size: .8rem; color: var(--st-muted); }
.st-head-big { margin-left: auto; text-align: right; }
.st-big { font-size: 1.6rem; font-weight: 800; line-height: 1; color: var(--tone); }
.st-chart-box { padding: 0 1rem 1rem; }
.st-chart { width: 100%; height: auto; display: block; }
.st-chart .grid { stroke: var(--st-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.st-chart .base { stroke: var(--st-muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.st-chart .axis { fill: var(--st-muted); font-size: 11px; }
.st-chart .bar { fill: var(--tone); }
.st-chart .weekend .bar { opacity: .55; }
.st-chart .hit { fill: transparent; }
.st-chart .col:hover .hit { fill: var(--tone-soft); }
.st-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; border-bottom: 1px solid var(--st-border); }
.st-tabs > button { color: var(--st-muted); font-weight: 600; padding: .65rem 1rem; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.st-tabs > button.active { color: #16a34a; border-bottom-color: #16a34a; }
.st-order { margin-left: auto; display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--st-muted); padding-bottom: .3rem; }
.st-note { font-size: .85rem; color: var(--st-muted); margin: 0; }
.st-empty { text-align: center; color: var(--st-muted); padding: 1.5rem; font-size: .9677rem; }
.st-list { list-style: none; margin: 0; padding: .25rem 1.25rem 1rem; }
.st-item { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem .8rem; border-radius: .75rem; background: var(--st-soft); }
.st-item + .st-item { margin-top: .5rem; }
.st-rank { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; background: var(--tone-soft); color: var(--tone); }
.st-main { flex: 1; min-width: 0; }
.st-row { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.st-label { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-val { font-weight: 800; white-space: nowrap; }
.st-item .st-bar { margin: .4rem 0 .3rem; }
.st-meta { font-size: .76rem; color: var(--st-muted); }
.st-more { display: block; text-align: center; padding: 0 0 1rem; font-size: .85rem; font-weight: 600; color: var(--tone); }
.st-facts { padding: .25rem 1.25rem 1.1rem; }
.st-fact { display: flex; align-items: center; gap: .85rem; padding: .85rem .9rem; border-radius: .75rem; background: var(--st-soft); }
.st-fact + .st-fact { margin-top: .55rem; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tone); flex: 0 0 10px; }
.st-fact-lbl { font-weight: 600; }
.st-fact-val { margin-left: auto; font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.st-detail { background: var(--st-bg); border: 1px solid var(--st-border); border-radius: 1rem; }
.st-detail > summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 700; }
.st-detail > summary small { display: block; font-weight: 400; font-size: .8rem; color: var(--st-muted); }
.st-detail-body { padding: 0 1.25rem 1.25rem; }
.st-rank-card { margin-bottom: 1.25rem; }
.st-rank-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.st-note-r { margin-left: auto; font-size: .8rem; }
.st-scroll { overflow: auto; }
.st-table td, .st-table th { white-space: normal; }
.st-table .r { text-align: right; } .st-table .nw { white-space: nowrap; }
@media print { .st-detail-body { display: block !important; } .st-filter, .st-tabs { display: none; } }
.deca-steps { padding-left: 1.2rem; list-style: decimal; font-size: .9677rem; } .deca-steps li { margin-bottom: .35rem; }
.deca-var-unused { opacity: .45; }

/* Superadmin tools */
.deca-gate { max-width: 420px; margin: 2rem auto; text-align: center; display: flex; flex-direction: column; gap: .8rem; align-items: center; background: var(--deca-surface, #fff); border: 1px solid var(--deca-border, #e2e8f0); border-radius: 1rem; padding: 2rem; }
.deca-gate-icon { font-size: 2.5rem; }
.deca-gate h2 { font-size: 1.25rem; font-weight: 700; }
.deca-gate .deca-input { width: 100%; }
.deca-target { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.deca-target .deca-input { width: auto; min-width: 240px; }
.deca-tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.deca-progress { height: 14px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.deca-progress > span { display: block; height: 100%; background: #16a34a; transition: width .3s; }
.deca-num-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; }
.deca-num-grid label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; }
.deca-danger-box { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: .7rem; padding: 1rem; font-weight: 600; }

/* Theme miniatures */
.deca-swatch { display: inline-flex; width: 74px; height: 46px; border-radius: 6px; overflow: hidden; border: 1px solid rgb(0 0 0 / .15); vertical-align: middle; flex: 0 0 auto; }
.deca-swatch-side { width: 22px; display: flex; flex-direction: column; gap: 3px; padding: 6px 4px; }
.deca-swatch-side i { display: block; height: 4px; border-radius: 2px; }
.deca-swatch-main { flex: 1; display: flex; flex-direction: column; }
.deca-swatch-top { height: 9px; }
.deca-swatch-card { margin: 5px; flex: 1; border: 1px solid; border-radius: 3px; padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.deca-swatch-card i { display: block; height: 4px; border-radius: 2px; width: 70%; }
.deca-swatch + span { margin-left: .5rem; font-weight: 600; }
.deca-theme-preview { display: grid; grid-template-columns: 170px 1fr; min-height: 220px; border-radius: .75rem; overflow: hidden; border: 1px solid rgb(0 0 0 / .15); font-size: .8rem; }
.deca-theme-preview .tp-side { padding: .75rem .5rem; display: flex; flex-direction: column; gap: .35rem; }
.deca-theme-preview .tp-side span { padding: .35rem .6rem; border-radius: .4rem; }
.deca-theme-preview .tp-main { display: flex; flex-direction: column; }
.deca-theme-preview .tp-top { padding: .6rem .9rem; font-weight: 700; }
.deca-theme-preview .tp-body { padding: .9rem; flex: 1; }
.deca-theme-preview .tp-card { border: 1px solid; border-radius: .6rem; padding: .75rem; }
.deca-theme-preview .tp-btn { display: inline-block; padding: .35rem .8rem; border-radius: .4rem; color: #fff; font-weight: 600; margin-top: .5rem; }
.deca-theme-preview .tp-ic { display: inline-flex; width: 24px; height: 24px; border-radius: 4px; align-items: center; justify-content: center; font-size: .75rem; margin-left: .25rem; }

/* Effective carrier: first block, slightly darker (light themes) / lighter (dark themes) */
.deca-carrier .fi-section, .deca-carrier.fi-section, .deca-sheet-carrier { background-color: color-mix(in srgb, var(--deca-surface, #fff) 92%, #000) !important; }
.dark .deca-carrier .fi-section, .dark .deca-carrier.fi-section, .dark .deca-sheet-carrier { background-color: color-mix(in srgb, var(--deca-surface, #111) 88%, #fff) !important; }
.deca-sheet-carrier { padding: .65rem 1rem; display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; border-bottom: 1px solid var(--deca-border, rgb(0 0 0 / .08)); }
.deca-sheet-carrier > span { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.deca-kv tr.deca-kv-head th { width: auto; padding-top: .9rem; font-size: .78rem; font-weight: 800; opacity: 1; color: var(--deca-link, var(--primary-600)); border-bottom: 2px solid var(--deca-border, rgb(0 0 0 / .1)); }
.deca-kv tr.deca-kv-head:first-child th { padding-top: .35rem; }
.deca-grid-2 { align-items: start; }
.deca-carrier .fi-section-content-ctn { background: transparent !important; }

/* Transport sheet: main button 3/4 + «Cancel·lar» 1/4, the whole width */
.fi-ac:has(> .deca-act-main) { display: grid !important; grid-template-columns: 3fr 1fr; gap: .75rem; width: 100%; }
.fi-ac > .deca-act-main, .fi-ac > .deca-act-cancel { width: 100%; justify-content: center; padding-block: .7rem; font-size: 1rem; }

/* Dashboard of the drivers: «Els meus transports» and the sections enabled by the superadmin. */
.deca-my-transports { margin-bottom: 1.25rem; }
.deca-mine { display: flex; flex-direction: column; gap: .5rem; }
.deca-mine-row { display: grid; grid-template-columns: 9rem 1fr auto; gap: .75rem; align-items: center; padding: .6rem .75rem; border: 1px solid var(--gray-200); border-radius: .5rem; }
.deca-mine-row.is-today { border-color: var(--success-500, #16a34a); background: color-mix(in srgb, var(--success-500, #16a34a) 6%, transparent); }
.deca-mine-date { display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; }
.deca-mine-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .deca-mine-row { grid-template-columns: 1fr; } .deca-mine-actions { justify-content: flex-start; } }
.deca-driver-links { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 1rem; }
.deca-driver-link { display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem; border: 1px solid var(--gray-200); border-radius: .6rem; font-weight: 600; background: var(--deca-surface, #fff); }
.deca-driver-link:hover { border-color: var(--primary-500); }
.deca-driver-link-icon { width: 1.4rem; height: 1.4rem; color: var(--primary-600); }
.deca-group-toggle { font-weight: 700; padding-bottom: .5rem; border-bottom: 1px solid var(--gray-200); margin-bottom: .25rem; }

/* Dades de prova: generate 3/4 + lock 1/4; inline form: password 1/4, send 2/4, cancel 1/4. */
.deca-row-34 { display: grid; grid-template-columns: 3fr 1fr; gap: .75rem; margin: 1rem 0; }
.deca-row-121 { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: .75rem; align-items: start; margin-top: 1rem; }
.deca-row-34 > .fi-btn, .deca-row-121 > .fi-btn { width: 100%; justify-content: center; }
.deca-row-121 .deca-input { width: 100%; height: 2.75rem; }
.deca-gen-form { margin: 1rem 0; display: flex; flex-direction: column; gap: 1rem; }
@media (max-width: 640px) { .deca-row-34, .deca-row-121 { grid-template-columns: 1fr; } }

/* Sheet lists: own filter header (search + «Restablir filtres»), buttons at the left of the rows. */
.deca-sheet-table .fi-ta-filters-header { display: none !important; }
.deca-reset-filters { width: 100%; height: 2.5rem; padding: 0 1rem; border-radius: var(--deca-btn-radius, .5rem); border: 1px solid var(--gray-300); background: var(--deca-surface, #fff); font-weight: 600; white-space: nowrap; }
.deca-reset-filters:hover { border-color: var(--primary-500); color: var(--primary-600); }
.fi-icon-btn.deca-ic-off { background: #d1d5db !important; color: #6b7280 !important; opacity: 1 !important; cursor: not-allowed; }
.fi-icon-btn.deca-ic-delete-soft { background: #fecaca !important; color: #b91c1c !important; }
.fi-header:has(.deca-head-wide) { display: grid !important; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; }
.fi-header .fi-ac:has(> .deca-head-wide) { display: grid !important; grid-template-columns: 1fr 1fr; gap: .75rem; width: 100%; }
.fi-header .fi-ac:has(> .deca-head-wide) > .fi-btn { width: 100%; justify-content: center; padding-top: .8rem; padding-bottom: .8rem; font-size: 1rem; }
@media (max-width: 767px) {
    .fi-header:has(.deca-head-wide) { grid-template-columns: 1fr; }
    .fi-header .fi-ac:has(> .deca-head-wide) { grid-template-columns: 1fr; }
}
.deca-export-row { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: .75rem; margin-top: 1rem; }
@media (max-width: 640px) { .deca-export-row { grid-template-columns: 1fr 1fr; } }

/* Section headings: band from side to side with the colours of the theme (Temes › Capçaleres), bigger and bold. */
.fi-section:not(.fi-section-not-contained) > .fi-section-header {
    background: var(--deca-heading, #1e293b) !important; color: var(--deca-heading-text, #fff) !important;
    border-top-left-radius: inherit; border-top-right-radius: inherit; padding-top: .85rem; padding-bottom: .85rem;
}
.fi-section:not(.fi-section-not-contained).fi-collapsed > .fi-section-header { border-radius: inherit; }
.fi-section > .fi-section-header .fi-section-header-heading { color: inherit !important; font-size: 122%; font-weight: 700; letter-spacing: .01em; }
.fi-section:not(.fi-section-not-contained) > .fi-section-header .fi-section-header-description { color: inherit !important; opacity: .85; }
.fi-section:not(.fi-section-not-contained) > .fi-section-header .fi-icon,
.fi-section:not(.fi-section-not-contained) > .fi-section-header .fi-section-collapse-btn { color: inherit !important; }
/* Clearer cards: stronger border and a soft shadow, so sections stand out from the page background. */
.fi-section:not(.fi-section-not-contained), .fi-ta-ctn { box-shadow: 0 1px 3px rgb(0 0 0 / .10), 0 1px 2px rgb(0 0 0 / .06) !important; }
.dark .fi-section:not(.fi-section-not-contained), .dark .fi-ta-ctn { box-shadow: 0 1px 3px rgb(0 0 0 / .45) !important; }
.deca-theme-preview .tp-head { margin: -.75rem -.75rem .6rem; padding: .4rem .75rem; border-radius: .6rem .6rem 0 0; font-weight: 700; font-size: .8rem; }
.deca-sheet-bottom-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.deca-sheet-bottom-actions:empty { display: none; }

/* Sheet lists: only the search/filters zone is boxed; the list uses all the width. */
.fi-ta-ctn.deca-sheet-table, .deca-sheet-table.fi-ta-ctn { background: transparent !important; box-shadow: none !important; border: 0 !important; --tw-ring-shadow: 0 0 #0000 !important; border-radius: 0 !important; overflow: visible !important; }
.deca-sheet-table .fi-ta-filters-above-content-ctn { background: var(--deca-surface, #fff); border: 1px solid var(--deca-border); border-radius: .75rem; box-shadow: 0 1px 3px rgb(0 0 0 / .10); margin-bottom: .75rem; }
.deca-sheet-table .fi-ta-content-ctn { background: var(--deca-surface, #fff); border-top: 1px solid var(--deca-border); border-bottom: 1px solid var(--deca-border); }
.deca-sheet-table .fi-ta-main > *:not(.fi-ta-filters-above-content-ctn) { background: var(--deca-surface, #fff); }
.deca-top-scroll { display: none; overflow-x: auto; overflow-y: hidden; height: 16px; margin-top: .25rem; }
.deca-top-scroll > div { height: 1px; }
.deca-list-tools { display: flex; gap: .5rem; align-items: stretch; }
.deca-list-tools .deca-reset-filters { flex: 1; }
.deca-reset-filters { background: var(--deca-heading, #1e293b) !important; color: var(--deca-heading-text, #fff) !important; border-color: transparent !important; }
.deca-reset-filters:hover { filter: brightness(1.15); color: var(--deca-heading-text, #fff) !important; }
.deca-tool-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; min-width: 2.5rem; height: 2.5rem; border-radius: var(--deca-btn-radius, .5rem); border: 1px solid var(--deca-border); background: var(--deca-surface, #fff); color: var(--deca-text); }
.deca-tool-btn:hover { border-color: var(--primary-500); color: var(--primary-600); }
.deca-tool-ic { width: 1.25rem; height: 1.25rem; }
.deca-filters-toggle-cell { display: none; }
@media (max-width: 767px) {
    /* Phones: no filters (only the search and the buttons). */
    .deca-sheet-filters-row { display: none !important; }
}
/* Export modal of the lists. */
.deca-export-count { font-size: 1.1rem; font-weight: 700; margin-bottom: .25rem; }
.deca-export-btns { display: grid; gap: .6rem; }
.deca-export-btn { display: block; text-align: center; padding: .8rem 1rem; border-radius: var(--deca-btn-radius, .5rem); color: #fff !important; font-weight: 700; }
.deca-export-btn.is-pdf { background: #dc2626; } .deca-export-btn.is-xlsx { background: #16a34a; } .deca-export-btn.is-csv { background: #2563eb; }
.deca-export-btn:hover { filter: brightness(1.1); }
/* Import: type of data + upload button. */
.deca-import-pick { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.deca-import-pick select { min-width: 16rem; height: 2.5rem; }
/* Empreses: change of active company. */
.deca-changer { margin-bottom: 1rem; }
.deca-changer:empty { display: none; }
.deca-changer-now { margin-bottom: .5rem; color: var(--deca-muted); }
.deca-changer-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; padding: 1rem 1.25rem; border-radius: .75rem; background: var(--deca-heading, #1e293b); color: var(--deca-heading-text, #fff); }
.deca-changer-label { font-size: 1.15rem; font-weight: 700; }
.deca-changer-form select { min-width: 16rem; height: 2.75rem; color: var(--deca-text); background: var(--deca-surface, #fff); }
.deca-list-tools { min-width: 0; }
.deca-list-tools .deca-reset-filters { min-width: 0; padding: 0 .6rem; overflow: hidden; text-overflow: ellipsis; }
.deca-pre { background: var(--deca-body); border: 1px solid var(--deca-border); border-radius: .5rem; padding: .75rem 1rem; font-family: ui-monospace, monospace; font-size: .85rem; white-space: pre-wrap; margin-top: .5rem; }

/* Only one wide button at the right of the title: it takes all that space. */
.fi-header .fi-ac:has(> .deca-head-wide:only-child) { grid-template-columns: 1fr; }

/* Brand logo: light / dark variant can differ between the desktop and the mobile theme. */
.deca-brand { height: 100%; width: auto; }
.deca-brand-m { display: none; }
@media (max-width: 767px) { .deca-brand-d { display: none; } .deca-brand-m { display: inline-block; } }

/* Lists: short values on one line, cut with «…» at the width of the column (no break at «-»). */
.deca-nowrap { display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.deca-nowrap .deca-hist > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deca-wrapcell { display: block; min-width: 14rem; max-width: 26rem; white-space: normal; }
@media (max-width: 767px) { .deca-wrapcell { min-width: 11rem; } }

/* Phones: lists without reset / print / export; long explanations of the sheet form hidden. */
@media (max-width: 767px) {
    .deca-list-tools { display: none !important; }
    .deca-desc-desktop .fi-section-header-description { display: none !important; }
}
@media (max-width: 767px) {
    .deca-sheet-table .fi-grid-col:has(> .fi-sc-component > .deca-list-tools),
    .deca-sheet-table .fi-grid-col:has(> .fi-sc-component > .deca-sheet-filters-row),
    .deca-sheet-table .fi-grid-col:has(> .fi-sc-component > .deca-top-scroll) { display: none !important; }
}

/* Bottom of the side menu: copyright and version. */
.deca-sidebar-footer { padding: .9rem 1.25rem 1.1rem; font-size: .75rem; line-height: 1.5; color: var(--deca-sidebar-text, #e2e8f0); opacity: .7; border-top: 1px solid color-mix(in srgb, var(--deca-sidebar-text, #fff) 18%, transparent); }
/* Buttons at the right of the title of the sheets: «Veure els meus DECA» normal, «NOU FULL…» bold. */
.fi-header .deca-head-light, .fi-header .deca-head-light .fi-btn-label { font-weight: 400 !important; }
.fi-header .deca-head-bold, .fi-header .deca-head-bold .fi-btn-label { font-weight: 800 !important; }
/* Phones: «Generar DeCA PDF» from side to side, the other buttons below. */
@media (max-width: 767px) {
    .fi-header .fi-ac:has(> .deca-issue-btn) { display: flex !important; flex-wrap: wrap; gap: .6rem; }
    .fi-header .fi-ac > .deca-issue-btn { order: -1; width: 100%; justify-content: center; padding-top: .9rem; padding-bottom: .9rem; font-size: 1.05rem; }
}

/* Comptes: «Administrador» and «Conductor» one under the other, «Editar» beside them. */
.deca-accounts-table .fi-ta-actions { display: flex; flex-wrap: nowrap; gap: .4rem; align-items: center; }
.deca-accounts-table .fi-ta-actions .fi-btn { white-space: nowrap; }
/* Maintenance of an account: gear button, grey when off, amber when the account is in maintenance. */
.fi-icon-btn.deca-maint-btn { border: 1.5px solid #d1d5db; border-radius: var(--deca-btn-radius, .5rem); color: #6b7280 !important; background: #fff; }
.dark .fi-icon-btn.deca-maint-btn { background: transparent; border-color: #4b5563; color: #9ca3af !important; }
.fi-icon-btn.deca-maint-btn.is-on { background: #f59e0b !important; border-color: #b45309; color: #fff !important; }
.fi-icon-btn.deca-maint-btn.is-on svg { animation: deca-maint-turn 9s linear infinite; }

/* Left menu: «Nou full de ruta» red, «Fulls de transport» blue (computer and mobile). */
.fi-sidebar-item-btn[href$="/sheets/new"], .fi-sidebar-item-btn[href$="/sheets"] { color: #fff !important; font-weight: 700; }
.fi-sidebar .fi-sidebar-item .fi-sidebar-item-btn[href$="/sheets/new"], .fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-btn[href$="/sheets/new"] { background: #dc2626 !important; }
.fi-sidebar .fi-sidebar-item .fi-sidebar-item-btn[href$="/sheets"], .fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-btn[href$="/sheets"] { background: #2563eb !important; }
.fi-sidebar-item-btn[href$="/sheets/new"]:hover { background: #ef4444 !important; }
.fi-sidebar-item-btn[href$="/sheets"]:hover { background: #3b82f6 !important; }
.fi-sidebar .fi-sidebar-item .fi-sidebar-item-btn[href$="/sheets/new"] *, .fi-sidebar .fi-sidebar-item .fi-sidebar-item-btn[href$="/sheets"] *,
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-btn[href$="/sheets/new"] *, .fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-btn[href$="/sheets"] * { color: #fff !important; }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn[href$="/sheets/new"], .fi-sidebar-item.fi-active > .fi-sidebar-item-btn[href$="/sheets"] { box-shadow: inset 0 0 0 2px rgba(255,255,255,.75); }
.fi-sidebar-item:has(> .fi-sidebar-item-btn[href$="/sheets"]) { margin-top: .35rem; }

/* Border of the input fields: darker (light themes) / lighter (dark themes), taken from the text colour of the theme. */
.fi-input-wrp:not(.fi-invalid):not(:focus-within),
.fi-checkbox-input:not(:checked):not(:focus), .fi-radio-input:not(:checked):not(:focus) {
    --tw-ring-color: color-mix(in srgb, var(--deca-text, #111827) 38%, transparent) !important;
}
.fi-fo-repeater .fi-input-wrp:not(.fi-invalid):not(:focus-within) { --tw-ring-color: color-mix(in srgb, var(--deca-text, #111827) 30%, transparent) !important; }
.fi-fo-file-upload .filepond--panel-root { border: 1px solid color-mix(in srgb, var(--deca-text, #111827) 38%, transparent) !important; }

/* Required fields: «(*)» after the label, in red (instead of a superscript), and the note at the end of the page. */
.fi-fo-field-label-required-mark, .fi-fo-table-repeater-header-required-mark, .fi-fieldset-label-required-mark {
    font-size: 0 !important; vertical-align: baseline !important; top: 0 !important;
}
.fi-fo-field-label-required-mark::before, .fi-fo-table-repeater-header-required-mark::before, .fi-fieldset-label-required-mark::before {
    content: " (*)"; white-space: pre; font-size: .9677rem; font-weight: 700; color: #dc2626;
}
.deca-required-note { display: none; margin: 0; color: #dc2626; font-weight: 600; font-size: .9677rem; }
.fi-page:has(.fi-fo-field-label-required-mark, .fi-fo-table-repeater-header-required-mark) .deca-required-note,
.fi-simple-page:has(.fi-fo-field-label-required-mark) .deca-required-note { display: block; }
.fi-simple-page .deca-required-note { margin-top: .75rem; font-size: .8rem; }
.fi-page:has(.fi-fo-field-label-required-mark, .fi-fo-table-repeater-header-required-mark) .fi-modal .deca-required-note { display: none; }

/* Loads on the mobile: «Total kg» label on the left and the field on the right, on one line. */
@media (max-width: 767px) {
    .deca-inline-field { display: grid !important; grid-template-columns: auto 1fr; align-items: center; column-gap: .75rem; }
    .deca-inline-field > .fi-fo-field-label-col { margin: 0 !important; }
}

/* Login: two lines under the logo. */
.deca-login-sub1 { font-weight: 700; font-size: 1.05rem; }
.deca-login-sub2 { font-size: .9677rem; opacity: .85; }

/* «Afegir càrrega»: tinted with the primary colour so it stands out from the background. */
.deca-add-load.fi-btn, .fi-fo-table-repeater-add .deca-add-load {
    background: color-mix(in srgb, var(--primary-500) 14%, var(--deca-surface, #fff)) !important;
    border: 1px solid color-mix(in srgb, var(--primary-600) 45%, transparent) !important;
    color: var(--primary-700) !important; font-weight: 700;
}
.dark .deca-add-load.fi-btn, .dark .fi-fo-table-repeater-add .deca-add-load { color: var(--primary-300) !important; }
.deca-add-load:hover { background: color-mix(in srgb, var(--primary-500) 24%, var(--deca-surface, #fff)) !important; }

/* Mobile, loads with only description + weight: the trash after the weight, on the same line. */
@media (max-width: 767px) {
    .deca-loads-simple tbody tr { grid-template-columns: 1fr auto !important; align-items: end; }
    .deca-loads-simple tbody tr > td:first-child { grid-column: 1 / -1; }
    .deca-loads-simple tbody tr > td:last-child { grid-column: 2; padding-bottom: .4rem; }
}

/* (*) note above the buttons at the bottom of the form, on the right. */
form.fi-sc-form:has(.fi-fo-field-label-required-mark, .fi-fo-table-repeater-header-required-mark) > .fi-grid > .fi-grid-col:last-child > .fi-sc-component:has(> .fi-sc-actions)::before {
    content: var(--deca-req); display: block; text-align: right; color: #dc2626; font-weight: 600; font-size: .9677rem; margin-bottom: .6rem;
}
.fi-page:has(form.fi-sc-form > .fi-grid > .fi-grid-col:last-child > .fi-sc-component > .fi-sc-actions) .deca-required-note,
.fi-simple-page:has(form.fi-sc-form > .fi-grid > .fi-grid-col:last-child > .fi-sc-component > .fi-sc-actions) .deca-required-note { display: none !important; }

/* Mobile: the company logo on the left of the top bar. */
@media (max-width: 1023px) {
    .fi-topbar .fi-topbar-start { display: flex !important; margin-inline-end: .5rem; min-width: 0; }
    .fi-topbar .fi-topbar-start .fi-topbar-collapse-sidebar-btn-ctn { display: none !important; }
    .fi-topbar .fi-topbar-start .fi-logo { height: 2.25rem !important; margin-inline-start: .25rem; max-width: 40vw; }
    .fi-topbar .fi-topbar-start .fi-logo img, .fi-topbar .fi-topbar-start .deca-brand { height: 100%; max-width: 40vw; object-fit: contain; }
}
/* Logos always fit (also opaque JPG ones). */
.fi-logo img, .deca-brand { object-fit: contain; max-width: 100%; }

/* Sheets list: filters row hidden for now (SheetTable::SHEETS_FILTERS). */
.deca-filters-off { display: none !important; }
.fi-grid-col:has(> .fi-sc-component > .deca-filters-off) { display: none !important; }
.deca-list-tools-end { justify-content: flex-end; }

/* Delete a load line: red button with a white trash, a bit bigger. */
.deca-del-load { background: #dc2626 !important; color: #fff !important; width: 2.4rem !important; height: 2.4rem !important; border-radius: var(--deca-btn-radius, .5rem) !important; display: inline-flex; align-items: center; justify-content: center; }
.deca-del-load:hover { background: #b91c1c !important; }
.deca-del-load .fi-icon, .deca-del-load svg { color: #fff !important; width: 1.35rem !important; height: 1.35rem !important; }

/* Lists (carregadors, vehicles, conductors, usuaris…): the search box takes all the width it can. */
.fi-ta-header-toolbar > div:last-child { flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
.fi-ta-header-toolbar .fi-ta-search-field { flex: 1 1 auto; max-width: none !important; width: auto; }
.fi-ta-header-toolbar > .fi-ta-actions:not(:has(*)) { display: none !important; }

/* Eines › Comprovar NIF i correus */
.deca-check-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem 1.5rem; align-items: start; }
.deca-check-field { display: flex; flex-direction: column; gap: .4rem; border: 0; padding: 0; margin: 0; }
.deca-check-field > span, .deca-check-field > legend { font-weight: 600; font-size: .9677rem; margin-bottom: .2rem; }
.deca-check-opt { display: flex; gap: .5rem; align-items: center; font-size: .9677rem; }
.deca-check-problems { color: #b91c1c; font-weight: 600; font-size: .82rem; }
.dark .deca-check-problems { color: #fca5a5; }
.deca-check-table td { vertical-align: top; }

/* Superadmin › Resum de comptes: security points still pending. */
.deca-security { border: 2px solid #dc2626; border-radius: .75rem; padding: .9rem 1.1rem; background: color-mix(in srgb, #dc2626 6%, var(--deca-surface, #fff)); }
.deca-security-title { font-weight: 800; color: #dc2626; margin-bottom: .4rem; }
.deca-security ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.deca-security li { display: flex; gap: .75rem; justify-content: space-between; align-items: baseline; font-size: .9677rem; padding-left: .9rem; position: relative; }
.deca-security li::before { content: ""; position: absolute; left: 0; top: .45rem; width: .45rem; height: .45rem; border-radius: 50%; background: #f59e0b; }
.deca-security li.deca-security-high::before { background: #dc2626; }
.deca-security li.deca-security-low::before { background: #64748b; }
.deca-security li a { white-space: nowrap; font-weight: 600; }

/* Cookies and privacy notice (access screens): blocks the form until it is accepted. */
[x-cloak] { display: none !important; }
.deca-privacy-overlay { position: fixed; inset: 0; z-index: 100; background: rgb(15 23 42 / .72); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.deca-privacy-box { background: #fff; color: #111827; border-radius: .9rem; max-width: 46rem; width: 100%; max-height: 92vh; display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem 1.4rem; box-shadow: 0 20px 50px rgb(0 0 0 / .35); text-align: left; }
.deca-privacy-box h2 { font-size: 1.2rem; font-weight: 800; margin: 0; }
.deca-privacy-box h3 { font-size: .95rem; font-weight: 800; margin: .9rem 0 .4rem; }
.deca-privacy-box p { margin: 0; font-size: .9677rem; }
.deca-privacy-scroll { overflow-y: auto; border: 1px solid #e5e7eb; border-radius: .5rem; padding: .25rem .9rem .9rem; font-size: .84rem; line-height: 1.5; flex: 1 1 auto; min-height: 8rem; }
.deca-privacy-scroll table { width: 100%; border-collapse: collapse; }
.deca-privacy-scroll th, .deca-privacy-scroll td { border-bottom: 1px solid #e5e7eb; padding: .3rem .4rem; text-align: left; vertical-align: top; }
.deca-privacy-scroll code { font-size: .78rem; word-break: break-all; }
.deca-privacy-scroll dt { font-weight: 700; margin-top: .55rem; }
.deca-privacy-scroll dd { margin: 0; }
.deca-privacy-accept { align-self: stretch; background: #16a34a; color: #fff; font-weight: 800; border-radius: var(--deca-btn-radius, .5rem); padding: .75rem 1rem; font-size: 1rem; }
.deca-privacy-accept:hover { background: #15803d; }

/* Languages with flags */
.deca-flag { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgb(0 0 0 / .15); object-fit: cover; flex: none; display: inline-block; vertical-align: middle; }
.deca-lang { display: inline-flex; align-items: center; gap: .45rem; }
.deca-lang-radio .fi-fo-radio { gap: .5rem 1.25rem; flex-wrap: wrap; }
.deca-langpick { position: relative; display: inline-block; margin: .25rem 0 .5rem; }
.deca-langpick-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .75rem; border-radius: var(--deca-btn-radius, .5rem); border: 1px solid color-mix(in srgb, var(--deca-text, #111827) 30%, transparent); background: var(--deca-surface, #fff); font-weight: 600; font-size: .9677rem; }
.deca-langpick-caret { width: 1rem; height: 1rem; opacity: .6; }
.deca-langpick-list { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% + .35rem); z-index: 60; min-width: 12rem; background: var(--deca-surface, #fff); border: 1px solid color-mix(in srgb, var(--deca-text, #111827) 18%, transparent); border-radius: .6rem; box-shadow: 0 12px 30px rgb(0 0 0 / .2); padding: .3rem; list-style: none; margin: 0; text-align: left; }
.deca-langpick-list a { display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; border-radius: .4rem; text-decoration: none !important; font-size: .9677rem; }
.deca-langpick-list a:hover, .deca-langpick-list a.is-current { background: color-mix(in srgb, var(--primary-500) 12%, transparent); }
.deca-langpick-list a.is-current { font-weight: 700; }

/* «Enviar avís»: same header for every block, language buttons with flags, Send 3/4 · Cancel 1/4. */
.deca-lang-buttons .fi-fo-toggle-buttons { flex-wrap: wrap; gap: .4rem; }
.deca-lang-buttons label.fi-btn { gap: .4rem; }
.deca-send-modal .fi-sc-actions .fi-btn { width: 100%; justify-content: center; }
.deca-preview-head { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* Tabs (Valors per defecte…): a band with the colours of the section headings, active tab clearly marked. */
.deca-tabs { overflow: hidden; border-radius: .75rem; }
.deca-tabs > .fi-tabs { background: var(--deca-heading, #1e293b) !important; padding: .5rem .5rem 0; gap: .35rem; border-radius: 0; margin: 0; box-shadow: none; flex-wrap: wrap; }
.deca-tabs > .fi-tabs .fi-tabs-item { color: var(--deca-heading-text, #fff) !important; opacity: .85; font-weight: 700; font-size: .95rem; padding: .7rem 1.1rem; border-radius: .6rem .6rem 0 0; background: transparent; }
.deca-tabs > .fi-tabs .fi-tabs-item .fi-icon, .deca-tabs > .fi-tabs .fi-tabs-item-label { color: inherit !important; }
.deca-tabs > .fi-tabs .fi-tabs-item:hover { opacity: 1; background: color-mix(in srgb, var(--deca-heading-text, #fff) 12%, transparent); }
.deca-tabs > .fi-tabs .fi-tabs-item.fi-active { opacity: 1; background: var(--deca-surface, #fff) !important; color: var(--deca-text, #111827) !important; box-shadow: 0 -3px 0 0 var(--primary-500) inset; }
.deca-tabs > .fi-tabs .fi-tabs-item.fi-active .fi-icon { color: var(--primary-600) !important; }
.deca-alert-info { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; padding: .75rem 1rem; border-radius: .5rem; }
.deca-locked-toggle { opacity: .55; }

/* Tipus de compte: one card per plan, limits as tiles. */
.deca-plan-card { display: flex; flex-direction: column; gap: .8rem; width: 100%; padding: .25rem; }
.deca-plan-name { font-size: 1.1rem; font-weight: 800; }
.deca-plan-meta { display: flex; gap: .5rem; align-items: center; margin-top: .3rem; font-size: .82rem; }
.deca-plan-accounts { color: var(--deca-muted, #64748b); font-weight: 600; }
.deca-plan-limits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .45rem; }
.deca-plan-limits li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .45rem; padding: .45rem .6rem; border-radius: .55rem; background: color-mix(in srgb, var(--deca-text, #111827) 5%, transparent); }
.deca-plan-ic { width: 1.1rem; height: 1.1rem; color: var(--primary-600); }
.deca-plan-lbl { font-size: .78rem; line-height: 1.15; color: var(--deca-muted, #475569); }
.deca-plan-val { font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; }
.deca-plan-val.is-unlimited { color: #16a34a; font-size: 1.15rem; }
/* 3.10.2 send modal: compact notice row, faded unavailable channel */
.deca-send-inline { background: color-mix(in srgb, var(--primary-500, #3b82f6) 7%, transparent); }
.deca-send-inline .fi-section-content { padding-block: .5rem !important; }
.deca-send-inline .fi-fo-field { align-items: center; }
.deca-send-inline .fi-fo-field-label-content { font-weight: 600; }
.deca-send-off { opacity: .45; filter: grayscale(1); }
.deca-sendto .fi-fo-toggle-buttons { gap: .4rem; }
/* 3.10.4 send modal: «Enviar només el QR» as a button with blue border, the switch at the end */
.deca-send-qrbar, .deca-send-qrbar .fi-section { background: #fff !important; box-shadow: none !important; }
.deca-send-qrbar .fi-section { border: 2px solid var(--primary-600, #2563eb) !important; border-radius: .7rem; }
.deca-send-qrbar .fi-section-content { padding: .55rem 1rem !important; }
.deca-send-qrbar label.fi-fo-field-label { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; width: 100%; cursor: pointer; }
.deca-send-qrbar .fi-fo-field-label-ctn { width: 100%; }
.deca-qrbar-lbl { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--primary-700, #1d4ed8); font-size: .95rem; }
.deca-qrbar-ic { width: 1.5rem; height: 1.5rem; }
.deca-send-qrbar .fi-toggle-off { background: #cbd5e1 !important; box-shadow: inset 0 0 0 1px #94a3b8; }
.dark .deca-send-qrbar, .dark .deca-send-qrbar .fi-section { background: transparent !important; }
.dark .deca-qrbar-lbl { color: var(--primary-300, #93c5fd); }
/* WhatsApp button always green */
.deca-send-modal .deca-btn-wa { background: #16a34a !important; color: #fff !important; }
.deca-send-modal .deca-btn-wa:hover { background: #15803d !important; }
.deca-send-modal .deca-btn-wa .fi-icon { color: #fff !important; }
/* 3.10.5 Superadmin › Idiomes */
.deca-langopt .fi-section-content { gap: 0 !important; }
.deca-langopt-row { align-items: center; padding: .55rem .25rem; border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent); }
.deca-langopt-row:last-child { border-bottom: 0; }
.deca-langopt-headrow { padding-top: 0; }
.deca-langopt-head { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--deca-muted, #64748b); }
.deca-langopt-head.is-center { text-align: center; }
.deca-langopt-name .deca-lang { font-weight: 600; }
.deca-langopt-cell { display: flex; justify-content: center; }
.deca-langopt-cell .fi-fo-field-content-col, .deca-langopt-cell .fi-fo-field-label-col { justify-content: center; }
.deca-langopt-cell { flex-direction: column; align-items: center; }
.deca-langopt-cell > * { display: flex; flex-direction: column; align-items: center; }
.deca-langopt-cell .fi-fo-field-content-col { flex-direction: column; align-items: center; gap: .15rem; }
.deca-langopt-cell .fi-sc-text, .deca-langopt-cell [class*="helper"] { font-size: .72rem; color: #6b7280; text-align: center; }
.deca-langinfo { display: flex; flex-direction: column; gap: 1rem; }
.deca-langinfo-item { display: grid; grid-template-columns: 1.25rem 1fr; gap: .65rem; align-items: start; padding: .8rem .9rem; border-radius: .6rem; background: color-mix(in srgb, #f59e0b 9%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); }
.deca-langinfo-ic { width: 1.25rem; height: 1.25rem; color: #d97706; margin-top: .1rem; }
.deca-langinfo-title { font-weight: 700; margin-bottom: .25rem; }
.deca-langinfo p { margin: 0 0 .35rem; line-height: 1.5; }
.deca-langinfo a { font-size: .85rem; word-break: break-all; }
/* 3.10.6 «Tauler» first and as a plain menu option */
.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn:has(.deca-nav-dash) { background: transparent !important; }
.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn:has(.deca-nav-dash) .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn:has(.deca-nav-dash) .fi-icon { color: var(--deca-sidebar-text) !important; }
.fi-sidebar .fi-sidebar-item-btn:has(.deca-nav-dash):hover { background: color-mix(in srgb, var(--deca-sidebar-text) 10%, transparent) !important; }
.fi-sidebar-item:has(.deca-nav-dash) { margin-bottom: .35rem; }
/* Opcions › Idiomes: default languages row */
.deca-langopt-defaults { align-items: start; padding-top: 1rem; margin-top: .4rem; border-top: 2px solid color-mix(in srgb, currentColor 14%, transparent); }
/* 3.10.7 Idiomes: order arrows */
.deca-langopt-name { display: flex; align-items: center; gap: .6rem; }
.deca-langopt-arrows { display: inline-flex; flex-direction: row; gap: .3rem; }
.deca-langopt-arrow { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: .45rem; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); background: transparent; color: var(--primary-600, #2563eb); cursor: pointer; padding: 0; }
.deca-langopt-arrow:hover:not([disabled]) { background: color-mix(in srgb, var(--primary-500, #3b82f6) 14%, transparent); }
.deca-langopt-arrow[disabled] { opacity: .25; cursor: default; }
.deca-langopt-arrow-ic { width: 1.15rem; height: 1.15rem; }
.deca-send-failed { display: flex; flex-direction: column; gap: .75rem; }
.deca-send-failed .deca-alert-danger { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; border-radius: .6rem; padding: .8rem 1rem; }
.deca-send-failed code { display: block; margin-top: .4rem; white-space: pre-wrap; word-break: break-word; font-size: .82rem; color: #7f1d1d; }
/* 3.10.10 Idiomes: language criteria below the table */
.deca-langinfo-box { background: #fffbeb; border: 1px solid #fcd34d; border-radius: .75rem; padding: 1rem 1.1rem; }
.deca-langinfo-box-title { font-weight: 800; font-size: 1rem; color: #92400e; margin-bottom: .75rem; }
.deca-langinfo-box .deca-langinfo-item { background: #fff; }
.dark .deca-langinfo-box { background: rgba(245, 158, 11, .08); border-color: rgba(245, 158, 11, .35); }
.dark .deca-langinfo-box .deca-langinfo-item { background: transparent; }
.deca-send-sec .fi-section-header .fi-btn { background: #fff; }
/* 3.11.0 user: vehicle of the linked driver */
.deca-linked-vehicle { display: flex; gap: .7rem; align-items: center; padding: .65rem .85rem; border-radius: .6rem; background: color-mix(in srgb, var(--primary-500, #3b82f6) 7%, transparent); border: 1px solid color-mix(in srgb, var(--primary-500, #3b82f6) 20%, transparent); }
.deca-linked-vehicle-ic { width: 1.6rem; height: 1.6rem; color: var(--primary-600, #2563eb); flex: none; }
/* 3.11.4 change registered window */
.deca-change-done ul { margin: 0 0 .75rem; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.deca-change-done li { font-weight: 600; }
/* 3.11.5 messages as a centred window with «Tancar» (also on phones) */
.fi-no:has(.fi-no-notification) { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; padding: 1rem; background: rgba(15, 23, 42, .45); pointer-events: auto; }
.fi-no .fi-no-notification { width: min(30rem, 100%); max-width: 100%; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); border-radius: .9rem; padding: 1.1rem 1.2rem; pointer-events: auto; }
.fi-no .fi-no-notification-title { font-size: 1.02rem; font-weight: 700; }
.fi-no .fi-no-notification-body { font-size: .95rem; margin-top: .25rem; }
.fi-no .fi-no-notification-actions { margin-top: .9rem; }
.fi-no .fi-no-notification-actions .fi-btn { min-width: 7rem; justify-content: center; }
@media (max-width: 640px) { .fi-no .fi-no-notification-actions .fi-btn { width: 100%; } }
.fi-no .fi-no-notification { border: 1px solid rgba(148, 163, 184, .35); }
/* 3.11.6 duplicated NIF of a shipper */
.deca-dup p { margin: 0 0 .6rem; font-size: .9677rem; }
.deca-dup-card { border: 1px solid #fecaca; background: #fef2f2; border-radius: .7rem; padding: .6rem .8rem; display: flex; flex-direction: column; gap: .3rem; }
.dark .deca-dup-card { background: rgb(239 68 68 / .08); border-color: rgb(239 68 68 / .35); }
.deca-dup-row { display: flex; justify-content: space-between; gap: .75rem; font-size: .86rem; border-bottom: 1px dashed rgb(239 68 68 / .2); padding-bottom: .25rem; }
.deca-dup-row:last-of-type { border-bottom: 0; padding-bottom: 0; }
.deca-dup-row span { color: #6b7280; flex-shrink: 0; }
.deca-dup-row strong { text-align: right; overflow-wrap: anywhere; }
.deca-dup-inactive { margin-top: .3rem; font-size: .8rem; color: #b45309; font-weight: 600; }
.deca-dup-hint { margin-top: .6rem !important; font-size: .82rem !important; color: #6b7280; }

/* 3.11.6 «virtuous cycle»: route sheet → DECA → send to the driver */
.deca-next { display: flex; flex-direction: column; gap: .9rem; }
.deca-next p { margin: 0; font-size: .9677rem; line-height: 1.45; }
.deca-next-lead { font-weight: 600; }
.deca-cycle { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-start; }
.deca-cycle-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; position: relative; text-align: center; }
.deca-cycle-step + .deca-cycle-step::before { content: ''; position: absolute; top: 1.05rem; right: 50%; width: 100%; height: 3px; background: #e5e7eb; z-index: 0; }
.dark .deca-cycle-step + .deca-cycle-step::before { background: rgb(255 255 255 / .12); }
.deca-cycle-step.is-done + .deca-cycle-step::before, .deca-cycle-step.is-current::before { background: #16a34a !important; }
.deca-cycle-dot { position: relative; z-index: 1; width: 2.1rem; height: 2.1rem; border-radius: 999px; display: grid; place-items: center; background: #f3f4f6; color: #9ca3af; border: 2px solid #e5e7eb; }
.dark .deca-cycle-dot { background: #1f2937; border-color: #374151; }
.deca-cycle-step.is-done .deca-cycle-dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.deca-cycle-step.is-current .deca-cycle-dot { background: #fff; border-color: #16a34a; color: #16a34a; box-shadow: 0 0 0 4px rgb(22 163 74 / .15); }
.dark .deca-cycle-step.is-current .deca-cycle-dot { background: #052e16; }
.deca-cycle-ic { width: 1.1rem; height: 1.1rem; }
.deca-cycle-label { font-size: .72rem; font-weight: 600; color: #6b7280; line-height: 1.2; }
.deca-cycle-step.is-current .deca-cycle-label { color: #15803d; }
.deca-next-doc { display: flex; gap: .9rem; align-items: flex-start; border: 1px solid #e5e7eb; border-left: 5px solid #16a34a; border-radius: .7rem; padding: .85rem 1rem; background: linear-gradient(180deg, #f9fafb, #fff); box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.dark .deca-next-doc { background: rgb(255 255 255 / .03); border-color: rgb(255 255 255 / .1); border-left-color: #16a34a; }
.deca-next-doc-ic { flex-shrink: 0; width: 3rem; height: 3.6rem; border-radius: .35rem .9rem .35rem .35rem; background: #dcfce7; color: #15803d; display: grid; place-items: center; }
.deca-next-doc-svg { width: 1.8rem; height: 1.8rem; }
.deca-next-doc-body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.deca-next-doc-number { font-family: ui-monospace, monospace; font-size: .8rem; font-weight: 700; color: #15803d; letter-spacing: .03em; }
.deca-issued-hero { text-align: center; border-radius: .9rem; padding: 1rem .9rem .9rem; background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%); display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.dark .deca-issued-hero { background: linear-gradient(135deg, rgb(22 163 74 / .12), rgb(37 99 235 / .12)); }
.deca-issued-art { display: flex; align-items: center; gap: .5rem; width: min(17rem, 100%); }
.deca-issued-bubble { flex-shrink: 0; width: 3.4rem; height: 3.4rem; border-radius: 999px; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px rgb(0 0 0 / .15); }
.deca-issued-bubble.is-truck { background: #16a34a; }
.deca-issued-bubble.is-mail { background: #2563eb; }
.deca-issued-svg { width: 1.8rem; height: 1.8rem; }
.deca-issued-road { flex: 1; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, #9ca3af 0 10px, transparent 10px 18px); animation: deca-road 1.2s linear infinite; }
@keyframes deca-road { to { background-position: 18px 0; } }
@media (prefers-reduced-motion: reduce) { .deca-issued-road { animation: none; } }
.deca-issued-code { font-family: ui-monospace, monospace; font-size: 1.15rem; font-weight: 800; letter-spacing: .05em; color: #111827; background: #fff; border: 1px solid #d1d5db; border-radius: .5rem; padding: .2rem .7rem; overflow-wrap: anywhere; }
.dark .deca-issued-code { color: #f9fafb; background: rgb(0 0 0 / .3); border-color: rgb(255 255 255 / .15); }
.deca-issued-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (max-width: 560px) { .deca-issued-cards { grid-template-columns: 1fr; } }
.deca-issued-card { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid #e5e7eb; border-radius: .7rem; padding: .7rem .75rem; }
.dark .deca-issued-card { border-color: rgb(255 255 255 / .1); }
.deca-issued-card strong { display: block; font-size: .9677rem; margin-bottom: .2rem; }
.deca-issued-card p { font-size: .8rem; color: #4b5563; }
.dark .deca-issued-card p { color: #d1d5db; }
.deca-issued-card-ic { flex-shrink: 0; width: 2.1rem; height: 2.1rem; border-radius: .55rem; display: grid; place-items: center; }
.deca-issued-card-ic.is-lock { background: #fef3c7; color: #b45309; }
.deca-issued-card-ic.is-send { background: #dbeafe; color: #1d4ed8; }
.deca-issued-card-svg { width: 1.2rem; height: 1.2rem; }
.deca-issued-url-label { display: flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; margin-bottom: .3rem; }
.deca-issued-url-row { display: flex; align-items: center; gap: .4rem; border: 1px solid #d1d5db; border-radius: .55rem; padding: .35rem .4rem .35rem .65rem; background: #f9fafb; }
.dark .deca-issued-url-row { background: rgb(255 255 255 / .04); border-color: rgb(255 255 255 / .12); }
.deca-issued-url-row a { flex: 1; min-width: 0; font-size: .8rem; color: #2563eb; text-decoration: underline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deca-issued-copy { flex-shrink: 0; border: 0; background: #e5e7eb; border-radius: .4rem; padding: .3rem; color: #374151; cursor: pointer; }
.dark .deca-issued-copy { background: rgb(255 255 255 / .1); color: #e5e7eb; }
.deca-issued-url-ic { width: 1rem; height: 1rem; }
.deca-next, .deca-next > * { min-width: 0; max-width: 100%; }
.deca-issued-url-row a { flex: 1 1 0; width: 0; }

/* 3.11.7 rule of the buttons (every screen and window):
   «Tancar» / «Cancel·lar» always on the right and red;
   with one more button 3/4 + 1/4; with two more 2/5 + 2/5 + 1/5; alone, on the right (1/4). */
:is(.fi-modal-footer-actions, .fi-ac):has(> .deca-cancel) { display: flex !important; flex-direction: row !important; flex-wrap: nowrap; gap: .6rem; width: 100%; }
:is(.fi-modal-footer-actions, .fi-ac):has(> .deca-cancel) > * { flex: 2 1 0; min-width: 0; justify-content: center; white-space: normal; text-align: center; }
:is(.fi-modal-footer-actions, .fi-ac):has(> .deca-cancel):has(> :nth-child(2):last-child) > :not(.deca-cancel) { flex: 3 1 0; }
:is(.fi-modal-footer-actions, .fi-ac) > .deca-cancel { flex: 1 1 0; order: 99; }
:is(.fi-modal-footer-actions, .fi-ac):has(> .deca-cancel:only-child) { justify-content: flex-end; }
:is(.fi-modal-footer-actions, .fi-ac) > .deca-cancel:only-child { flex: 0 0 25%; min-width: 7rem; }
@media (max-width: 640px) { :is(.fi-modal-footer-actions, .fi-ac) > .deca-cancel:only-child { flex: 1 1 100%; } }
.deca-cancel, .deca-cancel:hover { background-color: #dc2626 !important; color: #fff !important; border-color: #dc2626 !important; --tw-ring-color: #dc2626; }
.deca-cancel:hover { background-color: #b91c1c !important; }
.deca-cancel .fi-icon, .deca-cancel span { color: #fff !important; }
/* When the main button is already red (delete…), «Cancel·lar» in grey so the two are not confused. */
:is(.fi-modal-footer-actions, .fi-ac):has(> .fi-color-danger:not(.deca-cancel):not(.deca-delete-btn)) > .deca-cancel { background-color: #6b7280 !important; border-color: #6b7280 !important; }
/* 3.11.7 steps everywhere + «Procés completat» */
.deca-steps-head { margin-bottom: .25rem; }
.deca-steps-line { text-align: center; font-size: .85rem !important; color: #4b5563; }
.dark .deca-steps-line { color: #d1d5db; }
.deca-cycle.is-complete .deca-cycle-step::before { background: #16a34a !important; }
.deca-cycle.is-complete .deca-cycle-label { color: #15803d; }
.deca-next-doc.is-change { border-left-color: #d97706; }
.deca-next-doc.is-change .deca-next-doc-ic { background: #fef3c7; color: #b45309; }
.deca-next-list { list-style: disc; margin: .2rem 0 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .2rem; font-size: .86rem; font-weight: 600; }
.deca-issued-hero.is-done { background: linear-gradient(135deg, #ecfdf5 0%, #dcfce7 100%); }
.dark .deca-issued-hero.is-done { background: rgb(22 163 74 / .14); }
.deca-send-done-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; }
.deca-send-done-list li { display: flex; align-items: center; gap: .35rem; justify-content: center; overflow-wrap: anywhere; }
.deca-send-done-ic { width: 1.05rem; height: 1.05rem; color: #16a34a; flex-shrink: 0; }
.deca-offline { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid #fcd34d; background: #fffbeb; border-radius: .7rem; padding: .7rem .75rem; }
.dark .deca-offline { background: rgb(245 158 11 / .1); border-color: rgb(245 158 11 / .4); }
.deca-offline strong { display: block; font-size: .9677rem; margin-bottom: .2rem; }
.deca-offline p { font-size: .82rem; }
.deca-offline-ic { flex-shrink: 0; width: 2.1rem; height: 2.1rem; border-radius: .55rem; display: grid; place-items: center; background: #fde68a; color: #92400e; }
/* 3.11.8 «Enviar només el QR» next to «Adjuntar el PDF», highlighted (violet, QR icon) */
.deca-qr-toggle { border: 2px solid #7c3aed; background: #f5f3ff; border-radius: .7rem; padding: .45rem .7rem; }
.dark .deca-qr-toggle { background: rgb(124 58 237 / .14); border-color: #8b5cf6; }
.deca-qr-toggle label.fi-fo-field-label { cursor: pointer; }
.deca-qr-toggle .deca-qrbar-lbl { color: #6d28d9; }
.dark .deca-qr-toggle .deca-qrbar-lbl { color: #c4b5fd; }
.deca-qr-toggle .fi-toggle-on { background: #7c3aed !important; }
.deca-qr-toggle .fi-toggle-off { background: #cbd5e1 !important; }
.deca-send-opts { align-items: center; }

/* 3.11.9 ↑ ↓: two buttons side by side, big enough for a finger (lists, languages, repeaters) */
.deca-move-btn { width: 2.25rem !important; height: 2.25rem !important; border: 1px solid #d1d5db !important; border-radius: .45rem !important; background: #fff; }
.dark .deca-move-btn { background: rgb(255 255 255 / .05); border-color: rgb(255 255 255 / .15) !important; }
.deca-move-btn:disabled, .deca-move-btn[disabled] { opacity: .3; }
.deca-move-btn .fi-icon { width: 1.15rem; height: 1.15rem; }
.fi-fo-table-repeater-actions, .fi-fo-repeater-item-header-start-actions { display: flex !important; flex-direction: row !important; gap: .3rem; align-items: center; }
.fi-fo-table-repeater-actions .fi-icon-btn[wire\:click*="moveUp"], .fi-fo-table-repeater-actions .fi-icon-btn[wire\:click*="moveDown"],
.fi-fo-repeater-item .fi-icon-btn[wire\:click*="moveUp"], .fi-fo-repeater-item .fi-icon-btn[wire\:click*="moveDown"] {
    width: 2.25rem !important; height: 2.25rem !important; border: 1px solid #d1d5db; border-radius: .45rem; background: #fff; }
.dark .fi-fo-table-repeater-actions .fi-icon-btn[wire\:click*="move"], .dark .fi-fo-repeater-item .fi-icon-btn[wire\:click*="move"] { background: rgb(255 255 255 / .05); border-color: rgb(255 255 255 / .15); }
@media (max-width: 640px) {
    .deca-langopt-row { grid-template-columns: 1.7fr 1fr 1fr !important; }
    .deca-langopt-name { flex-wrap: wrap; row-gap: .35rem; }
    .fi-fo-table-repeater-actions { gap: .4rem !important; }
}

/* 3.11.10 «?» square button next to the languages: big glyph, amber, the height of a language row */
.deca-langinfo-sq { width: 2.4rem !important; min-width: 2.4rem; height: 2.4rem !important; padding: 0 !important; justify-content: center;
    border-radius: .5rem !important; font-size: 1.35rem !important; font-weight: 800 !important; line-height: 1 !important; }
.deca-langinfo-cell { align-self: flex-end; }
.deca-langinfo-cell .fi-ac { margin: 0; }
/* «Enviar només el QR» box: content centred, on the same line as «Adjuntar el PDF» */
.deca-send-opts .fi-grid { align-items: center; }
.deca-qr-toggle { display: flex !important; align-items: center; min-height: 3.1rem; padding: .35rem .8rem !important; }
.deca-qr-toggle > .fi-fo-field-label-col, .deca-qr-toggle .fi-fo-field-label-ctn { width: 100%; margin: 0; }
.deca-qr-toggle label.fi-fo-field-label { align-items: center; }
/* Hint just after the label and its asterisk */
.deca-hint-inline .fi-fo-field-label-ctn { justify-content: flex-start !important; flex-wrap: wrap; column-gap: .6rem; row-gap: .1rem; }
.deca-hint-inline .fi-fo-field-wrp-hint, .deca-hint-inline .fi-fo-field-label-ctn > :last-child:not(label) { font-size: .78rem; color: #6b7280; font-weight: 400; }
.deca-hint-inline .fi-fo-field-label-ctn > .fi-sc { margin-inline-start: 0 !important; justify-content: flex-start !important; flex: 0 1 auto !important; width: auto !important; }
.deca-hint-inline .fi-sc-text { font-size: .78rem; color: #6b7280; font-style: italic; }
.dark .deca-hint-inline .fi-sc-text { color: #9ca3af; }
/* «Enviar a»: three equal buttons that always fit (also on the phone) */
.deca-sendto { width: 100%; max-width: 30rem; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.deca-sendto > * { min-width: 0; }
.deca-sendto .fi-btn { justify-content: center; padding-inline: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .deca-sendto .fi-btn .fi-icon { display: none; } .deca-sendto .fi-btn { font-size: .85rem; } }

/* 3.11.11 */
.deca-steps-line.is-big { font-size: 1.3rem !important; font-weight: 800; font-family: ui-monospace, monospace; letter-spacing: .03em; color: #111827; }
.dark .deca-steps-line.is-big { color: #f9fafb; }
.deca-code-line { display: block; white-space: nowrap; font-family: ui-monospace, monospace; font-size: 1.05em; margin: .1rem 0; }
.deca-offline-more { margin-top: .45rem !important; padding-top: .45rem; border-top: 1px dashed rgb(146 64 14 / .3); }
/* «+ Nou carregador» apart from the field, coloured and bold */
.deca-shipper-select .fi-input-wrp { box-shadow: none !important; background: transparent !important; border: 0 !important; overflow: visible !important; gap: .6rem; }
.deca-shipper-select .fi-input-wrp-content-ctn { border: 1px solid #d1d5db; border-radius: .5rem; background: #fff; }
.dark .deca-shipper-select .fi-input-wrp-content-ctn { background: rgb(255 255 255 / .05); border-color: rgb(255 255 255 / .15); }
.deca-shipper-select .fi-input-wrp-suffix { border: 0 !important; padding: 0 !important; background: transparent !important; }
.deca-new-shipper-btn { font-weight: 800 !important; white-space: nowrap; height: 100%; min-height: 2.5rem; }
@media (max-width: 640px) {
    .deca-shipper-select .fi-input-wrp { flex-wrap: wrap; }
    .deca-shipper-select .fi-input-wrp-content-ctn, .deca-shipper-select .fi-input-wrp-suffix { flex: 1 1 100%; }
    .deca-shipper-select .fi-input-wrp-actions, .deca-new-shipper-btn { width: 100%; justify-content: center; }
}
/* 3.12.0 Eines › Diagnòstic */
.deca-doc-head { border-radius: .9rem; padding: 1rem 1.1rem; background: #ecfdf5; border: 1px solid #86efac; display: flex; flex-direction: column; gap: .45rem; }
.deca-doc-head.is-warn { background: #fffbeb; border-color: #fcd34d; }
.deca-doc-head.is-bad { background: #fef2f2; border-color: #fca5a5; }
.dark .deca-doc-head { background: rgb(22 163 74 / .1); } .dark .deca-doc-head.is-warn { background: rgb(245 158 11 / .1); } .dark .deca-doc-head.is-bad { background: rgb(239 68 68 / .1); }
.deca-doc-verdict { font-size: 1.15rem; font-weight: 800; }
.deca-doc-meta { font-size: .8rem; color: #6b7280; }
.deca-doc-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.deca-doc-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; padding: .25rem .6rem; border-radius: 999px; background: #fff; border: 1px solid #e5e7eb; }
.dark .deca-doc-chip { background: rgb(255 255 255 / .05); border-color: rgb(255 255 255 / .12); }
.deca-doc-chip-ic, .deca-doc-row-ic { width: 1.1rem; height: 1.1rem; }
.is-pass > .deca-doc-chip-ic, .deca-doc-row.is-pass .deca-doc-ic, .deca-doc-chip.is-pass { color: #15803d; }
.deca-doc-chip.is-notice, .deca-doc-row.is-notice .deca-doc-ic { color: #2563eb; }
.deca-doc-chip.is-warn, .deca-doc-row.is-warn .deca-doc-ic { color: #b45309; }
.deca-doc-chip.is-fail, .deca-doc-row.is-fail .deca-doc-ic, .deca-doc-row.is-error .deca-doc-ic { color: #dc2626; }
.deca-doc-chip.is-skip, .deca-doc-row.is-skip .deca-doc-ic { color: #9ca3af; }
.deca-doc-list { display: flex; flex-direction: column; }
.deca-doc-row { display: flex; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid color-mix(in srgb, currentColor 8%, transparent); }
.deca-doc-row:last-child { border-bottom: 0; }
.deca-doc-row.is-fail, .deca-doc-row.is-error { background: rgb(239 68 68 / .06); border-radius: .4rem; padding-inline: .4rem; }
.deca-doc-ic { flex-shrink: 0; padding-top: .1rem; }
.deca-doc-body { min-width: 0; }
.deca-doc-name { font-weight: 700; font-size: .9677rem; }
.deca-doc-sum { font-size: .82rem; color: #4b5563; } .dark .deca-doc-sum { color: #d1d5db; }
.deca-doc-det { display: block; font-size: .75rem; margin-top: .25rem; white-space: pre-wrap; overflow-wrap: anywhere; color: #991b1b; }
.deca-doc-fix { font-size: .8rem; margin-top: .25rem; }
.deca-doc-problems { border: 2px solid #fca5a5; }

/* Weight notices of the route sheet (only notices: they do not stop the DECA). */
.deca-load-warn { margin-top: .5rem; display: grid; gap: .3rem; }
.deca-load-warn-note { font-size: .8rem; opacity: .85; }

/* Utilitats › Descàrrega de DECA */
.deca-dl-preview { grid-column: 1 / -1; display: grid; gap: .35rem; padding: .85rem 1rem; border-radius: .6rem; background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; }
.deca-dl-file { display: flex; align-items: center; gap: .4rem; word-break: break-all; }
.deca-dl-file code { font-size: .85rem; }
.deca-dl-ic { width: 1.1rem; height: 1.1rem; flex: none; }

/* Maintenance window (deca.js): amber card, line drawing, no shades */
.deca-maint-overlay { position: fixed; inset: 0; z-index: 2147483000; background: rgb(15 23 42 / .72); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.deca-maint-card { background: #fbbf24; color: #3b1d06; max-width: 600px; width: 100%; border-radius: 1rem; padding: 2rem 1.75rem 1.75rem; text-align: center; border: 2px solid #b45309; }
.deca-maint-card.is-done { background: #bbf7d0; color: #052e16; border-color: #15803d; }
.deca-maint-card h2 { font-size: 1.5rem; font-weight: 800; margin: .75rem 0 .75rem; }
.deca-maint-card p { margin: .5rem 0; line-height: 1.5; font-size: 1.02rem; }
.deca-maint-msg:empty { display: none; }
.deca-maint-msg { background: #fff7ed; border: 1.5px solid #b45309; color: #7c2d12; border-radius: .6rem; padding: .7rem .9rem; white-space: pre-wrap; font-weight: 600; }
.deca-maint-wait { font-size: .9677rem; opacity: .8; }
.deca-maint-graphic { color: #7c2d12; }
.deca-maint-svg .f1 { fill: #fff7e6; }
.deca-maint-svg .f2 { fill: #fde68a; }
.deca-maint-svg.is-done .f1 { fill: #f0fdf4; }
.deca-maint-svg.is-done .f2 { fill: #bbf7d0; }
.deca-maint-card.is-done .deca-maint-graphic { color: #166534; }
.deca-maint-svg { width: 100%; max-width: 460px; height: auto; display: block; margin: 0 auto; }
.deca-maint-gear { transform-box: fill-box; transform-origin: center; animation: deca-maint-turn 9s linear infinite; }
@keyframes deca-maint-turn { to { transform: rotate(360deg); } }
.deca-maint-flow { stroke-dasharray: 6 7; animation: deca-maint-flow 1.1s linear infinite; }
.deca-maint-svg.is-done .deca-maint-flow { animation: none; stroke-dasharray: none; }
@keyframes deca-maint-flow { to { stroke-dashoffset: -26; } }
.deca-maint-legend { display: flex; justify-content: space-between; max-width: 460px; margin: .2rem auto 0; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.deca-maint-legend span { width: 33%; }
.deca-maint-close { margin-top: 1.1rem; width: 100%; background: #dc2626; color: #fff; font-weight: 700; border-radius: var(--deca-btn-radius, .5rem); padding: .75rem 1rem; font-size: 1rem; }
.deca-maint-admin { margin-top: .9rem; font-size: .8rem; text-decoration: underline; opacity: .75; background: none; color: inherit; }
.deca-maint-band-ic { width: 1.2rem; height: 1.2rem; flex: none; }
.deca-maint-band-ic .f2 { fill: #b45309; }
.deca-maint-band-ic .f1 { fill: #b45309; }
.deca-maint-band { display: flex; align-items: center; gap: .45rem; position: fixed; left: 50%; bottom: .75rem; transform: translateX(-50%); z-index: 2147483000; background: #b45309; color: #fff; font-weight: 600; font-size: .85rem; padding: .45rem 1rem; border-radius: 999px; }
@media (max-width: 767px) { .deca-maint-card { padding: 1.5rem 1rem 1.25rem; } .deca-maint-card h2 { font-size: 1.3rem; } .deca-maint-legend { font-size: .7rem; } }
.fi-section-header-after-ctn:has(.deca-maint-btn) { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; }
.fi-section-header-after-ctn .deca-maint-btn { width: 2.25rem; height: 2.25rem; }
/* Accounts list on the phone: the buttons only with their icon (the name of the account stays visible). */
@media (max-width: 767px) {
    .deca-accounts-table .fi-ta-actions .fi-btn { padding-inline: .5rem; gap: 0; font-size: 0; }
    .deca-accounts-table .fi-ta-actions .fi-btn svg { margin: 0; }
}

/* Figure tiles with the icon of the item (x-stat) */
.deca-stat-ic { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; min-width: 0; }
.deca-stat-ic > div { min-width: 0; width: 100%; }
.deca-stat-ic .deca-stat-label { overflow-wrap: anywhere; hyphens: auto; }
.deca-stat-ic .deca-stat-value { overflow-wrap: anywhere; line-height: 1.15; }
.deca-stat-icon { flex: none; width: 2.3rem; height: 2.3rem; border-radius: .7rem; display: grid; place-items: center; }
.deca-stat-svg { width: 1.3rem; height: 1.3rem; }
.deca-tone-blue { background: #dbeafe; color: #1d4ed8; } .deca-tone-sky { background: #e0f2fe; color: #0369a1; }
.deca-tone-indigo { background: #e0e7ff; color: #4338ca; } .deca-tone-teal { background: #ccfbf1; color: #0f766e; }
.deca-tone-violet { background: #ede9fe; color: #6d28d9; } .deca-tone-amber { background: #fef3c7; color: #b45309; }
.deca-tone-orange { background: #ffedd5; color: #c2410c; } .deca-tone-green { background: #dcfce7; color: #15803d; }
.deca-tone-slate { background: #e2e8f0; color: #334155; }
.dark .deca-stat-icon { filter: saturate(.9) brightness(.9); }
.deca-big-svg { width: 2rem; height: 2rem; }

/* Eines › Corregir caràcters */
.deca-charset-bar { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; margin-bottom: .75rem; font-weight: 600; }
.deca-charset .deca-charset-old { color: #b91c1c; text-decoration: line-through; text-decoration-thickness: 1px; }
.deca-charset .deca-charset-new { color: #15803d; font-weight: 600; }
.deca-charset tr.is-off td { opacity: .45; }
.deca-charset tr.is-off .deca-charset-old { text-decoration: none; }
.deca-check { width: 1.15rem; height: 1.15rem; accent-color: #16a34a; }
.deca-cs-field { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; }
.deca-cs-name { background: #dbeafe; color: #1d4ed8; } .deca-cs-city { background: #ccfbf1; color: #0f766e; }
.deca-cs-province { background: #ede9fe; color: #6d28d9; } .deca-cs-address { background: #ffedd5; color: #b45309; }

/* Privacy policy (second window of the cookies notice) */
.deca-privacy-policy-link { display: block; margin: .6rem auto .2rem; background: none; color: var(--deca-link, #1d4ed8); text-decoration: underline; font-weight: 600; font-size: .9677rem; }
.deca-policy-overlay { z-index: 2147482000; }
.deca-policy-box { max-width: 760px; }
.deca-policy-text { max-height: 70vh; }
.deca-policy-text h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 .6rem; }
.deca-policy-text h3 { font-size: 1rem; font-weight: 700; margin: 1rem 0 .35rem; }
.deca-policy-text p { margin: .4rem 0; line-height: 1.5; }
.deca-policy-text ul { list-style: disc; padding-left: 1.3rem; margin: .3rem 0; }
.deca-policy-text li { margin: .15rem 0; }
.deca-policy-close { margin-top: .8rem; width: 100%; background: #dc2626; color: #fff; font-weight: 700; border-radius: var(--deca-btn-radius, .5rem); padding: .65rem 1rem; }

/* Legal windows: «Política de cookies» at the entrance, «Informació legal» and the full texts. */
.deca-legal-box { max-width: 34rem; align-items: stretch; text-align: center; gap: .9rem; }
.deca-legal-title { font-size: 1.35rem !important; text-align: center; }
.deca-legal-intro { text-align: center; color: #374151; line-height: 1.55; }
.deca-cookie-svg, .deca-legal-hero { width: 100%; max-width: 250px; height: auto; display: block; margin: 0 auto; color: #78350f; }
.deca-legal-hero { max-width: 120px; color: #1e3a8a; }
.deca-legal-hero .f1 { fill: #eff6ff; } .deca-legal-hero .f2 { fill: #bfdbfe; }
.deca-cookie-svg .bg { fill: #fff7e6; stroke: none; }
.deca-cookie-svg .dough { fill: #f4c27a; }
.deca-cookie-svg .chip { fill: #78350f; }
.deca-cookie-svg .ink { fill: currentColor; stroke: none; }
.deca-cookie-svg .cheek { fill: #fb923c; opacity: .45; }
.deca-cookie-svg .shield { fill: #bbf7d0; color: #166534; }
.deca-cookie-svg .shield + path { color: #166534; }
.deca-cookie-body { transform-origin: 108px 72px; animation: deca-cookie-bob 3.2s ease-in-out infinite; }
.deca-cookie-crumbs { animation: deca-cookie-crumbs 3.2s ease-in infinite; }
@keyframes deca-cookie-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }
@keyframes deca-cookie-crumbs { 0% { transform: translateY(-6px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .deca-cookie-body, .deca-cookie-crumbs { animation: none; } }
.deca-legal-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.deca-legal-tile { hyphens: manual; overflow-wrap: break-word; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .8rem .4rem .7rem; border-radius: .8rem; border: 1.5px solid; font-weight: 700; font-size: .82rem; line-height: 1.2; transition: transform .12s, box-shadow .12s; }
.deca-legal-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgb(0 0 0 / .12); }
.deca-legal-tile-ic { width: 2.8rem; height: 2.8rem; border-radius: .7rem; display: flex; align-items: center; justify-content: center; color: #fff; }
.deca-legal-tile-ic svg { width: 1.7rem; height: 1.7rem; }
.deca-legal-tile.is-cookies { background: #fffbeb; border-color: #fcd34d; color: #92400e; } .deca-legal-tile.is-cookies .deca-legal-tile-ic { background: #d97706; }
.deca-legal-tile.is-privacy { background: #eff6ff; border-color: #93c5fd; color: #1e40af; } .deca-legal-tile.is-privacy .deca-legal-tile-ic { background: #2563eb; }
.deca-legal-tile.is-terms { background: #f5f3ff; border-color: #c4b5fd; color: #5b21b6; } .deca-legal-tile.is-terms .deca-legal-tile-ic { background: #7c3aed; }
.deca-legal-foot { display: flex; justify-content: flex-end; }
.deca-legal-close { background: #dc2626; color: #fff; font-weight: 700; border-radius: var(--deca-btn-radius, .5rem); padding: .6rem 1.6rem; }
.deca-legal-close:hover { background: #b91c1c; }
.deca-legal-info-overlay { z-index: 2147481000; }
.deca-legal-only-es { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: #6b7280; }
.deca-policy-text table { width: 100%; border-collapse: collapse; margin: .4rem 0; font-size: .8rem; }
.deca-policy-text th { background: #f3f4f6; font-weight: 700; }
.deca-login-legal { text-decoration: underline; }
/* Superadministrator: preview of a legal text, the replaced data marked. */
.deca-legal-preview { max-height: 26rem; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: .5rem; padding: .4rem 1rem 1rem; font-size: .9677rem; line-height: 1.55; }
.dark .deca-legal-preview { border-color: #374151; }
.deca-legal-preview h2 { font-size: 1.15rem; font-weight: 800; margin: .6rem 0; }
.deca-legal-preview h3 { font-size: 1rem; font-weight: 700; margin: .9rem 0 .3rem; }
.deca-legal-preview p { margin: .35rem 0; }
.deca-legal-preview ul { list-style: disc; padding-left: 1.3rem; }
.deca-legal-preview table { border-collapse: collapse; width: 100%; font-size: .82rem; }
.deca-legal-preview th, .deca-legal-preview td { border-bottom: 1px solid #e5e7eb; padding: .3rem .4rem; text-align: left; vertical-align: top; }
mark.deca-legal-var { background: #dbeafe; color: #1e3a8a; border-radius: .25rem; padding: 0 .2rem; }
/* Side menu: «Informació legal» over the copyright. */
.deca-sidebar-legal { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .35rem 0 .55rem; color: inherit; font-weight: 600; font-size: .8rem; text-align: left; }
.deca-sidebar-legal svg { width: 1.25rem; height: 1.25rem; flex: none; }
.deca-sidebar-legal:hover span { text-decoration: underline; }
.deca-sidebar-copy span { white-space: nowrap; }

/* ===== Login screen: «Modern» and «Modern expandit» looks (Opcions › Pantalla d'entrada) ===== */
.deca-login-art { display: none; }
.deca-login-copy { opacity: .7; }
.deca-login-head { display: none; }
.fi-simple-layout:has(> .deca-login-art:not(.is-classic)) .deca-login-head { display: block; margin-bottom: 1.4rem; }
.fi-simple-layout:has(> .deca-login-art:not(.is-classic)) .deca-login-footer-lang { display: none; }
.deca-login-head-logo { display: flex; justify-content: center; margin-bottom: 1.6rem; }
.deca-login-head-logo img { height: 4.8rem; width: auto; max-width: 80%; object-fit: contain; }
.deca-login-head-logo .deca-logo-d { display: none; }
.deca-login-head-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.deca-login-title { font-size: 1.1rem; line-height: 1.2; font-weight: 800; color: var(--deca-text, #0f2a5c); margin: 0; }
.deca-login-head-row .deca-langpick { margin: 0; flex: none; }
.deca-login-head-row .deca-langpick-btn { padding: .35rem .6rem; font-size: .85rem; }
.deca-login-head-row .deca-langpick-list { top: calc(100% + .35rem); bottom: auto; left: auto; right: 0; transform: none; }
.fi-simple-layout:has(> .deca-login-art:not(.is-classic)) .fi-input-wrp { border-radius: .7rem; }
.fi-simple-layout:has(> .deca-login-art:not(.is-classic)) .fi-input { padding-top: .6rem; padding-bottom: .6rem; }
.fi-simple-layout:has(> .deca-login-art:not(.is-classic)) .fi-btn[type="submit"] { border-radius: .7rem; padding-top: .7rem; padding-bottom: .7rem; font-weight: 700; }

/* Phones and tablets: no photo and no card, the form straight on the background. */
@media (max-width: 1023px) {
    .fi-simple-layout:has(> .deca-login-art:not(.is-classic)), .fi-simple-layout:has(> .deca-login-art:not(.is-classic)) .fi-simple-main-ctn { background: var(--deca-surface, #fff) !important; }
    .fi-simple-layout:has(> .deca-login-art:not(.is-classic)) .fi-simple-main { background: transparent !important; box-shadow: none !important; border: 0 !important; --tw-ring-shadow: 0 0 #0000; }
    /* From the top, without the big empty band; bigger logo. */
    .fi-simple-layout:has(> .deca-login-art:not(.is-classic)) .fi-simple-main-ctn { align-items: flex-start; }
    .fi-simple-layout:has(> .deca-login-art:not(.is-classic)) .fi-simple-main { margin-top: .5rem; margin-bottom: 1rem; padding-top: 1.25rem; }
    .deca-login-head-logo { margin-bottom: 1.4rem; }
    .deca-login-head-logo img { height: 6rem; max-width: 85%; }
}
@media (max-width: 639px) {
    .fi-simple-layout:has(> .deca-login-art:not(.is-classic)) .fi-simple-main { padding-left: 1.25rem; padding-right: 1.25rem; }
    .deca-login-head-logo img { height: 5.2rem; }
}

/* Panel of the photo (computers only). */
.deca-login-art-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.deca-login-art-draw { position: absolute; left: 50%; top: 44%; width: 82%; max-width: 30rem; transform: translate(-50%, -50%); }
.deca-login-art-text { position: absolute; left: 0; right: 0; bottom: 2.2rem; display: flex; justify-content: center; padding: 0 1.5rem; color: #fff; }
.deca-login-art-band { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.4rem; border-radius: 1rem; background: rgb(10 25 55 / .38); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgb(255 255 255 / .14); max-width: 100%; }
.deca-login-art-logo { height: 2.9rem; width: auto; max-width: 9rem; object-fit: contain; flex: none; }
.deca-login-art-logo.is-whitened { filter: brightness(0) invert(1); }
.deca-login-art-logo + div { padding-left: 1rem; border-left: 1px solid rgb(255 255 255 / .3); }
.deca-login-art-eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .2em; opacity: .9; }
.deca-login-art-sub { font-size: .98rem; margin-top: .2rem; }
@media (min-width: 1024px) {
    .deca-login-art.is-modern, .deca-login-art.is-expanded { display: block; position: relative; overflow: hidden; background: radial-gradient(120% 90% at 20% 0%, #1f5fae 0%, #0f3a7a 45%, #0a2a5c 100%); }
    /* Modern: rounded panel at the left of the card, both centred. */
    /* Modern: photo panel and card side by side, the panel exactly as tall as the card (photo cropped to fit). */
    .fi-simple-layout:has(> .deca-login-art.is-modern) { display: grid; grid-template-columns: minmax(0, 40rem) minmax(0, 29rem); column-gap: 3rem; align-items: stretch; place-content: safe center; padding: 2rem 2.5rem; background: linear-gradient(160deg, #f4f8fd 0%, #e8f0fa 100%); }
    /* The photo always fits on the screen: as tall as the card, at most the visible height (then it stays put while scrolling). */
    .deca-login-art.is-modern { height: auto; min-height: 0; max-height: calc(100dvh - 4rem); position: sticky; top: 2rem; border-radius: 1.75rem; box-shadow: 0 24px 60px rgb(10 42 92 / .25); }
    .fi-simple-layout:has(> .deca-login-art.is-modern) .fi-simple-main-ctn { width: auto; min-width: 0; min-height: 0; height: auto; padding: 0; display: flex; background: transparent; }
    .fi-simple-layout:has(> .deca-login-art.is-modern) .fi-simple-main { max-width: 29rem; width: 100%; margin: 0; padding-top: 2.5rem; padding-bottom: 2.25rem; border-radius: 1.4rem; box-shadow: 0 18px 50px rgb(15 40 90 / .10); padding-left: 2.2rem; padding-right: 2.2rem; }
    /* Modern expandit: the screen split in two; the right half is plain (no card). */
    .deca-login-art.is-expanded { position: fixed; left: 0; top: 0; bottom: 0; width: 50vw; }
    .fi-simple-layout:has(> .deca-login-art.is-expanded), .fi-simple-layout:has(> .deca-login-art.is-expanded) .fi-simple-main-ctn { background: var(--deca-surface, #fff) !important; }
    .fi-simple-layout:has(> .deca-login-art.is-expanded) { padding-left: 50vw; }
    .fi-simple-layout:has(> .deca-login-art.is-expanded) .fi-simple-main-ctn { width: 100%; min-height: 100dvh; align-items: safe center; }
    .fi-simple-layout:has(> .deca-login-art.is-expanded) .fi-simple-main { margin-top: 1.5rem; margin-bottom: 1.5rem; }
    .fi-simple-layout:has(> .deca-login-art.is-expanded) .fi-simple-main { max-width: 28rem; background: transparent !important; box-shadow: none !important; border: 0 !important; --tw-ring-shadow: 0 0 #0000; }
}

/* Superadministrator › Pantalla d'entrada. */
.deca-loginopt-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.deca-loginopt-mode { display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: 1rem; border: 2px solid #e5e7eb; border-radius: .9rem; background: #fff; text-align: center; transition: border-color .15s, box-shadow .15s; }
.dark .deca-loginopt-mode { background: transparent; border-color: #374151; }
.deca-loginopt-mode:hover { border-color: #93c5fd; }
.deca-loginopt-mode.is-on { border-color: #2563eb; box-shadow: 0 0 0 3px rgb(37 99 235 / .18); }
.deca-loginopt-mode svg { width: 100%; max-width: 12rem; height: auto; }
.deca-loginopt-mode svg .bg { fill: #eef3fa; stroke: #cbd5e1; }
.deca-loginopt-mode svg .card { fill: #fff; stroke: #94a3b8; }
.deca-loginopt-mode svg .ln { stroke: #cbd5e1; stroke-width: 3; stroke-linecap: round; }
.deca-loginopt-mode svg .btn { fill: #2563eb; }
.deca-loginopt-mode svg .photo { fill: #1e4e8c; }
.deca-loginopt-mode svg .hill { fill: #3b82c4; }
.deca-loginopt-mode svg .sun { fill: #fcd34d; }
.deca-loginopt-mode-name { font-weight: 800; font-size: .95rem; }
.deca-loginopt-mode.is-on .deca-loginopt-mode-name { color: #1d4ed8; }
.deca-loginopt-mode-help { font-size: .8rem; color: #6b7280; line-height: 1.35; }
.deca-loginopt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.deca-loginopt-img { border: 1px solid #e5e7eb; border-radius: .8rem; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.dark .deca-loginopt-img { background: transparent; border-color: #374151; }
.deca-loginopt-thumb { position: relative; display: block; aspect-ratio: 4 / 3; background: #e5e7eb; }
.deca-loginopt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.deca-loginopt-size { position: absolute; right: .4rem; bottom: .4rem; font-size: .7rem; background: rgb(0 0 0 / .55); color: #fff; padding: .05rem .4rem; border-radius: .3rem; }
.deca-loginopt-uses { display: flex; gap: .4rem; padding: .6rem .6rem 0; }
.deca-loginopt-use { flex: 1; font-size: .75rem; font-weight: 700; padding: .35rem .3rem; border-radius: .5rem; border: 1.5px solid #cbd5e1; color: #475569; background: #f8fafc; }
.deca-loginopt-use:hover { border-color: #60a5fa; }
.deca-loginopt-use.is-on { background: #2563eb; border-color: #2563eb; color: #fff; }
.deca-loginopt-tools { display: flex; justify-content: space-between; align-items: center; padding: .5rem .7rem .6rem; }
.deca-loginopt-tool { display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; font-weight: 600; color: #1d4ed8; }
.deca-loginopt-viewer { position: fixed; inset: 0; z-index: 2147482000; background: rgb(15 23 42 / .8); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.deca-loginopt-viewer-box { background: #fff; border-radius: .9rem; padding: .8rem; max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; gap: .7rem; }
.deca-loginopt-viewer-box img { max-width: calc(92vw - 1.6rem); max-height: calc(92vh - 5rem); object-fit: contain; border-radius: .5rem; }
.deca-loginopt-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.4rem 1rem; border: 2px dashed #cbd5e1; border-radius: .9rem; background: #f8fafc; cursor: pointer; text-align: center; }
.dark .deca-loginopt-drop { background: transparent; border-color: #4b5563; }
.deca-loginopt-drop:hover, .deca-loginopt-drop.is-over { border-color: #3b82f6; background: #eff6ff; }
.deca-loginopt-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.deca-loginopt-drop-ic { width: 2.2rem; height: 2.2rem; color: #3b82f6; }
.deca-loginopt-drop-title { font-weight: 700; color: #1d4ed8; }
.deca-loginopt-drop-help { font-size: .8rem; color: #6b7280; }
.deca-loginopt-drop-busy, .deca-loginopt-drop-chosen { font-size: .85rem; font-weight: 700; color: #15803d; margin-top: .2rem; }
.deca-loginopt-error { color: #dc2626; font-size: .85rem; margin-top: .4rem; }
.deca-loginopt-thumb { width: 100%; overflow: hidden; }
.deca-loginopt-thumb img { position: absolute; inset: 0; }
.deca-loginopt-img { align-self: start; }
/* Login: no «(*)» marks nor «Camp obligatori» note (both fields are obviously needed). */
.fi-simple-layout:has(> .deca-login-art) .fi-fo-field-label-required-mark { display: none !important; }
.fi-simple-layout:has(> .deca-login-art) .deca-required-note { display: none !important; }
.fi-simple-layout:has(> .deca-login-art) form.fi-sc-form .fi-sc-component:has(> .fi-sc-actions)::before { content: none !important; display: none !important; }
/* «Veure QR» of a route sheet: big enough for a phone camera, not more. */
.deca-qr-modal { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.deca-qr-modal-img { width: min(300px, 72vw); height: auto; image-rendering: pixelated; border: 1px solid #e5e7eb; border-radius: .5rem; background: #fff; }
.deca-qr-modal-code { font-family: ui-monospace, monospace; font-weight: 700; font-size: 1rem; }
.deca-qr-modal-dl { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; border-radius: var(--deca-btn-radius, .5rem); background: #2563eb; color: #fff !important; font-weight: 700; text-decoration: none !important; }
.deca-qr-modal-dl:hover { background: #1d4ed8; }
.deca-qr-modal-dl-ic { width: 1.1rem; height: 1.1rem; }
.deca-loginopt-builtin { font-size: .72rem; font-weight: 700; color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0; padding: .15rem .5rem; border-radius: 999px; }
/* Default drawing: whole drawing visible in the rounded panel (its dark background fills the rest). */
.deca-login-art:has(.deca-login-art-photo.is-drawing) { background: #05070c !important; }
.deca-login-art .deca-login-art-photo.is-drawing { object-fit: contain; object-position: center 40%; }
/* Modern: the drawing just above the band of texts, as big as possible without being covered. */
.deca-login-art.is-modern .deca-login-art-photo.is-drawing { inset: 1rem 0 7.4rem 0; height: calc(100% - 8.4rem); object-position: center; }

/* Shared masters (users, fleet, shippers): highlighted notice at the top of the form. */
.deca-shared-banner { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem 1rem; border-radius: .75rem;
  border: 1px solid rgb(245 158 11 / .45); background: rgb(254 243 199 / .7); color: #78350f; font-size: .9677rem; line-height: 1.35; }
.dark .deca-shared-banner { background: rgb(120 53 15 / .25); color: #fde68a; border-color: rgb(245 158 11 / .35); }
.deca-shared-banner-ic { width: 1.35rem; height: 1.35rem; flex: none; margin-top: .05rem; }
.deca-shared-banner-sub { font-size: .8rem; opacity: .85; margin-top: .15rem; }
/* Documents inside the user / vehicle form: compact, no big empty box. */
.deca-docs-empty { padding: .5rem 1.5rem; font-size: .85rem; color: rgb(107 114 128); text-align: left; }
.dark .deca-docs-empty { color: rgb(156 163 175); }
.deca-user-docs .fi-ta-empty-state { padding: 0 !important; }
.deca-user-docs .fi-ta-ctn { box-shadow: none; }
/* Role: four compact buttons. */
.deca-role-buttons .fi-btn { display: flex !important; width: 100%; height: 100%; flex-direction: column; justify-content: center; gap: .45rem; padding: .9rem .5rem .8rem; font-size: .9677rem; font-weight: 600; border-radius: .7rem; text-align: center; white-space: normal; }
.deca-role-buttons .fi-btn > .fi-icon { width: 2.1rem !important; height: 2.1rem !important; }
.deca-role-buttons .fi-btn:not(.fi-color-gray) { box-shadow: 0 4px 12px rgb(15 23 42 / .15); }

/* Every drop zone of uploads: cloud with an arrow above the «Drag & drop» text. */
.filepond--drop-label label { display: flex !important; flex-direction: column; align-items: center; gap: .3rem; }
.filepond--drop-label label::before { content: ""; width: 2rem; height: 2rem; flex: none; background-color: currentColor; opacity: .65;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.filepond--root .filepond--drop-label { min-height: 6.5rem !important; }

/* Companies of a shared record: two columns of small switches. */
.deca-company-toggles input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 2rem; height: 1.1rem; border-radius: 999px;
  background: rgb(209 213 219); border: 0; position: relative; cursor: pointer; transition: background .15s; flex: none; box-shadow: none !important; background-image: none !important; }
.deca-company-toggles input[type=checkbox]::after { content: ""; position: absolute; top: .15rem; left: .15rem; width: .8rem; height: .8rem; border-radius: 999px; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.deca-company-toggles input[type=checkbox]:checked { background: var(--primary-600, #2563eb); }
.deca-company-toggles input[type=checkbox]:checked::after { transform: translateX(.9rem); }
.dark .deca-company-toggles input[type=checkbox] { background: rgb(75 85 99); }
.dark .deca-company-toggles input[type=checkbox]:checked { background: var(--primary-500, #3b82f6); }

/* Subsections (fieldsets) of the whole application: a clearer frame, less rounded, and a bolder legend. */
.fi-fieldset:not(.fi-fieldset-not-contained) { border: 1.5px solid color-mix(in srgb, var(--primary-600, #2563eb) 55%, transparent) !important; border-radius: .5rem !important; padding: 1.1rem 1.25rem 1.25rem !important; }
.dark .fi-fieldset:not(.fi-fieldset-not-contained) { border-color: color-mix(in srgb, var(--primary-400, #60a5fa) 55%, transparent) !important; }
.fi-fieldset > legend { font-weight: 700 !important; color: var(--primary-700, #1d4ed8) !important; }
.dark .fi-fieldset > legend { color: var(--primary-300, #93c5fd) !important; }
/* Documents embedded in a form (users, fleet): framed the same way. */
.deca-user-docs .fi-ta-ctn { border: 1.5px solid color-mix(in srgb, var(--primary-600, #2563eb) 55%, transparent) !important; border-radius: .5rem !important; box-shadow: none !important; --tw-ring-shadow: 0 0 #0000 !important; }
.dark .deca-user-docs .fi-ta-ctn { border-color: color-mix(in srgb, var(--primary-400, #60a5fa) 55%, transparent) !important; }
.deca-user-docs .fi-ta-header-heading { color: var(--primary-700, #1d4ed8) !important; }
.dark .deca-user-docs .fi-ta-header-heading { color: var(--primary-300, #93c5fd) !important; }

/* Section explanations: below the header band, at the top of the content. */
.deca-section-desc { padding: 1rem 1.5rem 0; font-size: .9677rem; line-height: 1.45; color: var(--deca-muted, rgb(100 116 139)); }
.fi-section.fi-compact .deca-section-desc { padding: .75rem 1rem 0; }
@media (max-width: 767px) { .deca-desc-desktop .deca-section-desc { display: none; } }

/* Upload zones wider than tall: the cloud on the left of the text. */
.fi-fo-file-upload { container-type: inline-size; }
@container (min-width: 26rem) {
    .filepond--drop-label label { flex-direction: row !important; gap: .75rem !important; text-align: left; }
    .filepond--drop-label label::before { width: 2.2rem; height: 2.2rem; }
}
@media (min-width: 640px) {
    .deca-loginopt-drop { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; row-gap: .15rem; align-items: center; justify-items: start; text-align: left; padding: 1.1rem 1.4rem; }
    .deca-loginopt-drop > .deca-loginopt-drop-ic { grid-row: 1 / span 4; width: 2.6rem; height: 2.6rem; }
}

/* Company › Logotips: per column, the title, the logo big on its background, and the upload below. */
.deca-logo-col > .fi-sc { gap: .6rem !important; }
.deca-logo-title { font-size: .9677rem; font-weight: 600; margin-bottom: .45rem; color: var(--deca-text, #0f172a); }
.deca-logo-box { display: flex; align-items: center; justify-content: center; height: 9.5rem; padding: 1rem; border-radius: .6rem; background: #f1f5f9; border: 1px solid rgb(203 213 225); }
.deca-logo-box.is-dark { background: #0b0f19; border-color: #0b0f19; }
.deca-logo-box img { max-height: 100%; max-width: 100%; object-fit: contain; }
.deca-logo-box.is-empty { border-style: dashed; background: transparent; color: rgb(100 116 139); font-size: .85rem; }
.deca-logo-box.is-dark.is-empty { background: #0b0f19; color: rgb(148 163 184); }
.deca-logo-col .filepond--root .filepond--drop-label { min-height: 4.5rem !important; }

/* Record pages: «Desar» · «Esborrar» (outlined red) · «Cancel·lar» (red, on the right). */
.fi-ac:has(> .deca-delete-btn) > :first-child { flex: 3 1 0 !important; }
.fi-ac > .deca-delete-btn { flex: 1 1 0 !important; }
.fi-ac:has(> .deca-delete-btn) > .deca-cancel { background-color: #dc2626 !important; border-color: #dc2626 !important; }

/* Lists of users, fleet and shippers: ⛔ and a red tint for the ones not assigned to the active company. */
.fi-ta-row.deca-row-outside > td { background: rgb(254 242 242) !important; }
.fi-ta-row.deca-row-outside .fi-ta-text-item-label { color: #b91c1c; }
.dark .fi-ta-row.deca-row-outside > td { background: rgb(127 29 29 / .25) !important; }
.dark .fi-ta-row.deca-row-outside .fi-ta-text-item-label { color: #fca5a5; }
.deca-role-buttons .fi-fo-toggle-buttons-btn-ctn { height: 100%; }
.deca-role-buttons .fi-btn > .fi-icon { width: 2.5rem !important; height: 2.5rem !important; }
.deca-role-buttons .fi-fo-toggle-buttons-input:not(:checked) + .fi-btn > .fi-icon { color: var(--color-500) !important; }

/* Avatar: the example circle centred on the fields at its left, bigger. */
.fi-grid-col:has(.deca-avatar-prev) { display: flex; align-items: center; justify-content: center; }
.deca-avatar-prev { display: flex; align-items: center; justify-content: center; }
.deca-avatar-prev > span { display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 999px; font-weight: 700; font-size: 28px; box-shadow: 0 4px 12px rgb(15 23 42 / .18); }
/* Subsection that does not apply (e.g. «En cas de ser conductor» with another role): grey. */
.fi-fieldset.deca-fieldset-off { opacity: .5; filter: grayscale(1); }

/* ===== 3.25 Typography (Geist): smaller text, 400 (3.25.2: one step heavier); titles 22px/600; no capital-letter labels; numbers in columns. ===== */
html { font-size: 15.5px; }
body, .fi-body { font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: .005em; word-spacing: .03em; }
input, textarea, select, .fi-input, .fi-select-input { font-weight: 400 !important; }
b, strong { font-weight: 600; }
.fi-header-heading { font-size: 22px !important; font-weight: 600 !important; letter-spacing: -.01em; }
.fi-section > .fi-section-header .fi-section-header-heading { font-size: 1.05rem !important; font-weight: 600 !important; letter-spacing: 0; }
.fi-fo-field-label-content, .fi-fieldset > legend, .fi-ta-header-cell-label, .fi-tabs-item-label { font-weight: 600 !important; }
.fi-btn, .fi-link { font-weight: 600 !important; }
.fi-ta-text-item-label { font-weight: 400; }
.fi-ta-text-item-label.fi-font-bold, .fi-ta-text-item-label.fi-font-semibold, .fi-ta-cell .fi-font-bold { font-weight: 600 !important; }
.fi-sidebar-item-label { font-weight: 500 !important; }
.fi-sidebar-item.fi-active .fi-sidebar-item-label, .fi-sidebar-group-label { font-weight: 600 !important; }
/* Labels in normal case (no capitals). */
.deca-stat-label, .deca-table th, .deca-switcher-label, .deca-kv th, .deca-preview-title, .st-kpi-lbl, .deca-sheet-carrier > span,
.deca-langopt-head, .deca-issued-url-label, .fi-ta-header-cell-label, .fi-sidebar-group-label { text-transform: none !important; letter-spacing: 0 !important; }
.deca-kv th, .deca-table th { font-size: .8rem; font-weight: 600; opacity: .75; }
/* Table rows about 48px high. */
.fi-ta-row > .fi-ta-cell > * > .fi-ta-col, .fi-ta-row .fi-ta-text, .fi-ta-row .fi-ta-icon, .fi-ta-row .fi-ta-actions { padding-top: .45rem !important; padding-bottom: .45rem !important; }
.fi-ta-row { height: 48px; }

/* ===== Side menu: bigger icons; collapsed = rail with the icon on top and a short name below (QuickBooks style). ===== */
.fi-sidebar .fi-sidebar-item-icon { width: 1.6rem !important; height: 1.6rem !important; }
@media (min-width: 1024px) {
    .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-btn { flex-direction: column; justify-content: center; align-items: center; gap: .22rem; padding: .55rem .2rem !important; height: auto !important; }
    .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-btn::after { content: attr(aria-label); display: block; max-width: 100%; font-size: .68rem; line-height: 1.15; font-weight: 500; text-align: center; overflow-wrap: anywhere; color: inherit; }
    .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav { padding-inline: .35rem !important; }
    .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups { gap: .35rem !important; }
}

/* ===== Hubs (Utilitats, Opcions): cards with a big icon and the name below. ===== */
.deca-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 1rem; }
.deca-hub-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; padding: 1.4rem .9rem 1.2rem; min-height: 9.5rem; border-radius: .9rem;
  background: var(--deca-surface, #fff); border: 1px solid rgb(203 213 225 / .8); box-shadow: 0 1px 3px rgb(15 23 42 / .06); text-align: center; transition: transform .12s, box-shadow .12s, border-color .12s; }
.deca-hub-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgb(15 23 42 / .12); border-color: var(--primary-400, #60a5fa); }
.deca-hub-ic { display: flex; align-items: center; justify-content: center; width: 3.6rem; height: 3.6rem; border-radius: 1rem; }
.deca-hub-ic svg { width: 2rem; height: 2rem; }
.deca-hub-label { font-size: .95rem; font-weight: 600; color: var(--deca-text, #0f172a); line-height: 1.25; }
.deca-hub-c0 .deca-hub-ic { background: #dbeafe; color: #1d4ed8; }
.deca-hub-c1 .deca-hub-ic { background: #dcfce7; color: #15803d; }
.deca-hub-c2 .deca-hub-ic { background: #fef3c7; color: #b45309; }
.deca-hub-c3 .deca-hub-ic { background: #ede9fe; color: #6d28d9; }
.deca-hub-c4 .deca-hub-ic { background: #fee2e2; color: #b91c1c; }
.deca-hub-c5 .deca-hub-ic { background: #cffafe; color: #0e7490; }
@media (max-width: 640px) { .deca-hub { grid-template-columns: repeat(2, 1fr); gap: .7rem; } .deca-hub-card { min-height: 8rem; } }
.deca-hub-back { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 500; color: var(--primary-600, #2563eb); margin: 1.1rem 0 -.6rem; }
.deca-hub-back:hover { text-decoration: underline; }
.deca-hub-back-ic { width: 1rem; height: 1rem; }
/* Group of the hubs (Utilitats, Opcions): no title. */
.fi-sidebar-group[data-group-label="\a0"] > .fi-sidebar-group-btn { display: none !important; }
.fi-ta-row > td.fi-ta-cell { padding-top: .3rem !important; padding-bottom: .3rem !important; }
@media (min-width: 1024px) {
    .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-btn::after { color: var(--deca-sidebar-text, #e2e8f0); }
    .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item.fi-active > .fi-sidebar-item-btn::after { color: var(--deca-sidebar-active-text, #fff); }
    .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-btn[href$="/sheets/new"]::after, .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-btn[href$="/sheets"]::after { color: #fff; }
    /* Collapsed footer: only the legal icon and the version. */
    .fi-sidebar:not(.fi-sidebar-open) .deca-sidebar-footer { padding: .7rem .3rem .9rem; text-align: center; }
    .fi-sidebar:not(.fi-sidebar-open) .deca-sidebar-legal { justify-content: center; }
    .fi-sidebar:not(.fi-sidebar-open) .deca-sidebar-legal span, .fi-sidebar:not(.fi-sidebar-open) .deca-sidebar-copy { font-size: 0; }
    .fi-sidebar:not(.fi-sidebar-open) .deca-sidebar-copy span { font-size: .65rem; }
}
.fi-badge { font-weight: 600 !important; }
/* Mail: platform / own server as two big choices. */
.deca-mail-mode { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
@media (max-width: 760px) { .deca-mail-mode { grid-template-columns: 1fr; } }
.deca-mail-mode > * { border: 1.5px solid rgb(203 213 225); border-radius: .7rem; padding: .9rem 1rem; }
.deca-mail-mode > *:has(input:checked) { border-color: var(--primary-500, #3b82f6); background: color-mix(in srgb, var(--primary-500, #3b82f6) 7%, transparent); }

/* =====================================================================================================
   3.26 Cleaner, lighter look (less «blocky"): light section headers with a coloured mark, filled inputs,
   soft table actions, light sheet view and dashboard cards. Colours still come from each theme.
   ===================================================================================================== */
/* Sections: white card, thin border, header in a light tint of the theme heading colour with a mark. */
.fi-section:not(.fi-section-not-contained) { border-radius: .9rem !important; box-shadow: 0 1px 2px rgb(15 23 42 / .04) !important; --tw-ring-color: var(--deca-border) !important; }
.fi-section:not(.fi-section-not-contained) > .fi-section-header {
    background: color-mix(in srgb, var(--deca-heading, #1d4ed8) 6%, var(--deca-surface, #fff)) !important;
    color: var(--deca-text, #0f172a) !important; border-bottom: 1px solid var(--deca-border, #e2e8f0);
    position: relative; padding-left: 1.75rem !important; padding-top: .8rem !important; padding-bottom: .8rem !important;
}
.fi-section:not(.fi-section-not-contained) > .fi-section-header::before {
    content: ""; position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 4px; height: 1.25rem; border-radius: 3px;
    background: var(--deca-heading, var(--primary-600, #1d4ed8));
}
.fi-section > .fi-section-header .fi-section-header-heading { color: var(--deca-text, #0f172a) !important; font-size: 1.05rem !important; }
.fi-section:not(.fi-section-not-contained) > .fi-section-header .fi-icon,
.fi-section:not(.fi-section-not-contained) > .fi-section-header .fi-section-collapse-btn { color: var(--deca-muted, #64748b) !important; }
.fi-section.fi-collapsed > .fi-section-header { border-bottom: 0; }
.deca-section-desc { color: var(--deca-muted, #64748b); }

/* Subsections: softer frame. */
.fi-fieldset:not(.fi-fieldset-not-contained) { border-width: 1px !important; border-color: color-mix(in srgb, var(--primary-600, #2563eb) 30%, var(--deca-border, #e2e8f0)) !important; border-radius: .7rem !important; }

/* Inputs: lightly filled, thin border; white when focused. */
.fi-input-wrp { background-color: color-mix(in srgb, var(--deca-text, #0f172a) 2.5%, var(--deca-surface, #fff)) !important; border-radius: .6rem !important; --tw-ring-color: var(--deca-border, #e2e8f0) !important; }
.fi-input-wrp:focus-within { background-color: var(--deca-surface, #fff) !important; --tw-ring-color: var(--primary-500, #3b82f6) !important; }
.fi-input-wrp .fi-input, .fi-input-wrp input, .fi-input-wrp select, .fi-input-wrp textarea { background-color: transparent !important; }

/* Tables: light header, no stripes, soft hover; row actions as soft tinted buttons. */
.fi-ta-ctn { border-radius: .9rem !important; box-shadow: 0 1px 2px rgb(15 23 42 / .04) !important; }
.fi-ta-header-cell { background: color-mix(in srgb, var(--deca-text, #0f172a) 3%, var(--deca-surface, #fff)) !important; }
.fi-ta-header-cell-label { color: var(--deca-muted, #64748b) !important; font-size: .82rem; }
.fi-ta-row:nth-child(even) { background: transparent !important; }
.fi-ta-row:hover { background: color-mix(in srgb, var(--primary-500, #3b82f6) 4%, transparent) !important; }
.fi-ta-row .fi-icon-btn.deca-ic-view { background: color-mix(in srgb, var(--color-view-bg, #1d4ed8) 13%, var(--deca-surface, #fff)) !important; color: var(--color-view-bg, #1d4ed8) !important; }
.fi-ta-row .fi-icon-btn.deca-ic-edit { background: color-mix(in srgb, var(--color-edit-bg, #16a34a) 15%, var(--deca-surface, #fff)) !important; color: var(--color-edit-bg, #16a34a) !important; }
.fi-ta-row .fi-icon-btn.deca-ic-delete { background: color-mix(in srgb, var(--color-delete-bg, #dc2626) 13%, var(--deca-surface, #fff)) !important; color: var(--color-delete-bg, #dc2626) !important; }
.fi-ta-row .fi-icon-btn.deca-ic-print { background: color-mix(in srgb, var(--color-print-bg, #374151) 12%, var(--deca-surface, #fff)) !important; color: var(--color-print-bg, #374151) !important; }
.fi-ta-row .fi-icon-btn.deca-ic-dup { background: color-mix(in srgb, #7c3aed 13%, var(--deca-surface, #fff)) !important; color: #7c3aed !important; }
.fi-ta-row .fi-icon-btn[class*="deca-ic-"]:hover { filter: saturate(1.3) brightness(.97); }
.fi-ta-row .fi-icon-btn[class*="deca-ic-"] .fi-icon { color: inherit !important; }

/* Side menu: section names small and spaced; «Fulls/DeCAs» outlined (solid when open), «Nou full» stays red. */
.fi-sidebar .fi-sidebar-group-label { text-transform: uppercase !important; letter-spacing: .07em !important; font-size: .72rem !important; opacity: .6; }
.fi-sidebar .fi-sidebar-item:not(.fi-active) .fi-sidebar-item-btn[href$="/sheets"] { background: transparent !important; box-shadow: inset 0 0 0 1.5px #3b82f6; }
.fi-sidebar .fi-sidebar-item:not(.fi-active) .fi-sidebar-item-btn[href$="/sheets"] * { color: #3b82f6 !important; }
.fi-sidebar .fi-sidebar-item:not(.fi-active) .fi-sidebar-item-btn[href$="/sheets"]:hover { background: color-mix(in srgb, #2563eb 8%, transparent) !important; }
@media (min-width: 1024px) { .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item:not(.fi-active) .fi-sidebar-item-btn[href$="/sheets"]::after { color: #3b82f6; } }
.fi-sidebar { border-right: 1px solid var(--deca-border, #e2e8f0); }
.fi-topbar { border-bottom: 1px solid var(--deca-border, #e2e8f0); box-shadow: none !important; }

/* Sheet view: light frame and header band (dot of the status colour), groups with a coloured title. */
.deca-sheet { border: 1px solid var(--deca-border, #e2e8f0) !important; border-radius: .9rem; box-shadow: 0 1px 2px rgb(15 23 42 / .04); }
.deca-sheet-band { background: color-mix(in srgb, #16a34a 9%, var(--deca-surface, #fff)) !important; color: var(--deca-text, #0f172a) !important; letter-spacing: 0; font-weight: 600; border-bottom: 1px solid var(--deca-border, #e2e8f0); padding: .7rem 1.1rem; }
.deca-sheet-band::before { content: ""; width: .6rem; height: .6rem; border-radius: 999px; background: #16a34a; }
.deca-sheet-band .deca-muted { color: var(--deca-muted) !important; }
.deca-sheet-carrier { background: var(--deca-surface, #fff) !important; }
.deca-kv th { font-weight: 400 !important; color: var(--deca-muted, #64748b); opacity: 1 !important; }
.deca-kv th, .deca-kv td { border-bottom-color: color-mix(in srgb, var(--deca-border, #e2e8f0) 70%, transparent) !important; }
.deca-kv tr.deca-kv-head th { color: var(--deca-heading, var(--primary-600)) !important; font-weight: 600 !important; font-size: .9677rem !important; border-bottom: 0 !important; padding-top: 1rem; }

/* Dashboard: white cards with a tinted icon instead of solid colour blocks. */
.deca-big { background: var(--deca-surface, #fff) !important; color: var(--deca-text, #0f172a) !important; border: 1px solid var(--deca-border, #e2e8f0); box-shadow: 0 1px 2px rgb(15 23 42 / .05); }
.deca-big:hover { filter: none; border-color: var(--c); box-shadow: 0 6px 18px rgb(15 23 42 / .08); }
.deca-big small { color: var(--deca-muted, #64748b); opacity: 1; }
.deca-big-icon { display: grid; place-items: center; width: 3rem; height: 3rem; flex: none; border-radius: .85rem; background: color-mix(in srgb, var(--c) 12%, var(--deca-surface, #fff)); color: var(--c); }
.deca-big-svg { width: 1.6rem; height: 1.6rem; }
.deca-big-new { --c: #dc2626; }
.deca-big-sheets { --c: var(--primary-600, #1d4ed8); }
.deca-big-decas { --c: #16a34a; }
.deca-stat { border: 1px solid var(--deca-border, #e2e8f0) !important; border-radius: .9rem; box-shadow: 0 1px 2px rgb(15 23 42 / .04); }

/* Modals and dropdowns: rounder, lighter shadow. */
.fi-modal-window { border-radius: 1rem !important; }

/* 3.26.1: page title with the coloured icon of its menu entry; less empty space; sections more visible. */
.fi-header > div:has(> .deca-page-ic) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .8rem; align-items: center; }
.fi-header > div:has(> .deca-page-ic) > :not(.deca-page-ic) { grid-column: 2; }
.fi-header > div:has(> .deca-page-ic) > .deca-page-ic { grid-row: 1; align-self: center; }
.deca-page-ic { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: .75rem;
  background: color-mix(in srgb, var(--deca-heading, #1d4ed8) 14%, var(--deca-surface, #fff)); color: var(--deca-heading, #1d4ed8); }
.deca-page-ic svg { width: 1.45rem; height: 1.45rem; }
.fi-header-subheading { margin-top: .15rem !important; }
/* Less space between the title and the sections, and between sections. */
.fi-page-main, .fi-page-content { row-gap: 1.1rem !important; }
.fi-page-content > .fi-sc, .fi-page-content form > .fi-sc, .fi-sc-form > .fi-sc { row-gap: 1.1rem !important; }
.fi-header { padding-bottom: 0 !important; }
/* Less padding inside the sections. */
.fi-section:not(.fi-section-not-contained) > .fi-section-content-ctn > .fi-section-content { padding-top: 1rem !important; padding-bottom: 1.1rem !important; }
.fi-section:not(.fi-section-not-contained) > .fi-section-header { padding-top: .65rem !important; padding-bottom: .65rem !important; }
.deca-section-desc { padding-top: .8rem !important; }
/* Section headers and cards more visible. */
.fi-section:not(.fi-section-not-contained) { --tw-ring-color: color-mix(in srgb, var(--deca-border, #e2e8f0) 75%, var(--deca-text, #0f172a)) !important; box-shadow: 0 1px 3px rgb(15 23 42 / .07) !important; }
.fi-section:not(.fi-section-not-contained) > .fi-section-header { background: color-mix(in srgb, var(--deca-heading, #1d4ed8) 12%, var(--deca-surface, #fff)) !important;
  border-bottom-color: color-mix(in srgb, var(--deca-heading, #1d4ed8) 22%, var(--deca-surface, #fff)) !important; }
.fi-section:not(.fi-section-not-contained) > .fi-section-header::before { width: 5px; height: 1.4rem; background: color-mix(in srgb, var(--deca-heading, #1d4ed8) 85%, #000); }
.fi-section > .fi-section-header .fi-section-header-heading { font-weight: 600 !important; }
.fi-page-header-main-ctn { row-gap: 1rem !important; padding-top: 1.4rem !important; }

/* =====================================================================================================
   3.26.2 Section system: header on the page background, title in the colour of its mark, a line under it;
   page title with the same line; subsections (Documents, Contacte…) with a short horizontal mark and a line.
   ===================================================================================================== */
:root { --deca-mark: color-mix(in srgb, var(--deca-heading, #1d4ed8) 85%, #000); --deca-line: color-mix(in srgb, var(--deca-heading, #1d4ed8) 70%, var(--deca-surface, #fff)); }
.fi-section:not(.fi-section-not-contained), .fi-ta-ctn, .deca-sheet, .deca-big, .deca-stat, .deca-hub-card { border-radius: .45rem !important; }
.fi-section:not(.fi-section-not-contained) > .fi-section-header {
    background: var(--deca-body, #eceef1) !important; border-bottom: 2.5px solid var(--deca-line) !important;
    border-top-left-radius: .45rem !important; border-top-right-radius: .45rem !important;
}
.fi-section:not(.fi-section-not-contained) > .fi-section-header::before { background: var(--deca-mark) !important; }
.fi-section > .fi-section-header .fi-section-header-heading { color: var(--deca-mark) !important; font-size: 1.16rem !important; }
/* Page title: the same line under it, from side to side. */
.fi-header { border-bottom: 2.5px solid var(--deca-line); padding-bottom: .7rem !important; }
.fi-header-heading { color: var(--deca-text, #0f172a); }
/* Subsections (fieldsets): title inside, in the colour, with a short horizontal mark and the line under it. */
.fi-fieldset:not(.fi-fieldset-not-contained) { padding-top: .9rem !important; }
.fi-fieldset > legend { float: left; width: 100%; display: flex !important; align-items: center; gap: .5rem; margin: 0 0 1rem !important; padding: 0 0 .45rem !important;
    border-bottom: 2.5px solid var(--deca-line); color: var(--deca-mark) !important; font-size: 1.05rem !important; font-weight: 600 !important; }
.fi-fieldset > legend::before { content: ""; flex: none; width: 1rem; height: 4px; border-radius: 2px; background: var(--deca-mark); }
.fi-fieldset > legend + * { clear: both; }
/* Documents (list inside a form): same as a subsection. */
.deca-user-docs .fi-ta-header { border-bottom: 2.5px solid var(--deca-line); }
.deca-user-docs .fi-ta-header-heading { display: flex; align-items: center; gap: .5rem; color: var(--deca-mark) !important; font-size: 1.05rem !important; font-weight: 600 !important; }
.deca-user-docs .fi-ta-header-heading::before { content: ""; flex: none; width: 1rem; height: 4px; border-radius: 2px; background: var(--deca-mark); }

/* 3.27: Comptes — search box and buttons of each account card */
.deca-acct-search { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .25rem; }
.deca-acct-search-input { flex: 1 1 18rem; max-width: 34rem; }
.deca-acct-search-status { flex: 0 0 auto; min-width: 10rem; }
.deca-acct-btns { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: flex-end; }
.deca-acct-btns .fi-btn { white-space: nowrap; }
@media (max-width: 640px) {
    .deca-acct-btns { justify-content: flex-start; }
}

/* 3.27: Informació legal i cookies — two big switches */
.deca-legal-switches .fi-fo-field { background: var(--deca-body, #f1f5f9); border: 1.5px solid var(--deca-border, #dbe2ea); border-radius: .5rem; padding: .9rem 1rem; height: 100%; }
.deca-legal-switches .fi-fo-field-label-content { font-size: 1.05rem; font-weight: 600; color: var(--deca-mark, #1d4ed8); }
.deca-legal-switches .fi-toggle { transform: scale(1.35); transform-origin: left center; margin-right: .5rem; }

/* 3.27: notice windows — larger, tinted by status, big round icon, centred title / text and «Tancar» */
.fi-no .fi-no-notification {
    --n-c: #2563eb; --n-bg: #eff6ff;
    position: relative; width: min(32rem, 100%); display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: .2rem; padding: 2rem 1.6rem 1.4rem; border-radius: 1rem; border: 0; border-top: 6px solid var(--n-c);
    background: linear-gradient(180deg, var(--n-bg) 0%, #fff 72%); box-shadow: 0 24px 60px rgba(15, 23, 42, .32);
    animation: deca-no-pop .22s ease-out;
}
.fi-no .fi-no-notification.fi-status-success { --n-c: #16a34a; --n-bg: #dcfce7; }
.fi-no .fi-no-notification.fi-status-warning { --n-c: #d97706; --n-bg: #fef3c7; }
.fi-no .fi-no-notification.fi-status-danger { --n-c: #dc2626; --n-bg: #fee2e2; }
.fi-no .fi-no-notification.fi-status-info { --n-c: #2563eb; --n-bg: #dbeafe; }
.fi-no .fi-no-notification .fi-no-notification-icon {
    width: 4.2rem; height: 4.2rem; padding: .7rem; margin: 0 auto .6rem; border-radius: 999px; flex: none;
    color: #fff !important; background: var(--n-c); box-shadow: 0 0 0 7px color-mix(in srgb, var(--n-c) 18%, transparent);
    stroke-width: 2.2; animation: deca-no-icon .45s ease-out;
}
.fi-no .fi-no-notification .fi-no-notification-main { width: 100%; margin: 0; }
.fi-no .fi-no-notification .fi-no-notification-title { font-size: 1.25rem; font-weight: 700; line-height: 1.35; color: #0f172a; text-wrap: balance; }
.fi-no .fi-no-notification .fi-no-notification-body { font-size: .97rem; line-height: 1.55; color: #475569; margin-top: .55rem; text-wrap: pretty; }
.fi-no .fi-no-notification .fi-no-notification-actions { justify-content: center; margin-top: 1.3rem; }
.fi-no .fi-no-notification .fi-no-notification-actions .fi-btn { min-width: 10rem; justify-content: center; padding-block: .6rem; font-size: .95rem; }
.fi-no .fi-no-notification .fi-no-notification-close-btn { position: absolute; top: .7rem; right: .7rem; }
@keyframes deca-no-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes deca-no-icon { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@media (max-width: 640px) { .fi-no .fi-no-notification .fi-no-notification-actions .fi-btn { width: 100%; } }
.dark .fi-no .fi-no-notification { background: linear-gradient(180deg, color-mix(in srgb, var(--n-c) 22%, #0f172a) 0%, #111827 72%); }
.dark .fi-no .fi-no-notification .fi-no-notification-title { color: #f1f5f9; }
.dark .fi-no .fi-no-notification .fi-no-notification-body { color: #cbd5e1; }

/* 3.27: search box of the top bar (pages of the application) */
.deca-psearch { position: relative; margin-inline-end: .5rem; }
.deca-psearch-toggle { display: none; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: .5rem; color: #475569; }
.deca-psearch-toggle:hover { background: #f1f5f9; }
.deca-psearch-box { position: relative; display: flex; align-items: center; width: clamp(15rem, 28vw, 26rem); height: 2.45rem; border: 1.5px solid var(--deca-border, #dbe2ea); border-radius: .55rem; background: var(--deca-body, #f1f5f9); transition: border-color .15s, box-shadow .15s, background .15s; }
.deca-psearch-box:focus-within { border-color: var(--deca-mark, #1d4ed8); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--deca-mark, #1d4ed8) 15%, transparent); }
.deca-psearch-ic { width: 1.15rem; height: 1.15rem; margin-inline: .7rem .45rem; color: #64748b; flex: none; }
.deca-psearch-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: .9677rem; color: #0f172a; padding: 0; box-shadow: none; }
.deca-psearch-box input:focus { box-shadow: none; outline: 0; }
.deca-psearch-box input::-webkit-search-cancel-button { display: none; }
.deca-psearch-kbd { margin-inline-end: .5rem; font-family: inherit; font-size: .7rem; font-weight: 600; line-height: 1; color: #64748b; border: 1px solid #cbd5e1; border-bottom-width: 2px; border-radius: .3rem; padding: .22rem .38rem; background: #fff; white-space: nowrap; }
.deca-psearch-box:focus-within .deca-psearch-kbd { display: none; }
.deca-psearch-close { margin-inline-end: .6rem; font-size: 1.05rem; color: #64748b; }
.deca-psearch-results { position: absolute; top: calc(100% + .45rem); left: 0; right: 0; min-width: 22rem; max-height: min(70vh, 30rem); overflow-y: auto; display: flex; flex-direction: column; padding: .35rem; background: #fff; border: 1px solid var(--deca-border, #dbe2ea); border-radius: .65rem; box-shadow: 0 18px 45px rgba(15, 23, 42, .18); z-index: 50; }
.deca-psearch-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .65rem; border-radius: .45rem; color: #0f172a; text-decoration: none; }
.deca-psearch-item:hover, .deca-psearch-item.is-active { background: color-mix(in srgb, var(--deca-mark, #1d4ed8) 9%, #fff); }
.deca-psearch-item-ic { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: .45rem; flex: none; color: var(--deca-mark, #1d4ed8); background: color-mix(in srgb, var(--deca-mark, #1d4ed8) 10%, #fff); }
.deca-psearch-item-txt { display: flex; flex-direction: column; min-width: 0; }
.deca-psearch-item-title { font-weight: 600; font-size: .9677rem; line-height: 1.3; }
.deca-psearch-item-parent { color: #64748b; font-weight: 500; }
.deca-psearch-item-hint { font-size: .8rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deca-psearch-item-hint:empty { display: none; }
.deca-psearch-empty { padding: .9rem; text-align: center; color: #64748b; font-size: .9677rem; }
@media (max-width: 1100px) { .deca-psearch-kbd { display: none; } }
@media (max-width: 767px) {
    .deca-psearch { margin-inline-end: .15rem; }
    .deca-psearch-toggle { display: inline-flex; }
    .deca-psearch-box { display: none; }
    .deca-psearch-box.is-mobile-open { display: flex; position: fixed; top: .6rem; left: .6rem; right: .6rem; width: auto; height: 2.9rem; z-index: 70; background: #fff; box-shadow: 0 10px 30px rgba(15, 23, 42, .25); }
    .deca-psearch-results { position: fixed; top: 4rem; left: .6rem; right: .6rem; min-width: 0; max-height: calc(100vh - 5rem); }
}
.fi-no:has(.fi-no-notification) { z-index: 10000; }
.deca-legal-tiles:has(> .deca-legal-tile:only-child) { display: flex; justify-content: center; }
.deca-legal-tiles:has(> .deca-legal-tile:only-child) .deca-legal-tile { min-width: 12rem; }
.deca-psearch-results .deca-psearch-item-ic { color: color-mix(in srgb, var(--deca-mark, #1d4ed8) 70%, #0f172a); background: color-mix(in srgb, var(--deca-mark, #1d4ed8) 12%, #fff); }
.deca-psearch-results .deca-psearch-item-ic svg { opacity: 1; }

/* 3.27.1: row action icons (ver, editar, esborrar…) at 90 % */
.fi-icon-btn.deca-ic { width: 27px !important; height: 27px !important; }
.fi-icon-btn.deca-ic .fi-icon, .fi-icon-btn.deca-ic svg { width: 17.4px !important; height: 17.4px !important; }

/* 3.27.1: Comptes — Editar in colour · «Entrar com a:» + the three entry buttons in the same colour · maintenance red on the right */
.deca-acct-btns { gap: .45rem; }
.deca-acct-btns .fi-btn .fi-icon, .deca-acct-btns .fi-btn svg { color: #fff !important; opacity: 1 !important; }
.deca-acct-enter-as { margin-inline: .6rem .1rem; font-size: .85rem; font-weight: 600; color: #475569; white-space: nowrap; }
.deca-acct-maint { margin-inline-start: 1.4rem; padding-inline-start: 1.1rem; border-inline-start: 1.5px solid var(--deca-border, #dbe2ea); display: inline-flex; }
.deca-acct-maint .fi-icon-btn.deca-maint-btn, .deca-acct-maint .fi-icon-btn.deca-maint-btn.is-on { background: #dc2626 !important; border-color: #b91c1c !important; color: #fff !important; width: 2.1rem; height: 2.1rem; }
.deca-acct-maint .fi-icon-btn.deca-maint-btn:hover { background: #b91c1c !important; }
.deca-acct-maint .fi-icon-btn.deca-maint-btn .fi-icon { color: #fff !important; }
@media (max-width: 640px) { .deca-acct-maint { margin-inline-start: auto; } .deca-acct-enter-as { flex-basis: 100%; margin: .2rem 0 0; } }
/* Buttons in a section header keep the icon in the colour of their text (the header icon rule greyed them). */
.fi-section:not(.fi-section-not-contained) > .fi-section-header .fi-btn .fi-icon,
.fi-section:not(.fi-section-not-contained) > .fi-section-header .fi-icon-btn .fi-icon { color: inherit !important; }
.deca-acct-btns .fi-btn.deca-acct-edit { background: #15803d !important; color: #fff !important; }
.deca-acct-btns .fi-btn.deca-acct-edit:hover { background: #166534 !important; }

/* 3.27.1: «Registres eliminats» (window like the end of maintenance) */
.deca-delnotice .deca-maint-card { max-width: 520px; }
.deca-delnotice-ic { width: 6.5rem; height: 6.5rem; margin: 0 auto .25rem; color: #166534; background: #f0fdf4; border-radius: 999px; padding: 1rem; box-shadow: 0 0 0 8px rgb(22 163 74 / .18); animation: deca-no-icon .45s ease-out; }
.deca-delnotice-ic svg { width: 100%; height: 100%; }
.deca-delnotice-ic .f { fill: #bbf7d0; }
.deca-delnotice-count { font-weight: 700; font-size: 1.08rem !important; }
.deca-delnotice-more { font-size: .9677rem !important; font-weight: 600; color: #14532d; }
.deca-maint-close.is-next { background: #15803d; }
.deca-mail-mode { margin-top: .85rem !important; }

/* 3.27.2: Comptes — Archivo Narrow on the entry buttons (and on any group of 4 or more buttons),
   half the space before the maintenance button, account in maintenance all in yellow. */
.deca-acct-btns .fi-btn, .deca-acct-enter-as,
.fi-ac:has(> :nth-child(4)) > .fi-btn, .fi-ac:has(> :nth-child(4)) > * > .fi-btn { font-family: 'Archivo Narrow', var(--font-family, sans-serif) !important; font-weight: 600; letter-spacing: .01em; }
.deca-acct-btns .fi-btn { font-size: .9677rem; }
.deca-acct-maint { margin-inline-start: .7rem; padding-inline-start: .55rem; }
.deca-acct-maint .fi-btn.deca-maint-btn { background: #dc2626 !important; color: #fff !important; border: 1px solid #b91c1c; min-height: 2.1rem; padding-inline: .55rem; gap: .35rem; }
.deca-acct-maint .fi-btn.deca-maint-btn:hover { background: #b91c1c !important; }
.deca-acct-maint .fi-btn.deca-maint-btn.is-on { background: #f59e0b !important; border-color: #92400e; color: #451a03 !important; padding-inline: .8rem; }
.deca-acct-maint .fi-btn.deca-maint-btn.is-on:hover { background: #d97706 !important; }
.deca-acct-maint .fi-btn.deca-maint-btn.is-on .fi-icon { animation: deca-maint-turn 9s linear infinite; }
.deca-acct-card.is-maint { background: #fbbf24 !important; border-color: #b45309 !important; }
.deca-acct-card.is-maint > .fi-section-header { background: #fbbf24 !important; border-bottom-color: #b45309 !important; }
.deca-acct-card.is-maint .fi-section-header-heading, .deca-acct-card.is-maint .fi-section-header .fi-section-header-heading * { color: #451a03 !important; }
.deca-acct-card.is-maint .fi-section-content-ctn, .deca-acct-card.is-maint .fi-section-content { background: #fbbf24 !important; }
.deca-acct-card.is-maint .deca-table th, .deca-acct-card.is-maint .deca-table td { color: #451a03; border-color: rgb(146 64 14 / .35) !important; background: transparent !important; }
.deca-acct-card.is-maint .deca-acct-maint { border-inline-start-color: rgb(146 64 14 / .45); }
.fi-section-header-after-ctn .deca-acct-maint .fi-btn.deca-maint-btn { width: auto; height: auto; min-width: 2.25rem; min-height: 2.25rem; justify-content: center; }
.deca-acct-card.is-maint > .fi-section-header::before { background: #92400e !important; }
.deca-acct-card.is-maint .deca-acct-maint .fi-btn.deca-maint-btn.is-on { background: #fde68a !important; border: 1.5px solid #92400e; }
.deca-acct-card.is-maint .deca-acct-maint .fi-btn.deca-maint-btn.is-on:hover { background: #fef3c7 !important; }
.deca-acct-card.is-maint .deca-acct-maint .fi-btn.deca-maint-btn.is-on .fi-icon { color: #b45309 !important; }
.deca-maint-card.is-discarded { background: #e2e8f0; color: #0f172a; border-color: #475569; }
.deca-delnotice.is-discarded .deca-delnotice-ic { color: #334155; background: #f8fafc; box-shadow: 0 0 0 8px rgb(71 85 105 / .2); }
.deca-delnotice.is-discarded .deca-delnotice-ic .f { fill: #cbd5e1; }

/* 3.27.3: window «La sessió es tancarà» (30 s before the end of the inactivity time) */
.deca-sess-card { background: linear-gradient(180deg, #fef3c7 0%, #fff 70%); color: #0f172a; max-width: 30rem; width: 100%; border-radius: 1rem; border-top: 6px solid #d97706; padding: 1.8rem 1.6rem 1.4rem; text-align: center; box-shadow: 0 24px 60px rgb(15 23 42 / .35); animation: deca-no-pop .22s ease-out; }
.deca-sess-ic { width: 4.2rem; height: 4.2rem; margin: 0 auto .6rem; padding: .75rem; border-radius: 999px; background: #d97706; color: #fff; box-shadow: 0 0 0 7px rgb(217 119 6 / .2); }
.deca-sess-ic svg { width: 100%; height: 100%; }
.deca-sess-card h2 { font-size: 1.3rem; font-weight: 700; margin: 0 0 .2rem; }
.deca-sess-sec { font-size: 2.6rem; font-weight: 800; color: #b45309; font-variant-numeric: tabular-nums; line-height: 1.1; }
.deca-sess-card p { color: #475569; line-height: 1.5; margin: .4rem 0 0; }
.deca-sess-btns { display: flex; gap: .6rem; margin-top: 1.3rem; }
.deca-sess-btns button { border-radius: var(--deca-btn-radius, .5rem); padding: .7rem 1rem; font-weight: 700; font-size: .95rem; color: #fff; }
.deca-sess-stay { flex: 3 1 0; background: #15803d; }
.deca-sess-stay:hover { background: #166534; }
.deca-sess-out { flex: 1 1 0; background: #dc2626; }
.deca-sess-out:hover { background: #b91c1c; }
@media (max-width: 480px) { .deca-sess-btns { flex-direction: column; } }

/* 3.27.3: Dashboard of the administrators — DeCA and use of the plan */
.deca-plan-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.deca-plan-kpi { display: flex; flex-direction: column; gap: .15rem; padding: .8rem 1rem; border-radius: .55rem; background: var(--deca-body, #f1f5f9); border: 1.5px solid var(--deca-border, #dbe2ea); }
.deca-plan-kpi span { font-size: .82rem; color: #64748b; font-weight: 600; }
.deca-plan-kpi strong { font-size: 1.7rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.deca-plan-kpi strong small { font-size: 1rem; color: #64748b; font-weight: 600; }
.deca-plan-kpi em { font-style: normal; font-size: .82rem; color: #475569; }
.deca-plan-kpi.is-deca { background: color-mix(in srgb, #16a34a 9%, #fff); border-color: color-mix(in srgb, #16a34a 35%, #fff); }
.deca-plan-kpi.is-deca strong { color: #15803d; }

/* 3.28: plans — validity, subscription, administrative messages */
.deca-plan-validity { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .7rem; }
.deca-plan-validity > div { display: flex; flex-direction: column; padding: .7rem .9rem; border-radius: .5rem; background: var(--deca-body, #f1f5f9); border: 1.5px solid var(--deca-border, #dbe2ea); }
.deca-plan-validity span { font-size: .8rem; color: #64748b; font-weight: 600; }
.deca-plan-validity strong { font-size: 1.15rem; }
.deca-plan-billing { margin-top: .35rem; font-size: .85rem; line-height: 1.5; }
.deca-subhead { font-size: .95rem; font-weight: 700; color: var(--deca-mark, #1d4ed8); margin: 0 0 .5rem; }
.deca-alert-red { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; border-radius: .5rem; padding: .6rem .8rem; font-weight: 600; }
.deca-acct-plan { margin-inline-start: .4rem; font-size: .78rem; font-weight: 500; color: #64748b; }
.deca-acct-card.is-maint .deca-acct-plan { color: #78350f; }
.deca-admsg-prev { border: 1.5px solid var(--deca-border, #dbe2ea); border-radius: .55rem; overflow: hidden; }
.deca-admsg-to { padding: .5rem .8rem; font-size: .85rem; background: var(--deca-body, #f1f5f9); border-bottom: 1px solid var(--deca-border, #dbe2ea); }
.deca-admsg-subj { padding: .6rem .8rem 0; font-weight: 700; }
.deca-admsg-body { padding: .5rem .8rem .8rem; font-size: .9677rem; line-height: 1.55; max-height: 22rem; overflow-y: auto; }
.deca-admsg-fixed { font-size: .85rem; color: #475569; background: #f0fdf4; border: 1px dashed #86efac; border-radius: .5rem; padding: .55rem .8rem; }

/* 3.28.1: wider scroll bar in the lists of the combos (carregadors, conductors…), easier with the finger */
/* Chrome / Edge / Android use ::-webkit-scrollbar (ignored when scrollbar-width is set); Firefox, the standard properties. */
@supports not selector(::-webkit-scrollbar) { .fi-dropdown-panel { scrollbar-width: auto; scrollbar-color: #94a3b8 #f1f5f9; } }
.fi-dropdown-panel::-webkit-scrollbar { width: 14px; }
.fi-dropdown-panel::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 0 .5rem .5rem 0; }
.fi-dropdown-panel::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 8px; border: 3px solid #f1f5f9; min-height: 44px; }
.fi-dropdown-panel::-webkit-scrollbar-thumb:hover, .fi-dropdown-panel::-webkit-scrollbar-thumb:active { background: #64748b; }
@media (pointer: coarse), (max-width: 767px) {
    .fi-dropdown-panel::-webkit-scrollbar { width: 20px; }
    .fi-dropdown-panel::-webkit-scrollbar-thumb { border-width: 4px; min-height: 56px; }
}
@supports not selector(::-webkit-scrollbar) { .dark .fi-dropdown-panel { scrollbar-color: #64748b #1f2937; } }
.dark .fi-dropdown-panel::-webkit-scrollbar-track { background: #1f2937; }
.dark .fi-dropdown-panel::-webkit-scrollbar-thumb { background: #64748b; border-color: #1f2937; }

/* 3.28.2: general text at 15 px (was ~14 px): Filament's «text-sm» and our ~14 px texts (root 15.5 px → .9677rem = 15 px). */
:root { --text-sm: .9677rem; --text-sm--line-height: calc(1.4 / .9677); }
/* NIF warning: the number alone on its line, bigger and bold. */
.fi-no-notification-body .deca-nif-big { display: block; font-size: 1.35rem; font-weight: 700; color: #0f172a; letter-spacing: .04em; margin: .1rem 0 .45rem; font-variant-numeric: tabular-nums; }
.dark .fi-no-notification-body .deca-nif-big { color: #f8fafc; }
/* Notices that close by themselves: a bar that empties in 5 s. */
.fi-no .fi-no-notification.deca-autoclose { overflow: hidden; }
.fi-no .fi-no-notification.deca-autoclose::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--n-c); transform-origin: left; animation: deca-autoclose var(--deca-auto, 5s) linear forwards; }
@keyframes deca-autoclose { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* 3.28.3: list rows — 20 % less white space above and below (48 → 44 px) and alternate rows:
   odd ones as now (white), even ones slightly darker. */
.fi-ta-row { height: 44px; }
.fi-ta-row > .fi-ta-cell { padding-top: 3.7px !important; padding-bottom: 3.7px !important; }
.fi-ta-row > .fi-ta-cell > * > .fi-ta-col, .fi-ta-row .fi-ta-text, .fi-ta-row .fi-ta-icon, .fi-ta-row .fi-ta-actions { padding-top: .29rem !important; padding-bottom: .29rem !important; }
.fi-ta-row:nth-child(even) { background: color-mix(in srgb, #64748b 7%, var(--deca-surface, #fff)) !important; }
.fi-ta-row:hover { background: color-mix(in srgb, var(--primary-500, #3b82f6) 8%, var(--deca-surface, #fff)) !important; }
.dark .fi-ta-row:nth-child(even) { background: rgb(255 255 255 / .04) !important; }
.deca-table tbody tr:nth-child(even):not(.total) { background: color-mix(in srgb, #64748b 7%, var(--deca-surface, #fff)); }

/* 3.28.4: notices appear without «bounce»: no transitions of Filament on the window (it moved / scaled while
   appearing) — only a short fade of the window and of the dark background. */
.fi-no .fi-no-notification, .fi-no .fi-no-notification.fi-transition-enter-start, .fi-no .fi-no-notification.fi-transition-leave-end { transition: opacity .12s linear !important; transform: none !important; scale: none !important; translate: none !important; animation: none !important; }
.fi-no .fi-no-notification .fi-no-notification-icon { animation: none !important; }
.fi-no:has(.fi-no-notification) { animation: deca-no-fade .12s linear; }
@keyframes deca-no-fade { from { background-color: rgba(15, 23, 42, 0); } to { background-color: rgba(15, 23, 42, .45); } }

/* 3.28.5: top bar — the company name always on one line («…» at the end), aligned with the avatar. */
.fi-topbar-end { align-items: center; min-width: 0; }
.fi-topbar-end > *, .fi-topbar-end .deca-switcher { min-width: 0; }
.deca-switcher { flex-wrap: nowrap; min-width: 0; line-height: 1.2; }
.deca-switcher-one, .deca-switcher select { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.deca-switcher-one { max-width: 260px; }
@media (max-width: 767px) {
    .deca-switcher { margin-inline-end: .4rem; }
    .deca-switcher-one, .deca-switcher select { max-width: 34vw; }
    /* Search: an icon with a soft background, like the icons of the rows. */
    .deca-psearch-toggle { width: 2.25rem; height: 2.25rem; border-radius: .55rem; background: color-mix(in srgb, var(--deca-mark, #1d4ed8) 13%, #fff) !important; color: var(--deca-mark, #1d4ed8) !important; }
    .deca-psearch-toggle .fi-icon, .deca-psearch-toggle svg { color: var(--deca-mark, #1d4ed8) !important; }
}
/* Row icons (ver, editar, esborrar…): a little space between them. */
.fi-ta-row .fi-ta-actions { gap: 4px !important; }
.fi-ta-row .fi-ta-actions .fi-icon-btn { margin: 0 !important; }
/* «Veure tots els DeCA» while only the own ones are shown. */
.fi-header .deca-head-light.is-mine, .fi-header .deca-head-light.is-mine .fi-btn-label { font-weight: 700 !important; }

/* 3.28.6: Comptes — plan of the account under the header line, highlighted. */
.deca-acct-planbar { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 0 0 .9rem; padding: .6rem .9rem; border-radius: .5rem;
    font-size: 1.08rem; background: color-mix(in srgb, var(--deca-mark, #1d4ed8) 10%, #fff); border: 1.5px solid color-mix(in srgb, var(--deca-mark, #1d4ed8) 30%, #fff); color: #0f172a; }
.deca-acct-planbar strong { font-weight: 700; color: var(--deca-mark, #1d4ed8); }
.deca-acct-planbar-ic { width: 1.3rem; height: 1.3rem; color: var(--deca-mark, #1d4ed8); }
.deca-acct-planbar-bill { margin-inline-start: auto; font-size: .82rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: #fff; border: 1px solid color-mix(in srgb, var(--deca-mark, #1d4ed8) 30%, #fff); }
.deca-acct-card.is-maint .deca-acct-planbar { background: #fde68a; border-color: #b45309; }
.deca-acct-card.is-maint .deca-acct-planbar strong, .deca-acct-card.is-maint .deca-acct-planbar-ic { color: #78350f; }

/* 3.28.7: colour and icon of each plan */
.deca-acct-planbar { background: color-mix(in srgb, var(--plan, #2563eb) 13%, #fff) !important; border-color: color-mix(in srgb, var(--plan, #2563eb) 45%, #fff) !important; }
.deca-acct-planbar strong { color: color-mix(in srgb, var(--plan, #2563eb) 80%, #0f172a) !important; }
.deca-acct-planbar .deca-acct-planbar-ic { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: .5rem; background: var(--plan, #2563eb); color: #fff !important; }
.deca-acct-planbar .deca-acct-planbar-ic svg { width: 1.25rem; height: 1.25rem; }
.deca-acct-planbar-bill { border-color: color-mix(in srgb, var(--plan, #2563eb) 45%, #fff) !important; }
.deca-acct-card.is-maint .deca-acct-planbar { background: #fde68a !important; border-color: #b45309 !important; }
.deca-plan-card-ic { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: .5rem; margin-inline-end: .5rem; vertical-align: middle; background: var(--plan, #2563eb); color: #fff; }
.deca-plan-card-ic svg { width: 1.15rem; height: 1.15rem; }
.deca-plan-icons .fi-btn { min-width: 2.6rem; justify-content: center; }
.deca-plan-icons .fi-btn .fi-icon { width: 1.35rem; height: 1.35rem; }

/* 3.28.8 · «Pla contractat»: buttons under the title, subsections inside */
.deca-plan-buttons { display: flex; flex-wrap: wrap; gap: .5rem; padding-bottom: .4rem; border-bottom: 1px solid rgb(0 0 0 / .08); }
.deca-plan-buttons .fi-btn { font-family: 'Archivo Narrow', var(--font-family, sans-serif); }
.deca-plan-contracted .fi-section .fi-section .fi-section-header-heading,
.deca-plan-contracted .fi-section-content .fi-section-header-heading { font-size: 1rem; }
@media (max-width: 639px) { .deca-plan-buttons .fi-btn { flex: 1 1 100%; justify-content: center; } }

/* 3.28.9 · Subsections (a section inside a section, on any page): like the subsections of the sheets —
   title in the colour, a short horizontal mark before it and the line under it; no header band. */
.fi-section .fi-section:not(.fi-section-not-contained) > .fi-section-header {
    background: transparent !important; border-bottom: 2.5px solid var(--deca-line) !important;
    padding-left: 2.6rem !important; padding-top: .7rem !important; padding-bottom: .45rem !important; border-radius: 0 !important; margin: 0 1rem; padding-left: 1.6rem !important;
}
.fi-section .fi-section:not(.fi-section-not-contained) > .fi-section-header::before {
    left: 0 !important; width: 1rem !important; height: 4px !important; border-radius: 2px !important; background: var(--deca-mark) !important;
}
.fi-section .fi-section > .fi-section-header .fi-section-header-heading { font-size: 1.05rem !important; font-weight: 600 !important; }
.fi-section .fi-section:not(.fi-section-not-contained) > .fi-section-header .fi-icon:not(.fi-section-collapse-btn .fi-icon) { display: none; }
/* «(fes clic per desplegar)» only while the section is closed. */
.deca-click-hint { font-size: .85rem; font-weight: 400; color: var(--deca-muted, #64748b); margin-left: .35rem; }
.fi-section:not(.fi-collapsed) > .fi-section-header .deca-click-hint { display: none; }
.fi-section.fi-collapsed > .fi-section-header { cursor: pointer; }
/* Accounts of a plan; theme preview of the account. */
.deca-plan-accounts-table .num { text-align: right; }
.deca-plan-accounts-table a.deca-link { color: var(--deca-mark); text-decoration: none; }
.deca-plan-accounts-table a.deca-link:hover { text-decoration: underline; }
.deca-theme-prev-wrap .deca-theme-preview { max-width: 100%; }

/* 3.28.10 · «Tancar» (close) buttons: grey #4B5563 everywhere («Cancel·lar» stays red). */
.deca-cancel.deca-close, .deca-cancel.deca-close:hover,
:is(.fi-modal-footer-actions, .fi-ac) > .deca-cancel.deca-close,
.fi-ac:has(> .deca-delete-btn) > .deca-cancel.deca-close { background-color: #4B5563 !important; border-color: #4B5563 !important; --tw-ring-color: #4B5563; color: #fff !important; }
.deca-cancel.deca-close:hover { background-color: #374151 !important; border-color: #374151 !important; }
.deca-legal-close, .deca-maint-close:not(.is-next) { background: #4B5563 !important; }
.deca-legal-close:hover, .deca-maint-close:not(.is-next):hover { background: #374151 !important; }
/* «Adjuntar el PDF» and «Adjuntar el PDF i el QR», one under the other. */
.deca-attach-opts > .fi-grid, .deca-attach-opts { row-gap: .6rem; }

/* 3.28.11 · «Enviar DeCA/QR»: tighter window; «Enviar a» on the left of its buttons; «Previsualització»
   next to the template, as wide as «Cancel·lar»; at the bottom only «Enviar correu» and «Cancel·lar». */
.deca-send-modal .deca-steps-head { margin-bottom: 0 !important; }
.deca-send-modal .deca-steps-line { margin: .35rem 0 0 !important; line-height: 1.2; }
.deca-send-modal .fi-modal-content > .fi-sc, .deca-send-modal .fi-modal-content .fi-sc { row-gap: .7rem !important; }
.deca-send-modal .fi-modal-content { padding-bottom: .5rem !important; }
.deca-send-modal .fi-modal-footer { padding-top: .6rem !important; }
.deca-send-modal .deca-send-sec .fi-section-content { padding-top: .75rem !important; padding-bottom: .8rem !important; }
.deca-send-modal .fi-fo-field-has-inline-label:has(.deca-sendto) { display: flex !important; align-items: center; gap: .75rem; }
.deca-send-modal .fi-fo-field-has-inline-label:has(.deca-sendto) > :first-child { flex: none; width: auto !important; padding-top: 0 !important; }
.deca-send-modal .fi-fo-field-has-inline-label:has(.deca-sendto) > .fi-fo-field-content-col { flex: 1 1 auto; min-width: 0; }
.deca-send-modal .deca-sendto { max-width: 27rem; }
.deca-send-modal .deca-sendto .fi-btn { padding-block: .4rem; font-size: .9rem; }
.deca-send-modal .deca-notice-row .fi-fo-field-label-ctn, .deca-send-modal .deca-notice-row .fi-fo-field-label-col > div { flex-wrap: nowrap !important; white-space: nowrap; overflow: visible; }
.deca-send-modal .deca-notice-row > * { overflow: visible; }
.deca-send-modal .deca-notice-row { justify-content: flex-end; }
.deca-send-modal .deca-notice-row > :has(.deca-preview-cell) { flex: 0 0 calc((100% + 1.4rem) / 4) !important; width: calc((100% + 1.4rem) / 4) !important; max-width: none !important; }
.deca-send-modal .deca-preview-cell .fi-btn { width: 100%; justify-content: center; }
@media (max-width: 640px) {
  .deca-send-modal .fi-fo-field-has-inline-label:has(.deca-sendto) { gap: .45rem; }
  .deca-send-modal .fi-fo-field-has-inline-label:has(.deca-sendto) .fi-fo-field-label-content { font-size: .85rem; }
  .deca-send-modal .deca-sendto .fi-btn { font-size: .8rem; padding-inline: .25rem; }
  .deca-send-modal .deca-notice-row .fi-fo-field-label-ctn, .deca-send-modal .deca-notice-row .fi-fo-field-label-col > div { white-space: normal; flex-wrap: wrap !important; }
  .deca-send-modal .deca-notice-row > :has(.deca-preview-cell) { flex-basis: auto !important; width: 100% !important; }
}
/* 3.28.12 · «Previsualització» outlined; with only the QR, at the level of the QR switch, on the right. */
.deca-send-modal .deca-preview-cell .fi-btn.fi-outlined { background: transparent !important; border-width: 2px; }
.deca-send-modal .deca-preview-qr { width: calc((200% + 5.9rem) / 4); margin-left: auto; }
@media (max-width: 639px) { .deca-send-modal .deca-preview-qr { width: 100%; } }

/* 3.28.15 · Transport sheet (view): the line under the title as on the other pages (buttons below it);
   labels as big as the data, in Archivo Narrow; a thin blue line under each block title (Data, Conductor…). */
.fi-page-header-main-ctn:has(.deca-sheet) > .fi-header { flex-direction: column !important; align-items: stretch !important; border-bottom: 0 !important; padding-bottom: 0 !important; gap: .8rem; }
.fi-page-header-main-ctn:has(.deca-sheet) > .fi-header > div:first-child { border-bottom: 2.5px solid var(--deca-line); padding-bottom: .7rem; width: 100%; }
.deca-sheet .deca-kv th { font-family: 'Archivo Narrow', var(--font-family, sans-serif) !important; font-size: .9677rem !important; font-weight: 500 !important; }
.deca-sheet .deca-kv tr.deca-kv-head th { font-family: inherit !important; font-size: 1.05rem !important; font-weight: 600 !important;
    border-bottom: 1.5px solid var(--deca-heading, var(--primary-600, #2563eb)) !important; padding-bottom: .4rem; }
.deca-badge-blue { background: #dbeafe; color: #1e40af; }
.deca-badge-violet { background: #ede9fe; color: #5b21b6; }
.fi-page-header-main-ctn:has(.deca-sheet) > .fi-header .fi-header-actions-ctn { justify-content: flex-start !important; align-self: stretch; }
.fi-page-header-main-ctn:has(.deca-sheet) > .fi-header .fi-ac { justify-content: flex-start !important; }
.deca-badge-blue, .deca-badge-violet { white-space: nowrap; }

/* 3.28.16 · Number plates (Flota): like the real ones. */
.deca-plate { display: inline-flex; align-items: stretch; border: 2px solid #111827; border-radius: 5px; background: #fff; color: #111;
    font-family: 'Archivo Narrow', var(--font-family, sans-serif); font-weight: 600; line-height: 1; overflow: hidden; box-shadow: inset 0 0 0 1px #d1d5db; white-space: nowrap; }
.deca-plate-eu { display: flex; flex-direction: column; align-items: center; justify-content: space-between; background: #003399; color: #fff; padding: 3px 4px 2px; min-width: 1.35rem; }
.deca-plate-eu svg { width: .85rem; height: .85rem; fill: #ffcc00; }
.deca-plate-eu b { font-size: .7rem; font-weight: 600; font-family: var(--font-family, sans-serif); }
.deca-plate-num { padding: .28rem .55rem .22rem; font-size: 1.45rem; letter-spacing: .06em; }
.deca-plate.is-trailer { background: #e30613; box-shadow: none; }
.deca-plate.is-trailer .deca-plate-num { color: #111; }
@media (max-width: 640px) { .deca-plate-num { font-size: 1.2rem; } }

/* Transport sheet (view): the labels in Archivo Narrow a bit bigger; the lists inside (goods, messages,
   history of changes…) with a bigger, easier to read letter. */
.deca-sheet .deca-kv th { font-size: 1.08rem !important; color: color-mix(in srgb, var(--deca-muted, #64748b) 80%, var(--deca-text, #0f172a)) !important; }
.fi-page-content:has(.deca-sheet) .deca-table td { font-size: 1.02rem; }
.fi-page-content:has(.deca-sheet) .deca-table th { font-size: .92rem !important; }
.fi-page-content:has(.deca-sheet) .deca-table .deca-muted { font-size: .92rem; }
.deca-plate-part + .deca-plate-part { margin-left: .42em; }
.deca-plate-eu svg { display: block; flex: none; }
.deca-plate.is-sm .deca-plate-num { font-size: 1.05rem; padding: .18rem .4rem .14rem; }
.deca-plate.is-sm .deca-plate-eu { min-width: 1rem; padding: 2px 3px 1px; }
.deca-plate.is-sm .deca-plate-eu svg { width: .6rem; height: .6rem; }
.deca-plate.is-sm .deca-plate-eu b { font-size: .55rem; }
.deca-plate-opt { display: inline-flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.deca-plate-desc { color: var(--deca-muted, #64748b); }
.deca-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.deca-plate.is-temp { background: #00843d; box-shadow: none; }
.deca-plate.is-temp .deca-plate-num { color: #fff; }

/* 3.28.18 · Register of messages of the sheet: the address cut with «…» (complete on hovering it). */
.deca-msg-to { max-width: 15rem; }
.deca-msg-to > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deca-msg-nw { white-space: nowrap; }
/* Flota: the plates of the list at 90 %. */
.deca-plate.is-list { zoom: .9; }
.deca-narrow-input .fi-input-wrp { max-width: 14rem; }

/* 3.28.19 · Plates in «format gràfic»: lists (Flota, sheets) at 81 %, the sheet at 90 %. */
.deca-plate.is-list { zoom: .81; }
.deca-plate.is-view { zoom: .9; }
.deca-plate-cell { display: inline-block; white-space: nowrap; }
.deca-plate-plain { font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* 3.28.20 · «DeCA previst» 25 % bigger; note «more options» in the company; sections per role: the menu
   switch (upper level) in green and its options a little to the right, under the text. */
.deca-deca-preview { font-size: 1.25em; font-weight: 600; }
.deca-more-options { display: flex; align-items: flex-start; gap: .6rem; }
.deca-more-options-ic { width: 1.35rem; height: 1.35rem; flex: none; margin-top: .05rem; }
.deca-group-children { padding-left: 3.4rem; }
.deca-group-toggle-wrp .fi-fo-field-label-content { font-weight: 700; }
/* Sections per role: «Conductor» and «Oficina» as two coloured buttons (white bold text); the one not chosen paler. */
.deca-role-tabs .fi-tabs { gap: .6rem; padding: .7rem 1rem; }
.deca-role-tabs .fi-tabs-item { color: #fff !important; font-weight: 700 !important; padding: .55rem 1.2rem !important; border-radius: .55rem; opacity: .5; }
.deca-role-tabs .fi-tabs-item .fi-tabs-item-label, .deca-role-tabs .fi-tabs-item .fi-icon { color: #fff !important; }
.deca-role-tabs .fi-tabs-item:nth-child(1) { background: #2563eb !important; }
.deca-role-tabs .fi-tabs-item:nth-child(2) { background: #7c3aed !important; }
.deca-role-tabs .fi-tabs-item.fi-active, .deca-role-tabs .fi-tabs-item:hover { opacity: 1; box-shadow: 0 2px 6px rgb(0 0 0 / .18); }

/* 3.28.21 · Bigger «i» in the note of the company (the height of the box on the web). */
.deca-more-options { align-items: center; }
.deca-more-options-ic { width: 2.6rem !important; height: 2.6rem !important; margin-top: 0 !important; }
@media (max-width: 640px) { .deca-more-options-ic { width: 1.6rem !important; height: 1.6rem !important; } }
/* Examples of plates (Opcions › General). */
.deca-plate-samples { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-end; }
.deca-plate-samples > div { display: flex; flex-direction: column; gap: .3rem; }
/* «Origen i destinació detallats»: pins of the switches and the buttons next to the titles. */
.deca-pin-lbl { display: inline-flex; align-items: center; gap: .4rem; }
.deca-pin { width: 1.25rem; height: 1.25rem; }
.deca-pin.is-origin { color: #16a34a; } .deca-pin.is-dest { color: #dc2626; }
.deca-route-btn.fi-btn { padding-block: .3rem !important; }
.deca-route-star .fi-icon { color: #d97706 !important; }
