:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --danger: #dc2626;
  --success-bg: #ecfdf5;
  --success: #047857;
  --error-bg: #fef2f2;
  --error: #b91c1c;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(17, 24, 39, .08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar { background: #0f172a; color: #e5e7eb; padding: 24px; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; min-height: 100vh; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand span { display: block; color: #94a3b8; font-size: 13px; margin-top: 2px; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #6366f1, #06b6d4); color: white; font-weight: 900; box-shadow: 0 12px 30px rgba(79, 70, 229, .4); }
.brand-mark.large { width: 64px; height: 64px; border-radius: 22px; font-size: 28px; margin: 0 auto; }
.nav { display: grid; gap: 8px; }
.nav a { padding: 12px 14px; border-radius: 12px; color: #cbd5e1; transition: .2s ease; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-footer { margin-top: auto; color: #94a3b8; }
.main { min-width: 0; }
.topbar { height: 88px; background: rgba(255,255,255,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; position: sticky; top: 0; z-index: 10; }
.topbar h1 { margin: 0; font-size: 24px; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.topbar-user { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.topbar-user a { color: var(--primary); font-weight: 700; }
.menu-toggle { display: none; border: 0; background: var(--panel-2); border-radius: 12px; padding: 10px 12px; }
.content { padding: 30px; }
.grid { display: grid; gap: 20px; }
.stats-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 20px; }
.two-col { grid-template-columns: 1.25fr .75fr; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-head h2, .card h2 { margin: 0; font-size: 20px; }
.muted { color: var(--muted); margin: 6px 0 0; }
.stat-card span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.stat-card strong { display: block; font-size: 32px; margin-top: 8px; }
.gradient-card { background: linear-gradient(135deg, #111827, #312e81); color: #fff; }
.gradient-card p { color: #c7d2fe; }
.checklist { display: grid; gap: 10px; margin-top: 20px; }
.checklist span { background: rgba(255,255,255,.1); padding: 10px 12px; border-radius: 12px; }
.table-wrap { overflow-x: visible; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; background: #eef2ff; color: #4338ca; padding: 5px 10px; font-size: 12px; font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 12px; padding: 10px 14px; cursor: pointer; font-weight: 700; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn.small { padding: 7px 10px; font-size: 13px; }
.alert { margin-bottom: 18px; border-radius: 14px; padding: 13px 15px; font-weight: 700; }
.alert.success { background: var(--success-bg); color: var(--success); }
.alert.error { background: var(--error-bg); color: var(--error); }
.toolbar { display: flex; gap: 10px; margin-bottom: 18px; }
input, select, textarea { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px; font: inherit; background: #fff; color: var(--text); }
label { display: grid; gap: 7px; font-weight: 700; color: #374151; }
.form-stack { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.field-error { color: var(--error); }
.actions { display: flex; align-items: center; gap: 8px; }
.actions form { display: inline; }
.auth-page { min-height: 100vh; background: radial-gradient(circle at top left, #dbeafe, transparent 40%), linear-gradient(135deg, #0f172a, #312e81); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(440px, 100%); background: rgba(255,255,255,.95); border: 1px solid rgba(255,255,255,.4); box-shadow: 0 24px 80px rgba(0,0,0,.24); border-radius: 28px; padding: 34px; }
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand h1 { margin: 14px 0 6px; }
.auth-brand p { margin: 0; color: var(--muted); }
.hint { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; overflow-x: visible; padding-bottom: 8px; }
.kanban-col { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-height: 360px; }
.kanban-col h3 { margin: 0 0 14px; }
.deal-card { display: grid; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 10px 28px rgba(17,24,39,.06); }
.deal-card span { font-weight: 800; color: var(--primary); }
.settings-list { display: grid; gap: 12px; margin-top: 20px; }
.settings-list div { display: flex; justify-content: space-between; padding: 14px; border: 1px solid var(--border); border-radius: 14px; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.module-card { border: 1px solid var(--border); background: var(--panel-2); border-radius: 14px; padding: 13px; display: grid; gap: 6px; }
.module-card span { color: var(--muted); font-size: 13px; }
.error-page { min-height: 100vh; display: grid; place-content: center; text-align: center; padding: 30px; }
.error-page pre { max-width: 900px; overflow: auto; text-align: left; background: #111827; color: #f9fafb; padding: 16px; border-radius: 14px; }
@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } .two-col { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 280px; transform: translateX(-105%); transition: .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 16px; height: 76px; }
  .content { padding: 18px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .toolbar, .stack-mobile { flex-direction: column; align-items: stretch; }
}
@media (max-width: 520px) { .stats-grid { grid-template-columns: 1fr; } .topbar-user span { display: none; } .auth-card { padding: 24px; border-radius: 22px; } }
.mt { margin-top: 20px; }
.link-strong { color: var(--primary); font-weight: 800; }
.alert.warning { background: #fffbeb; color: #92400e; }
.section-title { font-weight: 900; color: #111827; border-top: 1px solid var(--border); padding-top: 12px; }
.checkbox-line { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: #374151; }
.checkbox-line input { width: auto; }
.tag-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.tag { display: inline-flex; align-items: center; border-radius: 999px; color: var(--tag-color); background: color-mix(in srgb, var(--tag-color) 12%, white); border: 1px solid color-mix(in srgb, var(--tag-color) 30%, white); padding: 6px 10px; font-size: 12px; font-weight: 900; }
.detail-list { display: grid; gap: 10px; margin-top: 16px; }
.detail-list div { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.detail-list span { color: var(--muted); font-size: 13px; }
.detail-list strong { font-weight: 800; white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline { display: grid; gap: 16px; }
.timeline-item { display: grid; grid-template-columns: 18px 1fr; gap: 12px; }
.timeline-dot { width: 12px; height: 12px; border-radius: 999px; background: var(--primary); margin-top: 5px; box-shadow: 0 0 0 6px #eef2ff; }
.timeline-item strong { display: block; }
.timeline-item p { margin: 4px 0; color: #374151; }
.timeline-item small { color: var(--muted); }
code { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 3px 6px; }
@media (max-width: 720px) { .detail-list div { grid-template-columns: 1fr; gap: 4px; } }
.success-pill { background: #ecfdf5; color: #047857; }
.warning-pill { background: #fffbeb; color: #92400e; }
.danger-pill { background: #fef2f2; color: #b91c1c; }
.inner-card { box-shadow: none; background: var(--panel-2); }
.import-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.import-summary div { border: 1px solid var(--border); border-radius: 14px; padding: 14px; background: var(--panel-2); }
.import-summary span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.import-summary strong { font-size: 18px; overflow-wrap: anywhere; }
.duplicate-list { display: grid; gap: 6px; margin-top: 10px; font-weight: 600; }
.compact-list { display: grid; gap: 8px; margin: 12px 0 18px; }
.compact-list div { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--panel-2); }
button:disabled, .btn:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 860px) { .import-summary { grid-template-columns: 1fr; } }
.kanban-col-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.kanban-col-head h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.kanban-col-head small { color: var(--muted); }
.stage-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--stage-color); display: inline-block; box-shadow: 0 0 0 4px color-mix(in srgb, var(--stage-color) 16%, transparent); }
.kanban-dropzone { min-height: 260px; display: grid; align-content: start; gap: 12px; border-radius: 14px; transition: .2s ease; }
.kanban-dropzone.drag-over { background: rgba(79, 70, 229, .08); outline: 2px dashed rgba(79, 70, 229, .35); outline-offset: 6px; }
.deal-card.dragging { opacity: .55; transform: rotate(1deg); }
.deal-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kanban-empty { color: var(--muted); border: 1px dashed var(--border); border-radius: 14px; padding: 14px; text-align: center; background: rgba(255,255,255,.5); }
@media (max-width: 860px) { .kanban { grid-template-columns: repeat(4, minmax(280px, 86vw)); } }
.nav-badge { float: right; min-width: 22px; height: 22px; display: inline-grid; place-items: center; background: #ef4444; color: #fff; border-radius: 999px; font-size: 12px; padding: 0 7px; }
.notification-link { display: inline-flex; align-items: center; gap: 5px; color: var(--primary); font-weight: 900; }
.notification-link strong { min-width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 999px; color: #fff; background: #ef4444; font-size: 12px; }
.text-danger { color: var(--danger); font-weight: 900; }
.calendar-title { font-weight: 900; font-size: 22px; margin: 0 0 14px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.calendar-weekdays { margin-bottom: 10px; }
.calendar-weekdays div { color: var(--muted); font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 0 8px; }
.calendar-day { min-height: 132px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 14px; padding: 10px; display: grid; grid-template-rows: auto 1fr; gap: 8px; }
.calendar-day.today { outline: 2px solid rgba(79, 70, 229, .35); background: #eef2ff; }
.calendar-day.muted-day { opacity: .52; }
.calendar-day-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calendar-day-head a { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-weight: 900; color: var(--primary); }
.calendar-events { display: grid; gap: 6px; align-content: start; }
.calendar-event { display: grid; grid-template-columns: 42px 1fr; gap: 6px; align-items: start; border-radius: 10px; background: #fff; border: 1px solid var(--border); padding: 7px; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
.calendar-event span { color: var(--primary); }
.notification-list { display: grid; gap: 12px; }
.notification-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border: 1px solid var(--border); border-radius: 16px; padding: 16px; background: var(--panel-2); }
.notification-item.unread { background: #eef2ff; border-color: #c7d2fe; }
.notification-item p { margin: 6px 0; color: #374151; }
.notification-item small { color: var(--muted); }
@media (max-width: 900px) {
  .calendar-grid { grid-template-columns: 1fr; }
  .calendar-weekdays { display: none; }
  .calendar-day { min-height: auto; }
  .calendar-day.muted-day { display: none; }
  .notification-item { flex-direction: column; }
}
.totals-box { margin-top: 18px; margin-left: auto; width: min(420px, 100%); display: grid; gap: 8px; }
.totals-box div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); }
.totals-box .grand-total, .document-totals .grand-total { background: #eef2ff; border-color: #c7d2fe; font-size: 18px; }
.print-page { background: #e5e7eb; padding: 24px; }
.document-sheet { width: min(980px, 100%); margin: 0 auto; background: #fff; border-radius: 18px; padding: 42px; box-shadow: 0 20px 70px rgba(15,23,42,.18); color: #111827; }
.document-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; border-bottom: 2px solid #111827; padding-bottom: 22px; margin-bottom: 26px; }
.document-header h1 { margin: 0; font-size: 42px; letter-spacing: -.04em; }
.document-header p { margin: 6px 0 0; color: var(--muted); font-weight: 900; }
.document-company { text-align: right; display: grid; gap: 4px; }
.document-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0; }
.document-meta > div { border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: grid; gap: 5px; }
.document-meta span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; }
.document-table { margin-top: 22px; }
.document-totals { width: min(420px, 100%); margin: 22px 0 22px auto; display: grid; gap: 8px; }
.document-totals div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.document-note { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 18px; }
.document-note p { white-space: pre-wrap; }
.document-footer { margin-top: 36px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); padding-top: 14px; }
.public-document-page { min-height: 100vh; background: radial-gradient(circle at top left, #dbeafe, transparent 38%), linear-gradient(135deg, #f8fafc, #eef2ff); padding: 28px; }
.public-document-wrap { width: min(1040px, 100%); margin: 0 auto; }
.public-document-card { box-shadow: 0 24px 80px rgba(79,70,229,.12); }
@media print {
  .print-page { background: #fff; padding: 0; }
  .document-sheet { width: 100%; box-shadow: none; border-radius: 0; padding: 0; }
  .document-footer { position: fixed; bottom: 0; left: 0; right: 0; }
  .btn, script { display: none !important; }
}
@media (max-width: 720px) {
  .document-sheet { padding: 22px; }
  .document-header, .document-meta { grid-template-columns: 1fr; flex-direction: column; }
  .document-company { text-align: left; }
}
.portal-shell .sidebar { background: #111827; }
.portal-auth-page { background: radial-gradient(circle at top left, #e0f2fe, transparent 38%), linear-gradient(135deg, #0f172a, #1e1b4b); }
.portal-decision-box { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 18px; }
.portal-thread { display: grid; gap: 14px; }
.portal-message { border: 1px solid var(--border); border-radius: 16px; padding: 15px; background: var(--panel-2); }
.portal-message.from-client { background: #eef2ff; border-color: #c7d2fe; }
.portal-message.from-team { background: #ecfdf5; border-color: #a7f3d0; }
.portal-message p { white-space: pre-wrap; margin: 8px 0; line-height: 1.55; }
.portal-message small { color: var(--muted); }
@media print {
  .portal-shell .sidebar, .portal-shell .topbar, .toolbar, .portal-decision-box { display: none !important; }
  .portal-shell { display: block; }
  .content { padding: 0; }
  .public-document-card { box-shadow: none !important; border: 0 !important; }
}
.ticket-sla-box { display: grid; gap: 8px; margin-top: 12px; }
.ticket-sla-box div { display: flex; justify-content: space-between; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--panel-2); }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.attachment-list a { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--primary); font-weight: 800; padding: 7px 10px; font-size: 12px; }
.attachment-list.all-files { align-items: flex-start; }
.internal-note { border-style: dashed; }
.actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.actions form { margin: 0; }

/* UX patch: responsive layout without horizontal overflow */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, canvas { max-width: 100%; height: auto; }
.card, .main, .content, .table-wrap { min-width: 0; }
.brand strong, .brand span, .topbar h1, .muted, .card h2, .card p { overflow-wrap: anywhere; }
.table-wrap { overflow-x: visible; width: 100%; }
table { width: 100%; table-layout: auto; }
th, td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.toolbar, .form-actions, .card-head, .topbar-user, .actions { flex-wrap: wrap; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.quick-actions .btn { flex: 1 1 180px; }

@media (max-width: 860px) {
  .topbar { height: auto; min-height: 72px; gap: 12px; padding-top: 12px; padding-bottom: 12px; align-items: flex-start; }
  .topbar h1 { font-size: clamp(19px, 6vw, 24px); line-height: 1.2; }
  .topbar-user { margin-left: auto; justify-content: flex-end; }
  .content { padding: 16px; }
  .card { padding: 18px; border-radius: 16px; }
  .module-grid { grid-template-columns: 1fr; }
  .settings-list div, .ticket-sla-box div, .totals-box div { flex-direction: column; align-items: flex-start; }
  .kanban { grid-template-columns: 1fr; overflow-x: visible; }
  .kanban-col { min-height: auto; }
}

@media (max-width: 720px) {
  .table-wrap table.responsive-ready { border-collapse: separate; border-spacing: 0 12px; }
  .table-wrap table.responsive-ready thead { display: none; }
  .table-wrap table.responsive-ready tbody { display: grid; gap: 12px; }
  .table-wrap table.responsive-ready tr { display: grid; gap: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); padding: 10px 12px; box-shadow: 0 10px 26px rgba(17, 24, 39, .06); }
  .table-wrap table.responsive-ready td { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr); gap: 10px; align-items: start; border-bottom: 1px solid var(--border); padding: 10px 0; text-align: right; }
  .table-wrap table.responsive-ready td:last-child { border-bottom: 0; }
  .table-wrap table.responsive-ready td::before { content: attr(data-label); text-align: left; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
  .table-wrap table.responsive-ready td[colspan] { display: block; text-align: left; }
  .table-wrap table.responsive-ready td[colspan]::before { content: none; }
  .actions, .form-actions, .toolbar, .quick-actions { align-items: stretch; }
  .actions .btn, .actions button, .form-actions .btn, .form-actions button, .toolbar .btn, .quick-actions .btn { width: 100%; }
  .document-table table.responsive-ready tr { box-shadow: none; }
}

@media (max-width: 520px) {
  .topbar { display: grid; grid-template-columns: auto 1fr; }
  .topbar-user { grid-column: 1 / -1; width: 100%; justify-content: space-between; }
  .btn { width: 100%; }
  .card-head { align-items: stretch; }
  .calendar-event { grid-template-columns: 1fr; }
}

/* Patch complet responsive: fără scroll lateral pe liste, tabele, formulare și fluxul de vânzări */
html {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
.app-shell,
.main,
.content,
.card,
.grid,
.table-wrap,
.form-stack,
.form-grid,
.toolbar,
.card-head,
.actions,
.topbar,
.topbar-user,
.detail-list,
.timeline,
.portal-thread,
.document-sheet,
.public-document-wrap {
  min-width: 0;
  max-width: 100%;
}
.content {
  width: 100%;
}
.card {
  overflow: hidden;
}
.table-wrap {
  overflow: visible !important;
  max-width: 100%;
}
table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}
th,
td {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
td .btn,
td button,
.actions .btn,
.actions button,
.toolbar .btn,
.toolbar button,
.form-actions .btn,
.form-actions button {
  white-space: normal;
  max-width: 100%;
}
input,
select,
textarea,
button,
.btn {
  max-width: 100%;
}
select {
  text-overflow: ellipsis;
}
.card-head,
.toolbar,
.actions,
.form-actions,
.topbar-user,
.kanban-col-head,
.notification-item,
.ticket-sla-box div,
.totals-box div,
.settings-list div,
.document-header {
  flex-wrap: wrap;
}
.card-head > *,
.toolbar > *,
.actions > *,
.form-actions > *,
.topbar-user > *,
.kanban-col-head > * {
  min-width: 0;
}
.toolbar input,
.toolbar select {
  flex: 1 1 220px;
}
.btn.small {
  min-height: 34px;
}
.brand,
.brand > div:last-child,
.brand strong,
.brand span,
.topbar h1,
.card h1,
.card h2,
.card h3,
.card p,
.muted,
.detail-list strong,
.timeline-item,
.portal-message,
.document-company,
.document-meta,
.public-document-card,
.kanban-col-head h3,
.deal-card,
.stat-card strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)) !important;
}
.two-col {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)) !important;
}
.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)) !important;
}
.form-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.form-grid .full {
  grid-column: 1 / -1;
}
.kanban {
  overflow-x: visible !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)) !important;
  align-items: start;
}
.kanban-col {
  min-width: 0;
  max-width: 100%;
}
.kanban-dropzone {
  min-height: 120px;
}
.deal-card-head {
  flex-wrap: wrap;
}
.document-sheet {
  width: min(980px, 100%);
}
.document-header,
.document-meta {
  min-width: 0;
}
.document-table {
  table-layout: fixed;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr !important;
  }
  .sidebar {
    position: fixed !important;
    z-index: 30;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    max-width: 86vw;
    transform: translateX(-105%);
    transition: .2s ease;
    overflow-y: auto;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .menu-toggle {
    display: inline-flex !important;
  }
  .topbar {
    height: auto !important;
    min-height: 72px;
    gap: 12px;
    padding: 12px 16px !important;
    align-items: flex-start;
  }
  .topbar h1 {
    font-size: clamp(19px, 4vw, 24px);
    line-height: 1.2;
  }
  .content {
    padding: 18px;
  }
  .table-wrap table.responsive-ready {
    border-collapse: separate;
    border-spacing: 0 12px;
    table-layout: fixed;
  }
  .table-wrap table.responsive-ready thead {
    display: none;
  }
  .table-wrap table.responsive-ready tbody {
    display: grid;
    gap: 12px;
  }
  .table-wrap table.responsive-ready tr {
    display: grid;
    gap: 0;
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
    padding: 10px 12px;
    box-shadow: 0 10px 26px rgba(17, 24, 39, .06);
  }
  .table-wrap table.responsive-ready td {
    display: grid;
    grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr);
    gap: 10px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    text-align: right;
  }
  .table-wrap table.responsive-ready td:last-child {
    border-bottom: 0;
  }
  .table-wrap table.responsive-ready td::before {
    content: attr(data-label);
    text-align: left;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
  }
  .table-wrap table.responsive-ready td[colspan] {
    display: block;
    text-align: left;
  }
  .table-wrap table.responsive-ready td[colspan]::before {
    content: none;
  }
  .table-wrap table.responsive-ready .actions {
    justify-content: flex-end;
  }
}

@media (max-width: 720px) {
  .content {
    padding: 14px;
  }
  .card {
    padding: 16px;
    border-radius: 16px;
  }
  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .topbar-user {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
  }
  .toolbar,
  .form-actions,
  .actions,
  .quick-actions,
  .stack-mobile {
    flex-direction: column;
    align-items: stretch !important;
  }
  .toolbar > *,
  .form-actions > *,
  .actions > *,
  .quick-actions > *,
  .stack-mobile > * {
    width: 100%;
  }
  .btn,
  button {
    width: 100%;
  }
  .table-wrap table.responsive-ready td {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .table-wrap table.responsive-ready td::before {
    margin-bottom: -4px;
  }
  .detail-list div,
  .ticket-sla-box div,
  .totals-box div,
  .settings-list div,
  .document-totals div {
    grid-template-columns: 1fr !important;
    flex-direction: column;
    align-items: flex-start;
  }
  .kanban {
    grid-template-columns: 1fr !important;
  }
  .kanban-col {
    padding: 14px;
  }
  .calendar-event {
    grid-template-columns: 1fr;
  }
  .document-sheet,
  .public-document-page {
    padding: 16px;
  }
}

@media (max-width: 420px) {
  .content {
    padding: 10px;
  }
  .card {
    padding: 14px;
  }
  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
  .stat-card strong {
    font-size: 26px;
  }
}

/* v0.9.1 - stabilizare responsive completa si eliminare overflow lateral */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

body {
  min-width: 0 !important;
}

*,
*::before,
*::after {
  min-width: 0;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

.app-shell {
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.main,
.content,
.card,
.grid,
.table-wrap,
.form-stack,
.form-grid,
.toolbar,
.card-head,
.actions,
.form-actions,
.topbar,
.topbar-user,
.detail-list,
.timeline,
.portal-thread,
.public-document-wrap,
.document-sheet,
.module-grid,
.settings-list,
.calendar-grid,
.kanban,
.kanban-col,
.kanban-dropzone,
.deal-card {
  min-width: 0 !important;
  max-width: 100% !important;
}

.main,
.content {
  width: 100%;
  overflow-x: hidden;
}

.card {
  overflow: hidden;
}

.card-head,
.toolbar,
.actions,
.form-actions,
.topbar-user,
.kanban-col-head,
.deal-card-head,
.notification-item,
.ticket-sla-box div,
.totals-box div,
.settings-list div,
.document-header,
.document-totals div {
  flex-wrap: wrap !important;
}

.card-head > *,
.toolbar > *,
.actions > *,
.form-actions > *,
.topbar-user > *,
.kanban-col-head > *,
.deal-card-head > * {
  min-width: 0 !important;
}

.brand,
.brand > div,
.brand strong,
.brand span,
.nav a,
.topbar h1,
.topbar p,
.card h1,
.card h2,
.card h3,
.card p,
.muted,
.pill,
.tag,
.detail-list strong,
.timeline-item,
.portal-message,
.document-company,
.document-meta,
.public-document-card,
.kanban-col-head h3,
.deal-card,
.deal-card strong,
.deal-card small,
.stat-card strong,
.stat-card span,
.module-card,
.ticket-sla-box,
.attachment-list a {
  overflow-wrap: anywhere !important;
  word-break: break-word;
}

input,
select,
textarea,
button,
.btn {
  max-width: 100%;
  min-width: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap !important;
  align-items: stretch;
}

.toolbar input,
.toolbar select,
.toolbar textarea {
  flex: 1 1 220px;
}

.toolbar .btn,
.toolbar button {
  flex: 0 0 auto;
}

.actions form,
.form-actions form {
  max-width: 100%;
}

.btn,
button {
  white-space: normal !important;
  text-align: center;
}

.table-wrap,
.auto-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: visible !important;
}

table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed !important;
  border-collapse: collapse;
}

th,
td {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word;
  vertical-align: top;
}

td .actions,
td.actions {
  min-width: 0 !important;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)) !important;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)) !important;
}

.module-grid,
.form-grid,
.import-summary {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)) !important;
}

.form-grid .full {
  grid-column: 1 / -1;
}

/* Flux de vanzari: coloane fluide, fara scroll lateral pe laptop/tableta/telefon */
.kanban {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)) !important;
  gap: 16px !important;
  overflow-x: visible !important;
  width: 100%;
  max-width: 100%;
  padding-bottom: 0 !important;
}

.kanban-col {
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
  min-height: 240px;
  padding: 16px;
}

.kanban-dropzone {
  min-height: 120px;
}

.deal-card {
  width: 100%;
  max-width: 100%;
}

.deal-card[draggable="true"] {
  cursor: grab;
}

.deal-card[draggable="true"]:active {
  cursor: grabbing;
}

.calendar-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)) !important;
}

.document-sheet {
  width: min(980px, 100%) !important;
}

.document-header,
.document-meta {
  min-width: 0 !important;
}

@media (max-width: 1180px) {
  .app-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .sidebar {
    position: fixed !important;
    z-index: 30;
    inset: 0 auto 0 0;
    width: min(310px, 86vw) !important;
    max-width: 86vw !important;
    min-height: 100vh;
    transform: translateX(-105%);
    transition: .2s ease;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-flex !important;
  }

  .topbar {
    height: auto !important;
    min-height: 72px;
    gap: 12px;
    padding: 12px 16px !important;
    align-items: flex-start;
  }

  .topbar h1 {
    font-size: clamp(19px, 4vw, 24px);
    line-height: 1.2;
  }

  .content {
    padding: 18px;
  }

  table.responsive-ready {
    display: block;
    width: 100%;
    max-width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 12px !important;
  }

  table.responsive-ready thead {
    display: none !important;
  }

  table.responsive-ready tbody,
  table.responsive-ready tr,
  table.responsive-ready td {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  table.responsive-ready tbody {
    display: grid !important;
    gap: 12px;
  }

  table.responsive-ready tr {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
    padding: 10px 12px;
    box-shadow: 0 10px 26px rgba(17, 24, 39, .06);
  }

  table.responsive-ready td {
    display: grid !important;
    grid-template-columns: minmax(110px, .72fr) minmax(0, 1.28fr);
    gap: 10px;
    align-items: start;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    text-align: right;
  }

  table.responsive-ready td:last-child {
    border-bottom: 0;
  }

  table.responsive-ready td::before {
    content: attr(data-label);
    text-align: left;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
  }

  table.responsive-ready td[data-label=""],
  table.responsive-ready td[data-label="Acțiuni"],
  table.responsive-ready td[data-label="Actiuni"] {
    grid-template-columns: 1fr;
    text-align: left;
  }

  table.responsive-ready td[data-label=""]::before,
  table.responsive-ready td[colspan]::before {
    content: none;
  }

  table.responsive-ready td[colspan] {
    display: block !important;
    text-align: left;
  }

  table.responsive-ready .actions {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .content {
    padding: 16px;
  }

  .card {
    padding: 18px;
    border-radius: 16px;
  }

  .topbar-user {
    margin-left: 0;
    justify-content: flex-start;
  }

  .kanban {
    grid-template-columns: 1fr !important;
  }

  .calendar-grid {
    grid-template-columns: 1fr !important;
  }

  .calendar-weekdays,
  .calendar-day.muted-day {
    display: none !important;
  }

  .calendar-day {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .content {
    padding: 14px;
  }

  .topbar {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .topbar-user {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
  }

  .toolbar,
  .form-actions,
  .actions,
  .quick-actions,
  .stack-mobile,
  .card-head {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .toolbar > *,
  .form-actions > *,
  .actions > *,
  .quick-actions > *,
  .stack-mobile > *,
  .card-head > * {
    width: 100% !important;
  }

  .btn,
  button {
    width: 100%;
  }

  table.responsive-ready td {
    grid-template-columns: 1fr !important;
    text-align: left !important;
  }

  table.responsive-ready td::before {
    margin-bottom: -4px;
  }

  .detail-list div,
  .ticket-sla-box div,
  .totals-box div,
  .settings-list div,
  .document-totals div,
  .document-meta,
  .document-header {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
  }

  .document-company {
    text-align: left !important;
  }

  .document-sheet,
  .public-document-page {
    padding: 16px !important;
  }
}

@media (max-width: 420px) {
  .content {
    padding: 10px;
  }

  .card,
  .kanban-col {
    padding: 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .stat-card strong {
    font-size: 26px;
  }
}

@media print {
  html,
  body {
    overflow: visible !important;
  }

  .app-shell,
  .main,
  .content,
  .card,
  .document-sheet {
    overflow: visible !important;
  }

  table.responsive-ready,
  table.responsive-ready thead,
  table.responsive-ready tbody,
  table.responsive-ready tr,
  table.responsive-ready td {
    display: revert !important;
  }

  table.responsive-ready td::before {
    content: none !important;
  }
}

/* v1.0 settings and branding */
.sidebar { background: var(--sidebar-bg, #0f172a) !important; }
.brand-logo { width: 42px; height: 42px; border-radius: 14px; object-fit: contain; background: rgba(255,255,255,.98); border: 1px solid rgba(255,255,255,.45); padding: 4px; box-shadow: 0 12px 30px rgba(15,23,42,.18); flex: 0 0 auto; }
.brand-logo.large { width: 74px; height: 74px; border-radius: 24px; margin: 0 auto; padding: 6px; }
.field-help { display: block; color: var(--muted); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.settings-dashboard { display: grid; gap: 20px; }
.settings-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, white), var(--panel)); }
.settings-preview { display: grid; gap: 8px; align-items: center; justify-items: center; min-width: 180px; text-align: center; border: 1px solid var(--border); background: rgba(255,255,255,.72); border-radius: 18px; padding: 18px; }
.settings-preview span { color: var(--muted); font-size: 13px; }
input[type="color"] { min-height: 46px; padding: 6px; cursor: pointer; }
.theme-dark { --bg: #0b1120; --panel: #111827; --panel-2: #0f172a; --text: #e5e7eb; --muted: #94a3b8; --border: #1f2937; --success-bg: #062c22; --success: #6ee7b7; --error-bg: #3b0a0a; --error: #fecaca; }
.theme-dark .topbar { background: rgba(17,24,39,.88); }
.theme-dark input, .theme-dark select, .theme-dark textarea { background: #0b1120; color: var(--text); border-color: var(--border); }
.theme-dark .deal-card, .theme-dark .settings-preview, .theme-dark .portal-message, .theme-dark .attachment-list a { background: #111827; }
.theme-dark .section-title, .theme-dark label, .theme-dark .timeline-item p { color: var(--text); }
.theme-dark .gradient-card { background: linear-gradient(135deg, #0f172a, #1e1b4b); }
.theme-dark .tag { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); }
.theme-dark .document-sheet, .theme-dark .public-document-card { background: #fff; color: #111827; }
@media (prefers-color-scheme: dark) {
  .theme-system { --bg: #0b1120; --panel: #111827; --panel-2: #0f172a; --text: #e5e7eb; --muted: #94a3b8; --border: #1f2937; --success-bg: #062c22; --success: #6ee7b7; --error-bg: #3b0a0a; --error: #fecaca; }
  .theme-system .topbar { background: rgba(17,24,39,.88); }
  .theme-system input, .theme-system select, .theme-system textarea { background: #0b1120; color: var(--text); border-color: var(--border); }
  .theme-system .deal-card, .theme-system .settings-preview, .theme-system .portal-message, .theme-system .attachment-list a { background: #111827; }
  .theme-system .section-title, .theme-system label, .theme-system .timeline-item p { color: var(--text); }
  .theme-system .document-sheet, .theme-system .public-document-card { background: #fff; color: #111827; }
}
@media (max-width: 720px) {
  .settings-hero { flex-direction: column; align-items: stretch; }
  .settings-preview { min-width: 0; }
}

/* v1.1 Roluri si permisiuni */
.permission-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}
.permission-group {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel-2);
  padding: 16px;
  min-width: 0;
}
.permission-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.permission-group-head h3 {
  margin: 0;
  font-size: 17px;
}
.permission-list {
  display: grid;
  gap: 10px;
}
.permission-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
}
.permission-item input {
  width: auto;
  margin-top: 3px;
}
.permission-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.permission-item small {
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  overflow-wrap: anywhere;
}
@media (max-width: 720px) {
  .permission-group-head,
  .permission-group-head .btn {
    width: 100%;
  }
}

/* v1.2 Automatizări și secvențe */
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.stat span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.stat strong { display: block; font-size: 28px; margin-top: 8px; }
.soft-card { background: var(--panel-2); box-shadow: none; margin: 14px 0; }
@media (max-width: 900px) { .grid.three { grid-template-columns: 1fr; } }

/* v1.3 - formulare publice pentru leaduri */
.public-form-page { min-height: 100vh; background: radial-gradient(circle at top left, #dbeafe, transparent 38%), linear-gradient(135deg, #f8fafc, #eef2ff); padding: 24px; }
.public-form-page.embedded { background: transparent; padding: 0; }
.public-form-wrap { width: min(760px, 100%); margin: 0 auto; }
.public-form-card { box-shadow: 0 24px 80px rgba(79,70,229,.12); }
.public-form-card h1 { margin: 0; font-size: clamp(26px, 6vw, 38px); letter-spacing: -.03em; }
.public-form-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.public-form-brand span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.public-lead-form { margin-top: 12px; }
.public-lead-form label { color: var(--text); }
.public-submit { width: 100%; padding: 13px 18px; }
.public-hp { position: absolute !important; left: -9999px !important; opacity: 0 !important; height: 0 !important; overflow: hidden !important; }
.public-checkbox { margin-top: 8px; }
.public-message-card { text-align: center; }
.public-message-card .public-form-brand { justify-content: center; }
@media (max-width: 640px) {
  .public-form-page { padding: 12px; }
  .public-form-card { padding: 18px; border-radius: 16px; }
  .public-form-brand { align-items: flex-start; }
}

/* v1.5 - rapoarte avansate */
.report-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) minmax(160px, 220px) auto auto;
  align-items: end;
  gap: 14px;
}
.report-filter h2 {
  margin: 0;
}
.report-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}
.report-kpi {
  display: grid;
  gap: 8px;
  box-shadow: var(--shadow);
}
.report-kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.report-kpi strong {
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.report-kpi p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}
.report-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
}
.report-bars {
  display: grid;
  gap: 10px;
}
.report-bar {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: 14px;
  padding: 11px 12px;
  overflow: hidden;
}
.report-bar div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}
.report-bar strong,
.report-bar span {
  overflow-wrap: anywhere;
}
.report-bar span {
  color: var(--muted);
  font-weight: 900;
  text-align: right;
}
.report-bar i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  min-width: 8px;
}
.report-section .compact-list div {
  min-width: 0;
}
.report-section small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
@media (max-width: 1180px) {
  .report-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-filter > div:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  .report-filter {
    grid-template-columns: 1fr;
  }
  .report-bar div {
    flex-direction: column;
    gap: 4px;
  }
  .report-bar span {
    text-align: left;
  }
}

/* v1.6 SaaS billing */
.billing-summary-grid,
.usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
}
.usage-card {
  border: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 12px;
}
.usage-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.usage-card strong { overflow-wrap: anywhere; }
.usage-card span { color: var(--muted); font-weight: 800; }
.usage-bar {
  height: 9px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}
.usage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent, #06b6d4));
}
.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.success-pill { background: #dcfce7; color: #166534; }
.warning-pill { background: #fef3c7; color: #92400e; }
@media (max-width: 720px) {
  .usage-card > div:first-child { flex-direction: column; }
}
