.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); min-width: 0; }
.card-head { min-height: 48px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.card-head > div { min-width: 0; }
.card-head h2, .card-head h3 { margin: 0; font-size: 14px; letter-spacing: -.01em; }
.card-head p { margin: 3px 0 0; font-size: 10px; color: var(--muted); }
.card-body { padding: 14px; }
.card-footer { min-height: 44px; padding: 9px 14px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.btn { min-height: 36px; border-radius: 9px; border: 1px solid transparent; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 650; font-size: 12px; cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: #141922; color: white; border-color: #141922; }
.btn-primary:hover { box-shadow: 0 8px 18px rgba(20,25,34,.18); }
.btn-yellow { background: var(--yellow); color: #181818; border-color: var(--yellow); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-soft); border-color: var(--border-strong); }
.btn-danger { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 18%, var(--border)); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-sm { min-height: 30px; padding-inline: 9px; font-size: 11px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn { width: 34px; height: 34px; border: 1px solid var(--border); background: var(--surface); border-radius: 9px; display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); transition: background .14s ease, color .14s ease, border-color .14s ease, transform .14s ease; flex: 0 0 auto; }
.icon-btn:hover { background: var(--surface-soft); color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn.danger:hover { color: var(--red); background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 22%, transparent); }

.kpi-card { min-height: 112px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 14px; box-shadow: var(--shadow-xs); display: flex; flex-direction: column; justify-content: space-between; min-width: 0; overflow: hidden; }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.kpi-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.kpi-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; }
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-blue .kpi-icon { background: var(--blue-soft); color: var(--primary); }
.kpi-green .kpi-icon { background: var(--green-soft); color: var(--green); }
.kpi-orange .kpi-icon { background: var(--orange-soft); color: var(--orange); }
.kpi-purple .kpi-icon { background: color-mix(in srgb, var(--purple) 12%, var(--surface)); color: var(--purple); }
.kpi-red .kpi-icon { background: var(--red-soft); color: var(--red); }
.kpi-yellow .kpi-icon { background: var(--yellow-soft); color: #9b7b00; }
.kpi-value { font-size: clamp(19px, 1.7vw, 25px); line-height: 1; letter-spacing: -.035em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 4px 0 3px; }
.kpi-bottom { min-height: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.trend { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.trend svg { width: 12px; height: 12px; }
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }
.sparkline { width: 44%; max-width: 110px; height: 30px; color: var(--primary); overflow: visible; }
.kpi-green .sparkline { color: var(--green); }
.kpi-orange .sparkline { color: var(--orange); }
.kpi-purple .sparkline { color: var(--purple); }
.kpi-red .sparkline { color: var(--red); }

.hero-kpi { min-height: 126px; border-radius: var(--radius); background: linear-gradient(135deg, #0f141d 0%, #131b28 60%, #0d1118 100%); color: white; padding: 15px 17px; position: relative; overflow: hidden; box-shadow: 0 10px 24px rgba(15, 20, 29, .14); }
.hero-kpi::before { content: ""; position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(90deg, transparent 49%, rgba(245,197,24,.15) 50%, transparent 51%), linear-gradient(0deg, transparent 49%, rgba(245,197,24,.10) 50%, transparent 51%); background-size: 38px 38px; transform: rotate(-12deg) scale(1.3); }
.hero-kpi > * { position: relative; z-index: 1; }
.hero-kpi .hero-label { color: #c6cbd4; font-size: 11px; }
.hero-kpi .hero-value { font-size: clamp(27px, 2.2vw, 34px); display: block; margin: 10px 0 8px; letter-spacing: -.045em; line-height: 1; }
.hero-kpi .hero-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hero-kpi .hero-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--yellow); color: #111; display: grid; place-items: center; }
.hero-kpi .hero-progress { height: 3px; background: rgba(255,255,255,.14); border-radius: 99px; margin-top: 13px; overflow: hidden; }
.hero-kpi .hero-progress span { display: block; height: 100%; background: var(--yellow); border-radius: inherit; }

.filter-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; box-shadow: var(--shadow-xs); }
.filter-search { flex: 1 1 260px; min-width: 190px; position: relative; }
.filter-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-2); }
.filter-search input { padding-left: 33px; }
.filter-spacer { flex: 1; }

.field { display: grid; gap: 6px; min-width: 0; }
.field > span { color: var(--muted); font-size: 11px; font-weight: 650; }
.field input, .field select, .field textarea, .input, .select { width: 100%; min-height: 36px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 9px; padding: 8px 10px; outline: none; transition: border-color .14s ease, box-shadow .14s ease; }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .select:focus { border-color: #aebfff; box-shadow: 0 0 0 3px rgba(49,87,246,.08); }
.field input::placeholder, .input::placeholder { color: var(--muted-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .span-2 { grid-column: span 2; }
.form-section { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.form-section-title { margin: 0 0 10px; font-size: 12px; }
.helper { color: var(--muted); font-size: 10px; margin: 4px 0 0; }

.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-xs); min-width: 0; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.data-table th { height: 38px; padding: 0 12px; text-align: left; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .01em; background: var(--surface-soft); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { height: 46px; padding: 7px 12px; border-bottom: 1px solid var(--border); font-size: 11px; color: #353b46; vertical-align: middle; }
.dark .data-table td { color: #d4d8df; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--surface-soft) 78%, transparent); }
.data-table .actions-cell { text-align: right; white-space: nowrap; }
.data-table .actions-inline { display: inline-flex; justify-content: flex-end; align-items: center; gap: 4px; }
.data-table .actions-inline .icon-btn { width: 28px; height: 28px; border-color: transparent; background: transparent; }
.data-table .actions-inline .icon-btn:hover { background: var(--surface-soft); border-color: var(--border); }
.data-table .actions-inline .icon-btn:disabled { opacity: .34; cursor: not-allowed; transform: none; background: transparent; border-color: transparent; }
.data-table .actions-inline .icon-btn:disabled:hover { color: var(--muted); background: transparent; border-color: transparent; transform: none; }
.entity-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.entity-avatar { width: 30px; height: 30px; border-radius: 9px; background: var(--blue-soft); color: var(--primary); display: grid; place-items: center; font-size: 10px; font-weight: 800; flex: 0 0 auto; }
.entity-avatar.yellow { background: var(--yellow-soft); color: #8b7100; }
.entity-copy { min-width: 0; }
.entity-copy strong, .entity-copy small { display: block; }
.entity-copy strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.entity-copy small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.table-footer { min-height: 48px; border-top: 1px solid var(--border); padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.table-footer-left, .pagination { display: flex; align-items: center; gap: 6px; }
.table-footer .select { min-height: 30px; width: auto; padding-block: 4px; font-size: 10px; }
.page-btn { min-width: 30px; height: 30px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; display: inline-grid; place-items: center; font-size: 10px; cursor: pointer; }
.page-btn.active { background: var(--yellow); border-color: var(--yellow); color: #111; font-weight: 800; }
.page-btn:disabled { opacity: .45; cursor: default; }
.empty-state { min-height: 150px; display: grid; place-items: center; align-content: center; color: var(--muted); gap: 8px; }
.empty-state svg { width: 24px; height: 24px; color: var(--muted-2); }
.empty-state p { margin: 0; font-size: 11px; }

.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border-radius: 7px; font-size: 9px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.badge-success { background: var(--green-soft); color: #148653; border-color: color-mix(in srgb, var(--green) 13%, transparent); }
.badge-warning { background: var(--orange-soft); color: #b06b17; border-color: color-mix(in srgb, var(--orange) 15%, transparent); }
.badge-danger { background: var(--red-soft); color: #ca3d3a; border-color: color-mix(in srgb, var(--red) 14%, transparent); }
.badge-blue { background: var(--blue-soft); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 12%, transparent); }
.badge-neutral { background: var(--surface-soft); color: var(--muted); border-color: var(--border); }

.tabs { display: flex; align-items: center; gap: 4px; padding: 4px; width: fit-content; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.tab { min-height: 30px; border: 0; border-radius: 7px; background: transparent; padding: 0 10px; font-size: 10px; color: var(--muted); cursor: pointer; }
.tab.active { background: #151a23; color: white; font-weight: 700; }
.dark .tab.active { background: white; color: #111; }

.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 7px); z-index: 80; min-width: 190px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; box-shadow: 0 18px 44px rgba(16,24,40,.13); padding: 5px; }
.dropdown-menu a, .dropdown-menu button { width: 100%; min-height: 34px; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--text); border-radius: 7px; padding: 0 9px; font-size: 11px; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-soft); }
.dropdown-menu svg { width: 15px; height: 15px; color: var(--muted); }
.danger-link { color: var(--red) !important; }
.notification-menu { width: 340px; padding: 7px; }
.dropdown-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 8px 10px; border-bottom: 1px solid var(--border); }
.dropdown-head strong { font-size: 12px; }
.dropdown-head span { color: var(--muted); font-size: 10px; }
.notification-item { min-height: 54px !important; display: grid !important; grid-template-columns: 8px minmax(0, 1fr) !important; align-items: start !important; gap: 8px !important; padding: 9px !important; }
.notification-item.unread { background: color-mix(in srgb, var(--primary-soft) 50%, transparent); }
.notification-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--primary); margin-top: 5px; }
.notification-item strong { font-size: 10px; display: block; }
.notification-item p { margin: 2px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.dropdown-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 10px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(15, 20, 29, .46); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: modalFade .15s ease; }
.modal { width: min(680px, 100%); max-height: calc(100vh - 40px); background: var(--surface); border: 1px solid var(--border); border-radius: 15px; box-shadow: 0 24px 80px rgba(15,23,42,.24); display: flex; flex-direction: column; animation: modalPop .18s ease; }
.modal.modal-lg { width: min(920px, 100%); }
.modal.modal-sm { width: min(460px, 100%); }
.modal-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 15px; }
.modal-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.modal-body { padding: 16px; overflow-y: auto; }
.modal-foot { min-height: 58px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 14px; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop { from { transform: translateY(8px) scale(.985); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

.alert { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; font-size: 11px; margin-bottom: 12px; }
.alert-success { background: var(--green-soft); color: #13754a; border-color: color-mix(in srgb, var(--green) 20%, transparent); }
.alert-danger { background: var(--red-soft); color: #bd3a37; border-color: color-mix(in srgb, var(--red) 20%, transparent); }
.alert-warning { background: var(--orange-soft); color: #9d5e12; border-color: color-mix(in srgb, var(--orange) 20%, transparent); }

.chart-card { min-height: 290px; }
.chart-card .card-body { min-height: 230px; position: relative; }
.chart-wrap { position: relative; width: 100%; height: 220px; }
.chart-wrap canvas { max-width: 100%; }
.chart-toolbar { display: flex; align-items: center; gap: 6px; }
.chart-stat { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.chart-stat strong { font-size: 22px; letter-spacing: -.04em; }
.chart-stat span { color: var(--green); font-size: 10px; font-weight: 700; }
.donut-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: center; gap: 8px; height: 230px; }
.donut-canvas { height: 220px; position: relative; }
.chart-legend { display: grid; gap: 8px; }
.legend-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 7px; align-items: center; font-size: 10px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-row span:nth-child(2) { color: var(--muted); }
.legend-row strong { font-size: 10px; }

.activity-list { display: grid; }
.activity-item { min-height: 58px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 9px; align-items: center; border-bottom: 1px solid var(--border); padding: 8px 0; }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.activity-icon svg { width: 16px; height: 16px; }
.activity-blue { color: var(--primary); background: var(--blue-soft); }
.activity-green { color: var(--green); background: var(--green-soft); }
.activity-orange { color: var(--orange); background: var(--orange-soft); }
.activity-purple { color: var(--purple); background: color-mix(in srgb, var(--purple) 12%, var(--surface)); }
.activity-copy strong { font-size: 10px; display: block; }
.activity-copy p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.activity-time { color: var(--muted-2); font-size: 9px; white-space: nowrap; }

.document-preview { min-height: 356px; background: #f8f8f8; border-radius: 9px; border: 1px solid var(--border); padding: 10px; color: #111; }
.document-preview .paper { background: white; min-height: 330px; padding: 12px; box-shadow: 0 5px 15px rgba(15,23,42,.05); display: flex; flex-direction: column; }
.doc-top { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: start; }
.doc-top img { width: 78px; }
.doc-type { font-size: 15px; font-weight: 800; }
.doc-meta { font-size: 7px; text-align: right; }
.doc-yellow { height: 2px; background: #f5c518; margin: 8px 0; }
.doc-boxes { display: grid; grid-template-columns: 1.4fr 1fr; gap: 6px; }
.doc-box { border: 1px solid #d9d9d9; border-radius: 5px; min-height: 58px; padding: 6px; font-size: 6.5px; }
.doc-mini-table { width: 100%; border-collapse: collapse; font-size: 6px; margin-top: 7px; }
.doc-mini-table th, .doc-mini-table td { border: 1px solid #ddd; padding: 4px; text-align: left; }
.doc-mini-total { margin-left: auto; margin-top: 6px; font-weight: 800; font-size: 7px; }

.toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 130; display: grid; gap: 8px; width: min(340px, calc(100vw - 36px)); }
.toast { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; box-shadow: 0 18px 45px rgba(15,23,42,.16); padding: 11px 12px; display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 9px; animation: toastIn .2s ease; }
.toast-icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.toast-success .toast-icon { background: var(--green-soft); color: var(--green); }
.toast-danger .toast-icon { background: var(--red-soft); color: var(--red); }
.toast strong { font-size: 11px; display: block; }
.toast p { margin: 2px 0 0; font-size: 10px; color: var(--muted); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.kpi-progress-card { min-height: 126px; padding: 14px; }
.kpi-progress-top { display: flex; justify-content: space-between; gap: 10px; }
.kpi-progress-value { font-size: 22px; letter-spacing: -.035em; font-weight: 800; }
.kpi-progress-label { color: var(--muted); font-size: 10px; }
.progress { height: 5px; border-radius: 999px; background: var(--surface-soft); overflow: hidden; margin-top: 17px; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.progress.yellow > span { background: var(--yellow); }
.progress.green > span { background: var(--green); }
.kpi-progress-foot { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 9px; }

@media (max-width: 1120px) {
  .donut-wrap { grid-template-columns: 1fr; height: auto; }
  .donut-canvas { height: 190px; }
  .chart-legend { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .filter-bar { align-items: stretch; }
  .filter-search, .filter-bar .select, .filter-bar .btn { flex: 1 1 100%; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .table-wrap { overflow-x: hidden; }
  .data-table { min-width: 0; table-layout: fixed; }
  .data-table th, .data-table td { padding-inline: 8px; }
  .data-table .col-secondary { display: none; }
  .data-table .actions-cell { width: 105px; }
  .data-table .actions-inline .icon-btn:nth-child(n+4) { display: none; }
  .entity-copy strong { max-width: 150px; }
  .table-footer { align-items: flex-start; flex-direction: column; }
  .pagination { width: 100%; justify-content: flex-end; }
  .notification-menu { width: min(340px, calc(100vw - 24px)); }
  .modal-backdrop { padding: 0; place-items: end center; }
  .modal, .modal.modal-lg, .modal.modal-sm { width: 100%; max-height: 92vh; border-radius: 15px 15px 0 0; border-bottom: 0; }
}

.document-lines-box{border:1px solid var(--border);border-radius:10px;padding:10px;overflow-x:auto}.document-lines-head,.document-line{min-width:760px;display:grid;grid-template-columns:160px minmax(220px,1fr) 70px 95px 72px 92px 34px;gap:6px;align-items:center}.document-lines-head{padding:0 0 7px;color:var(--muted);font-size:9px;font-weight:700}.document-line{padding:6px 0;border-top:1px solid var(--border)}.document-line .input,.document-line .select{min-height:32px;font-size:10px;padding:5px 7px}.document-line .line-total{text-align:right;font-size:10px}.document-line .icon-btn{width:30px;height:30px}.document-totals{margin-left:auto;width:min(360px,100%);display:grid;gap:6px}.document-totals>div{display:flex;align-items:center;justify-content:space-between;padding:7px 9px;border-bottom:1px solid var(--border);font-size:10px}.document-totals .grand{background:var(--surface-soft);border:1px solid var(--border);border-radius:9px}.document-totals .grand strong{font-size:14px}.commercial-kpis .kpi-card{min-height:112px}

.profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.profile-grid>div{border:1px solid var(--border);border-radius:9px;padding:10px;min-width:0}.profile-grid span,.profile-grid strong{display:block}.profile-grid span{font-size:9px;color:var(--muted)}.profile-grid strong{font-size:11px;margin-top:3px;overflow-wrap:anywhere}.profile-hero{display:flex;align-items:center;gap:12px;margin-bottom:14px}.profile-hero .entity-avatar{width:46px;height:46px;border-radius:13px}.profile-hero h3{margin:0}.profile-hero p{margin:3px 0 0;color:var(--muted);font-size:10px}.amount-danger{color:var(--red)}.amount-success{color:var(--green)}.payroll-live{background:var(--green-soft);border:1px solid color-mix(in srgb,var(--green) 18%,transparent);border-radius:10px;padding:12px}.payroll-live span,.payroll-live strong,.payroll-live small{display:block}.payroll-live span{font-size:9px;color:var(--muted)}.payroll-live strong{font-size:22px;color:var(--green);margin:3px 0}.payroll-live small{font-size:8px;color:var(--muted)}@media(max-width:680px){.profile-grid{grid-template-columns:1fr}}

.entity-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}


.login-divider{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:11px;margin:14px 0}.login-divider:before,.login-divider:after{content:"";height:1px;background:var(--border);flex:1}.login-demo-note{display:grid;gap:4px;margin-top:14px;padding:12px 14px;border:1px solid #f1da75;background:#fffaf0;border-radius:12px;font-size:12px}.login-demo-note strong{color:var(--text)}.login-demo-note span{color:var(--muted);line-height:1.45}

.field-error{display:block;color:var(--red);font-size:9px;font-weight:650;margin-top:4px}.field [aria-invalid="true"]{border-color:color-mix(in srgb,var(--red) 70%,var(--border));box-shadow:0 0 0 3px color-mix(in srgb,var(--red) 10%,transparent)}
.alert-info{background:var(--blue-soft);color:var(--primary);border-color:color-mix(in srgb,var(--primary) 20%,transparent)}
.document-flow-hint{display:flex;align-items:flex-start;gap:10px;margin-bottom:0}
.document-flow-hint strong{white-space:nowrap}
.document-flow-hint span{color:var(--muted);line-height:1.45}
@media(max-width:680px){.document-flow-hint{display:block}.document-flow-hint strong,.document-flow-hint span{display:block}.document-flow-hint span{margin-top:4px}}


/* Integrated Factures → Paiements → Trésorerie flow */
.finance-flow{margin:0 0 14px;display:grid;grid-template-columns:minmax(260px,.82fr) minmax(0,1.55fr);gap:12px;align-items:stretch;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-xs);padding:12px}.finance-flow-copy{min-width:0;padding:3px 5px;display:flex;flex-direction:column;justify-content:center}.finance-flow-kicker{font-size:9px;line-height:1;text-transform:uppercase;letter-spacing:.1em;color:var(--primary);font-weight:800}.finance-flow-copy>strong{font-size:14px;letter-spacing:-.02em;margin-top:6px}.finance-flow-copy>small{font-size:9px;line-height:1.5;color:var(--muted);margin-top:4px;max-width:520px}.finance-flow-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;min-width:0}.finance-flow-step{position:relative;min-width:0;display:grid;grid-template-columns:24px 32px minmax(0,1fr) 14px;align-items:center;gap:7px;border:1px solid var(--border);background:var(--surface-soft);border-radius:10px;padding:9px;transition:border-color .16s ease,background .16s ease,transform .16s ease}.finance-flow-step:hover{transform:translateY(-1px);border-color:var(--border-strong);background:var(--surface)}.finance-flow-step.active{border-color:color-mix(in srgb,var(--primary) 36%,var(--border));background:var(--primary-soft);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--primary) 7%,transparent)}.finance-flow-number{width:22px;height:22px;border-radius:999px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--border);font-size:9px;font-weight:850;color:var(--muted)}.finance-flow-step.active .finance-flow-number{background:var(--primary);border-color:var(--primary);color:#fff}.finance-flow-icon{width:32px;height:32px;border-radius:9px;background:var(--surface);border:1px solid var(--border);display:grid;place-items:center;color:var(--text)}.finance-flow-icon svg{width:15px;height:15px}.finance-flow-step-copy{min-width:0}.finance-flow-step-copy strong,.finance-flow-step-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.finance-flow-step-copy strong{font-size:10px}.finance-flow-step-copy small{font-size:8px;color:var(--muted);margin-top:2px}.finance-flow-arrow{width:13px;height:13px;color:var(--muted-2)}.flow-highlight{background:var(--yellow-soft)!important;box-shadow:inset 3px 0 0 var(--yellow)}.finance-source{display:flex;align-items:center;gap:7px;min-width:0}.finance-source-icon{width:28px;height:28px;border-radius:8px;background:var(--surface-soft);display:grid;place-items:center;color:var(--primary);flex:0 0 auto}.finance-source-icon svg{width:14px;height:14px}.finance-source-copy{min-width:0}.finance-source-copy strong,.finance-source-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.finance-source-copy strong{font-size:10px}.finance-source-copy small{font-size:8px;color:var(--muted);margin-top:2px}.integration-status{display:inline-flex;align-items:center;gap:5px;font-size:9px;font-weight:750}.integration-status svg{width:13px;height:13px}.integration-status.ok{color:var(--green)}.integration-status.warn{color:var(--orange)}
@media(max-width:1180px){.finance-flow{grid-template-columns:1fr}.finance-flow-copy>small{max-width:none}}
@media(max-width:760px){.finance-flow{padding:10px;gap:9px}.finance-flow-copy{padding:1px}.finance-flow-steps{grid-template-columns:1fr}.finance-flow-step{grid-template-columns:24px 32px minmax(0,1fr) 14px}.finance-flow-arrow{transform:rotate(90deg)}.finance-flow-step:last-child .finance-flow-arrow{visibility:hidden}}

/* v1.5.0 commercial discount */
.document-discount-row{display:grid!important;grid-template-columns:minmax(0,1fr) 112px minmax(110px,auto);gap:10px;align-items:center}.document-discount-input{display:flex;align-items:center;gap:6px;justify-content:flex-end}.document-discount-input .input{width:78px;min-height:34px;padding:6px 8px;text-align:right}.document-discount-input>span{color:var(--muted);font-weight:700}.document-discount-row.is-active strong{color:var(--success)}
@media(max-width:680px){.document-discount-row{grid-template-columns:minmax(0,1fr) 92px minmax(94px,auto)}.document-discount-input .input{width:60px}}
.document-amount-cell{display:grid;gap:3px;min-width:0}.document-amount-cell>strong{font-size:12px}.document-amount-cell>small{display:block;color:var(--muted);font-size:9px;line-height:1.35;white-space:normal}
