:root {
  --primary: #E00041;
  --primary-dark: #8B0020;
  --accent: #FF2C5C;
  --grad: linear-gradient(135deg, #FF2C5C 0%, #8B0020 100%);
  --heading: #1B1924;
  --text: #585661;
  --muted: #8A8893;
  --surface: #F8F8F8;
  --card: #FEFEFE;
  --border: #EBEBEB;
  --success: #00C950;
  --warning: #F0B100;
  --info: #00A6F4;
  --danger: #E00041;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(27, 25, 36, 0.06);
  --shadow-lg: 0 18px 48px rgba(27, 25, 36, 0.16);
  --sidebar-w: 264px;
  --font: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3, h4 { color: var(--heading); margin: 0; font-weight: 700; line-height: 1.3; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ltr { direction: ltr; unicode-bidi: embed; text-align: left; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: #fff; color: var(--heading); cursor: pointer; font-weight: 700; line-height: 1.2;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(224, 0, 65, .25); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(224, 0, 65, .35); }
.btn-outline { border-color: var(--border); background: #fff; color: var(--heading); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text); border-color: transparent; }
.btn-ghost:hover { background: rgba(224, 0, 65, .06); color: var(--primary); }
.btn-danger { background: #fff; color: var(--danger); border-color: rgba(224, 0, 65, .35); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-xs { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: #fff;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--heading); font-size: 18px;
}
.only-mobile { display: none; }

/* ---------- login ---------- */
.login-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(1200px 600px at 100% 0%, rgba(255, 44, 92, .12), transparent 60%),
              radial-gradient(900px 500px at 0% 100%, rgba(139, 0, 32, .10), transparent 60%), var(--surface);
}
.login-card {
  width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px 28px; box-shadow: var(--shadow-lg);
}
.login-card h1 { margin-top: 22px; }
.login-card .muted { margin: 4px 0 20px; }
.form-error {
  background: rgba(224, 0, 65, .08); color: var(--danger); border: 1px solid rgba(224, 0, 65, .25);
  padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 14px;
}

/* ---------- brand ---------- */
.brand-mark { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 13px; background: var(--grad); color: #fff; font-weight: 800;
  font-size: 22px; display: inline-flex; align-items: center; justify-content: center; letter-spacing: -1px;
  box-shadow: 0 8px 18px rgba(224, 0, 65, .3);
}
.brand-name { font-weight: 800; color: var(--heading); font-size: 18px; line-height: 1.1; }
.brand-sub { color: var(--muted); font-size: 12px; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--card); border-left: 1px solid var(--border); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-head { padding: 22px 20px 12px; display: flex; align-items: center; justify-content: space-between; }
.nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group { font-size: 11.5px; color: var(--muted); padding: 14px 12px 4px; letter-spacing: .3px; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--text);
  font-weight: 500; transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: rgba(224, 0, 65, .06); color: var(--primary); text-decoration: none; }
.nav a.active { background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(224, 0, 65, .22); font-weight: 700; }
.nav a.active .ic { background: rgba(255, 255, 255, .9); }
.ic {
  width: 20px; height: 20px; display: inline-block; background: currentColor; flex: none; opacity: .9;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
}
.ic-home { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-8 9 8v10a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
.ic-users { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.ic-coach { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 5v14M18 5v14M3 8v8M21 8v8M6 12h12'/%3E%3C/svg%3E"); }
.ic-club { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V7l7-4 7 4v14M9 21v-6h6v6M9 11h.01M15 11h.01'/%3E%3C/svg%3E"); }
.ic-image { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E"); }
.ic-sport { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 3a15 15 0 0 1 0 18M12 3a15 15 0 0 0 0 18M3 12h18'/%3E%3C/svg%3E"); }
.ic-pin { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13S3 17 3 10a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.ic-calendar { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); }
.ic-card { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E"); }
.ic-cog { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E"); }
.ic-lock { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
.ic-tag { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'/%3E%3Cpath d='M7 7h.01'/%3E%3C/svg%3E"); }
.ic-bell { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E"); }

.sidebar-foot { padding: 14px 16px 20px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.admin-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; border-radius: 20px; }
.admin-meta { min-width: 0; }
.admin-name { font-weight: 700; color: var(--heading); font-size: 14px; }
.admin-email { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: rgba(248, 248, 248, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.topbar h2 { flex: 1; font-size: 21px; }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.content { padding: 24px 28px 48px; max-width: 1400px; width: 100%; }
.overlay { display: none; position: fixed; inset: 0; background: rgba(27, 25, 36, .45); z-index: 29; }

/* ---------- cards / stats ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 20px; }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head h3 { flex: 1; }
.grid { display: grid; gap: 16px; }
.grid > *, .card, .main, .content { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 16px;
  box-shadow: var(--shadow); position: relative; overflow: hidden; display: block; color: inherit;
}
.stat:hover { text-decoration: none; border-color: rgba(224, 0, 65, .35); }
.stat::after { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { color: var(--heading); font-size: 30px; font-weight: 800; line-height: 1.2; margin-top: 2px; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.stats > * { min-width: 0; }
.stat.info::after { background: var(--info); }
.stat.success::after { background: var(--success); }
.stat.warning::after { background: var(--warning); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; min-width: 640px; }
table.table.compact { min-width: 0; }
.table th, .table td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 12.5px; color: var(--muted); font-weight: 700; background: #FCFCFC; white-space: nowrap; }
.table tbody tr:hover { background: rgba(224, 0, 65, .025); }
.table td.actions { white-space: nowrap; text-align: left; }
.table td.actions .btn + .btn { margin-inline-start: 4px; }
.table .thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface); border: 1px solid var(--border); display: inline-block; }
.table .thumb.wide { width: 84px; height: 44px; }
.table .thumb.ph { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 800; }
.cell-main { font-weight: 700; color: var(--heading); }
.cell-sub { font-size: 12.5px; color: var(--muted); }
.table-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.table-toolbar .search { flex: 1 1 220px; min-width: 180px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.pager { display: flex; gap: 6px; align-items: center; }
.pager .btn { min-width: 36px; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--heading); font-size: 16px; margin-bottom: 4px; }
.loading { padding: 32px; text-align: center; color: var(--muted); }
.spinner {
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary);
  animation: spin .8s linear infinite; margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; }
.badge-success { background: rgba(0, 201, 80, .12); color: #0A8F3F; }
.badge-warning { background: rgba(240, 177, 0, .16); color: #9A6E00; }
.badge-info { background: rgba(0, 166, 244, .12); color: #0072A8; }
.badge-danger { background: rgba(224, 0, 65, .10); color: var(--danger); }
.badge-muted { background: #F0F0F2; color: var(--muted); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span, .field > label { font-size: 13.5px; font-weight: 700; color: var(--heading); }
.field .help { font-size: 12px; color: var(--muted); font-weight: 400; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="number"],
.field input[type="date"], .field input[type="time"], .field input[type="search"], .field input[type="tel"], .field input[type="url"],
.field select, .field textarea, .input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; color: var(--heading);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(224, 0, 65, .12); }
.field textarea { min-height: 96px; resize: vertical; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; }
.field.inline input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .span-2 { grid-column: span 2; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; color: var(--heading); font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: #D9D9DE; position: relative; transition: background .15s ease; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s ease; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--success); }
.switch input:checked + .track::after { transform: translateX(-18px); }
.image-field { display: flex; gap: 14px; align-items: center; }
.image-field .preview { width: 92px; height: 92px; border-radius: 14px; border: 1px dashed var(--border); background: var(--surface); object-fit: cover; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; overflow: hidden; flex: none; }
.image-field .preview.wide { width: 170px; height: 86px; }
.image-field .preview img { width: 100%; height: 100%; object-fit: cover; }
.image-field input[type="file"] { display: none; }
.pick-list { border: 1px solid var(--border); border-radius: var(--radius-sm); max-height: 200px; overflow-y: auto; background: #fff; }
.pick-list .item { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
.pick-list .item:last-child { border-bottom: 0; }
.pick-list .item:hover, .pick-list .item.active { background: rgba(224, 0, 65, .06); }
.picked { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(0, 201, 80, .4); background: rgba(0, 201, 80, .06); border-radius: var(--radius-sm); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.filters .field { margin: 0; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(27, 25, 36, .5); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--card); border-radius: 18px; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
.modal.lg { max-width: 860px; }
.modal.sm { max-width: 440px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.modal-head h3 { flex: 1; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-start; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }

/* ---------- toast ---------- */
.toast-root { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 40px); }
.toast { background: var(--heading); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 500; animation: pop .18s ease; border-inline-start: 4px solid var(--info); max-width: 380px; }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--accent); }
.toast.warning { border-color: var(--warning); }

/* ---------- detail pages ---------- */
.detail-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.detail-head .meta { flex: 1; min-width: 200px; }
.detail-head .meta h2 { font-size: 22px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 18px; }
.kv .k { font-size: 12px; color: var(--muted); }
.kv .v { font-weight: 700; color: var(--heading); word-break: break-word; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 8px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 12px 14px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gallery .g-item { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); aspect-ratio: 4 / 3; }
.gallery .g-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .g-item .g-actions { position: absolute; inset-inline: 0; bottom: 0; display: flex; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.6)); justify-content: center; }
.gallery .g-item .g-actions .btn { background: rgba(255,255,255,.92); }
.gallery .g-item.cover::before { content: 'الغلاف'; position: absolute; top: 8px; inset-inline-start: 8px; background: var(--grad); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 999px; z-index: 1; }
.tier-row { display: grid; grid-template-columns: 1fr 140px 90px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tier-row:last-child { border-bottom: 0; }
.hours-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.hours-row .field { margin: 0; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: center; }
.list-plain li:last-child { border-bottom: 0; }
.slider-card { display: grid; grid-template-columns: 220px 1fr auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.slider-card img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 10px; background: var(--surface); }
.slider-card .order-btns { display: flex; flex-direction: column; gap: 4px; }
.notice { padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(0, 166, 244, .08); color: #0072A8; border: 1px solid rgba(0, 166, 244, .25); font-size: 13.5px; }
.notice.warn { background: rgba(240, 177, 0, .1); color: #8A6300; border-color: rgba(240, 177, 0, .35); }
.settings-row { display: grid; grid-template-columns: 220px 1fr 90px 44px; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: 0; }
.settings-row textarea { min-height: 44px; }
.settings-row .field { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: #F2F2F4; padding: 2px 6px; border-radius: 6px; direction: ltr; unicode-bidi: embed; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .only-mobile { display: inline-flex; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; right: 0; width: min(84vw, 300px); transform: translateX(100%); transition: transform .2s ease; z-index: 30; box-shadow: none; }
  body.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.sidebar-open .overlay { display: block; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar h2 { font-size: 18px; flex: 1 1 140px; }
  .topbar-actions { flex-basis: 100%; justify-content: flex-start; }
  .topbar-actions:empty { display: none; }
  .content { padding: 16px 16px 40px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .slider-card { grid-template-columns: 1fr; }
  .slider-card .order-btns { flex-direction: row; }
  .settings-row { grid-template-columns: 1fr; }
  .tier-row { grid-template-columns: 1fr 110px 70px; }
  .hours-row { grid-template-columns: 1fr 1fr; }
  .modal { max-height: calc(100vh - 16px); border-radius: 16px; }
  .modal-backdrop { padding: 8px; align-items: flex-end; }
  .table-foot { justify-content: center; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px 14px 12px; }
  .btn { padding: 9px 14px; }
  .stat .value { font-size: 26px; }
  .login-card { padding: 26px 20px; }
}
.q-row { grid-template-columns: 1.4fr 1fr auto; }
.q-row-actions { display: flex; gap: 4px; }
@media (max-width: 700px) { .q-row { grid-template-columns: 1fr; } }
/* v1.3: stepped modals (club wizard, package subscription) reuse tabs + pick-list */
.wizard-steps { padding: 0; margin-bottom: 18px; }
.wizard-steps button { padding: 10px 12px; }
.coach-pick { max-height: 300px; }
.coach-pick .item { display: flex; align-items: center; gap: 10px; }
.coach-pick .item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.coach-pick .field { margin: 0; flex: 0 0 190px; }
@media (max-width: 700px) { .coach-pick .item { flex-wrap: wrap; } .coach-pick .field { flex-basis: 100%; } }
