/* ─── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { font-family: var(--pt-font); background: var(--bg); color: var(--text); }
#app-root { height: 100%; }

/* PowerToken design tokens + shared styles
 * Lives at root scope; theme via [data-theme="dark"] on .pt-screen.
 */

:root {
  /* type */
  --pt-font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --pt-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* light theme */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-hover: #f3f4f6;
  --border: #e6e8ec;
  --border-strong: #d1d5db;
  --text: #0a0e1a;
  --text-2: #4b5563;
  --text-3: #8a92a3;
  --text-inv: #ffffff;

  --primary: #0b5fff;
  --primary-hover: #0a4fd6;
  --primary-pressed: #0942b8;
  --primary-50: #eef4ff;
  --primary-100: #d9e6ff;

  --elec: #f59e0b;
  --elec-bg: #fef6e6;
  --water: #0ea5e9;
  --water-bg: #e6f6fe;

  --success: #16a34a;
  --success-bg: #e8f6ed;
  --warn: #d97706;
  --warn-bg: #fdf3e0;
  --danger: #dc2626;
  --danger-bg: #fdecec;
  --pending: #ca8a04;
  --pending-bg: #fbf5d8;

  --shadow-sm: 0 1px 2px rgba(10, 14, 26, 0.04);
  --shadow-md: 0 1px 3px rgba(10, 14, 26, 0.06), 0 1px 2px rgba(10, 14, 26, 0.04);
  --shadow-lg: 0 12px 32px rgba(10, 14, 26, 0.08), 0 2px 6px rgba(10, 14, 26, 0.04);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
}

[data-theme="dark"] {
  --bg: #0a0e1a;
  --surface: #111626;
  --surface-2: #0d1220;
  --surface-hover: #1a2034;
  --border: #1f2638;
  --border-strong: #2a3147;
  --text: #f3f5f9;
  --text-2: #a6adbe;
  --text-3: #6b7388;
  --text-inv: #0a0e1a;

  --primary: #4f86ff;
  --primary-hover: #6e9bff;
  --primary-pressed: #2f6cff;
  --primary-50: rgba(79, 134, 255, 0.12);
  --primary-100: rgba(79, 134, 255, 0.22);

  --elec: #fbbf24;
  --elec-bg: rgba(251, 191, 36, 0.12);
  --water: #38bdf8;
  --water-bg: rgba(56, 189, 248, 0.12);

  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --warn: #f59e0b;
  --warn-bg: rgba(245, 158, 11, 0.14);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.14);
  --pending: #eab308;
  --pending-bg: rgba(234, 179, 8, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* Screen container — every artboard's root uses this */
.pt-screen {
  font-family: var(--pt-font);
  background: var(--bg);
  color: var(--text);
  width: 100%;
  height: 100%;
  display: flex;
  font-size: 14px;
  line-height: 1.45;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
.pt-screen * { box-sizing: border-box; }

.pt-screen.center { display: flex; align-items: center; justify-content: center; flex-direction: column; }

/* Sidebar */
.pt-sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  gap: 4px;
}
.pt-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.pt-brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--primary);
  display: flex; align-items: center; justify-content: center; color: white;
  position: relative; flex-shrink: 0;
}
.pt-brand-name { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.pt-nav-section { font-size: 10.5px; font-weight: 600; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; padding: 14px 10px 6px; }
.pt-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--text-2); cursor: default;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.pt-nav-item:hover { background: var(--surface-hover); color: var(--text); }
.pt-nav-item.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.pt-nav-item .pt-nav-count { margin-left: auto; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pt-nav-item.active .pt-nav-count { color: var(--primary); }

.pt-sidebar-foot { margin-top: auto; padding: 10px 8px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.pt-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #0b5fff, #6f57f3); color: white; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; flex-shrink: 0; }

/* Main */
.pt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.pt-topbar {
  height: 60px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
}
.pt-topbar h1 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.pt-topbar-actions { display: flex; align-items: center; gap: 10px; }

.pt-content { flex: 1; min-height: 0; overflow: auto; padding: 24px 28px 32px; background: var(--bg); }

.pt-page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.pt-page-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.pt-page-head p { font-size: 13px; color: var(--text-2); margin: 0; }

/* Cards */
.pt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.pt-card-pad    { padding: 20px; }
.pt-card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.pt-card-body   { padding: 20px 24px; }
.pt-card h3 { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; margin: 0; }

/* Stat card */
.pt-stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.pt-stat-label { font-size: 12px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.pt-stat-val { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.pt-stat-foot { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.pt-stat-foot .up { color: var(--success); font-weight: 600; }
.pt-stat-foot .down { color: var(--danger); font-weight: 600; }

/* Buttons */
.pt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 9px;
  font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer; transition: all .12s; white-space: nowrap;
}
.pt-btn.primary { background: var(--primary); color: white; border-color: var(--primary); }
.pt-btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.pt-btn.ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.pt-btn.ghost:hover { background: var(--surface-hover); }
.pt-btn.subtle { background: var(--surface-hover); color: var(--text); border-color: transparent; }
.pt-btn.subtle:hover { background: var(--border); }
.pt-btn.danger { background: var(--danger); color: white; border-color: var(--danger); }
.pt-btn.icon { width: 36px; padding: 0; }
.pt-btn.lg { height: 44px; padding: 0 18px; font-size: 14px; }
.pt-btn.xl { height: 52px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.pt-btn.full { width: 100%; }
.pt-btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }

/* Inputs */
.pt-field { display: flex; flex-direction: column; gap: 6px; }
.pt-field label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.pt-input, .pt-select, .pt-textarea {
  height: 38px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 9px;
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 14px; outline: none;
  transition: border .12s, box-shadow .12s;
  width: 100%;
}
.pt-input:focus, .pt-select:focus, .pt-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}
.pt-input.lg { height: 48px; font-size: 16px; }
.pt-textarea { height: auto; padding: 10px 12px; min-height: 84px; resize: vertical; }
.pt-input::placeholder { color: var(--text-3); }
.pt-help { font-size: 11.5px; color: var(--text-3); }

/* Input prefix/suffix (flex row usage: <span class="pt-input-prefix">UGX</span><input>) */
.pt-input-prefix {
  display: inline-flex; align-items: center; padding: 0 12px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--text-2);
  white-space: nowrap; height: 38px;
}
.pt-input-prefix + .pt-input,
.pt-input-prefix + input {
  border-top-left-radius: 0; border-bottom-left-radius: 0;
  border-left: none;
}

/* Field helpers */
.pt-field-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.pt-field-hint  { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.pt-field.error .pt-input,
.pt-field.error .pt-select { border-color: var(--danger); }
.pt-field.error .pt-input:focus,
.pt-field.error .pt-select:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.12); }

/* Section label (used inside cards) */
.pt-section-label {
  font-size: 11.5px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .06em;
}

/* Search */
.pt-search { position: relative; }
.pt-search input { padding-left: 36px; height: 36px; }
.pt-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }

/* Tables */
.pt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pt-table th { text-align: left; font-weight: 500; color: var(--text-2); font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.pt-table td { padding: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.pt-table tr:last-child td { border-bottom: none; }
.pt-table tbody tr:hover td { background: var(--surface-hover); }
.pt-table-wrap { overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.pt-table-toolbar { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border); background: var(--surface); }

.pt-cell-mono { font-family: var(--pt-mono); font-size: 12.5px; letter-spacing: -0.01em; }
.pt-cell-strong { font-weight: 600; color: var(--text); }
.pt-cell-muted { color: var(--text-2); }

/* Badges */
.pt-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: -0.005em; }
.pt-badge.success { background: var(--success-bg); color: var(--success); }
.pt-badge.danger { background: var(--danger-bg); color: var(--danger); }
.pt-badge.warn { background: var(--warn-bg); color: var(--warn); }
.pt-badge.pending { background: var(--pending-bg); color: var(--pending); }
.pt-badge.neutral { background: var(--surface-hover); color: var(--text-2); }
.pt-badge.elec { background: var(--elec-bg); color: var(--elec); }
.pt-badge.water { background: var(--water-bg); color: var(--water); }
.pt-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Meter type icons */
.pt-meter-icon { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pt-meter-icon.elec { background: var(--elec-bg); color: var(--elec); }
.pt-meter-icon.water { background: var(--water-bg); color: var(--water); }
.pt-meter-icon.lg { width: 44px; height: 44px; border-radius: 11px; }

/* Meter card (landlord My Meters page) */
.pt-meter-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 14px; transition: border .12s, box-shadow .12s; cursor: default; }
.pt-meter-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.pt-meter-card .head { display: flex; align-items: flex-start; gap: 12px; }
.pt-meter-card .serial { font-family: var(--pt-mono); font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.pt-meter-card .sub { font-size: 12px; color: var(--text-2); }
.pt-meter-card .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.pt-meter-card .stat-k { font-size: 11px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.pt-meter-card .stat-v { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Token display */
.pt-token {
  font-family: var(--pt-mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.pt-token.lg { font-size: 36px; padding: 22px; letter-spacing: 0.06em; }

/* Toast */
.pt-toast { display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 500; min-width: 280px; }
.pt-toast .ic { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: white; }
.pt-toast.success .ic { background: var(--success); }
.pt-toast.danger .ic { background: var(--danger); }
.pt-toast.info .ic { background: var(--primary); }
.pt-toast.warn .ic { background: var(--warn); }
.pt-toast .body { display: flex; flex-direction: column; gap: 1px; }
.pt-toast .body small { font-size: 12px; color: var(--text-2); font-weight: 400; }

/* Skeleton */
.pt-skel { background: linear-gradient(90deg, var(--surface-hover) 0%, var(--border) 50%, var(--surface-hover) 100%); background-size: 200% 100%; animation: ptShimmer 1.4s infinite; border-radius: 6px; }
@keyframes ptShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Banner / alert */
.pt-banner { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid transparent; }
.pt-banner.warn { background: var(--warn-bg); border-color: rgba(217, 119, 6, 0.25); color: var(--warn); }
.pt-banner.danger { background: var(--danger-bg); border-color: rgba(220, 38, 38, 0.25); color: var(--danger); }
.pt-banner.info { background: var(--primary-50); border-color: rgba(11, 95, 255, 0.18); color: var(--primary); }
.pt-banner .body { flex: 1; color: var(--text); font-size: 13px; }
.pt-banner .body b { font-weight: 600; }
.pt-banner .body small { display: block; color: var(--text-2); font-size: 12.5px; margin-top: 2px; font-weight: 400; }

/* Modal */
.pt-modal-bg { position: absolute; inset: 0; background: rgba(10, 14, 26, 0.45); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.pt-modal { background: var(--surface); border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }

/* Tenant mobile */
.pt-mob { font-family: var(--pt-font); width: 100%; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; display: flex; flex-direction: column; }
.pt-mob * { box-sizing: border-box; }
.pt-mob-head { padding: 14px 18px 6px; display: flex; align-items: center; justify-content: space-between; }
.pt-mob-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.pt-mob-content { flex: 1; min-height: 0; overflow: auto; padding: 12px 18px 90px; display: flex; flex-direction: column; gap: 14px; }
.pt-mob-tabs { position: absolute; bottom: 0; left: 0; right: 0; height: 64px; background: var(--surface); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-around; padding: 6px 8px 8px; }
.pt-mob-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--text-3); font-weight: 500; padding: 6px 12px; border-radius: 10px; }
.pt-mob-tab.active { color: var(--primary); }

/* Step indicator */
.pt-steps { display: flex; align-items: center; gap: 6px; padding: 0 18px; }
.pt-step-pill { flex: 1; height: 4px; border-radius: 999px; background: var(--surface-hover); }
.pt-step-pill.active { background: var(--primary); }
.pt-step-pill.done { background: var(--primary); opacity: 0.5; }

/* Generic helpers */
.pt-row { display: flex; align-items: center; gap: 12px; }
.pt-col { display: flex; flex-direction: column; gap: 12px; }
.pt-divider { height: 1px; background: var(--border); border: none; margin: 0; }
.pt-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pt-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pt-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pt-grid-meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.pt-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px 24px; text-align: center; }
.pt-empty-art   { width: 72px; height: 72px; border-radius: 18px; background: var(--primary-50); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.pt-empty-icon  { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.pt-empty-title { font-size: 15px; font-weight: 700; color: var(--text); }
.pt-empty-sub   { font-size: 13px; color: var(--text-3); max-width: 280px; }
.pt-empty h3 { font-size: 16px; font-weight: 600; margin: 0; }
.pt-empty p  { font-size: 13px; color: var(--text-2); margin: 0; max-width: 280px; }

/* Icon wrap (coloured square used in cards/headers) */
.pt-icon-wrap { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pt-icon-wrap.blue   { background: var(--primary-50);  color: var(--primary); }
.pt-icon-wrap.yellow { background: var(--elec-bg);     color: var(--elec); }
.pt-icon-wrap.teal   { background: var(--water-bg);    color: var(--water); }
.pt-icon-wrap.green  { background: var(--success-bg);  color: var(--success); }
.pt-icon-wrap.red    { background: var(--danger-bg);   color: var(--danger); }
.pt-icon-wrap.purple { background: #f3f0ff;            color: #6f57f3; }

/* Chart container */
.pt-chart-wrap { padding: 18px; }
.pt-chart-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }

/* Avatar list */
.pt-avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.pt-avatar-bg-1 { background: linear-gradient(135deg, #0b5fff, #6f57f3); }
.pt-avatar-bg-2 { background: linear-gradient(135deg, #f59e0b, #f43f5e); }
.pt-avatar-bg-3 { background: linear-gradient(135deg, #16a34a, #0ea5e9); }
.pt-avatar-bg-4 { background: linear-gradient(135deg, #6f57f3, #ec4899); }
.pt-avatar-bg-5 { background: linear-gradient(135deg, #0ea5e9, #14b8a6); }

/* Login page */
.pt-auth { width: 100%; height: 100%; display: flex; }
.pt-auth-form { flex: 1; padding: 56px 64px; display: flex; flex-direction: column; justify-content: center; max-width: 540px; }
.pt-auth-side { flex: 1; background: var(--primary); position: relative; overflow: hidden; color: white; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.pt-auth-side::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 110%, rgba(255,255,255,0.18), transparent 50%),
    radial-gradient(circle at 90% 0%, rgba(255,255,255,0.10), transparent 50%);
}
.pt-auth h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; margin: 0 0 8px; }
.pt-auth .lede { color: var(--text-2); font-size: 15px; margin: 0 0 28px; }

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile responsive — sidebar overlay, hamburger, scrollable tables
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hamburger button — hidden on desktop */
.pt-hamburger {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  flex-shrink: 0;
}
.pt-hamburger:hover { background: var(--surface-hover); }

/* Sidebar overlay backdrop */
.pt-sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 45;
}

@media (max-width: 768px) {
  /* ── Sidebar → overlay ──────────────────────────────────────────────── */
  .pt-hamburger { display: flex; }
  .pt-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
    transform: translateX(-100%);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-xl);
  }
  .pt-sidebar.open { transform: translateX(0); }
  .pt-sidebar-backdrop.show { display: block; }

  /* ── Main → full-width ──────────────────────────────────────────────── */
  .pt-main { margin-left: 0 !important; }
  .pt-content { padding: 14px; }
  .pt-topbar { padding: 0 14px; }

  /* ── Grids → single column ──────────────────────────────────────────── */
  .pt-grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  [style*="grid-template-columns:1.5fr 1fr"],
  [style*="grid-template-columns: 1.5fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* ── Tables → horizontal scroll ─────────────────────────────────────── */
  .pt-table-wrap,
  table.pt-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Cards → full-width ─────────────────────────────────────────────── */
  .pt-card-pad { padding: 14px; }
  .pt-card-header { padding: 14px 14px 0; }
  .pt-card-header + .pt-card-body { padding: 12px 14px 14px; }

  /* ── Settings form fields ────────────────────────────────────────────── */
  .sms-field { flex-direction: column; align-items: flex-start; gap: 4px; }
  .sms-label { width: auto; }

  /* ── Topbar search ───────────────────────────────────────────────────── */
  .pt-search { display: none; }

  /* ── Auth ────────────────────────────────────────────────────────────── */
  .pt-auth { padding: 28px 20px; }
  .pt-auth-form { padding: 32px 20px; max-width: 100%; }
}

@media (max-width: 480px) {
  .pt-grid-4 { grid-template-columns: 1fr; }
  .pt-content { padding: 10px; }
  .pt-topbar { padding: 0 10px; }
}
