/* Sadiba — shared tokens and components (customer app + admin panel) */
:root {
  --m-50: #FFF1F8;
  --m-100: #FDE2F0;
  --m-200: #F9C3E0;
  --m-400: #EE4FA0;
  --m-500: #E0187F;
  --m-600: #C3127A;
  --m-700: #9C0F68;
  --v-500: #8B2BB8;
  --v-600: #6E1E9E;
  --v-700: #521579;
  --v-900: #2A0B3A;
  --grad: linear-gradient(135deg, #F2268A 0%, #C8148A 42%, #7A21A8 100%);
  --grad-soft: linear-gradient(135deg, #FFF0F8 0%, #F7E9FF 100%);
  --ink: #26102F;
  --ink-2: #4B3555;
  --muted: #86728F;
  --line: #EFE3F0;
  --line-2: #E5D3E8;
  --bg: #FBF4FA;
  --card: #FFFFFF;
  --ok: #14A15A;
  --ok-bg: #E4F7EC;
  --warn: #D98A06;
  --warn-bg: #FFF4DC;
  --bad: #E0384B;
  --bad-bg: #FDE8EB;
  --info: #3A66DB;
  --info-bg: #E9EFFD;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(64, 12, 70, .05), 0 8px 24px rgba(120, 20, 110, .07);
  --shadow-lg: 0 18px 50px rgba(110, 20, 120, .18);
  --font: 'Poppins', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-bn: 'Hind Siliguri', 'Poppins', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
:lang(bn) body, body:lang(bn) { font-family: var(--font); }
img, svg { display: block; max-width: 100%; }
a { color: var(--m-600); text-decoration: none; }
a:hover { color: var(--m-700); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; color: var(--ink); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(224, 24, 127, .35); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: 'Poppins', var(--font); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 600; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 26px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ico { width: 20px; height: 20px; flex: none; }
.ico-sm { width: 16px; height: 16px; flex: none; }
.ico-lg { width: 26px; height: 26px; flex: none; }

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(239, 227, 240, .7);
}
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 0; }
.card-head h2, .card-head h3 { font-size: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 10px; }
.section-title h2 { font-size: 16px; }
.section-title a { font-size: 13px; font-weight: 500; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 15px; cursor: pointer; text-align: center;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent; text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(200, 20, 138, .28); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 26px rgba(200, 20, 138, .36); }
.btn-light { background: #fff; color: var(--m-600); border: 1.5px solid var(--m-200); }
.btn-light:hover { background: var(--m-50); }
.btn-soft { background: var(--m-50); color: var(--m-600); }
.btn-soft:hover { background: var(--m-100); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { color: #fff; filter: brightness(1.05); }
.btn-bad { background: #fff; color: var(--bad); border: 1.5px solid #F6C1C8; }
.btn-bad:hover { background: var(--bad-bg); color: var(--bad); }
.btn-dark { background: var(--v-900); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-xs { min-height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--m-600); font-weight: 500; cursor: pointer; }

/* Forms */
.field { display: block; }
.field + .field { margin-top: 14px; }
.label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.label .opt { color: var(--muted); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  background: #fff; font-size: 15px; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 96px; resize: vertical; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2386728F' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--m-500); box-shadow: 0 0 0 4px rgba(224, 24, 127, .12); }
.input::placeholder, .textarea::placeholder { color: #B8A6BE; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--bad); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.input-wrap .addon {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: none;
  color: var(--muted); cursor: pointer; border-radius: 10px;
}
.input-wrap .addon:hover { color: var(--m-600); background: var(--m-50); }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.input-prefix .input { padding-left: 34px; }
.input-lg { font-size: 22px; font-weight: 600; min-height: 58px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.error-text { font-size: 12.5px; color: var(--bad); margin-top: 5px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--m-500); margin: 1px 0 0; flex: none; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 46px; height: 26px; border-radius: 99px; background: #DCCFE0; position: relative; flex: none; transition: background .15s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .track { background: var(--m-500); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid rgba(224, 24, 127, .35); outline-offset: 2px; }

/* Status pills & badges */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-pending { color: var(--warn); background: var(--warn-bg); }
.pill-completed { color: var(--ok); background: var(--ok-bg); }
.pill-failed { color: var(--bad); background: var(--bad-bg); }
.pill-info { color: var(--info); background: var(--info-bg); }
.pill-plain { color: var(--ink-2); background: #F3EDF4; }
.pill-plain::before, .pill-info::before { display: none; }
.verified { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; color: var(--ok); background: var(--ok-bg); }

/* Payment method mark (used when no logo is uploaded) */
.mmark {
  --c: var(--m-500);
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: var(--c); color: #fff; font-weight: 700; font-size: 19px; letter-spacing: -.5px;
  box-shadow: inset 0 -8px 16px rgba(0,0,0,.08);
}
.mmark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.mmark.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
.mmark.lg { width: 54px; height: 54px; border-radius: 16px; font-size: 23px; }
.cmark {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--v-600); font-weight: 700; font-size: 12.5px; border: 1px solid var(--line);
}
.cmark.sm { width: 34px; height: 34px; font-size: 11px; }

/* Avatar */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 600; font-size: 15px; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.avatar.lg { width: 76px; height: 76px; font-size: 26px; }

/* Alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 14px; }
.alert .ico { margin-top: 1px; }
.alert-ok { background: var(--ok-bg); color: #0B6B3B; }
.alert-bad { background: var(--bad-bg); color: #A11B2D; }
.alert-warn { background: var(--warn-bg); color: #8A5600; }
.alert-info { background: var(--info-bg); color: #2547A6; }
.alert-brand { background: var(--m-50); color: var(--m-700); }

/* Key/value detail list */
.kv { margin: 0; }
.kv > div { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: 14px; flex: none; }
.kv dd { margin: 0; text-align: right; font-weight: 500; word-break: break-word; }
.kv .total dt, .kv .total dd { color: var(--ink); font-weight: 700; font-size: 16px; }

/* Empty state */
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty .ico-lg { margin: 0 auto 10px; color: var(--m-400); width: 40px; height: 40px; }
.empty h3 { font-size: 16px; margin-bottom: 4px; color: var(--ink-2); }

/* Tabs (pill style) */
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; font-weight: 500;
}
.tab .count { background: var(--m-50); color: var(--m-600); border-radius: 99px; padding: 0 7px; font-size: 12px; font-weight: 600; }
.tab.is-active { background: var(--grad); color: #fff; border-color: transparent; }
.tab.is-active .count { background: rgba(255,255,255,.25); color: #fff; }

/* Pagination */
.pager { display: flex; justify-content: center; gap: 6px; margin: 18px 0 4px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.pager .is-active { background: var(--grad); color: #fff; border-color: transparent; }
.pager .is-disabled { opacity: .45; }

/* Dialog */
dialog.sheet {
  border: 0; padding: 0; border-radius: 22px; width: min(460px, calc(100vw - 24px));
  box-shadow: var(--shadow-lg); color: var(--ink);
}
dialog.sheet::backdrop { background: rgba(38, 10, 46, .45); backdrop-filter: blur(2px); }
dialog.sheet .sheet-body { padding: 22px; }
dialog.sheet h3 { font-size: 18px; margin-bottom: 6px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--v-900); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px;
  transition: all .2s ease; z-index: 100; pointer-events: none; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
