/* ============================================
   Wedding Announcements — Mobile-First Design System
   ============================================ */

:root {
  --bg: #f7f8fb;
  --bg-elev: #ffffff;
  --bg-soft: #f2f4f8;
  --border: #dadfe8;
  --border-strong: #b8c0cf;
  --border-dashed: #9ba3b6;
  --text: #0f172a;
  --text-soft: #3b475c;
  --text-muted: #64748b;

  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-soft: #eef2ff;
  --accent: #b45309;
  --accent-soft: #fef3c7;

  --success: #047857;
  --success-soft: #d1fae5;
  --danger: #be123c;
  --danger-soft: #ffe4e6;
  --warning: #b45309;
  --warning-soft: #fef3c7;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -16px rgba(15, 23, 42, 0.18), 0 8px 16px -8px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 0 4px rgba(29, 78, 216, 0.12);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 0.25s var(--ease);

  --font: "Tajawal", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;

  --topbar-h: 64px;
  --bottomnav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="dark"] {
  --bg: #0b1020;
  --bg-elev: #111733;
  --bg-soft: #161d3d;
  --border: #2a3258;
  --border-strong: #3a4373;
  --border-dashed: #4a5489;
  --text: #e6e9f4;
  --text-soft: #c5cce0;
  --text-muted: #8b94b2;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-soft: rgba(99, 102, 241, 0.12);
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.12);
  --success-soft: rgba(16, 185, 129, 0.12);
  --danger-soft: rgba(244, 63, 94, 0.12);
  --warning-soft: rgba(245, 158, 11, 0.14);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.32);
  --shadow-lg: 0 20px 40px -16px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  direction: rtl;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t), color var(--t);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============ TOPBAR ============ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 24px;
  max-width: 1400px;
  margin: 0 auto;
  height: var(--topbar-h);
}
.topbar-brand {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: var(--shadow-md);
}
.brand-text { line-height: 1.2; }
.brand-name { font-weight: 700; font-size: 14.5px; }
.brand-sub { font-size: 11px; color: var(--text-muted); }

.topbar-nav {
  display: flex; align-items: center; gap: 2px;
  margin: 0 6px;
}
.topbar-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 13.5px;
  transition: all var(--t);
}
.topbar-nav a svg { width: 17px; height: 17px; }
.topbar-nav a:hover { background: var(--bg-soft); color: var(--text); }
.topbar-nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.topbar-actions {
  display: flex; align-items: center; gap: 6px;
  margin-inline-start: auto;
}
.search {
  position: relative;
  display: flex; align-items: center;
  width: 240px;
}
.search input {
  width: 100%;
  padding: 9px 38px 9px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  transition: all var(--t);
  font-family: inherit;
}
.search input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-elev);
  box-shadow: var(--shadow-glow);
  width: 320px;
}
.search-icon {
  position: absolute;
  inset-inline-end: 12px;
  color: var(--text-muted);
  pointer-events: none;
  width: 15px; height: 15px;
}

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  display: grid; place-items: center;
  color: var(--text-soft);
  transition: all var(--t);
  flex-shrink: 0;
}
.icon-btn:hover {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--text);
}
.icon-btn svg { width: 18px; height: 18px; }

/* ============ MOBILE SEARCH OVERLAY ============ */
.mobile-search {
  display: none;
  position: relative;
  padding: 8px 14px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
}
.mobile-search.open { display: flex; align-items: center; gap: 8px; animation: slide-down 0.2s var(--ease); }
@keyframes slide-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mobile-search input {
  flex: 1;
  padding: 11px 38px 11px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
}
.mobile-search input:focus { outline: none; border-color: var(--primary); }
.mobile-search .search-icon {
  position: absolute;
  inset-inline-end: 65px;
}

/* ============ BOTTOM NAV (MOBILE) ============ */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; inset-inline: 0;
  background: color-mix(in srgb, var(--bg-elev) 96%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 4px 4px calc(4px + var(--safe-bottom));
  z-index: 90;
  height: calc(var(--bottomnav-h) + var(--safe-bottom));
  justify-content: space-around;
  box-shadow: 0 -4px 12px rgba(15,23,42,0.04);
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s var(--ease);
  position: relative;
  min-height: 52px;
}
.bottom-nav a svg { width: 22px; height: 22px; transition: transform 0.2s var(--ease); }
.bottom-nav a:active { background: var(--bg-soft); }
.bottom-nav a:active svg { transform: scale(0.92); }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a.active::before {
  content: "";
  position: absolute; top: 4px;
  inset-inline: 24%;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

/* ============ PAGE LAYOUT ============ */
.main { min-height: 100vh; }
.page {
  padding: 28px 24px;
  max-width: 1400px;
  margin: 0 auto;
  animation: fade-up 0.4s var(--ease);
}
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-head { margin-bottom: 24px; }
.page-title {
  font-size: 26px; font-weight: 800; margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.page-sub { color: var(--text-soft); font-size: 14px; margin: 0; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 10px; flex-wrap: wrap;
}
.section-title { font-size: 16px; font-weight: 700; margin: 0; }

/* ============ STATS ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: all var(--t);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.stat-head {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--text-soft); font-size: 13px; font-weight: 500;
  margin-bottom: 12px;
}
.stat-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--bg-soft);
  display: grid; place-items: center;
  color: var(--primary);
}
.stat-icon svg { width: 17px; height: 17px; }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stat-foot { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* ============ CARD ============ */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: all var(--t);
}

/* ============ HERO ============ */
.hero {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 22px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hero::before {
  content: "";
  position: absolute;
  inset-inline-end: -120px; top: -120px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--primary-soft), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset-inline-start: -100px; bottom: -100px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  margin-bottom: 12px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}
.hero-title {
  font-size: 28px; font-weight: 800; margin: 0 0 8px;
  letter-spacing: -0.025em;
  background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 70%, var(--primary)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.25;
}
.hero-desc { color: var(--text-soft); font-size: 14.5px; line-height: 1.75; margin: 0 0 18px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--t);
  background: transparent;
  color: var(--text);
  white-space: nowrap;
  min-height: 42px;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px -4px var(--primary);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-ghost {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-elev); border-color: var(--border-strong); }
.btn-outline {
  border-color: var(--border-strong);
  background: var(--bg-elev);
}
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
  box-shadow: 0 4px 12px -4px rgba(37, 211, 102, 0.5);
}
.btn-whatsapp:hover:not(:disabled) {
  background: #1faa54;
  border-color: #1faa54;
  color: #fff;
}
.btn.btn-sm { padding: 7px 12px; font-size: 12.5px; min-height: 34px; gap: 6px; }
.btn.btn-sm svg { width: 14px; height: 14px; }
.btn.btn-lg { padding: 13px 22px; font-size: 15px; min-height: 48px; }

/* ============ TABLE ============ */
.table-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 10px; flex-wrap: wrap;
}
.table-head-left { display: flex; align-items: center; gap: 10px; }
.table-head-count {
  padding: 2px 9px;
  background: var(--bg-soft);
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: var(--text-soft);
}
.table-tools { display: flex; gap: 8px; flex-wrap: wrap; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data th {
  text-align: start;
  padding: 13px 20px;
  background: var(--bg-soft);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  cursor: pointer;
  user-select: none;
  transition: background var(--t);
}
table.data th:hover { background: var(--bg-elev); color: var(--text); }
table.data th .th-content { display: inline-flex; align-items: center; gap: 6px; }
table.data th.sorted .th-content::after {
  content: "▲";
  font-size: 9px;
  color: var(--primary);
}
table.data th.sorted.desc .th-content::after { content: "▼"; }
table.data td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
table.data tbody tr { transition: background var(--t); }
table.data tbody tr:hover { background: var(--bg-soft); }
table.data tbody tr:last-child td { border-bottom: 0; }

.cell-name { display: flex; align-items: center; gap: 10px; }
.cell-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  display: grid; place-items: center;
  color: var(--primary); font-weight: 700;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.cell-meta { line-height: 1.35; }
.cell-meta b { font-weight: 600; }
.cell-meta small { color: var(--text-soft); font-size: 12px; display: block; }

.date-pill {
  display: inline-flex; flex-direction: column;
  align-items: center; padding: 6px 10px;
  background: var(--bg-soft);
  border-radius: 10px;
  min-width: 56px;
  line-height: 1.15;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.date-pill .d-day { font-weight: 700; font-size: 18px; color: var(--text); }
.date-pill .d-mon {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 600;
  white-space: nowrap;
  margin-top: 1px;
}

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  border: 1px solid transparent;
}
.badge-pending { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 20%, transparent); }
.badge-approved { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 20%, transparent); }
.badge-soon { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 20%, transparent); }
.badge-day { background: var(--primary-soft); color: var(--primary); }

.row-actions { display: flex; gap: 4px; }
.row-actions .icon-btn { width: 34px; height: 34px; }

/* ============ FORM ============ */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px; font-weight: 600; color: var(--text-soft);
}
.field label .req { color: var(--danger); }
.field input, .field select, .field textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  transition: all var(--t);
  width: 100%;
  min-height: 46px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.field .hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.field.error input, .field.error select, .field.error textarea { border-color: var(--danger); }
.field .err {
  font-size: 12px; color: var(--danger);
  display: none; align-items: center; gap: 4px;
}
.field.error .err { display: flex; }

/* ============ CITY PICKER ============ */
.city-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 220px;
  overflow-y: auto;
}
.city-option {
  padding: 8px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all var(--t);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.city-option:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.city-option.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px -2px var(--primary);
}
.city-option.selected::before {
  content: "✓";
  margin-inline-end: 4px;
  font-weight: 700;
}

/* ============ HIJRI PICKER ============ */
.hijri-picker {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.hijri-selects {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 8px;
}
.hp-field { display: flex; flex-direction: column; gap: 4px; }
.hp-field label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hp-field select {
  padding: 13px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elev);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: left 10px center;
  background-size: 14px;
  padding-inline-start: 30px;
  cursor: pointer;
  min-height: 48px;
  transition: all var(--t);
}
.hp-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.hijri-preview {
  padding: 11px 13px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 5px;
}
.hp-row {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px;
}
.hp-row.text-soft { color: var(--text-soft); }
.hp-hijri-text { font-size: 14.5px; font-weight: 700; color: var(--text); }

/* ============ MODAL ============ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: fade-in 0.25s var(--ease);
}
.modal-backdrop.show { display: flex; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 560px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: pop 0.3s var(--ease);
  overflow: hidden;
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
}
.modal-title { font-size: 16px; font-weight: 700; margin: 0; }
.modal-body { padding: 22px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1 1 auto; min-height: 0; }
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-start;
  background: var(--bg-soft);
  flex-shrink: 0;
}
/* When a form wraps body+foot inside modal, propagate flex */
.modal > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* ============ TOAST ============ */
.toasts {
  position: fixed; bottom: 20px; inset-inline-start: 20px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9999;
}
.toast {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 260px; max-width: 360px;
  animation: slide-in 0.3s var(--ease);
  border-left: 3px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warning); }
.toast .toast-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
  flex-shrink: 0;
}
.toast.success .toast-icon { background: var(--success-soft); color: var(--success); }
.toast.error .toast-icon { background: var(--danger-soft); color: var(--danger); }
.toast.warn .toast-icon { background: var(--warning-soft); color: var(--warning); }
.toast .toast-icon svg { width: 15px; height: 15px; }
.toast .toast-body { line-height: 1.4; }
.toast .toast-title { font-weight: 700; font-size: 13px; }
.toast .toast-msg { font-size: 12.5px; color: var(--text-soft); }
.toast.hide { animation: slide-out 0.25s var(--ease) forwards; }
@keyframes slide-in { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }
@keyframes slide-out { to { opacity: 0; transform: translateX(-20px); } }

.toast-close {
  background: transparent;
  border: 0;
  width: 24px; height: 24px;
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t);
  margin-inline-start: 4px;
}
.toast-close:hover { background: var(--bg-soft); color: var(--text); }
.toast-close svg { width: 14px; height: 14px; }

/* Prominent toast — for celebratory success states */
.toast.prominent {
  min-width: 320px;
  max-width: 480px;
  padding: 18px 20px;
  gap: 14px;
  border-left-width: 4px;
  box-shadow: 0 24px 60px -16px rgba(15, 23, 42, 0.32), 0 8px 24px -8px rgba(15, 23, 42, 0.18);
  animation: toast-pop 0.5s var(--ease);
  position: relative;
  overflow: hidden;
}
.toast.prominent::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, color-mix(in srgb, var(--success) 8%, transparent) 50%, transparent 70%);
  pointer-events: none;
}
.toast.prominent .toast-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  animation: icon-pulse 1.4s var(--ease) infinite;
}
.toast.prominent .toast-icon svg {
  width: 24px; height: 24px;
}
.toast.prominent .toast-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.toast.prominent .toast-msg {
  font-size: 13.5px;
  line-height: 1.6;
}
@keyframes toast-pop {
  0% { opacity: 0; transform: translateX(-30px) scale(0.85); }
  50% { opacity: 1; transform: translateX(6px) scale(1.04); }
  100% { transform: translateX(0) scale(1); }
}
@keyframes icon-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 50%, transparent); }
  50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--success) 0%, transparent); }
}
@media (max-width: 720px) {
  .toast.prominent { min-width: 0; padding: 16px; gap: 12px; }
  .toast.prominent .toast-icon { width: 42px; height: 42px; }
  .toast.prominent .toast-title { font-size: 15px; }
}

/* ============ SKELETON ============ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-soft) 25%, color-mix(in srgb, var(--bg-soft) 50%, var(--border)) 50%, var(--bg-soft) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 8px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ============ EMPTY STATE ============ */
.empty {
  padding: 56px 20px;
  text-align: center;
  color: var(--text-soft);
}
.empty-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: grid; place-items: center;
  margin: 0 auto 14px;
  color: var(--text-muted);
}
.empty-icon svg { width: 28px; height: 28px; }
.empty h3 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.empty p { margin: 0 0 16px; font-size: 13.5px; }

/* ============ TABS ============ */
.tabs {
  display: flex; gap: 4px;
  padding: 4px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  width: fit-content;
  flex-wrap: wrap;
  max-width: 100%;
  overflow-x: auto;
}
.tabs button {
  background: transparent; border: 0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--text-soft);
  transition: all var(--t);
  white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button.active {
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.tabs button .count {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 7px;
  background: var(--bg-soft);
  border-radius: 999px;
  font-size: 11px;
}
.tabs button.active .count { background: var(--primary-soft); color: var(--primary); }

/* ============ MOBILE CARDS ============ */
.cards-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.wd-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 12px;
  transition: all var(--t);
}
.wd-card:active { transform: scale(0.99); }
.wd-card-head { display: flex; align-items: flex-start; gap: 12px; }
.wd-card-head .cell-avatar { width: 42px; height: 42px; font-size: 16px; }
.wd-card-name { font-weight: 700; font-size: 15px; line-height: 1.35; }
.wd-card-sub { color: var(--text-soft); font-size: 12px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 5px; }
.wd-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wd-card-cell {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 9px 11px;
}
.wd-card-cell .label {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 700;
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 4px;
  letter-spacing: 0.01em;
}
.wd-card-cell .value { font-size: 13px; font-weight: 600; color: var(--text); }
.wd-card-cell.full { grid-column: 1 / -1; }
.wd-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1.5px dashed var(--border-dashed);
}

/* ============ REFRESH BUTTON SPIN ============ */
.refresh-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  transform-origin: 50% 50%;
  will-change: transform;
  line-height: 1;
}
.refresh-icon-wrap svg {
  width: 16px;
  height: 16px;
  display: block;
}
.refresh-icon-wrap.spinning {
  animation: refresh-spin 0.75s linear infinite;
}
@keyframes refresh-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

/* ============ IMAGE VIEWER ============ */
.img-viewer {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.94);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 64px 12px 12px;
}
.img-viewer.open {
  display: flex;
  animation: fade-in 0.2s var(--ease);
}
.img-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  -webkit-touch-callout: default !important; /* keep long-press menu on iOS */
}
.iv-toolbar {
  position: absolute;
  top: 12px; inset-inline-start: 12px; inset-inline-end: 12px;
  display: flex;
  gap: 8px;
  z-index: 2;
  justify-content: flex-end;
}
.iv-toolbar .btn-ghost,
.iv-toolbar .btn-primary {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.iv-toolbar .btn-ghost {
  background: rgba(255,255,255,0.14);
  color: #fff;
  border-color: rgba(255,255,255,0.22);
}
.iv-toolbar .btn-ghost:hover {
  background: rgba(255,255,255,0.24);
  border-color: rgba(255,255,255,0.38);
}

/* Prominent save instruction banner */
.iv-hint-top {
  position: absolute;
  top: 64px;
  inset-inline-start: 12px;
  inset-inline-end: 12px;
  background: linear-gradient(135deg, #1d4ed8, #b45309);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 12px 30px -8px rgba(29, 78, 216, 0.55);
  z-index: 2;
  animation: iv-hint-pulse 2.4s var(--ease) infinite;
}
.iv-hint-top.hidden { display: none; }
.iv-hint-top .iv-finger {
  font-size: 28px;
  line-height: 1;
  animation: iv-finger-tap 1.6s var(--ease) infinite;
  flex-shrink: 0;
}
.iv-hint-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.iv-hint-text b { font-weight: 800; font-size: 14px; }
.iv-hint-text span { font-size: 12.5px; opacity: 0.95; }
.iv-hint-close {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 0;
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s var(--ease);
}
.iv-hint-close:hover { background: rgba(255,255,255,0.32); }
.iv-hint-close svg { width: 12px; height: 12px; }

@keyframes iv-hint-pulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 12px 30px -8px rgba(29, 78, 216, 0.55); }
  50%      { transform: translateY(-3px); box-shadow: 0 16px 36px -8px rgba(29, 78, 216, 0.75); }
}
@keyframes iv-finger-tap {
  0%, 100% { transform: scale(1) translateY(0); }
  30%      { transform: scale(1.2) translateY(2px); }
  60%      { transform: scale(1) translateY(0); }
}

@media (max-width: 720px) {
  .img-viewer { padding: 56px 8px 8px; }
  .iv-hint-top { top: 56px; padding: 10px 12px; }
  .iv-hint-text b { font-size: 13px; }
  .iv-hint-text span { font-size: 11.5px; }
  .iv-hint-top .iv-finger { font-size: 24px; }
}

/* ============ ICS BUTTON (on cards) ============ */
.btn-ics {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 2px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-soft);
  background: transparent;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--t);
  flex-shrink: 0;
}
.btn-ics svg { opacity: 0.7; transition: opacity var(--t); }
.btn-ics:hover { color: var(--primary); }
.btn-ics:hover svg { opacity: 1; }
.btn-ics:active { opacity: 0.7; }

/* ============ MONTH DIVIDER ============ */
/* Mobile cards divider */
.month-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin: 4px 0 6px;
  background: linear-gradient(90deg, var(--primary-soft), transparent 80%);
  border-radius: var(--radius);
  border-inline-start: 4px solid var(--primary);
  position: sticky;
  top: 64px;
  z-index: 5;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.month-divider:first-child { margin-top: 0; }
.month-divider-icon { font-size: 18px; line-height: 1; }
.month-divider-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.01em;
}
.month-divider-num {
  font-size: 12px;
  color: color-mix(in srgb, var(--primary) 80%, var(--text-soft));
  font-weight: 600;
  letter-spacing: 0.2px;
}
.month-divider-count {
  margin-inline-start: auto;
  padding: 3px 11px;
  background: var(--bg-elev);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

/* Desktop table divider row */
.month-divider-row td {
  background: linear-gradient(90deg, var(--primary-soft), transparent 70%) !important;
  padding: 12px 20px !important;
  border-top: 2px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-bottom: 1px solid var(--border);
}
.month-divider-row:hover td { background: linear-gradient(90deg, var(--primary-soft), transparent 70%) !important; }
.month-divider-row .month-divider-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============ COUNTDOWN ============ */
.countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-soft);
}
.countdown.soon { color: var(--danger); }
.countdown.today-label {
  color: var(--accent);
  font-weight: 800;
  font-size: 14px;
  padding: 4px 10px;
  background: var(--accent-soft);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  animation: today-pulse 2.5s var(--ease) infinite;
}
@keyframes today-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); }
}

/* ============ NEW BADGE + HIGHLIGHT (within 48h) ============ */
.badge-new {
  background: linear-gradient(90deg, #06b6d4, #0891b2);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.2px;
  animation: badge-new-pulse 2.2s var(--ease) infinite;
  box-shadow: 0 2px 6px -2px rgba(6, 182, 212, 0.5);
}
@keyframes badge-new-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.55), 0 2px 6px -2px rgba(6, 182, 212, 0.5); }
  50%      { box-shadow: 0 0 0 7px rgba(6, 182, 212, 0),    0 2px 6px -2px rgba(6, 182, 212, 0.5); }
}

/* New card soft highlight (only when NOT also today — today wins) */
.wd-card.is-new:not(.is-today) {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.10), var(--bg-elev) 65%);
  border-color: color-mix(in srgb, #06b6d4 35%, var(--border));
  position: relative;
}
.wd-card.is-new:not(.is-today)::before {
  content: "";
  position: absolute;
  inset-inline-start: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #06b6d4, #0891b2);
}
tr.is-new:not(.is-today) {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.10), transparent 65%);
}
tr.is-new:not(.is-today) td:first-child {
  border-inline-start: 3px solid #06b6d4;
}

/* Slide-in animation on page load — only for new entries */
.wd-card.is-new, tr.is-new {
  animation: card-slide-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
@keyframes card-slide-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Stat card variant for "new" */
.stat.stat-new {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  border-color: transparent;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px -8px rgba(6, 182, 212, 0.5);
}
.stat.stat-new .stat-head span { color: rgba(255, 255, 255, 0.96); font-weight: 700; }
.stat.stat-new .stat-value { color: #fff; }
.stat.stat-new .stat-foot { color: rgba(255, 255, 255, 0.86); }
.stat.stat-new .stat-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.stat.stat-new::after {
  content: "✨";
  position: absolute;
  bottom: -18px; inset-inline-end: -10px;
  font-size: 86px;
  opacity: 0.14;
  pointer-events: none;
  line-height: 1;
}
.stat.stat-new:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(6, 182, 212, 0.6);
}

/* ============ TODAY HIGHLIGHT (Card + Row) ============ */
.wd-card.is-today {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-elev) 60%);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 40%, transparent), 0 4px 12px -4px rgba(15,23,42,0.06);
  position: relative;
  overflow: hidden;
}
.wd-card.is-today::before {
  content: "";
  position: absolute;
  inset-inline-start: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 60%, transparent));
}
.wd-card.is-today::after {
  content: "✨ مناسبة اليوم";
  position: absolute;
  top: 10px; inset-inline-end: 10px;
  padding: 4px 11px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px -4px var(--accent);
}
.wd-card.is-today .wd-card-head { padding-top: 4px; }
tr.is-today {
  background: linear-gradient(90deg, var(--accent-soft), transparent 60%);
  position: relative;
}
tr.is-today td:first-child {
  border-inline-start: 3px solid var(--accent);
}
tr.is-today .cell-meta b::after {
  content: "✨";
  margin-inline-start: 6px;
  font-size: 14px;
}

/* ============ DB CHIP ============ */
.db-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  color: var(--text-soft);
}
.db-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
}

/* ============ AUTH ============ */
.auth-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 20px;
  background: radial-gradient(ellipse at top, var(--primary-soft), transparent 60%), var(--bg);
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
}
.auth-card .brand-logo { margin-bottom: 16px; }
.auth-card h1 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.auth-card p { color: var(--text-soft); margin: 0 0 20px; font-size: 13.5px; }

/* ============ UTILITY ============ */
.hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.text-muted { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 18px; }
.gap-2 { gap: 8px; }
.desktop-only { display: flex; }
.mobile-only { display: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ====================================================
   ============ RESPONSIVE BREAKPOINTS ================
   ==================================================== */

/* show desktop table, hide mobile cards by default */
.data-cards-mobile { display: none; }
.data-table-desktop { display: block; }

@media (max-width: 980px) {
  .topbar-nav { display: none; }
  .topbar-brand .brand-sub { display: none; }
  .topbar-inner { padding: 10px 14px; gap: 10px; }
  .search { display: none; }

  .mobile-only { display: grid; }
  .desktop-only { display: none; }

  /* show bottom nav on mobile */
  .bottom-nav { display: flex; }

  /* reserve bottom space for nav */
  body { padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom)); }

  /* toast above bottom nav */
  .toasts { bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 12px); inset-inline-start: 12px; inset-inline-end: 12px; }
  .toast { min-width: 0; max-width: 100%; }

  /* convert table to cards on mobile */
  .data-table-desktop { display: none; }
  .data-cards-mobile { display: block; }
}

@media (max-width: 720px) {
  body { font-size: 14px; }
  .page { padding: 16px 12px; }
  .page-title { font-size: 22px; }
  .page-sub { font-size: 13px; }
  .page-head { margin-bottom: 18px; }

  .topbar-inner { padding: 8px 12px; height: 58px; gap: 8px; }
  .brand-logo { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }
  .brand-name { font-size: 14px; }

  .hero { padding: 20px 18px; border-radius: 18px; margin-bottom: 16px; }
  .hero-title { font-size: 22px; }
  .hero-desc { font-size: 13.5px; line-height: 1.7; margin-bottom: 14px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { flex: 1; justify-content: center; padding: 11px 12px; font-size: 13.5px; min-height: 44px; }
  .hero::before, .hero::after { width: 200px; height: 200px; }

  .stats { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
  .stat { padding: 14px; border-radius: 14px; }
  .stat-value { font-size: 22px; }
  .stat-head { font-size: 12px; margin-bottom: 10px; }
  .stat-icon { width: 30px; height: 30px; }
  .stat-icon svg { width: 14px; height: 14px; }
  .stat-foot { font-size: 11px; }

  .table-head { padding: 14px 16px; }
  .section-title { font-size: 15px; }

  .btn.btn-lg { padding: 11px 16px; font-size: 14px; min-height: 46px; }
  .btn { padding: 10px 14px; font-size: 13.5px; min-height: 42px; }
  .btn.btn-sm { padding: 6px 11px; font-size: 12px; min-height: 32px; }

  .modal { max-height: 92vh; border-radius: 18px 18px 0 0; align-self: flex-end; max-width: 100%; margin-bottom: var(--bottomnav-h); }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-head { padding: 16px 18px; }
  .modal-body { padding: 18px; }
  .modal-foot { padding: 14px 18px; flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; justify-content: center; }

  .hijri-selects { grid-template-columns: 1fr 1.4fr 1fr; gap: 6px; }
  .hp-field select { font-size: 14.5px; padding: 12px 8px; padding-inline-start: 26px; }
  .hp-field label { font-size: 10px; }

  .form-grid { grid-template-columns: 1fr; gap: 14px; }

  .auth-card { padding: 24px 20px; border-radius: 18px; }
}

@media (max-width: 420px) {
  .topbar-actions { gap: 4px; }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn svg { width: 17px; height: 17px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 20px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .table-head { flex-direction: column; align-items: stretch; }
  .table-head-left { justify-content: space-between; width: 100%; }
  .table-tools { width: 100%; }
  .table-tools .btn, .table-tools .db-chip { flex: 1; justify-content: center; }
  .bottom-nav a { font-size: 10.5px; }
  .bottom-nav a span { font-size: 10.5px; }
}
