.branch-master-list{margin-top:22px}
.branch-master-list .franchise-table-wrap{width:100%;overflow-x:auto}
.branch-master-list .franchise-table{width:100%;min-width:1050px;border-spacing:0;border-collapse:collapse;table-layout:fixed}
.branch-master-list th,.branch-master-list td{padding:15px 18px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle;overflow-wrap:anywhere}
.branch-master-list th{background:#f7f9fb;color:#33485b;font-size:11px;font-weight:800;white-space:nowrap}
.branch-master-list tbody tr:last-child td{border-bottom:0}
.branch-master-list tbody tr:hover{background:#f8fbfe}
.branch-master-list th:first-child,.branch-master-list td:first-child{width:18%;padding-left:24px}
.branch-master-list th:nth-child(2),.branch-master-list td:nth-child(2){width:19%}
.branch-master-list th:nth-child(3),.branch-master-list td:nth-child(3){width:21%}
.branch-master-list th:nth-child(4),.branch-master-list td:nth-child(4){width:15%}
.branch-master-list th:nth-child(5),.branch-master-list td:nth-child(5){width:10%}
.branch-master-list th:last-child,.branch-master-list td:last-child{width:17%;padding-right:24px;white-space:nowrap;text-align:right}
.branch-master-list td b,.branch-master-list td small{display:block}
.branch-master-list td small{margin-top:3px;color:var(--muted);font-size:10px}
.branch-master-list .tag{margin:2px 3px 2px 0}
.branch-master-list .action-trigger{min-width:62px}
.action-trigger.danger{border-color:#efc9cf;color:var(--red)}

.sidebar nav {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #294a63 transparent;
}

.operator {
  flex-shrink: 0;
}

.action-menu button[data-franchise-action="delete"] {
  margin-top: 5px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
  color: var(--red);
}

.action-menu button[data-franchise-action="delete"]:hover {
  background: #fdecee;
  color: var(--red);
}

#franchise-list-page .select-column {
  width: 48px;
  min-width: 48px;
  padding-right: 4px;
  text-align: center;
}

#franchise-list-page .select-column input {
  width: 17px;
  height: 17px;
  cursor: pointer;
}

#franchise-list-page .row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.row-delete-button,
.bulk-delete-button {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #efc9cf;
  border-radius: 7px;
  background: #fff;
  color: var(--red);
  font-weight: 700;
  cursor: pointer;
}

.row-delete-button:hover,
.bulk-delete-button:hover:not(:disabled) {
  background: #fdecee;
}

.bulk-delete-button:disabled {
  border-color: var(--line);
  color: #9aa8b5;
  cursor: not-allowed;
}

.package-list-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.package-list-table th,
.package-list-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.package-list-table td b,
.package-list-table td small {
  display: block;
}

.policy-mode-row {
  max-width: 520px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #dbe9f8;
  border-radius: 10px;
  background: #f5f9fe;
}

.policy-mode-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.single-policy-column {
  grid-template-columns: 1fr;
}

.inline-policy-toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 360px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.inline-policy-toggle input {
  display: none;
}

.inline-policy-toggle > span {
  position: relative;
  flex: none;
  width: 36px;
  height: 20px;
  border-radius: 20px;
  background: #c9d3dc;
}

.inline-policy-toggle > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  content: '';
  transition: .2s;
}

.inline-policy-toggle input:checked + span {
  background: var(--blue);
}

.inline-policy-toggle input:checked + span::after {
  transform: translateX(16px);
}

.inline-policy-toggle b,
.inline-policy-toggle small {
  display: block;
}

.selection-description {
  min-height: 28px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
}

.package-list-table td small {
  color: var(--muted);
  font-size: 10px;
}

.subscriber-map-picker {
  width: 100%;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
}

.map-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.map-picker-heading b,
.map-picker-heading small {
  display: block;
}

.map-picker-heading small,
#subscriber-map-coordinates {
  color: var(--muted);
}

#subscriber-location-map {
  z-index: 1;
  width: 100%;
  height: 360px;
  border: 1px solid #cddceb;
  border-radius: 10px;
  background: #eaf1f8;
}

#subscriber-map-coordinates {
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: 700;
}

#subscribers-page .franchise-table {
  width: 100%;
  table-layout: fixed;
}

#subscribers-page .franchise-table th,
#subscribers-page .franchise-table td {
  vertical-align: middle;
  padding: 16px 18px;
  text-align: left;
}

#subscribers-page .franchise-table td b,
#subscribers-page .franchise-table td small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#subscribers-page .franchise-table td b {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

#subscribers-page .franchise-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

#subscribers-page .franchise-table tbody tr {
  min-height: 68px;
}

#subscribers-page .franchise-table th:first-child { width: 22%; }
#subscribers-page .franchise-table th:nth-child(2) { width: 18%; }
#subscribers-page .franchise-table th:nth-child(3) { width: 16%; }
#subscribers-page .franchise-table th:nth-child(4) { width: 19%; }
#subscribers-page .franchise-table th:nth-child(5) { width: 10%; }
#subscribers-page .franchise-table th:last-child { width: 15%; }

.customer-actions {
  white-space: nowrap;
}

.customer-actions .action-trigger {
  min-width: 58px;
  padding: 9px 12px;
}

.customer-actions .action-trigger + .action-trigger {
  margin-left: 6px;
}

.customer-dialog {
  width: min(720px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(14, 39, 66, .28);
}

.customer-dialog::backdrop {
  background: rgba(5, 24, 40, .56);
}

.customer-dialog header,
.customer-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.customer-dialog header button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
}

.subscriber-profile-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.customer-dialog header .subscriber-profile-header-actions .primary,
.customer-dialog header .subscriber-profile-header-actions .secondary {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.customer-dialog header .subscriber-profile-header-actions .primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.customer-dialog header .subscriber-profile-header-actions .secondary {
  background: #fff;
  color: var(--ink);
}

.customer-dialog header .subscriber-profile-header-actions .subscriber-profile-dismiss {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 28px;
  line-height: 1;
}

.customer-dialog .master-grid {
  padding: 24px;
}

.customer-dialog footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.subscriber-profile-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
}

.subscriber-profile-shell {
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.subscriber-profile-dialog header p,
.subscriber-profile-section p {
  margin: 4px 0 0;
  color: var(--muted);
}

.subscriber-profile-content {
  display: grid;
  gap: 22px;
  padding: 24px;
}

.subscriber-profile-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.subscriber-profile-summary > div {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faff;
}

.subscriber-profile-summary small,
.subscriber-invoice-money small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.subscriber-profile-summary span {
  color: var(--muted);
  font-size: 11px;
}

.subscriber-profile-summary .good { color: #087a52; }
.subscriber-profile-summary .muted { color: var(--muted); }

.subscriber-wallet-balance strong {
  color: #0768c9;
  font-size: 22px;
}
.subscriber-wallet-balance strong.negative { color: #c9364f; }
.subscriber-wallet-balance strong.positive { color: #07865d; }
.subscriber-wallet-balance strong.zero { color: #52677d; }
.invoice-cancel-button {
  border: 1px solid #e5a2ad;
  background: #fff;
  color: #bf2f48;
  border-radius: 10px;
  padding: .72rem 1rem;
  font-weight: 750;
  cursor: pointer;
}
.invoice-cancel-button:hover { background: #fff1f3; }
.subscriber-invoice-card.invoice-void { opacity: .76; }

.subscriber-profile-section {
  display: grid;
  gap: 12px;
}

.subscriber-profile-section .section-heading,
.subscriber-invoice-head,
.subscriber-invoice-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.subscriber-profile-section h3 {
  margin: 0;
}

.subscriber-invoice-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.subscriber-invoice-card.is-expanded {
  border-color: #9fc8f5;
  box-shadow: 0 8px 24px rgba(30, 105, 190, .08);
}

.subscriber-invoice-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto 24px;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border: 0;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.subscriber-invoice-toggle:hover { background: #f7faff; }
.subscriber-invoice-card.is-expanded .subscriber-invoice-toggle { background: #f3f8fe; }

.invoice-step-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6f1fd;
  color: #126fd1;
  font-weight: 800;
}

.invoice-step-summary { min-width: 0; }
.invoice-step-summary b,
.invoice-step-summary small { display: block; }
.invoice-step-summary small { margin-top: 4px; color: var(--muted); }
.invoice-step-total { font-weight: 800; white-space: nowrap; }
.invoice-step-chevron { color: #647a90; font-size: 22px; transition: transform .2s ease; }
.subscriber-invoice-card.is-expanded .invoice-step-chevron { transform: rotate(180deg); }

.subscriber-invoice-details {
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}
.subscriber-invoice-details[hidden] { display: none; }

.subscriber-invoice-head small,
.subscriber-invoice-footer small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.subscriber-invoice-money {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

@media (max-width: 760px) {
  .subscriber-invoice-toggle { grid-template-columns: 34px minmax(0, 1fr) 22px; }
  .subscriber-invoice-toggle .tag { grid-column: 2; justify-self: start; }
  .invoice-step-total { grid-column: 2; }
  .invoice-step-chevron { grid-column: 3; grid-row: 1 / span 2; }
  .subscriber-invoice-money { grid-template-columns: 1fr; }
}

.subscriber-invoice-money > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #f5f8fb;
  border-radius: 10px;
}

.subscriber-invoice-money strong {
  color: #086c4c;
  font-size: 18px;
}

.subscriber-invoice-footer .primary {
  padding: 9px 13px;
  border-radius: 9px;
  text-decoration: none;
}

.subscriber-invoice-footer > div,
.pi-payment-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pi-payment-form input,
.pi-payment-form select {
  width: 190px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.pi-payment-form select {
  width: 210px;
}

.pi-payment-form .pi-payment-amount {
  width: 130px;
}

.pi-payment-form .primary {
  border: 0;
  cursor: pointer;
}

.subscriber-profile-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.subscriber-profile-table table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.subscriber-profile-table th,
.subscriber-profile-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.subscriber-profile-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.subscriber-profile-table .number { text-align: right; }
.subscriber-profile-table .wallet-credit { color: #07845c; font-weight: 800; }
.subscriber-profile-table .wallet-debit { color: #c43b4e; font-weight: 800; }

.subscriber-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.subscriber-detail-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.subscriber-detail-card > h3,
.subscriber-detail-card .readonly-heading {
  margin: 0;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  background: #f7faff;
}

.readonly-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.readonly-heading h3 { margin: 0; }
.readonly-heading span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8f1fc;
  color: #1769c2;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.subscriber-detail-list {
  margin: 0;
}

.subscriber-detail-list > div {
  display: grid;
  grid-template-columns: minmax(130px, 42%) 1fr;
  gap: 12px;
  padding: 11px 17px;
  border-bottom: 1px solid #edf1f5;
}

.subscriber-detail-list > div:last-child { border-bottom: 0; }
.subscriber-detail-list dt { color: var(--muted); }
.subscriber-detail-list dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.subscriber-card-note {
  margin: 0;
  padding: 13px 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.radius-readonly { border-color: #cfe1f5; }

.subscriber-map-link {
  display: block;
  margin: 14px 17px;
  color: #1769c2;
  font-weight: 700;
  text-decoration: none;
}

/* Subscriber profile — presentation only. Business fields and actions are unchanged. */
@keyframes subscriberProfileEnter {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes subscriberProfileCardEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes subscriberProfileGlow {
  0%, 100% { opacity: .38; transform: translate3d(0, 0, 0) scale(1); }
  50% { opacity: .6; transform: translate3d(-10px, 8px, 0) scale(1.08); }
}

.subscriber-profile-dialog::backdrop {
  background: rgba(5, 22, 43, .68);
  backdrop-filter: blur(7px) saturate(115%);
}

.subscriber-profile-dialog[open] .subscriber-profile-shell {
  animation: subscriberProfileEnter .38s cubic-bezier(.22, 1, .36, 1) both;
}

.subscriber-profile-shell {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 92% 6%, rgba(65, 202, 224, .13), transparent 24%),
    radial-gradient(circle at 10% 22%, rgba(39, 112, 237, .1), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
}

.subscriber-profile-shell::before {
  position: absolute;
  z-index: -1;
  top: -90px;
  right: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(32, 113, 238, .22), rgba(33, 210, 191, .12));
  filter: blur(4px);
  content: "";
  pointer-events: none;
  animation: subscriberProfileGlow 8s ease-in-out infinite;
}

.subscriber-profile-dialog header {
  position: relative;
  overflow: hidden;
  padding: 25px 28px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .96), rgba(242, 249, 255, .94)),
    linear-gradient(90deg, #1577df, #2cc9bc);
}

.subscriber-profile-dialog header::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #1474e6 0%, #28b8d6 48%, #27c999 100%);
  content: "";
}

.subscriber-profile-dialog header .eyebrow {
  color: #1474df;
  letter-spacing: .17em;
}

.subscriber-profile-dialog header h2 {
  margin: 7px 0 0;
  color: #10273d;
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -.035em;
}

.subscriber-profile-dialog header p {
  font-weight: 600;
}

.customer-dialog header .subscriber-profile-header-actions .primary,
.customer-dialog header .subscriber-profile-header-actions .secondary,
.customer-dialog header .subscriber-profile-header-actions .subscriber-profile-dismiss {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}

.customer-dialog header .subscriber-profile-header-actions .primary {
  border-color: #1474e6;
  background: linear-gradient(135deg, #1474e6, #2864e8);
  box-shadow: 0 10px 24px rgba(30, 104, 222, .22);
}

.customer-dialog header .subscriber-profile-header-actions .secondary {
  border-color: #cbd9e7;
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 5px 14px rgba(25, 57, 89, .06);
}

.customer-dialog header .subscriber-profile-header-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(25, 75, 132, .16);
}

.customer-dialog header .subscriber-profile-header-actions button:active {
  transform: translateY(0) scale(.98);
}

.subscriber-profile-content {
  gap: 24px;
  padding: 26px 28px 32px;
}

.subscriber-profile-summary {
  gap: 14px;
}

.subscriber-profile-summary > div {
  position: relative;
  isolation: isolate;
  min-height: 112px;
  overflow: hidden;
  align-content: center;
  padding: 19px;
  border: 1px solid rgba(131, 162, 192, .25);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(244, 249, 255, .96));
  box-shadow: 0 10px 25px rgba(30, 66, 102, .07);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
  animation: subscriberProfileCardEnter .45s cubic-bezier(.22, 1, .36, 1) both;
}

.subscriber-profile-summary > div:nth-child(2) { animation-delay: .05s; }
.subscriber-profile-summary > div:nth-child(3) { animation-delay: .1s; }
.subscriber-profile-summary > div:nth-child(4) { animation-delay: .15s; }

.subscriber-profile-summary > div::before {
  position: absolute;
  z-index: -1;
  top: -30px;
  right: -25px;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: rgba(21, 116, 230, .1);
  content: "";
  transition: transform .3s ease;
}

.subscriber-profile-summary > div:nth-child(1) {
  border-top: 4px solid #12a56f;
  background: linear-gradient(145deg, #fff, #effbf6);
}
.subscriber-profile-summary > div:nth-child(1)::before { background: rgba(18, 165, 111, .13); }
.subscriber-profile-summary > div:nth-child(2) {
  border-top: 4px solid #7086a0;
  background: linear-gradient(145deg, #fff, #f1f5f9);
}
.subscriber-profile-summary > div:nth-child(2)::before { background: rgba(94, 117, 144, .12); }
.subscriber-profile-summary > div:nth-child(3) {
  border-top: 4px solid #3178e6;
  background: linear-gradient(145deg, #fff, #eef5ff);
}
.subscriber-profile-summary > div:nth-child(3)::before { background: rgba(49, 120, 230, .14); }
.subscriber-profile-summary > div:nth-child(4) {
  border-top: 4px solid #8c5bdb;
  background: linear-gradient(145deg, #fff, #f7f1ff);
}
.subscriber-profile-summary > div:nth-child(4)::before { background: rgba(140, 91, 219, .13); }

.subscriber-profile-summary > div:hover {
  z-index: 1;
  transform: translateY(-4px);
  border-color: rgba(72, 132, 199, .35);
  box-shadow: 0 17px 35px rgba(28, 73, 119, .13);
}

.subscriber-profile-summary > div:hover::before { transform: scale(1.18); }

.subscriber-profile-summary small,
.subscriber-invoice-money small {
  color: #617890;
  letter-spacing: .12em;
}

.subscriber-profile-summary b {
  color: #10273d;
  font-size: 19px;
}

.subscriber-profile-summary .good { color: #07855a; }

.subscriber-wallet-balance strong {
  font-size: clamp(22px, 2.4vw, 29px);
  letter-spacing: -.025em;
}

.subscriber-detail-grid {
  gap: 18px;
}

.subscriber-detail-card {
  border-color: rgba(132, 159, 187, .25);
  border-radius: 17px;
  box-shadow: 0 10px 25px rgba(30, 66, 102, .06);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
  animation: subscriberProfileCardEnter .48s cubic-bezier(.22, 1, .36, 1) both;
}

.subscriber-detail-card:nth-child(2) { animation-delay: .04s; }
.subscriber-detail-card:nth-child(3) { animation-delay: .08s; }
.subscriber-detail-card:nth-child(4) { animation-delay: .12s; }
.subscriber-detail-card:nth-child(5) { animation-delay: .16s; }
.subscriber-detail-card:nth-child(6) { animation-delay: .2s; }

.subscriber-detail-card:hover {
  transform: translateY(-2px);
  border-color: rgba(69, 130, 196, .34);
  box-shadow: 0 16px 34px rgba(29, 67, 106, .1);
}

.subscriber-detail-card > h3,
.subscriber-detail-card .readonly-heading {
  position: relative;
  padding: 17px 19px;
  background: linear-gradient(110deg, #f1f7ff, #fbfdff);
  color: #14304a;
}

.subscriber-detail-card > h3::before,
.subscriber-detail-card .readonly-heading::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, #1474e6, #28c5b8);
  content: "";
}

.subscriber-detail-card:nth-child(2) > h3::before { background: linear-gradient(180deg, #7857d9, #407ff0); }
.subscriber-detail-card:nth-child(3) > h3::before { background: linear-gradient(180deg, #10a879, #3bc6a6); }
.subscriber-detail-card:nth-child(4) > h3::before { background: linear-gradient(180deg, #e6a11b, #f0c54d); }
.subscriber-detail-card:nth-child(5) > h3::before { background: linear-gradient(180deg, #dc6176, #ee8e75); }

.subscriber-detail-list > div {
  transition: background-color .18s ease, padding-left .18s ease;
}

.subscriber-detail-list > div:hover {
  padding-left: 21px;
  background: #f6faff;
}

.subscriber-detail-list dt { color: #627990; }
.subscriber-detail-list dd { color: #122a40; }

.subscriber-profile-section {
  padding: 19px;
  border: 1px solid rgba(132, 159, 187, .23);
  border-radius: 17px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 28px rgba(30, 66, 102, .055);
  backdrop-filter: blur(6px);
  animation: subscriberProfileCardEnter .48s .1s cubic-bezier(.22, 1, .36, 1) both;
}

.subscriber-profile-section .section-heading h3 {
  color: #13314c;
  font-size: 19px;
}

.subscriber-invoice-card,
.subscriber-profile-table {
  border-color: rgba(126, 157, 188, .27);
  box-shadow: 0 5px 15px rgba(30, 66, 102, .04);
}

.subscriber-invoice-toggle {
  transition: background-color .2s ease, transform .2s ease;
}

.subscriber-invoice-toggle:hover {
  background: linear-gradient(90deg, #f3f8ff, #f7fcff);
}

.invoice-step-number {
  background: linear-gradient(135deg, #1678e7, #36a9e8);
  color: #fff;
  box-shadow: 0 6px 15px rgba(26, 119, 220, .2);
}

.subscriber-map-link {
  border-radius: 9px;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

.subscriber-map-link:hover {
  color: #075ab7;
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .subscriber-profile-dialog[open] .subscriber-profile-shell,
  .subscriber-profile-shell::before,
  .subscriber-profile-summary > div,
  .subscriber-detail-card,
  .subscriber-profile-section {
    animation: none !important;
  }

  .subscriber-profile-dialog *,
  .subscriber-profile-dialog *::before,
  .subscriber-profile-dialog *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 760px) {
  .subscriber-profile-dialog header {
    align-items: flex-start;
    flex-direction: column;
    padding: 21px;
  }

  .subscriber-profile-header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .subscriber-profile-content { padding: 20px; }
  .subscriber-profile-summary > div { min-height: 96px; }
}

@media (max-width: 760px) {
  .subscriber-profile-summary,
  .subscriber-invoice-money,
  .subscriber-detail-grid { grid-template-columns: 1fr; }
}

#franchise-list-page .franchise-table {
  width: 100%;
  min-width: 1280px;
  table-layout: fixed;
}

#franchise-list-page .franchise-table th,
#franchise-list-page .franchise-table td {
  padding: 16px 14px;
  vertical-align: middle;
  text-align: left;
}

#franchise-list-page .franchise-table th.select-column,
#franchise-list-page .franchise-table td.select-column { width: 48px; text-align: center; }
#franchise-list-page .franchise-table th:nth-child(2) { width: 260px; }
#franchise-list-page .franchise-table th:nth-child(3) { width: 100px; }
#franchise-list-page .franchise-table th:nth-child(4) { width: 180px; }
#franchise-list-page .franchise-table th:nth-child(5) { width: 140px; }
#franchise-list-page .franchise-table th:nth-child(6) { width: 220px; }
#franchise-list-page .franchise-table th:nth-child(7) { width: 100px; }
#franchise-list-page .franchise-table th:nth-child(8) { width: 220px; }

#franchise-list-page .franchise-table td b,
#franchise-list-page .franchise-table td small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#franchise-list-page .franchise-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

#franchise-list-page .row-actions {
  white-space: nowrap;
}

#franchise-list-page .row-actions .action-trigger,
#franchise-list-page .row-actions .row-delete-button {
  min-width: 82px;
}

#franchise-list-page .action-menu:not(.hidden) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(470px, calc(100vw - 24px));
  max-height: none;
  overflow: visible;
  gap: 2px;
}

#system-users-page .system-role-picker b,
#system-users-page .system-role-picker small,
#system-users-page .franchise-table td b,
#system-users-page .franchise-table td small {
  display: block;
}

#system-users-page .system-role-picker small,
#system-users-page .franchise-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entity-wallet-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 128px;
  height: 40px;
  padding: 5px 12px;
  border: 1px solid #bdd8f5;
  border-radius: 10px;
  background: #eff7ff;
  color: var(--ink);
  cursor: pointer;
}
.entity-wallet-pill small { color: #47769f; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.entity-wallet-pill b { color: #075fae; font-size: 13px; line-height: 1.25; }
.entity-wallet-pill:hover { border-color: var(--blue); background: #e5f2ff; }

.top-operator-menu {
  position: relative;
}

#top-operator-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px 0 5px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

#top-operator-trigger span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f2ff;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

#top-operator-trigger b { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
#top-operator-trigger i { color: var(--muted); font-style: normal; }

.top-operator-dropdown {
  position: absolute;
  top: 46px;
  right: 0;
  z-index: 80;
  width: 190px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(23,43,63,.18);
}

.top-operator-dropdown button {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.top-operator-dropdown button:hover { background: #eff5fc; }
.top-operator-dropdown button.danger { color: var(--red); }
.profile-password-heading { margin-top: 5px; padding-top: 18px; border-top: 1px solid var(--line); }
.profile-password-heading b,.profile-password-heading small { display: block; }
.profile-password-heading small { color: var(--muted); font-weight: 500; }
.root-only-hidden { display: none !important; }
.hierarchy-restricted { display: none !important; }
.permission-hidden { display: none !important; }
.return-to-root { border: 1px solid #f0b95a; border-radius: 9px; background: #fff8e8; color: #8a5700; padding: 10px 13px; font-weight: 800; cursor: pointer; }
.impersonation-dialog { width: min(590px, calc(100vw - 32px)); }
.entity-wallet-dialog { width: min(940px, calc(100vw - 32px)); }
.entity-wallet-dialog .wallet-dialog-shell { background: #fff; }
.entity-wallet-dialog header { display:flex; align-items:flex-start; justify-content:space-between; padding:22px 24px; border-bottom:1px solid var(--line); }
.entity-wallet-dialog header h2,.entity-wallet-dialog header p { margin:3px 0 0; }
.entity-wallet-dialog header p { color:var(--muted); }
.entity-wallet-dialog header > button { border:0; background:transparent; color:var(--muted); font-size:26px; cursor:pointer; }
.wallet-summary { display:flex; align-items:center; justify-content:space-between; margin:20px 24px; padding:20px 22px; border:1px solid #cfe1f4; border-radius:12px; background:linear-gradient(135deg,#eff7ff,#fff); }
.wallet-summary small,.wallet-summary strong { display:block; }
.wallet-summary small { color:#47769f; font-size:9px; font-weight:800; letter-spacing:.12em; }
.wallet-summary strong { margin-top:5px; color:#075fae; font-size:30px; }
.wallet-recharge { margin:0 24px 20px; padding:18px; border:1px solid #f0cf8e; border-radius:12px; background:#fffaf0; }
.wallet-recharge > div:first-child b,.wallet-recharge > div:first-child small { display:block; }
.wallet-recharge > div:first-child small { margin-top:3px; color:var(--muted); }
.wallet-recharge-fields { display:grid; grid-template-columns:1.35fr .75fr 1fr 1fr auto; align-items:end; gap:10px; margin-top:15px; }
.wallet-recharge-fields label { display:grid; gap:6px; color:var(--ink); font-size:10px; font-weight:800; }
.wallet-recharge-fields input,.wallet-recharge-fields select { width:100%; min-width:0; height:40px; padding:0 10px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.wallet-recharge-fields button { height:40px; white-space:nowrap; }
.wallet-ledger { padding:0 24px 24px; }
.wallet-ledger-heading { display:flex; justify-content:space-between; margin-bottom:10px; }
.wallet-ledger-heading b,.wallet-ledger-heading small { display:block; }
.wallet-ledger-heading small { margin-top:3px; color:var(--muted); }
.wallet-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:10px; }
.wallet-table-wrap table { width:100%; min-width:650px; border-collapse:collapse; }
.wallet-table-wrap th,.wallet-table-wrap td { padding:13px 15px; border-bottom:1px solid var(--line); text-align:left; vertical-align:middle; }
.wallet-table-wrap th { background:#f6f9fc; color:#526a80; font-size:9px; letter-spacing:.06em; text-transform:uppercase; }
.wallet-table-wrap tr:last-child td { border-bottom:0; }
.wallet-table-wrap td b,.wallet-table-wrap td small { display:block; }
.wallet-table-wrap td small { margin-top:3px; color:var(--muted); }
.wallet-table-wrap .wallet-amount { text-align:right; font-weight:800; white-space:nowrap; }
.wallet-amount.credit { color:#09875f; }
.wallet-amount.debit { color:#c43e50; }
.wallet-table-wrap .empty-state { margin:0; padding:30px; text-align:center; color:var(--muted); }
.package-sharing-list { display:grid; gap:14px; }
.sharing-rule { padding:14px; border:1px solid #cfe1f4; border-radius:10px; background:#f3f8fe; }
.sharing-rule b,.sharing-rule p { display:block; margin:0; }
.sharing-rule p { margin-top:4px; color:var(--muted); font-size:11px; line-height:1.5; }
.package-sharing-card { overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#fff; }
.package-sharing-card > header { display:flex; align-items:center; justify-content:space-between; padding:14px 15px; border-bottom:1px solid var(--line); background:#f8fafc; }
.package-sharing-card > header b,.package-sharing-card > header small { display:block; }
.package-sharing-card > header small { margin-top:3px; color:var(--muted); }
.sharing-inputs { display:grid; grid-template-columns:1fr 1fr .8fr 1.1fr; gap:10px; padding:14px 15px; }
.sharing-inputs label,.sharing-inputs > div { display:grid; gap:5px; color:var(--ink); font-size:10px; font-weight:800; }
.sharing-inputs input { width:100%; height:38px; padding:0 9px; border:1px solid var(--line); border-radius:8px; }
.sharing-inputs > div { align-content:center; padding:7px 10px; border-radius:8px; background:#f5f8fb; }
.sharing-inputs > div small { color:var(--muted); }
.sharing-package-note { margin:0; padding:0 15px 14px; color:var(--muted); font-size:10px; }
.sharing-default-card { border-color:#9cc7ff; background:#f8fbff; }
.sharing-package-list-heading { display:flex; justify-content:space-between; align-items:end; padding:10px 2px 0; }
.sharing-package-list-heading small { color:var(--muted); }
.package-sharing-override header { align-items:center; }
.sharing-override-toggle { display:flex; align-items:center; gap:9px; font-weight:800; color:#17324d; cursor:pointer; }
.sharing-override-toggle input { width:20px; height:20px; accent-color:#1671e8; }
.package-override-fields { padding-top:18px; border-top:1px solid #dbe5ef; }
.sharing-matrix { display:grid; grid-template-columns:repeat(6,1fr); gap:9px; padding:14px 15px; }
.sharing-matrix label,.sharing-total-box { display:grid; gap:5px; color:var(--ink); font-size:10px; font-weight:800; }
.sharing-matrix input { width:100%; min-width:0; height:38px; padding:0 8px; border:1px solid var(--line); border-radius:8px; }
.sharing-total-box { align-content:center; padding:7px 10px; border-radius:8px; background:#f5f8fb; }
.sharing-total-box small { color:var(--muted); }
.sharing-total.valid { color:#09875f; }
.sharing-total.invalid { color:#c43e50; }
.sharing-table { border-top:1px solid var(--line); }
.sharing-row { display:grid; grid-template-columns:1.6fr repeat(3,1fr); gap:8px; align-items:center; padding:10px 15px; border-bottom:1px solid var(--line); font-size:10px; }
.sharing-row:last-child { border-bottom:0; }
.sharing-row.heading { background:#f6f9fc; color:#60778c; font-size:8px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.sharing-row span:not(:first-child) { text-align:right; font-weight:800; }
.sharing-row b,.sharing-row small { display:block; }
.sharing-row small { margin-top:3px; color:var(--muted); }
.location-master-list { margin: 24px 0 0 284px; }
.location-master-list .franchise-table-wrap { width: 100%; overflow-x: auto; }
.location-master-list .franchise-table { width: 100%; min-width: 980px; border-spacing: 0; border-collapse: collapse; table-layout: fixed; }
.location-master-list .franchise-table th,
.location-master-list .franchise-table td { padding: 15px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; overflow: hidden; }
.location-master-list .franchise-table th { background: #f7f9fb; color: #33485b; font-size: 11px; font-weight: 800; white-space: nowrap; }
.location-master-list .franchise-table tbody tr:last-child td { border-bottom: 0; }
.location-master-list .franchise-table tbody tr:hover { background: #f8fbfe; }
.location-master-list .franchise-table th:first-child { width: 25%; }
.location-master-list .franchise-table th:nth-child(2) { width: 24%; }
.location-master-list .franchise-table th:nth-child(3) { width: 17%; }
.location-master-list .franchise-table th:nth-child(4) { width: 13%; }
.location-master-list .franchise-table th:nth-child(5) { width: 9%; }
.location-master-list .franchise-table th:last-child { width: 150px; }
.location-master-list .franchise-table td b,
.location-master-list .franchise-table td small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-master-list .franchise-table td small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.location-master-list .franchise-table td:last-child { white-space: nowrap; }
.location-master-list .franchise-table td:last-child .action-trigger + .action-trigger { margin-left: 6px; }
@media(max-width:980px){.location-master-list{margin-left:0}}
@media(max-width:900px){.wallet-recharge-fields{grid-template-columns:1fr 1fr}.wallet-recharge-fields button{grid-column:1/-1}.entity-wallet-pill small{display:none}.entity-wallet-pill{min-width:auto}}
@media(max-width:700px){.sharing-inputs{grid-template-columns:1fr 1fr}.sharing-row{grid-template-columns:1.4fr repeat(3,1fr);padding:10px 8px}}
@media(max-width:900px){.sharing-matrix{grid-template-columns:repeat(3,1fr)}}

@media(max-width:700px){.branch-master-list th,.branch-master-list td{padding:12px}.branch-master-list th:first-child,.branch-master-list td:first-child{padding-left:16px}.branch-master-list th:last-child,.branch-master-list td:last-child{padding-right:16px}}
.plan-change-timing small{display:block;margin-top:.45rem;color:var(--muted);font-weight:500;line-height:1.45}
.scheduled-plan-actions{display:flex;justify-content:flex-end;margin-top:1rem}
.subscriber-renew-dialog{width:min(1080px,calc(100vw - 32px));max-width:1080px}
.subscriber-renew-dialog>form>header{align-items:flex-start}
.subscriber-renew-dialog>form>header p{margin:.35rem 0 0;color:var(--muted)}
.renewal-date-strip{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--line);background:#f7faff}
.renewal-date-strip>div{display:grid;gap:5px;padding:15px 18px;border-right:1px solid var(--line)}
.renewal-date-strip>div:last-child{border-right:0}
.renewal-date-strip small,.renewal-wallet-summary small,.renewal-last-invoice small{color:#678097;font-size:9px;font-weight:800;letter-spacing:.08em}
.renewal-date-strip b{color:var(--ink);font-size:12px}
.renewal-workspace{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.85fr);gap:16px;padding:20px 22px 12px}
.renewal-panel{overflow:hidden;border:1px solid var(--line);border-radius:12px;background:#fff}
.renewal-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 17px;border-bottom:1px solid var(--line);background:#f8fbfe}
.renewal-panel-heading>div{display:flex;align-items:center;gap:10px}
.renewal-panel-heading>div>span{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#1770e8;color:#fff;font-weight:800}
.renewal-panel-heading h3,.renewal-panel-heading p{margin:0}
.renewal-panel-heading h3{font-size:14px}
.renewal-panel-heading p{margin-top:2px;color:var(--muted);font-size:10px}
.renewal-panel>.master-grid{padding:16px 17px}
.renewal-panel .master-grid label.full{grid-column:1/-1}
.renewal-finance-panel{align-self:start}
.renewal-breakdown{margin:0;padding:9px 17px}
.renewal-breakdown>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid var(--line)}
.renewal-breakdown dt{color:var(--muted);font-size:11px}.renewal-breakdown dd{margin:0;font-weight:800}
.renewal-breakdown .renewal-total{border-bottom:0;color:#08795b;font-size:14px}
.renewal-wallet-summary,.renewal-last-invoice{display:grid;gap:4px;margin:0 17px 14px;padding:12px;border-radius:9px;background:#f2f7fd}
.renewal-wallet-summary b{color:#0969c8;font-size:18px}.renewal-wallet-summary span,.renewal-last-invoice span{color:var(--muted);font-size:10px;line-height:1.4}
.renewal-last-invoice{background:#f8fafc}
.renewal-rule{margin:0 22px 18px;padding:13px 15px;border:1px solid #cde0f5;border-radius:10px;background:#f3f8fe}
.renewal-rule b,.renewal-rule p{display:block;margin:0}.renewal-rule p{margin-top:4px;color:var(--muted);font-size:10px;line-height:1.5}
@media(max-width:820px){.renewal-date-strip{grid-template-columns:1fr 1fr}.renewal-date-strip>div:nth-child(2){border-right:0}.renewal-date-strip>div:nth-child(-n+2){border-bottom:1px solid var(--line)}.renewal-workspace{grid-template-columns:1fr}.renewal-finance-panel{align-self:stretch}}
@media(max-width:560px){.subscriber-renew-dialog{width:calc(100vw - 16px)}.renewal-date-strip{grid-template-columns:1fr}.renewal-date-strip>div{border-right:0;border-bottom:1px solid var(--line)!important}.renewal-date-strip>div:last-child{border-bottom:0!important}.renewal-workspace{padding:12px}.renewal-rule{margin:0 12px 14px}}
.subscriber-plan-dialog .plan-current-field input{background:#f7f9fb;color:#52657a}
.subscriber-plan-dialog .plan-credit-row dd,.subscriber-plan-dialog [data-plan-total].is-credit{color:#09875f}
.subscriber-plan-dialog [data-plan-total].is-debit{color:#c43e50}
