:root,
[data-theme="classic"] {
  --rt-bg: #f3f1ec;
  --rt-surface: #fffdf9;
  --rt-ink: #1c2a22;
  --rt-muted: #5d6b63;
  --rt-accent: #1f6b4a;
  --rt-accent-dark: #154d35;
  --rt-warn: #b45309;
  --rt-danger: #b42318;
  --rt-border: #d7ddd7;
  --rt-sidebar: #14261d;
  --rt-sidebar-end: #0f1b15;
  --rt-sidebar-text: #e8f0ea;
  --rt-sidebar-muted: #9bb5a6;
  --rt-sidebar-section: #7f9a8b;
  --rt-sidebar-link: #d5e4db;
  --rt-sidebar-hover: rgba(255, 255, 255, 0.08);
  --rt-glow: rgba(31, 107, 74, 0.08);
  --rt-stat-from: #ffffff;
  --rt-stat-to: #f5faf7;
  --rt-table-head: #eef4f0;
  --rt-ok-bg: #ecfdf5;
  --rt-ok-border: #86efac;
}

[data-theme="soft_blue"] {
  --rt-bg: #eef3f8;
  --rt-surface: #fbfcfe;
  --rt-ink: #1e2a3a;
  --rt-muted: #5b6b7c;
  --rt-accent: #3a6ea5;
  --rt-accent-dark: #2b527a;
  --rt-warn: #b45309;
  --rt-danger: #b42318;
  --rt-border: #d5dde8;
  --rt-sidebar: #e8eef6;
  --rt-sidebar-end: #dce6f2;
  --rt-sidebar-text: #1e2a3a;
  --rt-sidebar-muted: #66788c;
  --rt-sidebar-section: #7a8fa3;
  --rt-sidebar-link: #334155;
  --rt-sidebar-hover: rgba(58, 110, 165, 0.12);
  --rt-glow: rgba(58, 110, 165, 0.10);
  --rt-stat-from: #ffffff;
  --rt-stat-to: #f0f5fb;
  --rt-table-head: #e8eef6;
  --rt-ok-bg: #eaf3fb;
  --rt-ok-border: #93c5fd;
}

[data-theme="warm_sand"] {
  --rt-bg: #f7f1e8;
  --rt-surface: #fffaf3;
  --rt-ink: #3a2f24;
  --rt-muted: #7a6a58;
  --rt-accent: #9a6b3f;
  --rt-accent-dark: #7a5230;
  --rt-warn: #b45309;
  --rt-danger: #b42318;
  --rt-border: #e4d7c6;
  --rt-sidebar: #f3e8da;
  --rt-sidebar-end: #eadccb;
  --rt-sidebar-text: #3a2f24;
  --rt-sidebar-muted: #8a7660;
  --rt-sidebar-section: #9a846c;
  --rt-sidebar-link: #4a3c2e;
  --rt-sidebar-hover: rgba(154, 107, 63, 0.12);
  --rt-glow: rgba(154, 107, 63, 0.10);
  --rt-stat-from: #ffffff;
  --rt-stat-to: #f8f1e7;
  --rt-table-head: #f1e6d8;
  --rt-ok-bg: #f5efe6;
  --rt-ok-border: #d2b48c;
}

[data-theme="mist_teal"] {
  --rt-bg: #eef6f5;
  --rt-surface: #f8fcfb;
  --rt-ink: #1c3330;
  --rt-muted: #5a736f;
  --rt-accent: #2f7a72;
  --rt-accent-dark: #235c56;
  --rt-warn: #b45309;
  --rt-danger: #b42318;
  --rt-border: #cfe0dd;
  --rt-sidebar: #e4f0ee;
  --rt-sidebar-end: #d7e8e5;
  --rt-sidebar-text: #1c3330;
  --rt-sidebar-muted: #62807b;
  --rt-sidebar-section: #6f918c;
  --rt-sidebar-link: #2a4541;
  --rt-sidebar-hover: rgba(47, 122, 114, 0.12);
  --rt-glow: rgba(47, 122, 114, 0.10);
  --rt-stat-from: #ffffff;
  --rt-stat-to: #eef7f5;
  --rt-table-head: #e3efed;
  --rt-ok-bg: #e7f5f2;
  --rt-ok-border: #99d5cc;
}

[data-theme="coral_cream"] {
  --rt-bg: #f8f0ec;
  --rt-surface: #fffaf8;
  --rt-ink: #3a2722;
  --rt-muted: #7a5f57;
  --rt-accent: #c46b55;
  --rt-accent-dark: #9e4f3d;
  --rt-warn: #b45309;
  --rt-danger: #b42318;
  --rt-border: #e8d5ce;
  --rt-sidebar: #f4e8e3;
  --rt-sidebar-end: #eddcd5;
  --rt-sidebar-text: #3a2722;
  --rt-sidebar-muted: #8a6a61;
  --rt-sidebar-section: #9a7a70;
  --rt-sidebar-link: #4a322c;
  --rt-sidebar-hover: rgba(196, 107, 85, 0.12);
  --rt-glow: rgba(196, 107, 85, 0.10);
  --rt-stat-from: #ffffff;
  --rt-stat-to: #faf1ed;
  --rt-table-head: #f0e3de;
  --rt-ok-bg: #f8ece8;
  --rt-ok-border: #e8b4a6;
}

[data-theme="slate_sky"] {
  --rt-bg: #eef1f4;
  --rt-surface: #fafbfc;
  --rt-ink: #243040;
  --rt-muted: #5f6e7e;
  --rt-accent: #4b6584;
  --rt-accent-dark: #374b63;
  --rt-warn: #b45309;
  --rt-danger: #b42318;
  --rt-border: #d3dae2;
  --rt-sidebar: #e6ebf0;
  --rt-sidebar-end: #dce3ea;
  --rt-sidebar-text: #243040;
  --rt-sidebar-muted: #667788;
  --rt-sidebar-section: #7a8a9a;
  --rt-sidebar-link: #334155;
  --rt-sidebar-hover: rgba(75, 101, 132, 0.12);
  --rt-glow: rgba(75, 101, 132, 0.10);
  --rt-stat-from: #ffffff;
  --rt-stat-to: #f0f3f6;
  --rt-table-head: #e5ebf1;
  --rt-ok-bg: #e9eef4;
  --rt-ok-border: #a8b8c8;
}

* { box-sizing: border-box; }

/* Keep type=number, hide the browser’s up/down stepper everywhere. */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Noto Sans Devanagari", Tahoma, sans-serif;
  background:
    radial-gradient(circle at top right, var(--rt-glow), transparent 40%),
    linear-gradient(180deg, color-mix(in srgb, var(--rt-bg) 70%, white), var(--rt-bg) 100%);
  color: var(--rt-ink);
  min-height: 100vh;
}

a { color: var(--rt-accent); text-decoration: none; }
a:hover { color: var(--rt-accent-dark); }

.app-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--rt-sidebar), var(--rt-sidebar-end));
  color: var(--rt-sidebar-text);
  padding: 1.25rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--rt-border);
  display: flex;
  flex-direction: column;
}

.brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
  color: var(--rt-sidebar-text);
}

.brand-sub {
  color: var(--rt-sidebar-muted);
  font-size: 0.8rem;
  margin-bottom: 0;
}

.brand-home {
  display: block;
  min-width: 0;
  flex: 1;
  margin-bottom: 1.5rem;
}

/* Match original sidebar readability (Bootstrap .nav-link must not shrink text). */
.sidebar .nav-link {
  display: block;
  color: var(--rt-sidebar-link);
  padding: 0.55rem 0.75rem;
  border-radius: 0.45rem;
  margin-bottom: 0.2rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: var(--rt-sidebar-hover);
  color: var(--rt-sidebar-text);
}

.sidebar .nav-section {
  margin-top: 1.1rem;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rt-sidebar-section);
  padding-left: 0.75rem;
  font-weight: 600;
}

.nav-link {
  display: block;
  color: var(--rt-sidebar-link);
  padding: 0.55rem 0.75rem;
  border-radius: 0.45rem;
  margin-bottom: 0.2rem;
}

.nav-link:hover,
.nav-link.active {
  background: var(--rt-sidebar-hover);
  color: var(--rt-sidebar-text);
}

.nav-section {
  margin-top: 1.1rem;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rt-sidebar-section);
  padding-left: 0.75rem;
}

.main {
  padding: 1.25rem 1.5rem 2rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
}

.card {
  background: var(--rt-surface);
  border: 1px solid var(--rt-border);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 24px rgba(20, 38, 29, 0.04);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.stat {
  background: linear-gradient(145deg, var(--rt-stat-from), var(--rt-stat-to));
  border: 1px solid var(--rt-border);
  border-radius: 0.75rem;
  padding: 1rem;
}

.stat .label { color: var(--rt-muted); font-size: 0.85rem; }
.stat .value { font-size: 1.55rem; font-weight: 700; margin-top: 0.25rem; }

.btn-primary {
  background: var(--rt-accent);
  border-color: var(--rt-accent);
}

.btn-primary:hover {
  background: var(--rt-accent-dark);
  border-color: var(--rt-accent-dark);
}

.table thead th {
  background: var(--rt-table-head);
  color: var(--rt-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-low {
  background: #fff7ed;
  color: var(--rt-warn);
  border: 1px solid #fdba74;
}

.badge-ok {
  background: var(--rt-ok-bg);
  color: var(--rt-accent);
  border: 1px solid var(--rt-ok-border);
}

.line-items-table input:not([type="checkbox"]),
.line-items-table select {
  min-width: 100px;
}

.line-items-table .line-discount {
  min-width: 72px;
}

.line-items-table td {
  vertical-align: middle;
}

.line-items-table .line-amount-inner {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: baseline;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.line-items-table .line-amount-inner .rs {
  flex: 0 0 auto;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.product-cell .ss-wrap,
.product-cell .product-select {
  flex: 1 1 auto;
  min-width: 0;
}

.product-cell .form-check {
  min-height: 0;
  margin: 0;
  padding-left: 1.4em;
}

.product-cell .form-check .form-check-input {
  float: none;
  margin-left: -1.4em;
  min-width: 1em;
  width: 1em;
  height: 1em;
}

.line-items-table tr.is-off-bill {
  opacity: 0.62;
}

.sell-margin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.7rem;
  background: var(--rt-table-head);
  border: 1px solid var(--rt-border);
  border-radius: 0.55rem;
}

.sell-margin-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rt-ink);
}

.sell-margin-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.sell-margin-btn.is-on {
  background: var(--rt-accent);
  border-color: var(--rt-accent);
  color: #fff;
}

.sell-margin-custom {
  width: 4.75rem;
}

.sell-margin-hint {
  flex: 1 1 12rem;
}

.ss-wrap {
  position: relative;
}

.ss-native {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.ss-list {
  position: absolute;
  z-index: 1300;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  max-height: min(16rem, 50vh);
  overflow: auto;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--rt-surface);
  border: 1px solid var(--rt-border);
  border-radius: 0.5rem;
  box-shadow: 0 10px 28px rgba(20, 38, 29, 0.14);
  -webkit-overflow-scrolling: touch;
}

.ss-option,
.ss-empty {
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

.ss-empty {
  color: var(--rt-muted);
}

.ss-option {
  cursor: pointer;
}

.ss-option.is-selected {
  font-weight: 600;
  color: var(--rt-accent-dark);
}

.ss-option.ss-create {
  font-weight: 600;
  color: var(--rt-accent-dark);
  border-bottom: 1px solid var(--rt-border);
}

/* ---------- Subscription ---------- */

.plan-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.65rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.plan-banner-danger {
  background: var(--rt-danger);
  color: #fff;
}

.plan-banner-warning {
  background: var(--rt-warn);
  color: #fff;
}

.plan-banner-info {
  background: var(--rt-accent);
  color: #fff;
}

.plan-status-card {
  padding: 1.5rem;
}

.plan-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.plan-status-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--rt-muted);
}

.plan-status-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rt-ink);
}

.plan-upgrade-note {
  padding: 1.15rem 1.35rem;
  border-left: 4px solid var(--rt-accent);
  background: color-mix(in srgb, var(--rt-accent) 6%, #fff);
}

.plan-upgrade-note-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rt-ink);
  margin-bottom: 0.55rem;
}

.plan-upgrade-note-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--rt-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.plan-upgrade-note-list li + li {
  margin-top: 0.35rem;
}

.plan-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 1rem 0 1.25rem;
  border-top: 1px solid var(--rt-border);
}

.plan-fact-label {
  font-size: 0.78rem;
  color: var(--rt-muted);
  margin-bottom: 0.2rem;
}

.plan-fact-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--rt-ink);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

@media (max-width: 991.98px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
}

.plan-card {
  padding: 1.5rem;
  min-width: 0;
}

.plan-card-current {
  border-color: var(--rt-accent);
  box-shadow: 0 0 0 2px rgba(31, 107, 74, 0.12);
}

.plan-card-next {
  border-color: #1f4b8a;
  box-shadow: 0 0 0 2px rgba(31, 75, 138, 0.1);
}

.plan-card-soon {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f8f1dc 0%, #fff 48%);
  border-color: #c9b37a;
}

.plan-card-gold {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(165deg, #fff9e8 0%, #ffffff 42%, #fff4d6 100%);
  border-color: #c9a227;
  box-shadow: 0 10px 28px rgba(184, 134, 11, 0.12);
}

.plan-gold-banner {
  margin-bottom: 0.85rem;
}

.plan-gold-pill {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a6a12, #b8860b);
  color: #fff8e7;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.plan-gold-kicker {
  margin: 0.15rem 0 0.65rem;
  font-size: 0.84rem;
  color: #7a6a3d;
  line-height: 1.35;
}

.plan-card-gold .plan-price {
  color: #6b4f0a;
}

.plan-card-gold .plan-pay .btn-warning {
  background: linear-gradient(90deg, #b8860b, #d4a017);
  border-color: #a67c00;
  color: #1b1405;
  font-weight: 700;
}

.plan-card-gold .plan-pay .btn-warning:hover {
  filter: brightness(1.05);
  color: #1b1405;
}

.plan-soon-banner {
  text-align: center;
  margin-bottom: 0.85rem;
}

.plan-soon-pill {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  background: #1b1b1b;
  color: #f3de9a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.plan-soon-kicker {
  margin: 0.2rem 0 0.55rem;
  font-size: 0.82rem;
  color: #7a6a3d;
}

.plan-soon-body {
  filter: blur(3.5px);
  opacity: 0.42;
  pointer-events: none;
  user-select: none;
}

.plan-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.plan-card-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--rt-ink);
}

.plan-price {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--rt-ink);
  line-height: 1.1;
}

.plan-price-was {
  display: inline-block;
  margin-right: 0.4rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #9aa3ad;
  text-decoration: line-through;
}

.plan-price-unit {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--rt-muted);
}

.plan-price-year {
  font-size: 0.85rem;
  color: var(--rt-muted);
  margin-bottom: 1rem;
}

.plan-save {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(31, 107, 74, 0.12);
  color: var(--rt-accent-dark);
  font-weight: 600;
}

.plan-features,
.pay-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.plan-features li,
.pay-steps li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.9rem;
  color: var(--rt-ink);
}

.plan-features li::before,
.pay-steps li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.45rem;
  width: 0.4rem;
  height: 0.22rem;
  border-left: 2px solid var(--rt-accent);
  border-bottom: 2px solid var(--rt-accent);
  transform: rotate(-45deg);
}

.plan-features li.is-off {
  color: var(--rt-muted);
}

.plan-features li.is-off::before {
  width: 0.7rem;
  height: 0;
  top: 0.62rem;
  border-left: 0;
  border-bottom: 2px solid #b42318;
  transform: none;
}

.plan-card .plan-features {
  margin-bottom: 1.25rem;
}

/* Monthly/yearly switch works without JavaScript: the hidden radios drive
   which price block and pay button stay visible. */
.plan-chooser {
  position: relative;
}

.plan-chooser > input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.plan-cycle-switch {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  border: 1px solid var(--rt-border);
  border-radius: 999px;
  background: var(--rt-table-head);
}

.plan-cycle-switch label {
  margin: 0;
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rt-muted);
  cursor: pointer;
}

.plan-cycle-switch label:hover {
  color: var(--rt-ink);
}

#cycle-monthly:checked ~ .plan-cycle-switch label[for="cycle-monthly"],
#cycle-yearly:checked ~ .plan-cycle-switch label[for="cycle-yearly"] {
  background: var(--rt-accent);
  color: #fff;
}

#cycle-monthly:focus-visible ~ .plan-cycle-switch label[for="cycle-monthly"],
#cycle-yearly:focus-visible ~ .plan-cycle-switch label[for="cycle-yearly"] {
  outline: 2px solid var(--rt-accent-dark);
  outline-offset: 2px;
}

#cycle-monthly:checked ~ .plan-grid [data-cycle="yearly"],
#cycle-yearly:checked ~ .plan-grid [data-cycle="monthly"] {
  display: none;
}

.plan-pay {
  margin: 0;
}

/* ---------- Installable app ---------- */

.header-install {
  white-space: nowrap;
}

.header-new-bill {
  white-space: nowrap;
}

.offline-wrap {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--rt-bg);
  color: var(--rt-ink);
}

.offline-wrap h1 {
  margin: 0.5rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.offline-wrap p {
  max-width: 30rem;
  margin: 0;
  color: var(--rt-muted);
}

.offline-hint {
  font-size: 0.9rem;
}

/* ---------- Payments ---------- */

.test-mode-badge {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #7a4b00;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.checkout-card {
  max-width: 560px;
  padding: 1.75rem;
}

.checkout-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--rt-border);
}

.checkout-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rt-muted);
}

.checkout-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rt-ink);
  word-break: break-all;
}

.pay-result {
  max-width: 560px;
  margin: 1rem auto;
  padding: 2rem 1.75rem;
  text-align: center;
}

.pay-result-icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.pay-result-ok .pay-result-icon {
  background: var(--rt-accent);
}

.pay-result-fail .pay-result-icon {
  background: #b02a37;
}

.pay-result-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rt-ink);
}

.pay-result-text {
  color: var(--rt-muted);
}

.pay-result-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  text-align: left;
}

.pay-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.pay-result-actions form {
  margin: 0;
}

/* ---------- Login / signup ---------- */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 3rem 3.5rem;
  color: var(--rt-sidebar-text);
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 209, 102, 0.20), transparent 45%),
    radial-gradient(circle at 12% 88%, rgba(52, 168, 120, 0.28), transparent 50%),
    linear-gradient(160deg, var(--rt-sidebar) 0%, var(--rt-accent-dark) 65%, var(--rt-accent) 100%);
}

.auth-brand-inner {
  position: relative;
  max-width: 30rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.auth-logo-mark {
  border-radius: 0.9rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.auth-logo-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.auth-logo-sub {
  font-size: 0.8rem;
  color: var(--rt-sidebar-muted);
}

.auth-headline {
  font-size: clamp(1.7rem, 2.4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

.auth-sub {
  color: var(--rt-sidebar-muted);
  font-size: 1rem;
  margin-bottom: 1.75rem;
}

.auth-points {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 0.85rem;
}

.auth-points li {
  position: relative;
  padding-left: 2rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.auth-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  /* tick mark drawn with a rotated border so no icon font is needed */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.auth-points li::after {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.42rem;
  width: 0.42rem;
  height: 0.22rem;
  border-left: 2px solid #ffd166;
  border-bottom: 2px solid #ffd166;
  transform: rotate(-45deg);
}

.auth-industries {
  margin-bottom: 1.75rem;
}

.auth-industries-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--rt-sidebar-muted);
  margin-bottom: 0.6rem;
}

.auth-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.auth-chip {
  font-size: 0.78rem;
  padding: 0.28rem 0.65rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.auth-badge {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.auth-form-side {
  display: grid;
  place-items: center;
  padding: 2.5rem 1.25rem;
  background: var(--rt-bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--rt-surface);
  border: 1px solid var(--rt-border);
  border-radius: 1.25rem;
  padding: 2.25rem;
  box-shadow: 0 18px 44px rgba(20, 38, 29, 0.10);
}

.auth-card-wide {
  max-width: 560px;
}

.auth-card-head {
  margin-bottom: 1.5rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rt-ink);
  margin: 0 0 0.35rem;
}

.auth-tagline {
  color: var(--rt-muted);
  font-size: 0.92rem;
  margin: 0;
}

.auth-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--rt-muted);
  padding-bottom: 0.5rem;
  margin: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--rt-border);
}

.auth-section-label:first-of-type {
  margin-top: 0;
}

.biz-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  max-height: 280px;
  overflow: auto;
  padding: 0.15rem;
}

.biz-type-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--rt-border);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.biz-type-option:hover {
  border-color: color-mix(in srgb, var(--rt-accent) 45%, var(--rt-border));
}

.biz-type-option:has(input:checked) {
  border-color: var(--rt-accent);
  box-shadow: 0 0 0 1px var(--rt-accent);
  background: color-mix(in srgb, var(--rt-accent) 6%, #fff);
}

.biz-type-option input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.biz-type-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--rt-ink);
}

@media (max-width: 575.98px) {
  .biz-type-grid {
    grid-template-columns: 1fr;
    max-height: none;
  }
}

.req {
  color: var(--rt-danger);
}

.invalid-note {
  color: var(--rt-danger);
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

.password-wrap {
  position: relative;
}

.password-wrap .form-control {
  padding-right: 2.7rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.3rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--rt-muted);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--rt-ink);
  background: color-mix(in srgb, var(--rt-accent) 12%, transparent);
}

.password-toggle[aria-pressed="true"] {
  color: var(--rt-accent);
}

.auth-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--rt-accent);
}

.auth-recover {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  justify-content: center;
  margin: 1.15rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-recover a {
  color: var(--rt-accent);
}

.auth-switch {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--rt-muted);
}

.auth-switch a {
  color: var(--rt-accent);
  font-weight: 600;
}

.auth-lang {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rt-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 991.98px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  /* Keep the pitch short above the form so the fields stay near the top */
  .auth-brand {
    padding: 1.75rem 1.25rem;
  }

  .auth-logo {
    margin-bottom: 1.25rem;
  }

  .auth-points,
  .auth-sub,
  .auth-industries {
    display: none;
  }

  .auth-headline {
    font-size: 1.35rem;
    margin-bottom: 0.9rem;
  }

  .auth-form-side {
    padding: 1.5rem 1rem 2.5rem;
  }

  .auth-card {
    padding: 1.5rem;
    box-shadow: none;
  }
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.theme-option {
  border: 1px solid var(--rt-border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  cursor: pointer;
  background: var(--rt-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.theme-option:hover {
  border-color: var(--rt-accent);
}

.theme-option.is-selected {
  border-color: var(--rt-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--rt-accent) 25%, transparent);
}

.theme-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-swatch {
  height: 42px;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(0,0,0,0.06);
}

.theme-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.settings-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0.25rem 0 0.5rem;
  color: var(--rt-accent-dark);
}

.upi-pay-card {
  border-color: color-mix(in srgb, var(--rt-accent) 28%, var(--rt-border));
}

.upi-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #ecfdf5, #f8fafc);
  border: 1px solid #6ee7b7;
}

.upi-preview-qr {
  width: 132px;
  height: 132px;
  object-fit: contain;
  background: #fff;
  border-radius: 0.7rem;
  padding: 0.35rem;
  border: 1px solid #d1fae5;
  image-rendering: pixelated;
}

.upi-preview-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #047857;
}

.upi-preview-name {
  margin-top: 0.2rem;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
}

.upi-preview-id {
  margin-top: 0.15rem;
  font-size: 0.98rem;
  font-weight: 650;
  color: #065f46;
  word-break: break-all;
}

.upi-preview-note {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--rt-muted);
}

@media (max-width: 576px) {
  .upi-preview {
    flex-direction: column;
    align-items: flex-start;
  }
}

.sign-card {
  border-color: color-mix(in srgb, var(--rt-accent) 28%, var(--rt-border));
}

.sign-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.95rem;
  background: #fff;
  border: 1px solid var(--rt-border);
}

.sign-preview-img {
  width: 180px;
  height: 72px;
  object-fit: contain;
  background: #fff;
}

.sign-preview-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rt-muted);
}

.sign-preview-for,
.sign-preview-name {
  font-weight: 800;
  line-height: 1.3;
}

.sign-preview-note {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--rt-muted);
}

@media (max-width: 576px) {
  .sign-preview {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Report pages — soft theme-tinted panels (follow Settings colour theme) */
.report-page {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.report-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 1.05rem 1.15rem;
  border-radius: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--rt-accent) 22%, var(--rt-border));
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--rt-accent) 12%, var(--rt-surface)) 0%,
      var(--rt-stat-to) 48%,
      var(--rt-surface) 100%
    );
  box-shadow: 0 10px 28px var(--rt-glow);
}

.report-hero-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rt-accent);
  margin-bottom: 0.2rem;
}

.report-hero-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 750;
  color: var(--rt-ink);
  line-height: 1.2;
}

.report-hero-sub {
  margin: 0.35rem 0 0;
  color: var(--rt-muted);
  font-size: 0.9rem;
  max-width: 36rem;
}

.report-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.report-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rt-accent);
  text-decoration: none;
  margin-bottom: 0.35rem;
}

.report-back:hover {
  color: var(--rt-accent-dark);
}

.report-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.report-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.05rem 1.1rem;
  border-radius: 0.9rem;
  text-decoration: none;
  color: var(--rt-ink);
  border: 1px solid color-mix(in srgb, var(--rt-accent) 18%, var(--rt-border));
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--rt-accent) 10%, var(--rt-surface)) 0%,
      var(--rt-stat-to) 55%,
      var(--rt-surface) 100%
    );
  box-shadow: 0 8px 22px var(--rt-glow);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 5.5rem;
}

.report-card:hover {
  color: var(--rt-ink);
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--rt-accent) 45%, var(--rt-border));
  box-shadow: 0 12px 28px var(--rt-glow);
}

.report-card-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  color: var(--rt-accent);
  background: color-mix(in srgb, var(--rt-accent) 14%, white);
  border: 1px solid color-mix(in srgb, var(--rt-accent) 22%, transparent);
}

.report-card-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

.report-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.report-card-title {
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.25;
}

.report-card-desc {
  font-size: 0.84rem;
  color: var(--rt-muted);
  line-height: 1.35;
}

.report-card-arrow {
  flex-shrink: 0;
  color: var(--rt-accent);
  font-size: 1.1rem;
  font-weight: 700;
  opacity: 0.75;
}

@media (max-width: 992px) {
  .report-card-grid {
    grid-template-columns: 1fr;
  }

  .report-card {
    min-height: 4.75rem;
  }
}

@media (max-width: 576px) {
  .report-card {
    padding: 0.95rem 1rem;
    gap: 0.75rem;
  }

  .report-card-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .report-card-title {
    font-size: 1rem;
  }

  .report-card-desc {
    font-size: 0.8rem;
  }
}

.report-panel {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--rt-stat-from) 70%, white),
      color-mix(in srgb, var(--rt-stat-to) 55%, var(--rt-surface))
    );
  border: 1px solid color-mix(in srgb, var(--rt-accent) 14%, var(--rt-border));
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 22px var(--rt-glow);
}

.report-panel-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rt-ink);
}

.report-stat {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      145deg,
      var(--rt-stat-from),
      color-mix(in srgb, var(--rt-accent) 10%, var(--rt-stat-to))
    );
  border: 1px solid color-mix(in srgb, var(--rt-accent) 18%, var(--rt-border));
  border-radius: 0.85rem;
  padding: 1rem 1.1rem 1rem 1.2rem;
  box-shadow: 0 8px 20px var(--rt-glow);
}

.report-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--rt-accent);
  border-radius: 0.85rem 0 0 0.85rem;
}

.report-stat-warn {
  background:
    linear-gradient(
      145deg,
      #fff,
      color-mix(in srgb, var(--rt-warn) 10%, var(--rt-stat-to))
    );
  border-color: color-mix(in srgb, var(--rt-warn) 28%, var(--rt-border));
}

.report-stat-warn::before {
  background: var(--rt-warn);
}

.report-stat-label {
  color: var(--rt-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.report-stat-value {
  margin-top: 0.3rem;
  font-size: 1.55rem;
  font-weight: 750;
  color: var(--rt-ink);
  letter-spacing: -0.02em;
}

@media (max-width: 576px) {
  .report-hero {
    padding: 0.95rem 1rem;
  }

  .report-hero-title {
    font-size: 1.28rem;
  }

  .report-stat-value {
    font-size: 1.35rem;
  }
}

.content-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.sidebar-close {
  display: none;
  background: transparent;
  border: 0;
  color: var(--rt-sidebar-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-top: calc(0.7rem + env(safe-area-inset-top, 0px));
  padding-right: calc(1.5rem + env(safe-area-inset-right, 0px));
  padding-bottom: 0.7rem;
  padding-left: calc(1.5rem + env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--rt-surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rt-border);
}

.header-identity {
  min-width: 0;
  flex: 1;
  color: inherit;
}

.header-shop {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-meta {
  color: var(--rt-muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-meta .dot { margin: 0 0.3rem; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-lang select { width: auto; min-width: 118px; }

.support-call {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.75rem 0.28rem 0.28rem;
  border-radius: 999px;
  background: #154d35;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 6px 14px rgba(20, 38, 29, 0.18);
  line-height: 1.1;
  flex-shrink: 0;
}

.support-call:hover {
  color: #fff !important;
  background: #1f6b4a;
}

.support-call-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: #ffd166;
  color: #14261d;
}

.support-call-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.support-call-kicker {
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: #d5e4db;
}

.support-call-number {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}

.header-call {
  margin-right: 0.15rem;
}

.guest-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: calc(0.7rem + env(safe-area-inset-top, 0px));
  padding-right: calc(1.15rem + env(safe-area-inset-right, 0px));
  padding-bottom: 0.7rem;
  padding-left: calc(1.15rem + env(safe-area-inset-left, 0px));
  background: #14261d;
  color: #e8f0ea;
}

.guest-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #e8f0ea !important;
  font-weight: 700;
  text-decoration: none;
}

.guest-brand img {
  border-radius: 0.5rem;
}

.guest-top-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.guest-cta,
.guest-login {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 0.6rem;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none !important;
  white-space: nowrap;
}

.guest-cta {
  background: #ffd166;
  color: #14261d !important;
}

.guest-login {
  background: rgba(255, 255, 255, 0.12);
  color: #e8f0ea !important;
}

.support-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.25rem;
  margin-bottom: 1rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--rt-border);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--rt-surface) 80%, #e8f4ee);
}

.support-note-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.support-note p {
  margin: 0;
  color: var(--rt-muted);
  font-size: 0.9rem;
  max-width: 42rem;
}

.support-note-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.9rem;
}

.support-mail {
  font-weight: 700;
  word-break: break-all;
}

.sidebar-support {
  margin-top: auto;
  padding-top: 1.25rem;
}

.sidebar-support-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rt-sidebar-section);
  padding-left: 0.75rem;
  margin-bottom: 0.45rem;
}

.sidebar-support-call,
.sidebar-support-mail {
  display: block;
  color: var(--rt-sidebar-text);
  padding: 0.35rem 0.75rem;
  font-weight: 700;
  font-size: 0.88rem;
}

.sidebar-support-mail {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--rt-sidebar-muted);
  word-break: break-all;
}

.auth-support {
  margin-top: 1.75rem;
  padding: 1rem 1.05rem;
  border-radius: 0.85rem;
  background: rgba(0, 0, 0, 0.18);
}

.auth-support-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rt-sidebar-muted);
  margin-bottom: 0.4rem;
}

.auth-support-call,
.auth-support-mail {
  display: block;
  color: #fff;
  font-weight: 700;
}

.auth-support-mail {
  margin-top: 0.2rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: #d5e4db;
}

.icon-btn.sidebar-open {
  display: none;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--rt-border);
  border-radius: 0.55rem;
  background: var(--rt-surface);
  cursor: pointer;
}

.icon-btn.sidebar-open span {
  display: block;
  height: 2px;
  background: var(--rt-ink);
  border-radius: 2px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.55rem;
  background: var(--rt-surface);
  border: 1px solid var(--rt-border);
  border-radius: 999px;
  cursor: pointer;
}

.user-chip .avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--rt-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.user-chip .user-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.user-chip .user-name { font-size: 0.85rem; font-weight: 600; }
.user-chip .user-role { font-size: 0.7rem; color: var(--rt-muted); }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 21, 0.45);
  z-index: 1030;
}

@media (max-width: 992px) {
  /* Block layout: a fixed sidebar must not keep a grid/flex track (that left a blank gap). */
  .app-shell {
    display: block;
    grid-template-columns: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: min(260px, 86vw);
    height: 100dvh;
    padding-top: calc(1.1rem + env(safe-area-inset-top, 0px));
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .sidebar-close { display: block; }
  .icon-btn.sidebar-open { display: flex; }
  .content-area,
  .main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .app-header {
    gap: 0.45rem;
    padding-top: calc(0.55rem + env(safe-area-inset-top, 0px));
    padding-right: calc(0.7rem + env(safe-area-inset-right, 0px));
    padding-bottom: 0.55rem;
    padding-left: calc(0.7rem + env(safe-area-inset-left, 0px));
    background: var(--rt-surface);
  }
  .main {
    padding: 0.85rem 0.85rem calc(4.4rem + env(safe-area-inset-bottom, 0px));
  }
  .table-responsive {
    max-width: 100%;
  }

  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  body.sidebar-open { overflow: hidden; }
}

@media (max-width: 576px) {
  .user-chip .user-text { display: none; }
  .header-lang select { min-width: 68px; }
  .header-call .support-call-kicker,
  .guest-call .support-call-kicker { display: none; }
  .header-meta { display: none; }
  .app-header { flex-wrap: wrap; }
  .header-identity {
    max-width: none;
    flex: 1 1 7rem;
  }
  .header-actions {
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .header-new-bill { padding-left: 0.55rem; padding-right: 0.55rem; }
}

/* Keyboard users must always be able to see where they are. */
:focus-visible {
  outline: 2px solid var(--rt-accent);
  outline-offset: 2px;
}

.page-title { font-size: clamp(1.2rem, 4vw, 1.55rem); }

.empty-cell {
  text-align: center;
  padding: 1.5rem 0.5rem;
  color: var(--rt-muted);
}

.status-pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-paid { background: #ecfdf5; color: #166534; border-color: #86efac; }
.status-partial { background: #fff7ed; color: #b45309; border-color: #fdba74; }
.status-credit { background: #fef2f2; color: #b42318; border-color: #fecaca; }
.status-cancelled { background: #f3f4f6; color: #6b7280; border-color: #d1d5db; }

.money { white-space: nowrap; }

.mobile-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1rem -1rem -1rem;
  padding: 0.75rem 1rem;
  background: var(--rt-surface);
  border-top: 1px solid var(--rt-border);
  box-shadow: 0 -6px 18px rgba(20, 38, 29, 0.08);
}

.mobile-save-bar .total-label {
  font-size: 0.78rem;
  color: var(--rt-muted);
  display: block;
}

.mobile-save-bar .total-value { font-weight: 700; font-size: 1.1rem; }

@media (max-width: 768px) {
  /* Line items become stacked cards: a 5-column grid is unusable on a phone. */
  .line-items-table thead { display: none; }

  .line-items-table,
  .line-items-table tbody,
  .line-items-table tr,
  .line-items-table td {
    display: block;
    width: 100%;
  }

  .line-items-table tr {
    background: var(--rt-surface);
    border: 1px solid var(--rt-border);
    border-radius: 0.6rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .line-items-table td {
    border: 0;
    padding: 0.25rem 0;
  }

  .line-items-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rt-muted);
    margin-bottom: 0.15rem;
  }

  .line-items-table td.line-amount {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .line-items-table td.line-amount::before {
    display: inline;
    margin-bottom: 0;
    flex: 0 0 auto;
  }

  .line-items-table .line-amount-inner {
    font-weight: 700;
    font-size: 1.05rem;
  }

  .line-items-table .row-actions { text-align: right; }

  .line-items-table input,
  .line-items-table select { min-width: 0; }
  .line-items-table .ss-wrap { width: 100%; }

  .totals-card { max-width: none !important; margin-left: 0 !important; }
}

@media (max-width: 576px) {
  .table { font-size: 0.88rem; }
  .card { padding: 0.85rem 0.9rem; }
  .stat .value { font-size: 1.35rem; }
}

/* Phone list pages: rows become cards so columns cannot blow the page width. */
@media (max-width: 640px) {
  html, body { overflow-x: clip; }
  .stack-table thead { display: none; }
  .stack-table,
  .stack-table tbody,
  .stack-table tr,
  .stack-table td {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  .stack-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }
  .stack-table tr {
    background: var(--rt-bg);
    border: 1px solid var(--rt-border);
    border-radius: 0.7rem;
    padding: 0.7rem 0.8rem;
    margin: 0;
  }
  .stack-table td {
    border: 0;
    padding: 0.18rem 0;
  }
  .stack-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rt-muted);
    margin-bottom: 0.08rem;
  }
  .stack-table td.is-primary {
    padding-bottom: 0.4rem;
  }
  .stack-table td.is-primary::before { display: none; }
  .stack-table td.is-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding-top: 0.45rem;
    text-align: left !important;
  }
  .stack-table td.is-actions::before { display: none; }
  .stack-table td.is-actions a { font-weight: 600; }
  .stack-table .money { white-space: normal; }
  .stack-table .empty-cell { padding: 1rem 0.25rem; }
  .staff-search { min-width: 0 !important; width: 100%; flex: 1 1 10rem; }
}

/* ---------- Product list (Products / Stock) ---------- */

.pl-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem 1.1rem;
  margin-bottom: 1.05rem;
}

.pl-head-copy .page-title {
  margin-bottom: 0.2rem;
}

.pl-head-sub {
  margin: 0;
  color: var(--rt-muted);
  font-size: 0.92rem;
}

.pl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pl-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pl-search {
  min-width: 12rem;
  width: 16rem;
  max-width: 100%;
}

.pl-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pl-stat {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 0.9rem 1rem;
  background: var(--rt-surface);
  border: 1px solid var(--rt-border);
  border-radius: 1rem;
  box-shadow: 0 8px 20px var(--rt-glow);
  color: inherit;
  text-decoration: none;
}

a.pl-stat:hover {
  border-color: var(--rt-accent);
  color: inherit;
}

.pl-stat.is-on {
  border-color: var(--rt-accent);
  box-shadow: 0 0 0 2px rgba(31, 107, 74, 0.16);
}

.pl-stat-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
}

.pl-stat-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.pl-stat-products .pl-stat-icon { background: #ecfdf5; color: #047857; }
.pl-stat-value .pl-stat-icon { background: #ecfdf5; color: #047857; }
.pl-stat-low .pl-stat-icon { background: #fff7ed; color: #c2410c; }
.pl-stat-out .pl-stat-icon { background: #fffbeb; color: #b45309; }

.pl-stat-body { min-width: 0; }

.pl-stat-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rt-muted);
}

.pl-stat-num {
  display: block;
  margin-top: 0.12rem;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.pl-name { display: flex; flex-direction: column; gap: 0.12rem; }

.pl-sku {
  font-size: 0.78rem;
  color: var(--rt-muted);
  letter-spacing: 0.02em;
}

.pl-qty {
  font-weight: 700;
  color: #047857;
}

.pl-qty.is-low { color: var(--rt-warn); }
.pl-qty.is-out { color: var(--rt-danger); }

.pl-reorder {
  font-weight: 700;
  color: #e11d48;
}

.pl-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.05rem;
  height: 2.05rem;
  margin-left: 0.25rem;
  border: 1px solid var(--rt-border);
  border-radius: 0.55rem;
  background: var(--rt-surface);
  color: var(--rt-accent-dark);
  text-decoration: none;
}

.pl-icon-btn svg {
  width: 1.05rem;
  height: 1.05rem;
}

.pl-icon-btn:hover {
  background: var(--rt-ok-bg);
  border-color: var(--rt-ok-border);
  color: var(--rt-accent-dark);
}

@media (max-width: 992px) {
  .pl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .pl-search { width: 100%; }
  .pl-search-form,
  .pl-toolbar { width: 100%; }
  .pl-stats { grid-template-columns: 1fr; }
  .stack-table td.is-actions .pl-icon-btn { margin-left: 0; }
}

.pl-filters .d-flex .btn { white-space: nowrap; }

.pl-list-card {
  overflow: hidden;
}

.pl-table {
  font-variant-numeric: tabular-nums;
}

.pl-table tbody tr:hover {
  background: color-mix(in srgb, var(--rt-accent) 5%, var(--rt-surface));
}

.pl-stat-num {
  font-variant-numeric: tabular-nums;
}

.pl-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--rt-border);
  background: color-mix(in srgb, var(--rt-table-head) 55%, var(--rt-surface));
}

.pl-pager-meta {
  font-size: 0.86rem;
  color: var(--rt-muted);
}

.pl-pager-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
}

.pl-pager-links a,
.pl-pager-links span {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.pl-pager-links a {
  border: 1px solid var(--rt-border);
  background: var(--rt-surface);
  color: var(--rt-ink);
}

.pl-pager-links a:hover {
  border-color: var(--rt-accent);
  color: var(--rt-accent-dark);
}

.pl-pager-links .is-on {
  background: var(--rt-accent);
  color: #fff;
}

.pl-pager-ellipsis {
  color: var(--rt-muted);
  border: 0;
}

/* Product Excel import */
.pi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.pi-card { padding: 1.15rem 1.2rem; }
.pi-card-template {
  border: 1px dashed color-mix(in srgb, var(--rt-accent) 35%, var(--rt-border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--rt-accent) 6%, #fff), var(--rt-surface));
}
.pi-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding-left: 1.1rem;
  margin: 0;
}
.pi-result-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}
.pi-result-stats strong { font-size: 1.15rem; }
.pi-error-table th:last-child,
.pi-error-table td:last-child { min-width: 12rem; }
.pi-error-table tbody td.text-danger { font-weight: 600; }
@media (max-width: 768px) {
  .pi-grid { grid-template-columns: 1fr; }
}

/* ---------- Customer visits ---------- */

.visit-intro {
  margin-top: -0.35rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.visit-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.visit-month-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.visit-month-label {
  min-width: 8.5rem;
  text-align: center;
  font-weight: 700;
  color: var(--rt-ink);
}

.visit-search {
  flex: 1 1 12rem;
}

.visit-list,
.visit-history-list {
  display: grid;
  gap: 0.75rem;
}

.visit-card,
.visit-history-row {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: var(--rt-surface);
  border: 1px solid var(--rt-border);
  border-radius: 0.75rem;
}

.visit-card-limit {
  border-color: color-mix(in srgb, var(--rt-warn) 55%, var(--rt-border));
}

.visit-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rt-ink);
}

.visit-card-phone {
  color: var(--rt-muted);
  font-size: 0.9rem;
}

.visit-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.visit-card-stats-head {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.visit-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rt-muted);
  margin-bottom: 0.15rem;
}

.visit-stat-value {
  font-weight: 700;
  color: var(--rt-ink);
}

.visit-stat-value.is-limit {
  color: var(--rt-warn);
}

.visit-meter {
  margin-top: 0.35rem;
  height: 6px;
  background: var(--rt-border);
  border-radius: 99px;
  overflow: hidden;
}

.visit-meter-fill {
  display: block;
  height: 100%;
  background: var(--rt-accent);
}

.visit-meter-fill.is-limit {
  background: var(--rt-warn);
}

.visit-history-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.6rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.6rem;
  border: 1px solid var(--rt-border);
  background: color-mix(in srgb, var(--rt-accent) 8%, #fff);
  color: var(--rt-accent-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

.visit-history-btn:hover {
  color: var(--rt-accent-dark);
  border-color: var(--rt-accent);
}

.visit-history-when {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.visit-history-date {
  font-weight: 700;
}

.visit-invoice-no {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
}

.visit-history-amount {
  font-size: 1.05rem;
  font-weight: 700;
}

#quickAddFields.is-disabled {
  opacity: 0.45;
}

#quickAddFields.is-disabled .form-text {
  color: var(--rt-muted);
}

@media (min-width: 768px) {
  .visit-card {
    grid-template-columns: minmax(8rem, 1.2fr) minmax(0, 2fr) auto;
    align-items: center;
  }

  .visit-history-row {
    grid-template-columns: 1.2fr 0.8fr auto auto;
    align-items: center;
  }

  .visit-card-stats-head {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .visit-history-btn {
    min-width: 7.5rem;
  }
}

.broadcast-channels,
.broadcast-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.broadcast-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--rt-border);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.broadcast-choice:has(input:checked) {
  border-color: var(--rt-accent);
  background: color-mix(in srgb, var(--rt-accent) 8%, #fff);
}

.emoji-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.emoji-btn {
  border: 1px solid var(--rt-border);
  background: var(--rt-surface);
  border-radius: 0.45rem;
  min-width: 2.4rem;
  min-height: 2.4rem;
  font-size: 1.15rem;
}

.broadcast-preview {
  white-space: pre-wrap;
  line-height: 1.5;
  padding: 0.85rem 1rem;
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--rt-accent) 6%, #fff);
  border: 1px solid var(--rt-border);
}

/* Bill scan (Stock In) — Vyapar-style upload zone */
.bill-scan-card {
  border: 1px dashed color-mix(in srgb, var(--rt-accent) 35%, var(--rt-border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--rt-accent) 5%, #fff), var(--rt-surface));
}

.bill-scan-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.bill-scan-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rt-accent);
  background: color-mix(in srgb, var(--rt-accent) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--rt-accent) 25%, var(--rt-border));
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  white-space: nowrap;
}

.bill-scan-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding-left: 1.1rem;
  margin-bottom: 0.85rem;
}

.bill-scan-drop {
  border: 2px dashed var(--rt-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--rt-surface);
}

.bill-scan-drop:focus {
  outline: 2px solid color-mix(in srgb, var(--rt-accent) 40%, transparent);
  outline-offset: 2px;
}

.bill-scan-drop-active,
.bill-scan-drop:hover {
  border-color: var(--rt-accent);
  background: color-mix(in srgb, var(--rt-accent) 4%, #fff);
}

.bill-scan-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.bill-scan-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  color: var(--rt-muted);
}

.bill-scan-result {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--rt-ok-border);
  background: var(--rt-ok-bg);
  background-size: cover;
  background-position: top right;
}

.bill-scan-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.bill-scan-conf {
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.bill-scan-conf-high { background: #dcfce7; color: #166534; }
.bill-scan-conf-medium { background: #fef3c7; color: #92400e; }
.bill-scan-conf-low { background: #fee2e2; color: #991b1b; }

/* Full-screen lock: Save / scan / wait. Blocks extra taps. */
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(20, 38, 29, 0.72);
  backdrop-filter: blur(6px);
}

.app-loader.is-on {
  display: flex !important;
}

body.app-loader-lock {
  overflow: hidden;
  touch-action: none;
}

.app-loader-card {
  width: min(22rem, 100%);
  background: var(--rt-surface);
  color: var(--rt-ink);
  border: 1px solid var(--rt-border);
  border-radius: 1.1rem;
  padding: 1.45rem 1.2rem 1.2rem;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.app-loader-scene {
  position: relative;
  width: 5.6rem;
  height: 5.6rem;
  margin: 0 auto 0.85rem;
}

.app-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid #d7e3db;
  border-top-color: var(--rt-accent);
  border-right-color: var(--rt-accent);
}

.app-loader.is-on .app-loader-ring {
  animation: app-spin 0.75s linear infinite;
}

.app-loader-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.1rem;
  height: 3.1rem;
  margin: -1.55rem 0 0 -1.55rem;
  border-radius: 50%;
  background: var(--rt-accent);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-loader.is-on .app-loader-core {
  animation: app-pulse 0.9s ease-in-out infinite;
}

.app-loader-dots {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.7rem;
  height: 1.15rem;
  margin: 0 0 0.9rem;
}

.app-loader-dots span {
  display: block;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--rt-accent);
  flex: 0 0 0.58rem;
}

.app-loader.is-on .app-loader-dots span:nth-child(1) {
  animation: app-dot 0.7s ease-in-out infinite;
}
.app-loader.is-on .app-loader-dots span:nth-child(2) {
  animation: app-dot 0.7s ease-in-out 0.15s infinite;
}
.app-loader.is-on .app-loader-dots span:nth-child(3) {
  animation: app-dot 0.7s ease-in-out 0.3s infinite;
}

.app-loader-text {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}

.app-loader-sub {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--rt-muted);
}

@keyframes app-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes app-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

@keyframes app-dot {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-10px); opacity: 1; }
}

/* ---------- Store overview ---------- */

.ov {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ov-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: 1.1rem;
  color: #f4faf6;
  background:
    radial-gradient(circle at 88% 12%, rgba(250, 204, 21, 0.22), transparent 28%),
    linear-gradient(135deg, #143528 0%, #1f6b4a 48%, #0f766e 100%);
  box-shadow: 0 16px 36px rgba(20, 38, 29, 0.18);
}

.ov-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fde68a;
}

.ov-hello {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.15;
}

.ov-shop {
  margin: 0.28rem 0 0;
  font-size: 1.05rem;
  font-weight: 650;
  color: #d1fae5;
}

.ov-sub {
  margin: 0.45rem 0 0;
  max-width: 36rem;
  color: rgba(236, 253, 245, 0.82);
  font-size: 0.92rem;
}

.ov-hero-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.ov-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.ov-hero-actions .btn-outline-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.ov-hero-actions .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.ov-hero-date {
  flex: 0 0 auto;
  min-width: 8.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem 0.8rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-align: center;
}

.ov-date-cal {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ov-date-day {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
}

.ov-date-rest,
.ov-date-week {
  font-size: 0.78rem;
  color: #d1fae5;
}

.ov-date-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  margin-top: 0.55rem;
  padding: 0.42rem 0.65rem 0.36rem;
  width: 100%;
  border-radius: 0.7rem;
  background: rgba(253, 230, 138, 0.14);
  box-shadow: inset 0 0 0 1px rgba(253, 230, 138, 0.28);
}

.ov-time-hm {
  font-size: 1.38rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: #fde68a;
}

.ov-time-colon {
  display: inline-block;
  width: 0.32em;
  text-align: center;
  animation: ov-colon 1s steps(1) infinite;
}

@keyframes ov-colon {
  50% { opacity: 0.45; }
}

.ov-time-ampm {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #fef3c7;
}

.ov-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.ov-kpi {
  padding: 0.95rem 1rem 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid transparent;
  box-shadow: 0 8px 20px rgba(20, 38, 29, 0.06);
  min-height: 7.1rem;
}

.ov-kpi-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.78;
}

.ov-kpi-value {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.38rem;
  font-weight: 800;
  line-height: 1.15;
  word-break: break-word;
}

.ov-kpi-meta {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  opacity: 0.78;
}

.ov-kpi-sales { background: linear-gradient(180deg, #ecfdf5, #d1fae5); color: #065f46; border-color: #6ee7b7; }
.ov-kpi-month { background: linear-gradient(180deg, #eff6ff, #dbeafe); color: #1e3a8a; border-color: #93c5fd; }
.ov-kpi-profit { background: linear-gradient(180deg, #f5f3ff, #ede9fe); color: #5b21b6; border-color: #c4b5fd; }
.ov-kpi-buy { background: linear-gradient(180deg, #fff7ed, #ffedd5); color: #9a3412; border-color: #fdba74; }
.ov-kpi-due { background: linear-gradient(180deg, #fffbeb, #fef3c7); color: #92400e; border-color: #fcd34d; }
.ov-kpi-pay { background: linear-gradient(180deg, #fff1f2, #ffe4e6); color: #9f1239; border-color: #fda4af; }
.ov-kpi-stock { background: linear-gradient(180deg, #f0fdfa, #ccfbf1); color: #115e59; border-color: #5eead4; }
.ov-kpi-alert { background: linear-gradient(180deg, #fff7ed, #fed7aa); color: #9a3412; border-color: #fb923c; }

.ov-charts,
.ov-grids {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.85rem;
}

.ov-panel {
  background: var(--rt-surface);
  border: 1px solid var(--rt-border);
  border-radius: 1rem;
  padding: 1rem 1.05rem 1.05rem;
  box-shadow: 0 10px 24px var(--rt-glow);
  min-width: 0;
}

.ov-panel-wide { grid-column: 1; }

.ov-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.ov-panel-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
}

.ov-panel-head span,
.ov-panel-head a {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--rt-muted);
}

.ov-chart-wrap {
  position: relative;
  height: 220px;
}

.ov-chart-wrap.is-empty {
  display: none;
}

.ov-chart-donut { height: 200px; }

.ov-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.ov-split div {
  padding: 0.65rem 0.75rem;
  border-radius: 0.7rem;
  background: var(--rt-stat-to);
}

.ov-split span {
  display: block;
  font-size: 0.75rem;
  color: var(--rt-muted);
  font-weight: 700;
}

.ov-split strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.05rem;
}

.ov-split small {
  color: var(--rt-muted);
}

.ov-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.ov-note {
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--rt-border);
  background: var(--rt-surface);
}

.ov-note h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 750;
}

.ov-note p {
  margin: 0.3rem 0 0;
  font-size: 0.86rem;
  color: var(--rt-muted);
  line-height: 1.4;
}

.ov-note-sales { background: #ecfdf5; border-color: #6ee7b7; }
.ov-note-profit { background: #f5f3ff; border-color: #c4b5fd; }
.ov-note-due { background: #fffbeb; border-color: #fcd34d; }
.ov-note-pay { background: #fff1f2; border-color: #fda4af; }
.ov-note-alert { background: #fff7ed; border-color: #fdba74; }
.ov-note-stock { background: #f0fdfa; border-color: #5eead4; }
.ov-note-up { background: #eff6ff; border-color: #93c5fd; }

.ov-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ov-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rt-border);
  align-items: center;
}

.ov-list li:last-child { border-bottom: 0; }

.ov-list-name {
  font-weight: 650;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-list-meta {
  grid-column: 1;
  font-size: 0.75rem;
  color: var(--rt-muted);
}

.ov-list strong { font-size: 0.92rem; }
.ov-due { color: #9f1239; }
.ov-empty { color: var(--rt-muted); font-size: 0.88rem; }

@media (max-width: 1100px) {
  .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-charts,
  .ov-grids,
  .ov-insights { grid-template-columns: 1fr; }
  .ov-panel-wide { grid-column: auto; }
}

@media (max-width: 640px) {
  .ov { gap: 0.7rem; }
  .ov-hero {
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.95rem 0.9rem 1rem;
  }
  .ov-kicker,
  .ov-sub { display: none; }
  .ov-hello {
    font-size: 1.22rem;
    overflow-wrap: anywhere;
  }
  .ov-shop { font-size: 0.88rem; }
  .ov-hero-actions {
    margin-top: 0.7rem;
    gap: 0.4rem;
  }
  .ov-hero-actions .btn {
    flex: 1 1 0;
    min-height: 2.15rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }
  .ov-hero-date {
    min-width: 5.7rem;
    padding: 0.5rem 0.55rem 0.55rem;
  }
  .ov-date-day { font-size: 1.55rem; }
  .ov-date-rest,
  .ov-date-week { font-size: 0.7rem; }
  .ov-date-time {
    margin-top: 0.4rem;
    padding: 0.28rem 0.35rem 0.24rem;
  }
  .ov-time-hm { font-size: 1.05rem; }
  .ov-time-ampm { font-size: 0.58rem; letter-spacing: 0.1em; }
  .ov-kpis { gap: 0.55rem; }
  .ov-kpi {
    min-height: 0;
    padding: 0.7rem 0.7rem 0.65rem;
  }
  .ov-kpi-label { font-size: 0.66rem; }
  .ov-kpi-value {
    font-size: 1.02rem;
    overflow-wrap: anywhere;
  }
  .ov-kpi-meta { font-size: 0.72rem; }
  .ov-panel { padding: 0.85rem 0.85rem 0.9rem; }
  .ov-chart-wrap { height: 168px; }
  .ov-chart-donut { height: 168px; }
  .ov-split { grid-template-columns: 1fr 1fr; gap: 0.45rem; }
}

@media (max-width: 400px) {
  .ov-date-week { display: none; }
  .ov-hero-date { min-width: 5.2rem; }
}

/* —— Gold plan extras —— */
.gold-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  padding: 0.12rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5c4508;
  background: linear-gradient(135deg, #f4e8c0 0%, #e0c56a 55%, #c9a227 100%);
  border: 1px solid rgba(184, 134, 11, 0.35);
  vertical-align: middle;
}

.gold-feature-card {
  border: 1px solid rgba(184, 134, 11, 0.35);
  background:
    linear-gradient(135deg, rgba(244, 232, 192, 0.35), rgba(255, 253, 249, 0.95)),
    var(--rt-card, #fff);
  box-shadow: 0 1px 0 rgba(184, 134, 11, 0.12);
}

.gold-feature-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a7209;
  margin-bottom: 0.35rem;
}

.shop-switcher {
  margin: 0;
}

.shop-switcher-select {
  min-width: 9.5rem;
  max-width: 14rem;
  font-weight: 600;
  border-color: rgba(184, 134, 11, 0.45);
  background-color: #fffdf6;
  color: #3d3208;
}

.shop-switcher-select:focus {
  border-color: #b8860b;
  box-shadow: 0 0 0 0.2rem rgba(184, 134, 11, 0.2);
}

.nav-link-gold {
  position: relative;
}

.nav-gold-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  background: linear-gradient(135deg, #e0c56a, #b8860b);
  box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.2);
  vertical-align: middle;
}

.hrms-stat {
  padding: 0.9rem 1rem;
}

.hrms-stat-label {
  font-size: 0.75rem;
  color: var(--rt-muted, #5d6b63);
  margin-bottom: 0.25rem;
}

.hrms-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--rt-ink, #14261d);
}

.hrms-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.05rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(184, 134, 11, 0.28);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.hrms-tile:hover {
  border-color: #b8860b;
  color: inherit;
  transform: translateY(-1px);
}

.hrms-tile span {
  font-size: 0.85rem;
  color: var(--rt-muted, #5d6b63);
}

/* Staff hub — stacked / side layouts + medium icon tiles */
.hrms-layout-switch {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.hrms-layout-switch-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  padding: 0 0.45rem 0 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hrms-layout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}
.hrms-layout-btn.is-on {
  background: #fff;
  color: #166534;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
  font-weight: 700;
}
.hrms-home-layout.is-stack {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.hrms-home-layout.is-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.hrms-home-layout.is-side .hrms-group-card {
  min-height: 0;
  padding: 0.95rem 1rem 1.05rem;
}
.hrms-home-layout.is-side .hrms-group-head {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  gap: 0.6rem;
}
.hrms-home-layout.is-side .hrms-group-badge {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.7rem;
  font-size: 0.95rem;
}
.hrms-home-layout.is-side .hrms-group-title {
  font-size: 1.05rem;
}
.hrms-home-layout.is-side .hrms-group-sub {
  font-size: 0.76rem;
}
.hrms-home-layout.is-side .hrms-group-tiles {
  gap: 0.55rem;
}
.hrms-home-layout.is-side .hrms-group-tiles-3,
.hrms-home-layout.is-side .hrms-group-tiles-4 {
  grid-template-columns: 1fr;
}
.hrms-home-layout.is-side .hrms-hub-tile {
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  min-height: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 0.85rem;
}
.hrms-home-layout.is-side .hrms-hub-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.hrms-home-layout.is-side .hrms-hub-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
}
.hrms-home-layout.is-side .hrms-hub-icon svg {
  width: 1.3rem;
  height: 1.3rem;
}
.hrms-home-layout.is-side .hrms-hub-text strong {
  font-size: 0.92rem;
}
.hrms-home-layout.is-side .hrms-hub-text span {
  font-size: 0.74rem;
}
.hrms-group-card {
  border-radius: 1.25rem;
  padding: 1.2rem 1.25rem 1.35rem;
  border: 1px solid transparent;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}
.hrms-group-pay {
  background:
    linear-gradient(165deg, rgba(236, 253, 245, 0.95) 0%, rgba(255, 255, 255, 0.98) 48%, rgba(254, 249, 195, 0.35) 100%);
  border-color: rgba(187, 247, 208, 0.85);
}
.hrms-group-time {
  background:
    linear-gradient(165deg, rgba(239, 246, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 45%, rgba(253, 242, 248, 0.45) 100%);
  border-color: rgba(191, 219, 254, 0.9);
}
.hrms-group-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.05rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.hrms-group-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  font-weight: 800;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.hrms-group-pay .hrms-group-badge {
  background: #dcfce7;
  color: #15803d;
}
.hrms-group-time .hrms-group-badge {
  background: #dbeafe;
  color: #1d4ed8;
}
.hrms-group-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}
.hrms-group-sub {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.35;
}
.hrms-group-tiles {
  display: grid;
  gap: 0.85rem;
}
.hrms-home-layout.is-stack .hrms-group-tiles-3 {
  grid-template-columns: repeat(3, 1fr);
}
.hrms-home-layout.is-stack .hrms-group-tiles-4 {
  grid-template-columns: repeat(4, 1fr);
}
.hrms-hub-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.05rem 1.05rem 1.15rem;
  border-radius: 1rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  min-height: 8.25rem;
}
.hrms-hub-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  color: inherit;
  text-decoration: none;
  background: #fff;
}
.hrms-hub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 0.85rem;
  flex-shrink: 0;
}
.hrms-hub-icon svg {
  width: 1.55rem;
  height: 1.55rem;
}
.hrms-hub-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.hrms-hub-text strong {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
}
.hrms-hub-text span {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.3;
}
.hrms-hub-employees { border-color: #bbf7d0; }
.hrms-hub-employees .hrms-hub-icon { background: #dcfce7; color: #15803d; }
.hrms-hub-attendance { border-color: #bfdbfe; }
.hrms-hub-attendance .hrms-hub-icon { background: #dbeafe; color: #1d4ed8; }
.hrms-hub-calendar { border-color: #ddd6fe; }
.hrms-hub-calendar .hrms-hub-icon { background: #ede9fe; color: #6d28d9; }
.hrms-hub-advance { border-color: #fed7aa; }
.hrms-hub-advance .hrms-hub-icon { background: #ffedd5; color: #c2410c; }
.hrms-hub-salary { border-color: #fde68a; }
.hrms-hub-salary .hrms-hub-icon { background: #fef08a; color: #a16207; }
.hrms-hub-leave { border-color: #fbcfe8; }
.hrms-hub-leave .hrms-hub-icon { background: #fce7f3; color: #be185d; }
.hrms-hub-leave-approve { border-color: #a5f3fc; }
.hrms-hub-leave-approve .hrms-hub-icon { background: #cffafe; color: #0e7490; }
@media (max-width: 900px) {
  .hrms-home-layout.is-side {
    grid-template-columns: 1fr;
  }
  .hrms-home-layout.is-stack .hrms-group-tiles-3,
  .hrms-home-layout.is-stack .hrms-group-tiles-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575.98px) {
  .hrms-layout-switch {
    width: 100%;
    justify-content: flex-end;
  }
  .hrms-layout-btn span {
    display: none;
  }
  .hrms-group-card {
    padding: 1rem 0.9rem 1.05rem;
    border-radius: 1.05rem;
  }
  .hrms-home-layout.is-stack .hrms-group-tiles-3,
  .hrms-home-layout.is-stack .hrms-group-tiles-4 {
    grid-template-columns: 1fr;
  }
  .hrms-hub-tile {
    flex-direction: row;
    align-items: center;
    min-height: 0;
    padding: 0.75rem 0.8rem;
  }
  .hrms-hub-text strong,
  .hrms-hub-text span {
    overflow-wrap: anywhere;
  }
}
.leave-approve-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid #e5e7eb;
}
.leave-approve-row:last-child {
  border-bottom: none;
}
.leave-approve-main {
  flex: 1 1 14rem;
  min-width: 10rem;
}
.leave-approve-actions {
  flex: 0 1 auto;
}
.leave-type-plus {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  line-height: 1;
  font-weight: 700;
  font-size: 1.1rem;
}
.leave-type-add-card {
  margin-bottom: 0.85rem;
}
.leave-type-list-card {
  padding-bottom: 0.65rem;
}
.leave-type-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.leave-type-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #fff;
}
.leave-type-row.is-inactive {
  background: #f8fafc;
  opacity: 0.85;
}
.leave-type-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.leave-type-code {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}
.leave-type-toggle {
  margin: 0;
}

.report-card-gold {
  border-color: rgba(184, 134, 11, 0.4);
  background: linear-gradient(180deg, #fffdf6, #fff);
}

.plan-features-gold li.is-on::before {
  content: "★";
  border: none;
  width: auto;
  height: auto;
  top: 0.05rem;
  left: 0;
  transform: none;
  color: #b8860b;
  font-size: 0.85rem;
  line-height: 1;
}

.plan-card-gold .plan-features {
  gap: 0.55rem;
}

.plan-card-gold .plan-features li {
  font-size: 0.88rem;
}

.plan-gold-note {
  margin: -0.55rem 0 1.1rem;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #7a6a3d;
  font-style: italic;
}

.plan-gold-phone {
  display: inline;
  white-space: nowrap;
  font-style: normal;
  font-weight: 700;
  color: #1d4ed8;
  text-decoration: none;
}

.plan-gold-phone:hover {
  color: #1e40af;
  text-decoration: underline;
}

.plan-card-soon .plan-features-gold {
  margin-top: 0.25rem;
}

.header-shop .gold-badge {
  position: relative;
  top: -0.1rem;
}

@media (max-width: 640px) {
  .shop-switcher-select {
    min-width: 7.5rem;
    max-width: 9.5rem;
    font-size: 0.8rem;
  }
}

/* —— HRMS attendance —— */
.att-status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.att-status-pill {
  cursor: pointer;
  border: 1px solid #d7ddd7;
  border-radius: 0.35rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
  background: #fff;
  user-select: none;
}
.att-status-pill.is-on {
  border-color: #1f6b4a;
  background: #e8f3ed;
  font-weight: 600;
}
.att-status-pill.att-status-absent.is-on {
  border-color: #9f1239;
  background: #ffe4e6;
  color: #9f1239;
}
.att-status-pill.att-status-leave.is-on {
  border-color: #a16207;
  background: #fef3c7;
}
.att-status-pill.att-status-half.is-on {
  border-color: #1d4ed8;
  background: #dbeafe;
}
.att-status-pill.att-status-off.is-on {
  border-color: #64748b;
  background: #f1f5f9;
}
.att-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--rt-muted, #5d6b63);
}
.att-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}
.att-cell.is-present { background: #dcfce7; color: #166534; }
.att-cell.is-half { background: #dbeafe; color: #1d4ed8; }
.att-board-table td.att-sum-col.is-zero { color: #cbd5e1; font-weight: 500; }
.att-board-table .att-sum-col.att-sum-first { border-left: 2px solid #e2e8f0; }
.att-board-table .att-sum-col.att-paid-col { color: #15803d; background: #f0fdf4; white-space: nowrap; }
.att-paid-col strong { font-size: .95rem; }
.att-paid-of { color: #64748b; font-size: .72rem; font-weight: 500; }
.att-paid-cut { color: #dc2626; font-size: .68rem; font-weight: 600; line-height: 1; }
.att-cell.is-absent { background: #ffe4e6; color: #9f1239; }
.att-cell.is-leave { background: #fef3c7; color: #a16207; }
.att-cell.is-off { background: #f1f5f9; color: #64748b; }
.att-cell.is-weekly {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #c4b5fd;
}
.att-cell.is-holiday-off {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fdba74;
}
.att-cell.att-cell-hd {
  min-width: 2.15rem;
  font-size: 0.65rem;
  letter-spacing: -0.02em;
}
.att-cell.is-empty { background: #fafafa; color: #94a3b8; border: 1px dashed #e2e8f0; }
.att-cell.is-inactive {
  color: #94a3b8;
  background: repeating-linear-gradient(135deg, #f1f5f9 0 4px, #e2e8f0 4px 8px);
  border: 1px solid #e2e8f0;
}
.att-month-wrap { overflow: hidden; max-width: 100%; }
.att-month-table { font-size: 0.75rem; }
.att-month-table .att-name-col {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  min-width: 7.5rem;
  white-space: nowrap;
}
.att-month-table .att-day-col {
  text-align: center;
  padding: 0.2rem !important;
  min-width: 1.6rem;
}
.att-month-table .att-day-col.is-sun { background: #f8fafc; }
.att-month-table thead th a { color: inherit; text-decoration: none; }

/* Editable cycle attendance board */
.att-board-toolbar {
  padding: 0.75rem 1rem;
}
.att-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  justify-content: space-between;
}
.att-toolbar-cycle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
}
.att-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-left: auto;
}
.att-board-cycle strong {
  font-size: 1.05rem;
}
.att-sheet-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.att-sheet-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-left: auto;
}
.att-zoom {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.att-zoom-btn {
  width: 1.85rem;
  height: 1.85rem;
  border: none;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.att-zoom-btn:hover:not(:disabled) {
  background: #e2e8f0;
}
.att-zoom-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.att-zoom-label {
  min-width: 2.75rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}
.att-sheet-note-bar {
  padding: 0.4rem 0.9rem;
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
}
.att-report-sheet {
  --att-zoom: 1;
}
.att-report-sheet-lg .att-sheet-scroll {
  max-height: min(70vh, 52rem);
  overflow: auto;
}
.att-report-sheet-lg .att-board-table {
  font-size: calc(0.78rem * var(--att-zoom));
}
.att-report-sheet-lg .att-board-table .att-name-col {
  min-width: calc(9rem * var(--att-zoom));
}
.att-report-sheet-lg .att-cell {
  width: calc(1.55rem * var(--att-zoom));
  height: calc(1.55rem * var(--att-zoom));
  font-size: calc(0.72rem * var(--att-zoom));
}
.att-report-sheet-lg .att-day-col {
  min-width: calc(1.85rem * var(--att-zoom));
  padding: 0.28rem 0.12rem !important;
}
.att-report-sheet-lg .att-day-num {
  font-size: calc(0.78rem * var(--att-zoom));
}
.att-report-sheet-lg .att-day-wd {
  font-size: calc(0.62rem * var(--att-zoom));
}

/* Full screen sheet */
#attSheet:fullscreen,
#attSheet.is-fullscreen-fallback {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  border-radius: 0;
  border: none;
  background: #fff;
  box-shadow: none;
}
#attSheet:fullscreen .att-sheet-scroll,
#attSheet.is-fullscreen-fallback .att-sheet-scroll {
  flex: 1 1 auto;
  max-height: none;
  height: 100%;
}
#attSheet.is-fullscreen-fallback {
  position: fixed;
  inset: 0;
  z-index: 2000;
}
@media (max-width: 575.98px) {
  .att-toolbar-actions {
    margin-left: 0;
    width: 100%;
  }
  .att-toolbar-actions .btn {
    flex: 1 1 auto;
  }
  .att-sheet-tools {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
}
.att-lock-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.9rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #ecfdf5, #fff);
  border: 1px solid #bbf7d0;
}
.att-lock-label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.att-lock-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #166534;
}
.att-lock-sub {
  font-size: 0.72rem;
  color: #64748b;
}
.att-lock-radios {
  display: inline-flex;
  padding: 0.15rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  gap: 0.1rem;
}
.att-lock-opt {
  margin: 0;
  cursor: pointer;
}
.att-lock-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.att-lock-opt span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
}
.att-lock-opt.is-on span {
  background: #1f6b4a;
  color: #fff;
  box-shadow: 0 1px 4px rgba(31, 107, 74, 0.25);
}
.att-board-lock-banner {
  padding: 0.55rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #166534;
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
}
.att-board-locked .att-board-wrap {
  opacity: 0.92;
}
.att-board-locked .att-edit-cell {
  cursor: not-allowed;
  pointer-events: none;
}
.att-board-unlocked .att-edit-cell {
  cursor: pointer;
  pointer-events: auto;
}
.att-board-wrap {
  overflow: hidden;
  padding: 0;
}
.att-board-table {
  font-size: 0.75rem;
  margin: 0;
}
.att-board-table .att-name-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  min-width: 8.5rem;
  max-width: 10rem;
  box-shadow: 4px 0 8px -6px rgba(15, 23, 42, 0.25);
}
.att-board-table thead .att-name-col {
  z-index: 3;
  background: #f8fafc;
}
.att-board-table .att-day-col {
  text-align: center;
  padding: 0.25rem 0.15rem !important;
  min-width: 2rem;
  vertical-align: middle;
}
.att-board-table .att-day-col.is-today {
  background: rgba(31, 107, 74, 0.08);
}
.att-board-table .att-day-col.is-holiday {
  background: rgba(251, 191, 36, 0.12);
}
.att-board-table .att-day-col.is-future {
  background: #fafafa;
}
.att-edit-cell.is-future-cell.is-empty {
  background: transparent;
  border-style: dashed;
  opacity: 0.55;
}
.att-day-num {
  display: block;
  font-weight: 700;
  line-height: 1.1;
}
.att-day-wd {
  display: block;
  font-size: 0.62rem;
  color: #94a3b8;
  text-transform: uppercase;
}
.att-sum-col {
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}
.att-edit-cell {
  border: none;
  cursor: pointer;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  font: inherit;
  font-weight: 700;
}
.att-edit-cell:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px rgba(31, 107, 74, 0.25);
}
.att-edit-cell.is-auto {
  opacity: 0.78;
  border: 1px dashed rgba(100, 116, 139, 0.45);
}
.att-edit-cell.is-leave-linked {
  outline: 2px solid #db2777;
  outline-offset: 1px;
}
.att-edit-cell.is-leave-linked:hover {
  box-shadow: 0 0 0 2px rgba(219, 39, 119, 0.35);
}
.att-cell.is-auto-hint {
  background: #fafafa;
  color: #94a3b8;
  border: 1px dashed #e2e8f0;
  opacity: 0.85;
}
.att-cell.is-auto {
  box-shadow: inset 0 0 0 1px rgba(22, 101, 52, 0.12);
}
.att-cell.is-leave-linked {
  outline: 1px solid rgba(161, 98, 7, 0.45);
}
.att-cell.is-future-cell {
  opacity: 0.55;
}

/* Read-only attendance report sheet */
.att-report-intro {
  padding: 1rem 1.15rem;
  border-color: #bfdbfe;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.98));
}
.att-report-intro-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: flex-start;
  justify-content: space-between;
}
.att-report-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #1d4ed8;
  color: #eff6ff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.att-report-lead {
  max-width: 46rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #334155;
}
.att-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.att-legend-report {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  align-items: center;
}
.att-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #475569;
}
.att-report-sheet {
  border-color: #e2e8f0;
  overflow: hidden;
}
.att-report-banner {
  padding: 0.55rem 0.9rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}
.att-report-sheet .att-cell {
  cursor: default;
  pointer-events: none;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.35rem;
}
.att-board-table .att-sum-col {
  text-align: center;
  font-weight: 700;
  min-width: 2.4rem;
  background: #f8fafc;
}
@media (max-width: 575.98px) {
  .att-report-intro {
    padding: 0.85rem 0.9rem;
  }
  .att-report-lead {
    font-size: 0.84rem;
  }
}

/* Weekly offs & holidays calendar */
.hrms-cal-tabs .nav-link {
  color: #475569;
  font-weight: 600;
  margin-bottom: -1px;
}
.hrms-cal-tabs .nav-link:hover {
  color: #1f6b4a;
  background: #f1f7f3;
  border-color: #e2e8f0 #e2e8f0 transparent;
}
.hrms-cal-tabs .nav-link.active {
  color: #1f6b4a;
  background: #fff;
  border-bottom-color: #1f6b4a;
}
.hrms-cal-card {
  padding: 1.15rem 1.25rem;
  border-radius: 0.9rem;
}
.hrms-cal-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin-bottom: 1rem;
}
.hrms-cal-current {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.65rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.hrms-year-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  min-width: 7.5rem;
}
.hrms-year-pick .form-select {
  min-width: 7.5rem;
  font-weight: 600;
}
.hrms-weekday-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.hrms-weekday-chip {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 4.4rem;
  padding: 0.65rem 0.7rem;
  margin: 0;
  border-radius: 0.75rem;
  border: 1.5px solid #d7ddd7;
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.hrms-weekday-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.hrms-weekday-short {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e293b;
  line-height: 1.1;
}
.hrms-weekday-full {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}
.hrms-weekday-chip:hover {
  border-color: #1f6b4a;
  box-shadow: 0 0 0 3px rgba(31, 107, 74, 0.08);
}
.hrms-weekday-chip.is-on {
  background: #1f6b4a;
  border-color: #1f6b4a;
  box-shadow: 0 0 0 3px rgba(31, 107, 74, 0.15);
}
.hrms-weekday-chip.is-on .hrms-weekday-short,
.hrms-weekday-chip.is-on .hrms-weekday-full {
  color: #fff;
}
.hrms-weekday-chip.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.hrms-weekday-chip.is-disabled:hover {
  border-color: #d7ddd7;
  box-shadow: none;
}
.hrms-holiday-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.hrms-holiday-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: linear-gradient(90deg, #f8fafc, #fff);
}
.hrms-holiday-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.65rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #166534;
  flex-shrink: 0;
}
.hrms-holiday-day {
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1;
}
.hrms-holiday-mon {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.hrms-holiday-meta {
  flex: 1 1 10rem;
  min-width: 8rem;
}

.sysdate-early-note {
  font-size: 0.82rem;
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid #fdba74;
  border-radius: 0.5rem;
  padding: 0.45rem 0.65rem;
}

.sysdate-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1.1rem;
  padding: 1rem 1.1rem;
  border-radius: 0.85rem;
  background:
    linear-gradient(135deg, rgba(31, 107, 74, 0.08), rgba(196, 107, 85, 0.08)),
    #fff;
  border: 1px solid #d7ddd7;
}
.sysdate-row-main {
  flex: 1 1 14rem;
  min-width: 12rem;
}
.sysdate-change-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.15rem;
  padding: 0.55rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f6b4a, #2f8f66 55%, #c46b55);
  color: #fff;
  box-shadow: 0 8px 18px rgba(31, 107, 74, 0.22);
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sysdate-change-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(31, 107, 74, 0.28);
  color: #fff;
}
.sysdate-change-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.sysdate-change-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.sysdate-change-title {
  font-weight: 700;
  font-size: 0.92rem;
}
.sysdate-change-sub {
  font-size: 0.72rem;
  opacity: 0.9;
}
.sysdate-modal {
  border: 0;
  overflow: hidden;
  border-radius: 1rem;
}
.sysdate-modal-hero {
  position: relative;
  padding: 1.25rem 1.35rem 1.1rem;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 214, 170, 0.45), transparent 42%),
    linear-gradient(135deg, #154d35 0%, #1f6b4a 48%, #c46b55 120%);
}
.sysdate-modal-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}
.sysdate-modal-title {
  margin: 0.35rem 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 750;
}
.sysdate-modal-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 0.92rem;
  opacity: 0.95;
}
.sysdate-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
}
.sysdate-modal-body {
  background: #f7faf8;
}
.sysdate-compose {
  position: relative;
  padding: 0.85rem;
  border-radius: 0.85rem;
  background: #fff;
  border: 1px solid #d7ddd7;
}
.sysdate-compose-label {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #5d6b63;
}
.sysdate-compose-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.sysdate-lang {
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #cfd8d2;
  background: #eef4f0;
}
.sysdate-lang-btn {
  border: 0;
  background: transparent;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #5d6b63;
}
.sysdate-lang-btn.is-on {
  background: linear-gradient(135deg, #1f6b4a, #c46b55);
  color: #fff;
}
.sysdate-compose-hint {
  line-height: 1.35;
}
.sysdate-compose textarea {
  min-height: 10rem;
  border-color: #cfd8d2;
  background: #fcfdfc;
}
.sysdate-date-chip {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #1f6b4a, #2a7d59);
  color: #fff;
}
.sysdate-date-chip .form-control {
  max-width: 12rem;
  border: 0;
  font-weight: 600;
}
.sysdate-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  background: #123a2a;
  border-top: 0;
}
.sysdate-to-line {
  margin-right: auto;
  color: #d7e8de;
  font-size: 0.82rem;
}
@media (max-width: 576px) {
  .sysdate-change-btn { width: 100%; }
  .sysdate-to-line { width: 100%; margin-bottom: 0.25rem; }
}

.bill-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.gst-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.35rem 0.7rem 0.35rem 0.45rem;
  border: 1px solid var(--rt-border);
  border-radius: 999px;
  background: var(--rt-surface);
  cursor: pointer;
  user-select: none;
}
.gst-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.gst-switch-ui {
  width: 2.4rem;
  height: 1.3rem;
  border-radius: 999px;
  background: #c5d0c9;
  position: relative;
  flex-shrink: 0;
}
.gst-switch-ui::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 38, 29, 0.25);
  transition: transform 0.15s ease;
}
.gst-switch input:checked + .gst-switch-ui {
  background: #1f6b4a;
}
.gst-switch input:checked + .gst-switch-ui::after {
  transform: translateX(1.05rem);
}
.gst-switch-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.gst-switch-copy strong {
  font-size: 0.82rem;
  color: var(--rt-ink, #14261d);
}
.gst-switch-copy small {
  font-size: 0.7rem;
  color: #5d6b63;
}
.gst-switch.is-locked {
  opacity: 0.65;
  cursor: not-allowed;
}
.gst-bill-panel {
  border-color: #c5e4d4;
  background: #f3faf6;
}
.gst-bill-panel-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.85rem;
}
.gst-bill-panel-head strong {
  color: #1f6b4a;
}
.gst-bill-panel-head span,
.gst-bill-missing {
  font-size: 0.85rem;
  color: #5d6b63;
  margin: 0;
}
.line-items-table:not(.is-gst) .gst-hsn-col {
  display: none;
}
.line-items-table.is-gst .gst-hsn-col {
  width: 6.75rem;
  min-width: 5.5rem;
}
.line-items-table .hsn {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.gst-plain-tax[hidden] {
  display: none !important;
}



/* ---------- Settings page ---------- */
.settings-subtitle {
  font-size: 0.88rem;
  color: var(--rt-muted);
  margin-top: 0.15rem;
}
.settings-jump {
  position: sticky;
  top: 4.6rem;
  z-index: 5;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.45rem;
  margin-bottom: 1rem;
  border: 1px solid var(--rt-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--rt-surface) 92%, transparent);
  backdrop-filter: blur(6px);
  scrollbar-width: none;
}
.settings-jump::-webkit-scrollbar { display: none; }
.settings-jump a {
  flex: 0 0 auto;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--rt-muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.settings-jump a:hover,
.settings-jump a.is-active {
  background: color-mix(in srgb, var(--rt-accent) 12%, transparent);
  color: var(--rt-accent-dark);
}
.settings-form section[id],
.settings-form #set-date {
  scroll-margin-top: 8.5rem;
}
.settings-card {
  padding: 1.15rem 1.25rem;
  border-radius: 0.9rem;
}
.settings-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px dashed var(--rt-border);
}
.settings-card-head .settings-section-title {
  font-size: 1.05rem;
  margin: 0;
}
.settings-card-sub {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--rt-muted);
}
.settings-ico {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.7rem;
  color: var(--rt-accent-dark);
  background: color-mix(in srgb, var(--rt-accent) 12%, var(--rt-surface));
}
.settings-ico svg { width: 1.2rem; height: 1.2rem; }
.settings-ico-gold {
  color: #7a5a06;
  background: linear-gradient(135deg, #f7ecc4, #e7cf7c);
}
.settings-subhead {
  margin: 1.25rem 0 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--rt-muted);
}
.settings-toggle-list {
  border: 1px solid var(--rt-border);
  border-radius: 0.75rem;
  background: var(--rt-surface);
  overflow: hidden;
}
.settings-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 0.95rem;
}
.settings-toggle + .settings-toggle { border-top: 1px solid var(--rt-border); }
.settings-toggle-copy {
  flex: 1 1 16rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  cursor: pointer;
}
.settings-toggle-title { font-weight: 600; font-size: 0.93rem; }
.settings-toggle-help { font-size: 0.8rem; line-height: 1.4; color: var(--rt-muted); }
.settings-toggle .form-switch .form-check-input {
  width: 2.6em;
  height: 1.4em;
  margin: 0;
  cursor: pointer;
}
.settings-toggle .form-check-input:checked {
  background-color: var(--rt-accent);
  border-color: var(--rt-accent);
}
.settings-toggle .errorlist { flex-basis: 100%; }
.settings-tile {
  padding: 0.9rem 1rem;
  border: 1px solid var(--rt-border);
  border-radius: 0.75rem;
  background: var(--rt-surface);
}
.gold-feature-card .settings-tile,
.gold-feature-card .settings-toggle-list {
  background: rgba(255, 255, 255, 0.75);
}
.settings-pending {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #7c2d12;
  background: #ffedd5;
  border: 1px solid #fdba74;
}
.settings-inline-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  padding: 0.75rem 0.95rem;
  border: 1px dashed rgba(184, 134, 11, 0.45);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.6);
}
.settings-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}
.settings-link-tile {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rt-border);
  border-radius: 0.9rem;
  background: var(--rt-surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.settings-link-tile:hover {
  border-color: var(--rt-accent);
  box-shadow: 0 4px 14px var(--rt-glow);
  transform: translateY(-1px);
  color: inherit;
}
.settings-link-copy { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.settings-link-title { font-weight: 700; color: var(--rt-accent-dark); }
.settings-link-sub { font-size: 0.8rem; line-height: 1.4; color: var(--rt-muted); }
.settings-link-go { font-size: 1.5rem; line-height: 1; color: var(--rt-muted); }
.settings-savebar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
  margin-right: 3.25rem;
  padding: 0.65rem 0.75rem 0.65rem 1.1rem;
  border: 1px solid var(--rt-border);
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--rt-surface) 94%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.settings-savebar-note { margin-right: auto; font-size: 0.83rem; color: var(--rt-muted); }
.settings-savebar .btn { min-width: 9rem; }
@media (max-width: 575.98px) {
  .settings-card { padding: 1rem; }
  .settings-savebar-note { display: none; }
  .settings-savebar .btn { width: 100%; }
}
/* Salary page */
.sal-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
}
.sal-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; }
.sal-filter .form-label { font-size: 0.78rem; color: var(--rt-muted); margin-bottom: 0.2rem; }
.sal-filter .form-select { min-width: 11.5rem; font-weight: 600; }
.sal-filter .sal-year { width: 6.5rem; }
.sal-totals { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sal-total {
  display: flex;
  flex-direction: column;
  min-width: 6.5rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--rt-border);
  border-radius: 0.6rem;
  background: var(--rt-surface);
}
.sal-total .label { font-size: 0.72rem; color: var(--rt-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.sal-total .value { font-size: 1.05rem; font-weight: 700; }
.sal-total.is-net { background: color-mix(in srgb, var(--rt-accent) 10%, var(--rt-surface)); border-color: color-mix(in srgb, var(--rt-accent) 35%, var(--rt-border)); }
.sal-total.is-net .value { color: var(--rt-accent-dark); }
.sal-table td, .sal-table th { white-space: nowrap; }
.sal-table .sal-name { font-weight: 600; margin-right: 0.25rem; }
.sal-table .sal-days { font-weight: 700; }
.sal-table .sal-cut { color: #b42318; }
.sal-edit { position: relative; display: inline-block; }
.sal-edit > summary { list-style: none; }
.sal-edit > summary::-webkit-details-marker { display: none; }
.sal-edit-form {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(2, 7rem);
  gap: 0.45rem;
  padding: 0.75rem;
  border: 1px solid var(--rt-border);
  border-radius: 0.6rem;
  background: var(--rt-surface);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  text-align: left;
}
.sal-edit-form label { font-size: 0.75rem; color: var(--rt-muted); }
.sal-edit-form .btn { grid-column: 1 / -1; }
.sal-card .table-responsive { overflow: visible; }
@media (max-width: 767.98px) {
  .sal-totals { width: 100%; }
  .sal-total { flex: 1 1 calc(50% - 0.5rem); }
  .sal-card .table-responsive { overflow-x: auto; }
  .sal-edit-form { position: static; margin-top: 0.4rem; box-shadow: none; }
}

/* Yearly salary page */
.sy-year {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--rt-border);
  border-radius: 999px;
  background: var(--rt-surface);
  overflow: hidden;
}
.sy-year input {
  width: 4.6rem;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 700;
  -moz-appearance: textfield;
}
.sy-year input::-webkit-inner-spin-button, .sy-year input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sy-year input:focus { outline: none; }
.sy-year-step {
  padding: 0.2rem 0.7rem;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--rt-accent-dark);
  text-decoration: none;
}
.sy-year-step:hover { background: color-mix(in srgb, var(--rt-accent) 10%, transparent); }
.sy-year-step.is-disabled { opacity: 0.35; pointer-events: none; }

.sy-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.sy-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rt-border);
  border-radius: 0.8rem;
  background: var(--rt-surface);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sy-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06); }
.sy-kpi .label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rt-muted); }
.sy-kpi .value { font-size: 1.45rem; font-weight: 800; }
.sy-kpi .sub { font-size: 0.78rem; color: var(--rt-muted); }
.sy-kpi.is-net { background: linear-gradient(135deg, color-mix(in srgb, var(--rt-accent) 16%, var(--rt-surface)), var(--rt-surface)); border-color: color-mix(in srgb, var(--rt-accent) 35%, var(--rt-border)); }
.sy-kpi.is-net .value { color: var(--rt-accent-dark); }
.sy-kpi.is-paid .value { color: #166534; }
.sy-kpi.is-pending .value { color: #b45309; }
.sy-progress, .sy-mini-progress {
  display: block;
  height: 0.4rem;
  border-radius: 999px;
  background: #fde7c7;
  overflow: hidden;
}
.sy-progress > span, .sy-mini-progress > span { display: block; height: 100%; background: #22a060; border-radius: inherit; transition: width 0.6s ease; }
.sy-mini-progress { width: 5.5rem; height: 0.25rem; margin-top: 0.25rem; }

.sy-chart-card { padding: 1rem 1rem 0.6rem; }
.sy-chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.sy-legend, .sy-foot-legend { display: inline-flex; flex-wrap: wrap; gap: 0.9rem; font-size: 0.78rem; color: var(--rt-muted); }
.sy-dot { display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 0.2rem; margin-right: 0.3rem; vertical-align: -1px; }
.sy-dot.is-paid { background: #22a060; }
.sy-dot.is-due { background: #f5b04c; }
.sy-dot.is-live { background: repeating-linear-gradient(45deg, #7cc4a0 0 3px, #d6efe2 3px 6px); }
.sy-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.5rem;
  height: 12rem;
  align-items: end;
}
.sy-bar-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.sy-bar-amt { font-size: 0.66rem; color: var(--rt-muted); margin-bottom: 0.2rem; min-height: 0.9rem; }
.sy-bar {
  position: relative;
  width: min(2.4rem, 100%);
  height: max(var(--h), 3px);
  max-height: calc(100% - 2.4rem);
  border-radius: 0.45rem 0.45rem 0.15rem 0.15rem;
  background: #f5b04c;
  overflow: hidden;
  transform-origin: bottom;
  animation: sy-grow 0.7s ease both;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.sy-bar-paid { position: absolute; left: 0; right: 0; bottom: 0; height: var(--p); background: #22a060; }
.sy-bar-col.is-live .sy-bar { background: repeating-linear-gradient(45deg, #7cc4a0 0 5px, #d6efe2 5px 10px); outline: 2px solid #22a060; outline-offset: 1px; }
.sy-bar-col.is-future .sy-bar, .sy-bar-col.is-empty .sy-bar { background: var(--rt-border); opacity: 0.6; outline: 0; }
.sy-bar-label { margin-top: 0.35rem; font-size: 0.78rem; font-weight: 600; color: var(--rt-muted); }
.sy-bar-col.is-live .sy-bar-label { color: var(--rt-accent-dark); }
.sy-bar-col:hover .sy-bar { filter: brightness(1.08); transform: scaleX(1.08); }
.sy-tip {
  position: absolute;
  bottom: calc(100% - 1rem);
  left: 50%;
  z-index: 10;
  display: none;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 10rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  background: #1f2a24;
  color: #fff;
  font-size: 0.75rem;
  white-space: nowrap;
  transform: translateX(-50%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}
.sy-bar-col:hover .sy-tip, .sy-bar-col:focus .sy-tip { display: flex; }
.sy-bar-col:first-child .sy-tip { left: 0; transform: none; }
.sy-bar-col:last-child .sy-tip { left: auto; right: 0; transform: none; }
@keyframes sy-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.sy-table-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.75rem 0.9rem; }
.sy-search { max-width: 16rem; }
.sy-table th, .sy-table td { white-space: nowrap; }
.sy-table th.sy-sort { cursor: pointer; user-select: none; }
.sy-table th.sy-sort:hover { color: var(--rt-accent-dark); }
.sy-table th.is-asc::after { content: ' ▲'; font-size: 0.6rem; }
.sy-table th.is-desc::after { content: ' ▼'; font-size: 0.6rem; }
.sy-table th.is-live { color: var(--rt-accent-dark); }
.sy-emp { display: flex; align-items: center; gap: 0.55rem; }
.sy-avatar {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--rt-accent) 15%, var(--rt-surface));
  color: var(--rt-accent-dark);
  font-weight: 700;
  flex: none;
}
.sy-table td.sy-cell { padding: 0.2rem; text-align: center; }
.sy-cell a, .sy-cell > span {
  display: block;
  min-width: 3.6rem;
  padding: 0.4rem 0.3rem;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.sy-cell a:hover { transform: scale(1.08); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); position: relative; z-index: 2; }
.sy-cell.is-paid a { background: color-mix(in srgb, #22a060 calc(14% + var(--heat) * 0.3%), transparent); color: #14532d; }
.sy-cell.is-due a { background: color-mix(in srgb, #f5b04c calc(18% + var(--heat) * 0.3%), transparent); color: #7c3d06; }
.sy-cell.is-live a { background: repeating-linear-gradient(45deg, #e3f4ea 0 6px, #f3faf6 6px 12px); color: #14532d; box-shadow: inset 0 0 0 1px #9fd5b8; }
.sy-cell.is-empty > span { color: var(--rt-border); }
.sy-v-days { display: none; }
.sy-table.show-days .sy-v-days { display: inline; }
.sy-table.show-days .sy-v-net { display: none; }
.sy-table .sy-pending { color: #b45309; font-weight: 600; }
.sy-table tfoot td { font-weight: 700; font-size: 0.8rem; background: var(--rt-table-head); }
.sy-foot-legend { padding: 0.6rem 0.9rem; border-top: 1px solid var(--rt-border); }
@media (max-width: 767.98px) {
  .sy-chart { height: 9rem; gap: 0.2rem; }
  .sy-bar-amt { display: none; }
  .sy-kpi .value { font-size: 1.2rem; }
}

/* Salary bulk pay */
.sal-table .sal-check-col { width: 2.6rem; padding-right: 0; text-align: center; }
.sal-table .sal-check-col .form-check-input {
  width: 1.3rem;
  height: 1.3rem;
  margin: 0;
  cursor: pointer;
  border: 2px solid #7c8a82;
  border-radius: 0.35rem;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.sal-table .sal-check-col .form-check-input:hover { border-color: #22a060; box-shadow: 0 0 0 3px rgba(34, 160, 96, 0.15); }
.sal-table .sal-check-col .form-check-input:focus { border-color: #22a060; box-shadow: 0 0 0 3px rgba(34, 160, 96, 0.25); }
.sal-table .sal-check-col .form-check-input:checked,
.sal-table .sal-check-col .form-check-input:indeterminate { background-color: #22a060; border-color: #22a060; }
.sal-table .sal-check-col .form-check-input:active { transform: scale(0.92); }
.sal-table .sal-check-done {
  display: inline-grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: #dcf3e6;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 800;
}
.sal-table tr.is-payable { cursor: pointer; }
.sal-table tr.is-picked > td { background: color-mix(in srgb, #22a060 9%, var(--rt-surface)); }
.sal-bulkbar {
  position: sticky;
  bottom: 0.9rem;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0.9rem auto 0;
  max-width: 44rem;
  padding: 0.6rem 0.75rem 0.6rem 1.1rem;
  border-radius: 999px;
  background: #1f2a24;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  animation: sal-bar-in 0.18s ease-out;
}
.sal-bulkbar[hidden] { display: none; }
.sal-bulkbar-info { font-size: 0.92rem; }
.sal-bulkbar-sep { margin: 0 0.35rem; opacity: 0.5; }
.sal-bulkbar-actions { display: flex; align-items: center; gap: 0.4rem; }
.sal-bulkbar .btn-link { color: #b9e6cc; text-decoration: none; }
.sal-bulkbar .btn-outline-secondary { color: #e5e7eb; border-color: #4b5a52; }
.sal-bulkbar .btn-outline-secondary:hover { background: #33423a; }
.sal-bulkbar .btn-success { border-radius: 999px; padding-inline: 1rem; font-weight: 700; }
@keyframes sal-bar-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 575.98px) {
  .sal-bulkbar { border-radius: 0.9rem; }
  .sal-bulkbar-actions { width: 100%; justify-content: flex-end; }
}

/* ---------- Leave quota settings ---------- */
.leave-quota-settings .lq-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: inherit;
}
.lq-default {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--rt-accent) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--rt-accent) 22%, transparent);
}
.lq-default-text { flex: 1 1 16rem; min-width: 0; }
.lq-default-input { width: 9.5rem; flex: 0 0 auto; }
.lq-default-input .form-control { font-weight: 700; font-size: 1.1rem; text-align: center; }
.lq-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin: 1rem 0 0.5rem;
}
.lq-roles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 0.6rem;
}
.lq-role {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--rt-border);
  border-radius: 0.6rem;
  background: var(--rt-surface, #fff);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.lq-role.is-custom {
  border-color: var(--rt-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--rt-accent) 14%, transparent);
}
.lq-role-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.lq-role-name { font-weight: 600; font-size: 0.88rem; }
.lq-role-count {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--rt-border);
  color: var(--rt-muted, #6b7280);
  white-space: nowrap;
}
.lq-role .lq-role-input { font-weight: 600; }
.lq-role .lq-role-input::placeholder { font-weight: 400; opacity: 0.55; }
.lq-role .lq-reset { visibility: hidden; }
.lq-role.is-custom .lq-reset { visibility: visible; }
.lq-role-state { margin-top: 0.35rem; font-size: 0.74rem; color: var(--rt-muted, #6b7280); }
.lq-role .lq-state-custom { display: none; color: var(--rt-accent); font-weight: 600; }
.lq-role.is-custom .lq-state-custom { display: inline; }
.lq-role.is-custom .lq-state-default { display: none; }
.lq-staff { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.lq-staff-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--rt-border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: inherit;
  text-decoration: none;
  background: var(--rt-surface, #fff);
}
.lq-staff-chip:hover { border-color: var(--rt-accent); }
.lq-staff-chip b { color: var(--rt-accent); }
.lq-note {
  margin-top: 0.9rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--rt-border);
  font-size: 0.78rem;
  color: var(--rt-muted, #6b7280);
}
