/* =========================================================
   admin_ui.css (DROP-IN) — Light theme UI kit (CLEAN + COMPLETE)
   Designed to work with your admin_layout.php + admin_nav.php
   Includes: tokens, layout, sidebar/nav, cards, buttons, badges,
   alerts, forms, toolbars, tables, pills, modal, tabs, utilities.
   ========================================================= */

/* ---------- Theme tokens ---------- */
:root {
  --bg: #f7f8fb;
  --card: rgba(255, 255, 255, .92);
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, .10);

  --primary: #2563eb;
  --primary2: #1d4ed8;

  --danger: #dc2626;
  --warning: #f59e0b;
  --success: #16a34a;

  --r: 18px;
  --shadow: 0 10px 25px rgba(15, 23, 42, .06);
}

/* ---------- Base reset ---------- */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary2);
}

code,
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  margin: 0;
}

h3 {
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.01em;
}

.small {
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.muted2 {
  color: var(--muted);
  font-size: 12px;
}

.text-center {
  text-align: center;
}

/* ---------- Spacing helpers ---------- */
.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 6px;
}

.mt-2 {
  margin-top: 12px;
}

.mt-3 {
  margin-top: 18px;
}

.mb-0 {
  margin-bottom: 0;
}

/* ---------- Layout helpers ---------- */
.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 760px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Admin Layout (works with admin_layout.php)
   ========================================================= */
.admin-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* Sidebar */
.admin-sidebar {
  width: 280px;
  flex: 0 0 280px;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 14px;
  overflow: auto;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .10));
  backdrop-filter: blur(12px);
}

/* Main area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(12px);
}

/* Content */
.admin-content {
  padding: 16px;
  min-width: 0;
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 980px) {
  .admin-sidebar {
    display: none;
  }

  .admin-content {
    padding: 14px;
  }
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
}

.brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  font-weight: 950;
  letter-spacing: .02em;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .18);
  user-select: none;
}

.brand .t1 {
  font-weight: 950;
  line-height: 1;
}

.brand .t2 {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Topbar pieces */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.topbar-title strong {
  font-weight: 950;
}

.topbar-title span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Icon button (topbar menu) */
.btn-icon,
.iconBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .9);
  cursor: pointer;
  font-weight: 950;
  user-select: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease, background .15s ease;
}

.btn-icon:hover,
.iconBtn:hover {
  border-color: rgba(37, 99, 235, .30);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.btn-icon:active,
.iconBtn:active {
  transform: translateY(1px);
}

/* Mobile drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .55);
  display: none;
  z-index: 30;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 305px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .80), rgba(255, 255, 255, .18));
  border-right: 1px solid var(--border);
  padding: 14px;
  transform: translateX(-105%);
  transition: transform .18s ease;
  z-index: 31;
  overflow: auto;
  backdrop-filter: blur(12px);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-backdrop.open {
  display: block;
}

/* =========================================================
   Navigation (sidebar + drawer)
   ========================================================= */
.admin-nav {
  margin-top: 10px;
}

.nav-section {
  margin-top: 12px;
}

.nav-section-title {
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 10px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.nav-item:hover {
  background: rgba(15, 23, 42, .06);
}

.nav-item:active {
  transform: translateY(1px);
}

.nav-item.active {
  background: rgba(37, 99, 235, .12);
  border-color: rgba(37, 99, 235, .25);
}

.nav-ico {
  width: 20px;
  display: inline-flex;
  justify-content: center;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: background .12s ease, transform .12s ease;
}

.nav-group-btn:hover {
  background: rgba(15, 23, 42, .06);
}

.nav-group-btn:active {
  transform: translateY(1px);
}

.nav-caret {
  margin-left: auto;
  opacity: .65;
  transition: transform .18s ease;
}

.nav-group-btn[aria-expanded="false"] .nav-caret {
  transform: rotate(-90deg);
}

.nav-group {
  padding-left: 12px;
  margin-top: 4px;
}

/* =========================================================
   Card
   ========================================================= */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 14px;
}

.cardLite {
  border: 1px solid rgba(15, 23, 42, .10);
  background: rgba(255, 255, 255, .90);
  border-radius: var(--r);
  padding: 12px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 900;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease, background .15s ease;
}

.btn:hover {
  border-color: rgba(37, 99, 235, .25);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  border-color: rgba(37, 99, 235, .25);
  background: linear-gradient(135deg, rgba(37, 99, 235, .95), rgba(29, 78, 216, .90));
  color: #fff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, .18);
}

.btn-primary:hover {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12), 0 14px 28px rgba(37, 99, 235, .20);
}

.btn-ghost {
  background: transparent;
}

.btn:disabled,
button.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* =========================================================
   Badges
   ========================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .85);
  font-size: 12px;
  font-weight: 900;
  color: var(--text);
}

.badge a {
  color: inherit;
}

.badge.success {
  border-color: rgba(22, 163, 74, .25);
  background: rgba(22, 163, 74, .10);
}

.badge.warning {
  border-color: rgba(245, 158, 11, .25);
  background: rgba(245, 158, 11, .10);
}

.badge.error {
  border-color: rgba(220, 38, 38, .25);
  background: rgba(220, 38, 38, .10);
}

/* =========================================================
   Alerts
   ========================================================= */
.alert {
  border-radius: 14px;
  padding: 12px 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .85);
  font-size: 13px;
  line-height: 1.35;
}

.alert.success {
  border-color: rgba(22, 163, 74, .28);
  background: rgba(22, 163, 74, .10);
}

.alert.warning {
  border-color: rgba(245, 158, 11, .28);
  background: rgba(245, 158, 11, .10);
}

.alert.error {
  border-color: rgba(220, 38, 38, .28);
  background: rgba(220, 38, 38, .10);
}

/* =========================================================
   Forms — Normalize (consistent across all admin pages)
   ========================================================= */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-row>label {
  display: block;
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  margin: 0;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="number"],
.form-row input[type="search"],
.form-row input[type="tel"],
.form-row input[type="url"],
.form-row input[type="date"],
.form-row input[type="time"],
.form-row select,
.form-row textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.form-row textarea {
  min-height: 96px;
  resize: vertical;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--muted);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: rgba(37, 99, 235, .55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Input row (input + addon button aligned) */
.input-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.input-row>input,
.input-row>select {
  flex: 1;
  min-width: 0;
}

.input-addon {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease, background .15s ease;
}

.input-addon:hover {
  border-color: rgba(37, 99, 235, .30);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.input-addon:active {
  transform: translateY(1px);
}

@media (max-width: 420px) {
  .input-row {
    flex-direction: column;
    gap: 8px;
  }

  .input-addon {
    width: 100%;
  }
}

/* Validation */
.form-error {
  font-size: 12px;
  color: var(--danger);
  font-weight: 900;
  margin-top: 4px;
}

.is-invalid {
  border-color: rgba(220, 38, 38, .55) !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .12) !important;
  background: #fff;
}

.form-row.has-error>label {
  color: var(--danger);
}

.form-row.has-error .form-hint {
  color: rgba(220, 38, 38, .85);
}

/* optional subtle shake */
@keyframes shakeX {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

.shake {
  animation: shakeX .25s linear;
}

/* Actions row alignment */
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.form-actions>label {
  display: none;
}

/* =========================================================
   Toolbar / Filters
   ========================================================= */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.toolbar .form-row {
  margin-bottom: 0;
  min-width: 220px;
}

.toolbar.compact .form-row>label {
  font-size: 12px;
}

.toolbar.compact .form-row input,
.toolbar.compact .form-row select {
  min-height: 42px;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* =========================================================
   Tables
   Use:
   <div class="tableWrap"><table class="table min-980">...</table></div>
   ========================================================= */
.tableWrap {
  overflow: auto;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .92);
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table.min-860 {
  min-width: 860px;
}

.table.min-980 {
  min-width: 980px;
}

.table th,
.table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, .07);
  vertical-align: top;
}

.table th {
  text-align: left;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(2, 6, 23, .02);
  position: sticky;
  top: 0;
  z-index: 1;
}

.table tr:hover td {
  background: rgba(37, 99, 235, .03);
}

/* Table helpers */
.nowrap {
  white-space: nowrap;
}

.right {
  text-align: right;
}

.center {
  text-align: center;
}

/* Compact table variant */
.table.compact th,
.table.compact td {
  padding: 8px 10px;
}

/* =========================================================
   Pills (status)
   ========================================================= */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  color: var(--text);
}

.pill.topbar {
  background: rgba(255, 255, 255, .9);
}

.pill.ok {
  border-color: rgba(22, 163, 74, .25);
  background: rgba(22, 163, 74, .10);
}

.pill.bad {
  border-color: rgba(220, 38, 38, .25);
  background: rgba(220, 38, 38, .10);
}

.pill.warn {
  border-color: rgba(245, 158, 11, .25);
  background: rgba(245, 158, 11, .10);
}

/* Topbar dot */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  display: inline-block;
}

/* =========================================================
   Row actions
   ========================================================= */
.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* =========================================================
   Split layout (2 columns)
   ========================================================= */
.split {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
}

@media (max-width: 980px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Checkbox rows (permission matrix)
   ========================================================= */
.permRow {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.chk {
  margin-top: 4px;
}

/* =========================================================
   Modal system
   Use:
   <div class="modalBack open"><div class="modalCard">...</div></div>
   ========================================================= */
.modalBack {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.modalBack.open {
  display: flex;
}

.modalCard {
  width: min(880px, 100%);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(15, 23, 42, .12);
  box-shadow: 0 24px 60px rgba(2, 6, 23, .25);
  overflow: hidden;
}

.modalHead {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(2, 6, 23, .02);
}

.modalTitle {
  display: grid;
  gap: 2px;
}

.modalTitle b {
  font-size: 14px;
}

.modalTitle span {
  font-size: 12px;
  color: var(--muted);
}

.modalBody {
  padding: 14px 16px;
}

/* Tabs inside modal */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tab {
  border: 1px solid rgba(15, 23, 42, .12);
  background: #fff;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  font-size: 12px;
}

.tab.active {
  border-color: rgba(37, 99, 235, .35);
  background: rgba(37, 99, 235, .10);
}

.pane {
  display: none;
}

.pane.active {
  display: block;
}

/* Danger box (confirm actions) */
.dangerBox {
  border: 1px solid rgba(220, 38, 38, .20);
  background: rgba(220, 38, 38, .06);
  border-radius: var(--r);
  padding: 12px;
}

/* =========================================================
   Utilities
   ========================================================= */
.hidden {
  display: none !important;
}

/* =========================================================
   SIDEBAR READABILITY & HIGHLIGHT IMPROVEMENTS
   (Drop-in, no layout change)
   ========================================================= */

/* --------- Better sidebar font --------- */
.admin-sidebar,
.drawer {
  font-size: 14px;
  line-height: 1.35;
}

/* --------- Section titles (CORE / WALLET / SETTINGS) --------- */
.nav-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  color: #94a3b8;
  /* slate-400 */
  margin: 18px 10px 8px;
}

/* --------- Nav items --------- */
.nav-item,
.nav-group-btn {
  font-weight: 600;
  color: #0f172a;
}

/* Softer inactive items */
.nav-item:not(.active),
.nav-group-btn {
  color: #334155;
  /* slate-700 */
}

/* Hover clarity */
.nav-item:hover,
.nav-group-btn:hover {
  background: rgba(37, 99, 235, .06);
}

/* --------- Active item (VERY CLEAR) --------- */
.nav-item.active {
  position: relative;
  background: rgba(37, 99, 235, .12);
  color: #1d4ed8;
  font-weight: 800;
}

/* Left accent bar for active */
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg,
      var(--primary),
      var(--primary2));
}

/* --------- Group buttons (API / Security / etc.) --------- */
.nav-group-btn {
  font-weight: 700;
}

/* Group open state */
.nav-group-btn[aria-expanded="true"] {
  background: rgba(15, 23, 42, .04);
}

/* Caret clearer */
.nav-caret {
  font-size: 12px;
  opacity: .8;
}

/* --------- Group children indentation --------- */
.nav-group {
  padding-left: 18px;
  border-left: 1px dashed rgba(15, 23, 42, .10);
  margin-left: 8px;
}

/* Child items slightly smaller */
.nav-group .nav-item {
  font-size: 13px;
  padding: 8px 12px;
}

/* --------- Icons alignment --------- */
.nav-ico {
  width: 22px;
  opacity: .9;
}

/* --------- Optional: collapse visual noise on mobile --------- */
@media (max-width: 980px) {
  .nav-section-title {
    margin-top: 14px;
  }
}

/* =========================================================
   Extra: Color picker + Marquee preview (for marquees.php)
   ========================================================= */

.colorPick {
  width: 46px;
  min-width: 46px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0;
  cursor: pointer;
}

.colorPick::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 12px;
}

.colorPick::-webkit-color-swatch {
  border: none;
  border-radius: 12px;
}

.marqueePreview {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-weight: 900;
}

/* Marquee list: nicer wrapping */
.cell-wrap {
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.pill b {
  font-weight: 950;
}

/* ==============================
   Modal: fit viewport + scroll
   ============================== */

.modalBack {
  overflow: auto;
  padding: 18px;
}

/* Backdrop: allow scrolling when content taller than viewport */
.modalBack.open {
  overflow: auto;
  padding: 18px;
  /* breathing space on small screens */
}

/* Modal card: max height + flex layout */
.modalCard {
  max-height: calc(100vh - 36px);
  /* 18px top + 18px bottom */
  width: min(920px, 100%);
  display: flex;
  flex-direction: column;
}

/* Header stays visible */
.modalHead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

/* Body scrolls (this is the key) */
.modalBody {
  overflow: auto;
  padding: 16px;
  flex: 1 1 auto;
}

/* Keep actions reachable on long forms */
.modalBody .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  padding-bottom: 12px;
  margin-top: 14px;
}

/* Mobile: tighter padding */
@media (max-width: 640px) {
  .modalBack.open {
    padding: 10px;
  }

  .modalBody {
    padding: 12px;
  }
}