/* 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: .9rem;
  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(auto-fill, minmax(340px, 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; }
.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: .9rem; }
.deca-issue-info ul { list-style: none; padding: 0; margin: .75rem 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.deca-issue-info li { border: 1px solid rgb(0 0 0 / .08); border-radius: .5rem; padding: .6rem .75rem; }
.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: .88rem; }
.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: .9rem; }
.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: .88rem; }
.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: .88rem; 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: .9rem; 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: .9rem; }
.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: .9rem; } .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 { overflow-x: auto; overflow-y: hidden; height: 16px; background: var(--deca-surface, #fff); border-top: 1px solid var(--deca-border); }
.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) {
    .deca-filters-toggle-cell { display: block; }
    .deca-filters-toggle { width: 100%; }
    .deca-sheet-filters-row { display: none !important; }
    html.deca-filters-open .deca-sheet-filters-row { display: grid !important; }
    html.deca-filters-open .deca-filters-toggle { background: var(--deca-heading, #1e293b); color: var(--deca-heading-text, #fff); }
}
/* 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); }
@media (min-width: 768px) { .fi-grid-col:has(> .fi-sc-component > .deca-filters-toggle) { display: none !important; } }
.fi-grid-col:has(> .fi-sc-component > .deca-filters-toggle) { display: flex; justify-content: flex-end; }
.deca-list-tools { min-width: 0; }
.deca-list-tools .deca-reset-filters { min-width: 0; padding: 0 .6rem; overflow: hidden; text-overflow: ellipsis; }
