/* CARTZIVO — Admin & Developer panel styles */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f9fafb; --border: #e5e7eb; --border-strong: #d1d5db;
  --text: #111827; --text-2: #374151; --muted: #6b7280; --faint: #9ca3af;
  --primary: #0f766e; --primary-hover: #0d5f59; --primary-soft: #e6f3f1; --primary-text: #ffffff;
  --danger: #dc2626; --danger-soft: #fdecec; --warning: #b45309; --warning-soft: #fdf3e2; --success: #15803d; --success-soft: #e8f5ec;
  --info: #1d4ed8; --info-soft: #e8eefc; --indigo: #4338ca; --indigo-soft: #ecebfd;
  --sidebar: #0f172a; --sidebar-text: #cbd5e1; --sidebar-muted: #64748b; --sidebar-active: #1e293b;
  --chart-1: #0f766e; --chart-2: #f59e0b;
  --radius: 10px; --radius-sm: 7px; --shadow: 0 1px 2px rgba(16,24,40,.05); --shadow-lg: 0 12px 32px rgba(16,24,40,.14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", "Hind Siliguri", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; } h2 { font-size: 17px; font-weight: 650; } h3 { font-size: 15px; font-weight: 650; }
p { margin: 0 0 10px; }
.ic { flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.text-right { text-align: right; } .text-center { text-align: center; } .nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 6px } .mt-2 { margin-top: 12px } .mt-3 { margin-top: 20px } .mb-2 { margin-bottom: 12px } .mb-3 { margin-bottom: 20px }
.flex { display: flex; gap: 8px; align-items: center; } .flex-wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.hide-mobile { } .only-mobile { display: none; }

/* layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 248px; background: var(--sidebar); color: var(--sidebar-text); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40; transition: transform .2s; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid #1e293b; min-height: 60px; }
.sidebar .brand img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; background: #fff; }
.sidebar .brand .logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; }
.sidebar .brand strong { color: #fff; font-size: 14.5px; display: block; line-height: 1.2; }
.sidebar .brand span { color: var(--sidebar-muted); font-size: 11.5px; }
.sidebar nav { overflow-y: auto; padding: 10px 10px 30px; flex: 1; scrollbar-width: thin; }
.sidebar .nav-group { margin-top: 14px; }
.sidebar .nav-group-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--sidebar-muted); padding: 0 10px 6px; font-weight: 700; }
.sidebar a.nav-link { display: flex; align-items: center; gap: 10px; color: var(--sidebar-text); padding: 8px 10px; border-radius: 8px; font-size: 13.5px; text-decoration: none; }
.sidebar a.nav-link:hover { background: var(--sidebar-active); color: #fff; }
.sidebar a.nav-link.active { background: var(--primary); color: #fff; }
.main { flex: 1; margin-left: 248px; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 22px; position: sticky; top: 0; z-index: 30; }
.topbar .search { flex: 1; max-width: 420px; position: relative; }
.topbar .search input { width: 100%; padding-left: 36px; background: var(--surface-2); }
.topbar .search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.topbar .actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; color: var(--text-2); background: transparent; border: 0; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.menu-toggle { display: none; }
.content { padding: 22px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: 13px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.breadcrumbs a { color: var(--muted); }
.banner { padding: 10px 22px; font-size: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.banner.warn { background: var(--warning-soft); color: #7c3f06; border-bottom: 1px solid #f3d9ae; }
.banner.danger { background: var(--danger-soft); color: #8e1616; border-bottom: 1px solid #f5c2c2; }
.banner.info { background: var(--indigo-soft); color: #312e81; border-bottom: 1px solid #d6d3fb; }
.overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 35; }

/* cards & grids */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 15px; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); } .grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stat { padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 22px; font-weight: 750; margin-top: 4px; letter-spacing: -.01em; }
.stat .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.link:hover { border-color: var(--primary); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 9px; font: 600 13.5px var(--font); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; }
.link-btn.danger { color: var(--danger); }

/* forms */
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--text-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url], input[type=search], input[type=date], input[type=datetime-local], input[type=time], input[type=color], select, textarea {
  width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: 14px var(--font); transition: border-color .15s, box-shadow .15s; }
input[type=color] { padding: 3px; width: 56px; }
textarea { height: auto; min-height: 90px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
textarea.rich { min-height: 200px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,118,110,.15); }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--danger); }
input[readonly] { background: var(--surface-2); }
.field { margin-bottom: 16px; }
.field .help { color: var(--muted); font-size: 12px; margin-top: 5px; }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 6px; flex-wrap: wrap; }
.form-section { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 10px 0 12px; grid-column: 1 / -1; padding-top: 10px; border-top: 1px dashed var(--border); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; margin: 0; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.input-group { display: flex; } .input-group > * { border-radius: 0; } .input-group > :first-child { border-radius: 8px 0 0 8px; } .input-group > :last-child { border-radius: 0 8px 8px 0; }
.input-addon { display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--muted); font-size: 13px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; margin: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .15s; flex-shrink: 0; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(15,118,110,.25); }
.image-field { display: flex; gap: 12px; align-items: center; }
.image-field .preview { width: 64px; height: 64px; border-radius: 8px; border: 1px solid var(--border); object-fit: cover; background: var(--surface-2); }
.upload-drop { border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 18px; text-align: center; color: var(--muted); background: var(--surface-2); cursor: pointer; }
.upload-drop:hover { border-color: var(--primary); color: var(--primary); }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.image-grid .img { position: relative; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.image-grid .img img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.image-grid .img .tools { display: flex; justify-content: space-between; padding: 5px 7px; font-size: 11.5px; }
.image-grid .img.main { outline: 2px solid var(--primary); }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th a { color: inherit; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfc; }
.table .thumb { width: 40px; height: 40px; border-radius: 7px; object-fit: cover; border: 1px solid var(--border); background: var(--surface-2); }
.table .row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }
.table.compact td, .table.compact th { padding: 7px 10px; }
.cell-title { font-weight: 600; color: var(--text); }
.cell-sub { color: var(--muted); font-size: 12px; }

/* filters bar */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.filters input[type=search], .filters input[type=text] { max-width: 260px; }
.filters select, .filters input[type=date] { width: auto; min-width: 140px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 650; white-space: nowrap; line-height: 1.6; }
.badge-green { background: var(--success-soft); color: var(--success); } .badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-amber { background: var(--warning-soft); color: var(--warning); } .badge-blue { background: var(--info-soft); color: var(--info); }
.badge-indigo { background: var(--indigo-soft); color: var(--indigo); } .badge-gray { background: #f1f2f4; color: #4b5563; }

/* alerts & toasts */
.alert { padding: 11px 14px; border-radius: 9px; font-size: 13.5px; margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid transparent; }
.alert-success { background: var(--success-soft); color: #14532d; border-color: #c7e7d1; } .alert-danger { background: var(--danger-soft); color: #7f1d1d; border-color: #f5c2c2; }
.alert-warning { background: var(--warning-soft); color: #7c2d12; border-color: #f3d9ae; } .alert-info { background: var(--info-soft); color: #1e3a8a; border-color: #cfdbfb; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.toasts { position: fixed; top: 72px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { background: #111827; color: #fff; border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow-lg); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; animation: toastIn .2s ease-out; }
.toast.success { border-left: 4px solid #22c55e; } .toast.error { border-left: 4px solid #ef4444; } .toast.info { border-left: 4px solid #3b82f6; }
.toast button { margin-left: auto; background: none; border: 0; color: #9ca3af; cursor: pointer; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 90; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--surface); border-radius: 14px; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow-lg); }
.modal.lg { width: min(820px, 100%); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* dropdown */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; display: none; z-index: 50; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; color: var(--text); font: 13.5px var(--font); background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); text-decoration: none; }
.dropdown-menu .sep { height: 1px; background: var(--border); margin: 5px 0; }
.notif-item { display: block; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.notif-item:hover { background: var(--surface-2); text-decoration: none; }
.notif-item.unread { background: var(--primary-soft); }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; margin-bottom: 16px; scrollbar-width: none; }
.tabs a, .tabs button { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: 13.5px; border: 0; background: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs .active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; } .tab-panel.active { display: block; }

/* misc */
.empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty .ic { color: var(--faint); margin-bottom: 8px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; flex-wrap: wrap; border-top: 1px solid var(--border); }
.pager-info { color: var(--muted); font-size: 12.5px; padding: 12px 14px; }
.pager .pager-info { padding: 0; }
.pager-links { display: flex; gap: 4px; }
.pager-links a, .pager-links span { min-width: 32px; height: 32px; padding: 0 8px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--border); font-size: 13px; color: var(--text); }
.pager-links a:hover { background: var(--surface-2); text-decoration: none; }
.pager-links .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager-links .disabled, .pager-links .gap { color: var(--faint); border-color: transparent; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline .t-title { font-weight: 600; } .timeline .t-meta { color: var(--muted); font-size: 12px; }
.chart-wrap { width: 100%; }
.chart { width: 100%; height: 220px; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10px; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.progress > span { display: block; height: 100%; background: var(--primary); }
.sortable-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; margin-bottom: 8px; }
.sortable-item.dragging { opacity: .5; }
.sortable-item .handle { cursor: grab; color: var(--faint); }
.repeater-row { display: grid; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--border); border-radius: 9px; margin-bottom: 8px; background: var(--surface-2); }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; }
.module-card { display: flex; gap: 12px; align-items: flex-start; }
.module-card .grow h3 { font-size: 14px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 9px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 10px; }
.list-plain li:last-child { border-bottom: 0; }

/* auth pages */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 20% -10%, #d8efeb 0%, transparent 60%), var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 30px 28px; box-shadow: var(--shadow-lg); }
.auth-card .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-card .brand .logo-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

/* print */
@media print {
  .sidebar, .topbar, .no-print, .page-head .actions, .banner { display: none !important; }
  .main { margin: 0 !important; } .content { padding: 0 !important; } body { background: #fff; }
  .card { border: 0; box-shadow: none; }
}

/* responsive */
@media (max-width: 1200px) { .grid-5 { grid-template-columns: repeat(3, minmax(0,1fr)); } .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); } body.nav-open .sidebar { transform: none; } body.nav-open .overlay { display: block; }
  .main { margin-left: 0; } .menu-toggle { display: inline-grid; }
  .grid-main { grid-template-columns: minmax(0,1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .content { padding: 16px; } .topbar { padding: 0 12px; } .topbar .search { display: none; }
  .grid-2, .grid-3, .grid-4, .grid-5, .form-grid, .form-grid-3 { grid-template-columns: minmax(0,1fr); }
  .kv { grid-template-columns: 110px 1fr; }
  .hide-mobile { display: none !important; } .only-mobile { display: initial; }
  .page-head h1 { font-size: 19px; }
  .filters input[type=search], .filters input[type=text], .filters select, .filters input[type=date] { max-width: none; width: 100%; }
  .table td, .table th { padding: 9px 10px; }
  .banner { padding: 10px 16px; }
}
.grid > .card + .card, .grid > div > .card:first-child { margin-top: 0; }
.grid > div > .card + .card { margin-top: 16px; }
.stat.link, .stat.link:hover { color: inherit; text-decoration: none; }
.table .row-actions { flex-wrap: wrap; }
.stat.link .value { color: var(--text); }
