:root {
  /* gpay brand palette (gpay.com.bd) */
  --brand: #2b3378;
  --brand-dark: #20275f;
  --brand-soft: #eef0f8;
  --accent: #f15b24;
  --sky: #29abe2;
  --ink: #1b1f36;
  --muted: #6d7392;
  --ok: #1a7f37;
  --bad: #c02626;
  --warn: #b26a00;
  --line: #dfe2ee;
  --bg: #f5f6fa;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", sans-serif;
  font-size: 15px;
}
a { color: var(--brand); }

.nav {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--brand); color: #fff; padding: 10px 20px;
}
.nav a { color: #ccd2ec; text-decoration: none; font-weight: 500; }
.nav a:hover { color: #fff; text-decoration: underline; }
.nav .brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: .3px; }
.nav .brand img { height: 30px; width: auto; display: block; border-radius: 6px; background: #fff; padding: 2px; }
.nav .spacer { flex: 1; }
.nav .who { color: #ccd2ec; font-size: 14px; }
.nav form { margin: 0; }
.link-button { background: none; border: 1px solid #5b64a6; color: #fff; border-radius: 6px; padding: 5px 10px; cursor: pointer; }
.login-logo { display: block; height: 74px; margin: 0 auto 14px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }
h1 { font-size: 22px; margin: 0 0 18px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.small-link { font-size: 13px; font-weight: 400; margin-left: 10px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.login-card { max-width: 380px; margin: 12vh auto; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 7px; color: var(--ink); font-size: 14px; }
input:not([type=checkbox]), select, textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
  font: inherit; background: #fff; color: var(--ink); min-width: 200px;
}
textarea { min-width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
button, .button {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 9px 14px; font: inherit; cursor: pointer; text-decoration: none;
}
button:hover { border-color: #b9c7c2; }
.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.primary:hover { background: var(--brand-dark); }
.danger { color: var(--bad); border-color: #f0c8c8; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions form { margin: 0; }
.actions.inline { margin-top: 14px; align-items: flex-end; }

fieldset.perms { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0; }
fieldset.perms legend { font-size: 12px; color: var(--muted); padding: 0 6px; }

.alert { border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; }
.alert.ok { background: var(--brand-soft); border: 1px solid #c3c9e6; }
.alert.bad { background: #fdecec; border: 1px solid #f3c4c4; color: #8f1d1d; }
.copy-row { display: flex; gap: 8px; margin-top: 8px; }
.copy-row input { flex: 1; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.copy-row.compact { margin-top: 0; }
.copy-row.compact input { min-width: 150px; font-size: 11px; padding: 5px 7px; }
.copy-row.compact button { padding: 5px 10px; font-size: 12px; }
.row-new > td { background: var(--brand-soft); }
.pager { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.pager .button { min-width: 38px; text-align: center; }
.pager .disabled { pointer-events: none; opacity: .45; }
.ok-flash { background: var(--brand) !important; border-color: var(--brand) !important; color: #fff !important; }

.grid { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.grid th, .grid td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.grid th { background: var(--brand-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.grid tr:last-child td { border-bottom: 0; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eceff0; color: #4a5a55; }
.pill.pending { background: var(--brand-soft); color: var(--brand); }
.pill.opened { background: #fff3dd; color: var(--warn); }
.pill.submitted { background: #e6f5ee; color: var(--ok); }
.pill.closed, .pill.expired { background: #ecedf3; color: #5a6079; }
.pill.deleted { background: #fdecec; color: var(--bad); }
.pill.warn { background: #fff3dd; color: var(--warn); }
.tag { background: #d9deef; color: var(--brand-dark); border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 700; }

.phone-input { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.phone-input .flag-prefix { display: flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--brand-soft); border-right: 1px solid var(--line); font-weight: 600; }
.phone-input input { border: 0; border-radius: 0; min-width: 160px; }
.bd-flag { display: inline-block; width: 20px; height: 13px; border-radius: 2px; background: #006a4e; position: relative; }
.bd-flag::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #f42a41; top: 3px; left: 5.5px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.thumb { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; display: block; }
.thumb img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: #dfe2ee; }
.thumb-meta { padding: 9px 11px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; align-items: flex-start; }
.thumb-meta .button { padding: 5px 12px; font-size: 12px; }

.detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.full-photo { width: 100%; border-radius: 8px; display: block; }
dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 0 0 16px; }
dt { color: var(--muted); font-size: 13px; }
dd { margin: 0; }
