@font-face {
  font-family: "Estedad";
  src: url("/public/fonts/estedad-arabic.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: "Estedad";
  src: url("/public/fonts/estedad-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-05FF;
}

:root {
  --ink: #252322;
  --muted: #77716c;
  --paper: #fffdf9;
  --canvas: #f6f2ec;
  --line: #e8e0d8;
  --coral: #d85d48;
  --coral-dark: #a93f31;
  --coral-soft: #f8e7e1;
  --amber: #d49a47;
  --amber-soft: #f8eedc;
  --green: #367d65;
  --green-soft: #e4f1eb;
  --blue: #4b6f87;
  --blue-soft: #e5eef3;
  --danger: #b93636;
  --shadow: 0 18px 48px rgb(66 47 37 / 8%);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Estedad", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: wait;
  opacity: .6;
}

.coming-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 32px;
  background:
    radial-gradient(circle at 20% 25%, rgb(235 183 137 / 24%), transparent 26%),
    radial-gradient(circle at 82% 72%, rgb(216 93 72 / 17%), transparent 27%),
    #f7f0e8;
}

.coming-card {
  position: relative;
  z-index: 1;
  width: min(700px, 100%);
  padding: clamp(38px, 7vw, 74px);
  text-align: center;
  border: 1px solid rgb(255 255 255 / 75%);
  border-radius: 36px;
  background: rgb(255 253 249 / 82%);
  box-shadow: 0 36px 100px rgb(69 40 29 / 13%);
  backdrop-filter: blur(24px);
}

.public-brand,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  letter-spacing: .16em;
  direction: ltr;
}

.public-brand {
  margin-bottom: 54px;
  font-size: 17px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: white;
  border-radius: 14px;
  background: var(--coral);
  font-family: Georgia, serif;
  font-size: 25px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: normal;
  box-shadow: 0 8px 20px rgb(216 93 72 / 30%);
}

.eyebrow,
.kicker {
  display: block;
  color: var(--coral);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.coming-card h1 {
  margin: 10px 0 14px;
  font-size: clamp(34px, 7vw, 64px);
  font-weight: 850;
  letter-spacing: -.06em;
  line-height: 1.25;
}

.coming-card > p {
  max-width: 530px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 16px;
}

.coming-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  color: var(--green);
  border-radius: 999px;
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 650;
}

.coming-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgb(54 125 101 / 12%);
}

.staff-entry {
  display: block;
  width: fit-content;
  margin: 34px auto 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.coming-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.orb-one {
  top: -80px;
  right: -60px;
  width: 250px;
  height: 250px;
  background: rgb(216 93 72 / 14%);
}

.orb-two {
  bottom: -100px;
  left: -70px;
  width: 320px;
  height: 320px;
  background: rgb(212 154 71 / 16%);
}

.login-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1.05fr .95fr;
  background: var(--paper);
}

.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(36px, 7vw, 84px);
  color: white;
  background:
    linear-gradient(145deg, rgb(46 33 28 / 15%), rgb(46 33 28 / 65%)),
    radial-gradient(circle at 30% 25%, #e9916d, transparent 38%),
    linear-gradient(145deg, #b64435, #632f29);
}

.brand.light small,
.staff-card small,
.brand small {
  display: block;
  color: inherit;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0;
  opacity: .68;
}

.login-visual h1 {
  max-width: 540px;
  margin: 12px 0;
  font-size: clamp(42px, 7vw, 82px);
  font-weight: 850;
  letter-spacing: -.07em;
  line-height: 1.15;
}

.login-visual p {
  max-width: 540px;
  color: rgb(255 255 255 / 76%);
  font-size: 17px;
}

.light-text {
  color: #ffd9cc;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 32px;
}

.form-card.compact {
  width: min(410px, 100%);
}

.form-heading {
  margin-bottom: 30px;
}

.form-heading h2 {
  margin: 3px 0 2px;
  font-size: 34px;
  letter-spacing: -.04em;
}

.form-heading p,
.workspace-header p,
.section-heading p,
.card-heading p {
  margin: 0;
  color: var(--muted);
}

label,
fieldset {
  color: #504b47;
  font-size: 13px;
  font-weight: 650;
}

label small,
legend small {
  margin-right: 4px;
  color: #aaa19a;
  font-weight: 400;
}

label em {
  margin-right: 5px;
  color: var(--coral);
  font-size: 10px;
  font-style: normal;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 12px 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: white;
  font-weight: 450;
  transition: border-color .15s, box-shadow .15s;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgb(216 93 72 / 65%);
  box-shadow: 0 0 0 4px rgb(216 93 72 / 9%);
}

.form-card label + label,
.stack-form > * + * {
  margin-top: 16px;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px 21px;
  border: 0;
  border-radius: 13px;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s, background .15s;
}

.primary-button {
  color: white;
  background: var(--coral);
  box-shadow: 0 11px 22px rgb(216 93 72 / 22%);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  background: var(--coral-dark);
}

.secondary-button {
  color: var(--coral-dark);
  background: var(--coral-soft);
}

.ghost-button {
  min-height: 40px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: white;
}

.wide {
  width: 100%;
  margin-top: 24px;
}

.back-link {
  display: block;
  margin-top: 22px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.form-error {
  margin: 12px 0 0;
  padding: 9px 12px;
  color: var(--danger);
  border-radius: 10px;
  background: #fbeaea;
  font-size: 12px;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 27px 20px;
  color: #eee5df;
  background: #2d2927;
}

.sidebar .brand {
  margin: 0 8px 42px;
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.sidebar nav a,
.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  color: #bdb4ae;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 600;
}

.sidebar nav a:hover,
body[data-page="dashboard"] [data-nav="dashboard"],
body[data-page="register"] [data-nav="register"],
body[data-page="sales"] [data-nav="sales"],
body[data-page="management"] [data-nav="management"] {
  color: white;
  background: rgb(255 255 255 / 9%);
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #e58d77;
  font-size: 18px;
}

.staff-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px 10px;
  border-top: 1px solid rgb(255 255 255 / 9%);
  font-size: 12px;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #4f2b24;
  border-radius: 50%;
  background: #edb39f;
  font-size: 16px;
  font-weight: 800;
}

.link-button {
  padding: 6px;
  color: var(--coral);
  border: 0;
  background: transparent;
  font-size: 12px;
}

.logout-button {
  color: #aa9f98;
  text-align: right;
}

.workspace {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 42px clamp(24px, 5vw, 72px) 80px;
}

.workspace-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.workspace-header h1 {
  margin: 4px 0 2px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.055em;
  line-height: 1.3;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-grid.small {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
}

.stat-card {
  min-height: 155px;
  padding: 20px;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card > span,
.stat-card > small {
  display: block;
  color: rgb(37 35 34 / 65%);
  font-size: 11px;
}

.stat-card strong {
  display: block;
  margin: 17px 0 2px;
  font-size: clamp(24px, 3.5vw, 36px);
  letter-spacing: -.04em;
  line-height: 1.2;
}

.stat-card.coral { background: #f3c6b9; }
.stat-card.amber { background: #f4dbab; }
.stat-card.green { background: #bcd9c9; }
.stat-card.ink { color: white; background: #373230; }
.stat-card.ink > span,
.stat-card.ink > small { color: rgb(255 255 255 / 62%); }

.quick-grid {
  display: grid;
  margin-top: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.quick-card {
  display: grid;
  min-height: 112px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  transition: transform .15s, box-shadow .15s;
}

.quick-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.quick-card b,
.quick-card small {
  display: block;
}

.quick-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.quick-icon,
.transaction-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--coral-dark);
  border-radius: 15px;
  background: var(--coral-soft);
  font-size: 22px;
}

.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 12px;
}

.notice.neutral {
  color: #5e574f;
  border: 1px solid var(--line);
  background: #eee8e0;
}

.notice b {
  white-space: nowrap;
}

.panel {
  padding: clamp(20px, 3.5vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 8px 30px rgb(66 47 37 / 4%);
}

.section-heading,
.card-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.section-heading h2,
.card-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.03em;
}

.section-heading p,
.card-heading p {
  font-size: 11px;
}

.section-number {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--coral-dark);
  border-radius: 13px;
  background: var(--coral-soft);
  font-weight: 800;
}

.form-grid {
  display: grid;
  margin-top: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inline-registration {
  margin-top: 18px;
  scroll-margin-top: 22px;
}

.inline-registration-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.inline-registration-head h2 {
  margin: 3px 0;
  font-size: 25px;
}

.inline-registration-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.jalali-input-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 46px;
}

.jalali-input-wrap input {
  direction: ltr;
  border-radius: 0 13px 13px 0;
  text-align: left;
  font-weight: 700;
}

.jalali-input-wrap button {
  margin-top: 7px;
  color: var(--coral-dark);
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 13px 0 0 13px;
  background: var(--coral-soft);
  font-size: 19px;
}

.date-picker {
  display: none;
  position: fixed;
  z-index: 120;
  width: min(292px, calc(100vw - 24px));
  padding: 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgb(255 255 255 / 99%);
  box-shadow: 0 22px 60px rgb(66 47 37 / 22%);
}

.date-picker.active { display: block; }

.date-picker-head {
  display: grid;
  align-items: center;
  margin-bottom: 10px;
  grid-template-columns: 38px 1fr 38px;
  gap: 8px;
}

.date-picker-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 5px;
}

.date-picker-title select {
  min-width: 0;
  margin: 0;
  padding: 7px 8px;
  color: var(--coral-dark);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
}
.date-picker-head button,
.date-grid button {
  color: var(--coral-dark);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf7f3;
}
.date-picker-head button { height: 36px; font-size: 20px; }
.date-weekdays,
.date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.date-weekdays span { padding: 4px 0; color: var(--muted); text-align: center; font-size: 11px; }
.date-grid button,
.date-empty { height: 34px; }
.date-grid button:hover { color: white; border-color: var(--coral); background: var(--coral); }

.span-full {
  grid-column: 1 / -1;
}

.top-gap {
  margin-top: 38px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.gender-options {
  display: flex;
  gap: 8px;
  margin-top: 7px;
}

.gender-option {
  position: relative;
  display: flex;
  min-height: 47px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  cursor: pointer;
}

.gender-option input,
.tree-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.gender-option:has(input:checked) {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgb(216 93 72 / 8%);
}

.gender-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.gender-icon.female {
  color: #b8486d;
  background: #f8e4ea;
}

.gender-icon.male {
  color: #376e91;
  background: #e3eef5;
}

.tree-choice {
  display: grid;
  margin-top: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tree-choice label {
  position: relative;
  display: block;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  cursor: pointer;
}

.tree-choice label:has(input:checked) {
  border-color: var(--coral);
  background: var(--coral-soft);
  box-shadow: inset 0 0 0 1px var(--coral);
}

.tree-choice b,
.tree-choice small {
  display: block;
}

.tree-choice small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.parent-picker {
  margin-top: 15px;
  padding: 17px;
  border-radius: 15px;
  background: #f3eee7;
}

.search-results {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.compact-results {
  max-height: 260px;
  overflow: auto;
}

.search-result {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  text-align: right;
}

.search-result:hover {
  border-color: rgb(216 93 72 / 50%);
}

.search-result b,
.search-result small {
  display: block;
}

.search-result small {
  color: var(--muted);
  font-size: 10px;
}

.search-result .balance {
  color: var(--green);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
}

.selected-customer {
  margin-top: 10px;
  padding: 13px;
  color: var(--green);
  border: 1px solid rgb(54 125 101 / 25%);
  border-radius: 12px;
  background: var(--green-soft);
}

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 450;
}

.check-line input,
.permission-list input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 3px 0 0;
  accent-color: var(--coral);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.form-hint {
  color: var(--muted);
  font-size: 10px;
}

.success-panel {
  margin-top: 18px;
  padding: 24px;
  color: #255b48;
  border: 1px solid rgb(54 125 101 / 22%);
  border-radius: var(--radius);
  background: var(--green-soft);
}

.success-panel h2 {
  margin: 0 0 5px;
}

.success-panel dl {
  display: grid;
  grid-template-columns: repeat(3, auto 1fr);
  gap: 7px 10px;
  margin: 18px 0 0;
  font-size: 12px;
}

.success-panel dt { color: #608a7a; }
.success-panel dd { margin: 0; font-weight: 750; }

.search-panel {
  padding: 18px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}

.search-box > span {
  color: var(--coral);
  font-size: 24px;
}

.search-box input {
  margin: 0;
  padding-inline: 2px;
  border: 0;
  box-shadow: none;
}

kbd {
  padding: 3px 8px;
  color: #99918b;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f5f1ec;
  font-family: inherit;
  font-size: 9px;
  white-space: nowrap;
}

.empty-state {
  margin: 20px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.not-found-registration {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px dashed rgb(216 93 72 / 45%);
  border-radius: 14px;
  background: var(--coral-soft);
}

.not-found-registration b,
.not-found-registration small { display: block; }
.not-found-registration small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.customer-summary {
  display: grid;
  align-items: center;
  gap: 16px;
  margin: 20px 0 14px;
  padding: 19px 22px;
  color: white;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #3b3633, #272322);
  grid-template-columns: auto 1fr auto;
  box-shadow: var(--shadow);
}

.customer-summary .avatar {
  width: 48px;
  height: 48px;
}

.customer-summary b,
.customer-summary small {
  display: block;
}

.customer-summary small {
  color: rgb(255 255 255 / 60%);
  font-size: 10px;
}

.customer-credit {
  text-align: left;
}

.customer-credit strong {
  display: block;
  color: #b9e1cc;
  font-size: 23px;
}

.transaction-grid,
.management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.transaction-card > label,
.transaction-card > div + label {
  display: block;
  margin-top: 17px;
}

.card-heading {
  margin-bottom: 20px;
}

.transaction-icon.credit { color: var(--green); background: var(--green-soft); }
.transaction-icon.staff { color: var(--blue); background: var(--blue-soft); }
.transaction-icon.role { color: #7e5e31; background: var(--amber-soft); }
.transaction-icon.sms { color: #6d547d; background: #eee7f2; }

[data-redemption-step] > label {
  display: block;
  margin-bottom: 15px;
}

.management-card {
  align-self: start;
}

.management-list {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.management-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.management-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.management-item b,
.management-item small {
  display: block;
}

.management-item small {
  color: var(--muted);
  font-size: 10px;
}

.management-item details {
  margin-top: 10px;
  color: var(--coral);
  font-size: 11px;
}

.management-item details[open] summary {
  margin-bottom: 10px;
}

.inline-edit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.inline-edit input,
.inline-edit select {
  margin: 0;
  padding: 9px;
  font-size: 11px;
}

.inline-edit button {
  grid-column: 1 / -1;
}

.status-badge,
.permission-chip {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
}

.status-badge.inactive {
  color: #8d5a52;
  background: var(--coral-soft);
}

.permission-list {
  display: grid;
  margin-top: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.permission-list label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
}

.role-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
}

.top-panel {
  margin-top: 14px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 11px;
  white-space: nowrap;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 50%;
  bottom: 24px;
  max-width: min(440px, calc(100% - 32px));
  padding: 11px 17px;
  color: white;
  border-radius: 12px;
  background: #2d2927;
  box-shadow: 0 15px 40px rgb(0 0 0 / 20%);
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 15px);
  transition: opacity .2s, transform .2s;
  font-size: 12px;
}

.toast.show {
  opacity: 1;
  transform: translate(50%, 0);
}

.toast.error {
  background: var(--danger);
}

.simple-page {
  display: grid;
  min-height: 100vh;
  place-content: center;
  padding: 30px;
  text-align: center;
}

.simple-page h1 {
  max-width: 600px;
}

.mobile-nav {
  display: none;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1050px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: 1fr; }
  .form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  body { padding-bottom: 72px; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: 300px; padding: 28px; }
  .login-visual .brand { margin-bottom: 60px; }
  .login-visual h1 { font-size: 45px; }
  .login-panel { padding: 38px 24px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .workspace { padding: 28px 17px 34px; }
  .workspace-header { align-items: flex-start; }
  .workspace-header h1 { font-size: 29px; }
  .workspace-header p { font-size: 11px; }
  .mobile-nav {
    position: fixed;
    z-index: 50;
    right: 10px;
    bottom: 9px;
    left: 10px;
    display: flex;
    height: 62px;
    align-items: center;
    justify-content: space-around;
    padding: 5px;
    border: 1px solid rgb(255 255 255 / 12%);
    border-radius: 20px;
    background: rgb(45 41 39 / 95%);
    box-shadow: 0 15px 40px rgb(0 0 0 / 25%);
    backdrop-filter: blur(16px);
  }
  .mobile-nav a { flex-direction: column; gap: 0; padding: 3px 8px; font-size: 8px; }
  .mobile-nav .nav-icon { height: 27px; }
  .transaction-grid,
  .management-grid { grid-template-columns: 1fr; }
  .form-grid,
  .form-grid.three,
  .tree-choice { grid-template-columns: 1fr; }
  .gender-field { grid-column: 1; }
  .span-full { grid-column: 1; }
  .success-panel dl { grid-template-columns: auto 1fr; }
  .customer-summary { grid-template-columns: auto 1fr; }
  .customer-credit { grid-column: 1 / -1; text-align: right; padding-top: 10px; border-top: 1px solid rgb(255 255 255 / 10%); }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .primary-button { width: 100%; }
  .permission-list { grid-template-columns: 1fr; }
  .inline-registration-head,
  .not-found-registration { align-items: stretch; flex-direction: column; }
}

@media (max-width: 480px) {
  .coming-page { padding: 16px; }
  .coming-card { padding: 38px 22px; border-radius: 28px; }
  .public-brand { margin-bottom: 42px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 125px; padding: 15px; border-radius: 17px; }
  .stat-card strong { font-size: 23px; }
  .panel { padding: 18px; border-radius: 18px; }
  .workspace-header { flex-direction: column; }
  .workspace-header .ghost-button { align-self: flex-start; }
  .notice { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
