:root {
  --vt-accent: #0f4c5c;
  --vt-accent-2: #2a9d8f;
  --vt-ink: #12262c;
  --vt-muted: #5b7380;
  --vt-line: #d7e3e6;
  --vt-bg: #f3f7f8;
  --vt-card: #ffffff;
  --vt-danger: #b42318;
  --vt-ok: #067647;
  --vt-warn: #b54708;
  --side-w: 220px;
  --top-h: 56px;
  --radius: 12px;
  --font: "Cairo", system-ui, sans-serif;
  --pad: 16px;
  color-scheme: only light;
  supported-color-schemes: light;
}
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  color-scheme: only light !important;
  background: var(--vt-bg) !important;
  background-image: linear-gradient(var(--vt-bg), var(--vt-bg)) !important;
}
html, body { margin: 0; min-height: 100%; }
body.vt-app {
  font-family: var(--font);
  color-scheme: only light !important;
  background-color: var(--vt-bg) !important;
  background-image: linear-gradient(var(--vt-bg), var(--vt-bg)) !important;
  color: var(--vt-ink) !important;
  overflow-x: hidden;
  forced-color-adjust: none;
}

/* منع تحويل أندرويد/كروم للدارك القسري */
@media (prefers-color-scheme: dark) {
  html, body.vt-app {
    color-scheme: only light !important;
    background-color: var(--vt-bg) !important;
    background-image: linear-gradient(var(--vt-bg), var(--vt-bg)) !important;
    color: var(--vt-ink) !important;
  }
  .vt-card, .vt-stat, .vt-lcard, .vt-side, .vt-chat, .vt-modal-card, .vt-notif-panel {
    background-color: var(--vt-card) !important;
    background-image: linear-gradient(var(--vt-card), var(--vt-card)) !important;
    color: var(--vt-ink) !important;
  }
  .vt-btn:not(.primary):not(.danger):not(.ghost):not(.vt-wa):not(.vt-wa-soft) {
    background-color: var(--vt-card) !important;
    color: var(--vt-ink) !important;
  }
}
a { color: var(--vt-accent); text-decoration: none; }
a:hover { color: var(--vt-accent-2); }

.vt-top {
  position: sticky; top: 0; z-index: 40;
  min-height: var(--top-h);
  display: flex; align-items: center; gap: 10px;
  padding: 8px var(--pad);
  background: var(--vt-accent); color: #fff;
  flex-wrap: wrap;
}
.vt-top a { color: #fff; }
.vt-brand { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 0 1 auto; }
.vt-brand strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-brand span { font-size: 11px; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.vt-top .page-title,
.vt-top .page-name {
  font-weight: 700; font-size: 14px; margin-inline-start: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 36vw;
}
.vt-top .spacer { flex: 1; min-width: 4px; }
.vt-user { font-size: 12px; opacity: .92; white-space: nowrap; }

/* اختيار الألوان */
.vt-themes {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 6px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
}
.vt-theme-dot {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85);
  padding: 0; cursor: pointer; background: #ccc; touch-action: manipulation;
}
.vt-theme-dot[data-theme="ocean"] { background: #0f4c5c; }
.vt-theme-dot[data-theme="navy"] { background: #1b365d; }
.vt-theme-dot[data-theme="forest"] { background: #1b5e4a; }
.vt-theme-dot[data-theme="sky"] { background: #1565a8; }
.vt-theme-dot[data-theme="sand"] { background: #6b4f3a; }
.vt-theme-dot[data-theme="rose"] { background: #8b3a4a; }
.vt-theme-dot.is-active {
  outline: 2px solid #fff;
  outline-offset: 1px;
  box-shadow: 0 0 0 2px rgba(0,0,0,.2);
}

.vt-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--vt-line); background: var(--vt-card); color: var(--vt-ink);
  font: inherit; font-weight: 700; cursor: pointer;
  touch-action: manipulation;
}
.vt-btn.primary { background: var(--vt-accent); color: #fff; border-color: transparent; }
.vt-btn.primary:hover { filter: brightness(.92); color: #fff; }
.vt-btn.danger { background: var(--vt-danger); color: #fff; border-color: transparent; }
.vt-btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.vt-btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.vt-btn.block { width: 100%; }

.vt-shell { display: flex; min-height: calc(100vh - var(--top-h)); align-items: stretch; }
.vt-side {
  width: var(--side-w); flex: 0 0 var(--side-w);
  background: var(--vt-card); border-inline-end: 1px solid var(--vt-line);
  padding: 12px 8px;
}
.vt-side a {
  display: block; padding: 10px 12px; border-radius: 10px;
  color: var(--vt-ink); font-weight: 700; font-size: 14px;
}
.vt-side a:hover, .vt-side a.active {
  background: color-mix(in srgb, var(--vt-accent) 12%, #fff);
  color: var(--vt-accent);
}
.vt-main { flex: 1; min-width: 0; padding: var(--pad); }

.vt-flash {
  padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 700; font-size: 14px;
}
.vt-flash.ok { background: #ecfdf3; color: var(--vt-ok); }
.vt-flash.err { background: #fef3f2; color: var(--vt-danger); }

.vt-card {
  background: var(--vt-card); border: 1px solid var(--vt-line);
  border-radius: var(--radius); padding: 16px;
}
.vt-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 0 0 16px;
}
.vt-head h1 { margin: 0; font-size: 20px; line-height: 1.3; }
.vt-head .vt-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vt-muted { color: var(--vt-muted); font-size: 13px; font-weight: 400; }

.vt-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.vt-stat { background: var(--vt-card); border: 1px solid var(--vt-line); border-radius: 12px; padding: 12px; }
.vt-stat b { display: block; font-size: 20px; }
.vt-stat span { color: var(--vt-muted); font-size: 12px; }
.vt-stat.is-due { border-color: #fecdca; background: #fff8f7; }
.vt-stat.is-due b { color: var(--vt-danger); }
.vt-stat.is-ok { border-color: #abeec6; background: #f6fef9; }
.vt-stat.is-ok b { color: var(--vt-ok); }
.vt-stat a { color: inherit; }
.vt-stat a:hover { color: var(--vt-accent-2); }

.vt-party-link {
  color: var(--vt-accent); font-weight: 800; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.vt-party-link:hover { color: var(--vt-accent-2); }

.vt-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.vt-filters { margin-bottom: 14px; display: grid; gap: 10px; }
.vt-tabs {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 0 0 14px; padding-bottom: 2px; scrollbar-width: thin;
}
.vt-tabs a {
  flex: 0 0 auto; padding: 10px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--vt-line);
  color: var(--vt-ink); font-weight: 800; font-size: 13px; white-space: nowrap;
}
.vt-tabs a.active, .vt-tabs a:hover {
  background: var(--vt-accent); color: #fff; border-color: transparent;
}
.vt-report-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start;
}
.vt-sec-title { margin: 0 0 12px; font-size: 16px; }
.vt-chart-box { position: relative; height: 240px; width: 100%; }
.vt-party-info { margin-bottom: 12px; }

.vt-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-inline-start: 6px;
  border-radius: 999px; background: #f04438; color: #fff;
  font-size: 11px; font-weight: 800;
}
.vt-notif { position: relative; }
.vt-notif-panel {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  width: min(320px, 86vw); max-height: 360px; overflow: auto;
  background: #fff; color: var(--vt-ink); border: 1px solid var(--vt-line);
  border-radius: 12px; box-shadow: 0 12px 40px rgba(18,38,44,.18);
  padding: 8px; z-index: 50;
}
.vt-notif-item {
  display: grid; gap: 4px; padding: 10px; border-radius: 10px;
  border-bottom: 1px solid var(--vt-line);
}
.vt-notif-item:last-child { border-bottom: 0; }
.vt-wa-link { color: #128c7e; font-weight: 800; font-size: 13px; }
.vt-btn.vt-wa { background: #128c7e; color: #fff; border-color: transparent; }
.vt-btn.vt-wa:hover { background: #0e7a6e; color: #fff; }
.vt-btn.vt-wa-soft { background: #e8f8f5; color: #0e7a6e; border-color: #b6e6dc; }

.vt-remind-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: #eef6f7; color: var(--vt-accent);
}
.vt-remind-chip.is-overdue { background: #fef3f2; color: var(--vt-danger); }
.vt-remind-chip.is-today { background: #fffaeb; color: var(--vt-warn); }
.vt-remind-chip.is-soon { background: #ecfdf3; color: var(--vt-ok); }
.vt-remind-box { margin-bottom: 12px; }
.vt-remind-box.is-overdue { border-color: #fecdca; background: #fff8f7; }
.vt-remind-box.is-today { border-color: #fedf89; background: #fffcf5; }

.vt-chat-fab {
  position: fixed; inset-inline-start: 16px; bottom: 16px; z-index: 60;
  min-width: 52px; min-height: 52px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--vt-accent); color: #fff; font: inherit; font-weight: 700;
  font-size: 13px; box-shadow: 0 10px 28px rgba(15,76,92,.35); cursor: pointer;
}
/* شات مضغوط: نفس المساحة، كلام أصغر */
.vt-chat {
  position: fixed; inset-inline-start: 16px; bottom: 78px; z-index: 60;
  width: min(340px, calc(100vw - 24px)); height: min(460px, 70vh);
  background: #fff; border: 1px solid var(--vt-line); border-radius: 12px;
  box-shadow: 0 16px 48px rgba(18,38,44,.22);
  display: flex; flex-direction: column; overflow: hidden;
  font-size: 11px !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.vt-chat[hidden] { display: none !important; }
.vt-chat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 4px; padding: 6px 8px; background: var(--vt-accent); color: #fff;
  flex: 0 0 auto;
}
.vt-chat-head strong { font-size: 11px !important; font-weight: 700 !important; }
.vt-chat-head-actions { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.vt-chat-head .vt-btn,
.vt-chat-head .vt-btn.small {
  color: #fff !important; border-color: rgba(255,255,255,.35) !important;
  background: transparent !important;
  font-size: 10px !important; padding: 2px 6px !important;
  min-height: 24px !important; height: 24px !important; border-radius: 6px !important;
  font-weight: 600 !important; line-height: 1 !important;
}
#vtSugToggle.is-on { background: rgba(255,255,255,.2) !important; border-color: #fff !important; }
.vt-chat-body {
  flex: 1; overflow: auto; padding: 6px 8px;
  display: flex; flex-direction: column; gap: 4px;
  background: #f7fbfb; min-height: 0;
}
.vt-chat-msg {
  max-width: 95%; padding: 5px 8px; border-radius: 8px;
  font-size: 11px !important; font-weight: 500 !important; line-height: 1.4 !important;
  white-space: pre-wrap; word-break: break-word;
}
.vt-chat-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--vt-line); }
.vt-chat-msg.me { align-self: flex-end; background: var(--vt-accent); color: #fff; }
.vt-chat-form {
  display: flex; gap: 4px; padding: 6px 7px; border-top: 1px solid var(--vt-line); background: #fff;
  align-items: center; flex: 0 0 auto;
}
.vt-chat-form input {
  flex: 1; min-width: 0; min-height: 34px; height: 34px; border: 1px solid var(--vt-line);
  border-radius: 8px; padding: 4px 8px; font: inherit;
  font-size: 13px !important; font-weight: 500 !important;
}
.vt-chat-form .vt-btn.primary {
  font-size: 11px !important; padding: 0 10px !important;
  min-height: 34px !important; height: 34px !important; font-weight: 700 !important;
}
.vt-chat-form .vt-mic,
.vt-chat-form .vt-speak-toggle {
  flex: 0 0 auto; min-width: 34px; width: 34px; min-height: 34px; height: 34px;
  padding: 0 !important; font-size: 14px !important;
}
.vt-mic.is-listening {
  background: #fef3f2; border-color: #fecdca; color: var(--vt-danger);
  animation: vt-pulse 1s ease-in-out infinite;
}
.vt-speak-toggle.is-on {
  background: #e8f4f3; border-color: var(--vt-accent); color: var(--vt-accent);
}
@keyframes vt-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.vt-chat-suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 4px 6px;
  border-top: 1px solid var(--vt-line);
  background: #f3f7f8;
  max-height: 72px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  flex: 0 0 auto;
}
.vt-chat-suggestions[hidden] { display: none !important; }
.vt-chat .vt-chip,
.vt-chip {
  border: 1px solid var(--vt-line); background: #fff; color: var(--vt-ink);
  border-radius: 6px; padding: 3px 5px !important;
  font-size: 9.5px !important; font-weight: 600 !important;
  cursor: pointer; touch-action: manipulation; text-align: center;
  line-height: 1.25 !important; min-height: 0 !important; height: auto !important;
}
.vt-chip:hover { border-color: var(--vt-accent); color: var(--vt-accent); background: #eef7f6; }
.vt-voice-status {
  font-size: 10px !important; padding: 2px 8px; color: var(--vt-muted);
  background: #fff8e8; border-top: 1px solid #f5e6b8;
}

.vt-inv-sum {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 12px; border-radius: 12px; background: #f7fbfb; border: 1px solid var(--vt-line);
}
.vt-inv-sum span { display: block; color: var(--vt-muted); font-size: 12px; font-weight: 800; }
.vt-inv-sum b { font-size: 18px; font-variant-numeric: tabular-nums; }
table.vt-lines .line-total { font-weight: 800; white-space: nowrap; min-width: 72px; }
.vt-paid-row { display: flex; gap: 8px; align-items: center; }
.vt-paid-row input { flex: 1; min-width: 0; }
.vt-paid-row .vt-btn { flex: 0 0 auto; white-space: nowrap; }

.vt-table-wrap { overflow: auto; -webkit-overflow-scrolling: touch; }
table.vt {
  width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px;
}
table.vt th, table.vt td {
  padding: 10px 8px; border-bottom: 1px solid var(--vt-line); text-align: right;
  vertical-align: top;
}
table.vt th { color: var(--vt-muted); font-size: 12px; font-weight: 800; }
table.vt .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
input.vt-qty {
  width: 120px; min-height: 40px; padding: 8px 10px;
  font: inherit; border: 1px solid var(--vt-line); border-radius: 8px;
  background: #fff; color: inherit; text-align: center;
}

.vt-form { display: grid; gap: 12px; }
.vt-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vt-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.vt-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vt-field span { font-size: 13px; font-weight: 800; }
.vt-field input, .vt-field select, .vt-field textarea {
  font: inherit; border: 1px solid var(--vt-line); border-radius: 10px;
  padding: 11px 12px; background: #fff; color: inherit; width: 100%;
  min-height: 44px;
}
.vt-field textarea { min-height: 88px; resize: vertical; }
.vt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.vt-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700;
}
.vt-check input { width: 18px; height: 18px; }
.vt-en-hint { font-size: 12px; color: var(--vt-muted); font-weight: 600; margin-top: 4px; }
.vt-en-hint.is-loading { color: var(--vt-accent); }

.vt-empty {
  background: #fff; border: 1px dashed var(--vt-line); border-radius: 14px;
  padding: 32px 16px; text-align: center; display: grid; gap: 6px;
}

.vt-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  width: 100%;
}
.vt-gcard {
  background: #fff;
  border: 1px solid var(--vt-line);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}
.vt-gcard.is-off { opacity: .62; }
.vt-gcard-top h2 {
  margin: 0; font-size: 17px; line-height: 1.35; font-weight: 800;
}
.vt-gcard-en {
  margin: 4px 0 0; color: var(--vt-muted); font-size: 13px;
}
.vt-pill {
  display: inline-block; margin-top: 8px; padding: 2px 8px;
  border-radius: 999px; background: #fef3f2; color: var(--vt-danger);
  font-size: 12px; font-weight: 800;
}
.vt-gcard-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  color: var(--vt-muted); font-size: 13px; font-weight: 700;
}
.vt-gcard-prices {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: auto;
}
.vt-gcard-prices div {
  background: #f7fbfb; border-radius: 10px; padding: 8px 10px;
}
.vt-gcard-prices small {
  display: block; color: var(--vt-muted); font-size: 11px; font-weight: 700;
}
.vt-gcard-prices b { font-size: 15px; font-variant-numeric: tabular-nums; }
.vt-gcard-actions { display: flex; gap: 8px; }
.vt-gcard-actions .vt-btn { flex: 1; }

.vt-list { display: grid; gap: 10px; }
.vt-lcard {
  background: var(--vt-card); border: 1px solid var(--vt-line); border-radius: 14px;
  padding: 14px; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap;
}
.vt-lcard.is-off { opacity: .62; }
.vt-lcard-main { flex: 1; min-width: 180px; }
.vt-lcard-main h2 { margin: 0; font-size: 16px; line-height: 1.35; }
.vt-lcard-main h2 a {
  color: var(--vt-accent); font-weight: 800;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.vt-lcard-main h2 a:hover { color: var(--vt-accent-2); }
.vt-lcard-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.vt-amount { font-variant-numeric: tabular-nums; color: var(--vt-accent); font-size: 15px; }
.vt-lcard-meta {
  display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px;
  color: var(--vt-muted); font-size: 13px; font-weight: 700;
}
.vt-lcard-meta a.vt-party-link { font-weight: 800; }
.vt-lcard-actions {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.vt-hide-sm { display: inline; }
.vt-show-sm { display: none; }
.vt-missing ul { margin: 8px 0 0; padding-inline-start: 18px; }
.vt-missing li { margin: 4px 0; }

.vt-modal {
  border: 0; padding: 0; border-radius: 16px;
  width: min(560px, calc(100vw - 20px));
  margin: auto;
  background: transparent;
  max-height: calc(100vh - 24px);
}
.vt-modal.vt-modal-wide { width: min(720px, calc(100vw - 16px)); }
.vt-modal::backdrop { background: rgba(18, 38, 44, .5); }
.vt-modal-card {
  background: #fff; border-radius: 16px; padding: 16px;
  border: 1px solid var(--vt-line);
  overflow: auto; max-height: calc(100vh - 32px);
  -webkit-overflow-scrolling: touch;
}
.vt-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px; position: sticky; top: 0; background: #fff; z-index: 1; padding-bottom: 6px;
}
.vt-modal-head h2 { margin: 0; font-size: 17px; }
.vt-modal-foot {
  display: flex; justify-content: stretch; gap: 8px; margin-top: 8px;
}
.vt-modal-foot .vt-btn { flex: 1; min-height: 44px; }

.vt-lines-wrap {
  overflow: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--vt-line); border-radius: 12px;
}
table.vt-lines { min-width: 0; width: 100%; }
table.vt-lines th, table.vt-lines td { padding: 8px; }
table.vt-lines select,
table.vt-lines input {
  width: 100%; min-height: 40px; font: inherit;
  border: 1px solid var(--vt-line); border-radius: 8px; padding: 8px 10px; background: #fff;
}

.vt-login {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(700px 280px at 100% 0, rgba(42,157,143,.18), transparent 60%),
    var(--vt-bg);
}
.vt-login .vt-card { width: min(420px, 100%); padding: 24px; }
.vt-login h1 { margin: 0 0 6px; }
.vt-due { color: var(--vt-warn); font-weight: 800; }
.vt-ok { color: var(--vt-ok); font-weight: 800; }

.vt-pay-box { margin-top: 12px; }
.vt-pay-form { margin-top: 4px; }
.vt-stock-warn {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline;
  margin: 10px 0; padding: 10px 12px; border-radius: 10px;
  background: #fff8f7; border: 1px solid #fecdca; color: #b42318; font-size: 13px;
}
.vt-stock-warn strong { font-weight: 800; }
.vt-stock-warn[hidden] { display: none !important; }
.vt-lines tr.is-stock-bad { background: #fff5f4; }
.vt-lines tr.is-stock-bad select,
.vt-lines tr.is-stock-bad input { border-color: #f04438; }
.vt-stock-low { color: #b42318; font-weight: 800; }

.vt-public {
  min-height: 100vh;
  background:
    radial-gradient(900px 340px at 0 0, rgba(42,157,143,.16), transparent 55%),
    var(--vt-bg);
}
.vt-hero { max-width: 1080px; margin: 0 auto; padding: 28px 16px 12px; }
.vt-hero h1 { margin: 0 0 8px; font-size: clamp(26px, 7vw, 34px); }
.vt-cards {
  max-width: 1080px; margin: 0 auto; padding: 8px 16px 36px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 12px;
}
.vt-pcard h2 { margin: 0 0 8px; font-size: 18px; }
.vt-pcard p { margin: 0 0 6px; color: var(--vt-muted); font-size: 14px; }
.vt-nav-pub {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; max-width: 1080px; margin: 0 auto;
}

/* ===== Tablet / Mobile ===== */
@media (max-width: 900px) {
  :root { --pad: 12px; --top-h: auto; }

  .vt-top {
    gap: 8px;
    padding: 8px 10px;
    row-gap: 8px;
  }
  .vt-brand span,
  .vt-top .page-title,
  .vt-top .page-name { display: none; }
  .vt-user { display: none; }
  .vt-themes { order: 3; flex: 1 1 100%; justify-content: center; }
  .vt-top .spacer { display: none; }

  .vt-shell { flex-direction: column; }
  .vt-side {
    width: 100%;
    flex: none;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 8px 10px;
    border-inline-end: 0;
    border-bottom: 1px solid var(--vt-line);
    scrollbar-width: none;
    background: var(--vt-card);
  }
  .vt-side::-webkit-scrollbar { display: none; }
  .vt-side a {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 10px 14px;
    background: color-mix(in srgb, var(--vt-accent) 6%, #fff);
    border: 1px solid var(--vt-line);
  }
  .vt-side a.active {
    background: var(--vt-accent);
    color: #fff;
    border-color: transparent;
  }

  .vt-main { padding: 12px; }
  .vt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vt-grid-2, .vt-grid-3, .vt-grid-4 { grid-template-columns: 1fr; }
  .vt-gallery { grid-template-columns: 1fr; gap: 10px; }
  .vt-report-grid { grid-template-columns: 1fr; }
  .vt-chart-box { height: 220px; }
  .vt-gcard { min-height: 0; }
  .vt-head h1 { font-size: 18px; }
  .vt-head .vt-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .vt-head .vt-actions .vt-btn { width: 100%; }

  .vt-field input,
  .vt-field select,
  .vt-field textarea { font-size: 16px; }

  .vt-lcard {
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  .vt-lcard-main { min-width: 0; width: 100%; }
  .vt-lcard-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .vt-lcard-actions .vt-btn { width: 100%; min-width: 0; }
  .vt-lcard-actions .vt-muted { grid-column: 1 / -1; }

  .vt-modal,
  .vt-modal.vt-modal-wide {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    border-radius: 14px;
  }
  .vt-modal-card { padding: 14px; border-radius: 14px; max-height: calc(100vh - 20px); }

  table.vt-lines { font-size: 13px; }
  table.vt-lines select,
  table.vt-lines input { font-size: 16px; min-height: 44px; }

  .vt-nav-pub { flex-wrap: wrap; }
  .vt-cards { grid-template-columns: 1fr; }

  .vt-hide-sm { display: none !important; }
  .vt-show-sm { display: inline !important; }

  .vt-chat {
    inset: auto 8px 68px 8px;
    inset-inline-start: 8px;
    inset-inline-end: 8px;
    bottom: 68px;
    width: auto;
    height: min(78vh, 540px);
    border-radius: 12px;
    font-size: 11px !important;
  }
  .vt-chat-msg { font-size: 11px !important; padding: 5px 8px !important; }
  .vt-chat-form input { font-size: 16px !important; min-height: 36px; height: 36px; } /* 16px يمنع زوم آيفون */
  .vt-chat-suggestions {
    grid-template-columns: 1fr 1fr;
    max-height: 68px;
    gap: 3px;
    padding: 4px 5px;
  }
  .vt-chat .vt-chip,
  .vt-chip { font-size: 9px !important; padding: 2px 4px !important; line-height: 1.2 !important; }
  .vt-chat-fab { inset-inline-start: 12px; bottom: 12px; }
}

@media (max-width: 420px) {
  .vt-stats { grid-template-columns: 1fr 1fr; }
  .vt-gcard-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .vt-btn.ghost.small { padding: 0 10px; }
  .vt-theme-dot { width: 16px; height: 16px; }
}
