:root {
  --ink: #13212b;
  --muted: #647583;
  --line: #d7e1e6;
  --panel: #ffffff;
  --soft: #f5f8fa;
  --mint: #19a073;
  --teal: #087a86;
  --amber: #d98512;
  --red: #c64242;
  --navy: #102837;
  --gold: #e6a600;
  --subscriber-blue: #3851c1;
  --shadow: 0 16px 44px rgba(15, 35, 46, 0.09);
  --shadow-soft: 0 10px 26px rgba(15, 35, 46, 0.07);
  --accent: #0e8d99;
  --accent-dark: #075f6b;
  --cream: #fff7e8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.panel-note {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.88rem;
}

.empty-row {
  text-align: center;
  color: var(--muted);
  font-weight: 850;
}

.development-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.9;
}

.development-form {
  display: grid;
  gap: 16px;
}

.development-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 850;
}

.reminder-control-panel {
  margin-top: 18px;
}

.reminder-button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.reminder-button-grid button {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(8, 127, 140, 0.22);
  border-radius: 8px;
  color: #064f59;
  background: #e8f8f5;
  font-weight: 900;
  text-align: left;
}

.reminder-button-grid button:hover {
  border-color: rgba(8, 127, 140, 0.5);
  background: #d8f3ee;
}

.reminder-button-grid button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.payment-qr-setting {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 12px;
  border: 1px dashed rgba(8, 127, 140, 0.28);
  border-radius: 10px;
  background: #f7fcfb;
}

.payment-qr-setting img {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  object-fit: contain;
  border: 1px solid rgba(127, 153, 160, 0.28);
  border-radius: 8px;
  background: #ffffff;
}

.payment-qr-setting span {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.payment-qr-setting .secondary-action {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 8%, rgba(8, 127, 140, 0.18), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(230, 166, 0, 0.12), transparent 32%),
    linear-gradient(135deg, #f4faf9 0%, #e6f0ee 46%, #f8fbfb 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.login-panel {
  min-height: 100vh;
  padding: 28px clamp(22px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  overflow: hidden;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-panel > .brand-block {
  width: min(460px, 100%);
  padding: 16px 18px;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  box-shadow: 0 22px 52px rgba(20, 54, 64, 0.14);
  backdrop-filter: blur(18px);
}

.brand-block.compact {
  padding: 6px 4px 22px;
}

.brand-mark {
  width: 62px;
  height: 52px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.28), transparent 24%),
    linear-gradient(145deg, #061d3f 0%, #093b68 44%, #087f8c 100%);
  border: 1px solid rgba(255, 255, 255, 0.82);
  flex: 0 0 auto;
  box-shadow: 0 18px 38px rgba(7, 46, 86, 0.24);
}

.brand-mark span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
}

.brand-mark span:nth-child(1) {
  height: 12px;
  transform: translateX(-14px);
}

.brand-mark span:nth-child(2) {
  height: 18px;
  transform: translateX(-7px);
}

.brand-mark span:nth-child(3) {
  height: 25px;
}

.brand-mark::before {
  content: "NV";
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(2, 16, 42, 0.32);
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  right: -22px;
  top: -20px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  box-shadow:
    -12px 16px 0 -10px rgba(255, 255, 255, 0.36),
    -28px 30px 0 -24px rgba(230, 166, 0, 0.75);
}

.brand-block:not(.compact) .brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 16px;
}

.brand-block:not(.compact) .brand-mark::before {
  font-size: 1.18rem;
}

.eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.brand-block h1,
.brand-block h2 {
  margin: 2px 0 0;
}

.brand-block h1 {
  color: #071b33;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

.login-grid {
  width: min(460px, 100%);
  margin: 0 auto auto;
  display: block;
  align-items: center;
}

.login-copy h2 {
  max-width: 680px;
  font-size: clamp(2.35rem, 4.2vw, 4.15rem);
  line-height: 1.04;
  letter-spacing: 0;
  margin: 22px 0 18px;
}

.login-lede {
  max-width: 620px;
  margin: 0 0 28px;
  color: #526873;
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 650;
}

.status-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #14624f;
  background: rgba(220, 246, 239, 0.86);
  padding: 9px 13px;
  border: 1px solid #bce9dd;
  border-radius: 999px;
  font-weight: 850;
  box-shadow: 0 8px 24px rgba(31, 157, 120, 0.08);
}

.status-pill span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 470px;
}

.quick-stats div,
.login-card,
.panel,
.metric-card,
.person-card,
.sidebar-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(220, 230, 232, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quick-stats div {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
}

.quick-stats strong,
.metric-card strong {
  display: block;
  font-size: 1.7rem;
}

.quick-stats span,
.metric-card span,
.sidebar-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.login-card {
  position: relative;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    var(--panel);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 80px rgba(15, 48, 58, 0.16);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--teal), var(--mint), var(--gold));
}

.login-error {
  margin: 12px 0 0;
  color: #8a2020;
  font-weight: 800;
}

.role-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #edf5f4;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid #d7e7e7;
}

.role-tab {
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  padding: 10px 8px;
  font-weight: 800;
}

.role-tab.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 6px 18px rgba(23, 33, 38, 0.08);
}

.fixed-login-page .role-tabs {
  display: none;
}

.form-heading {
  margin: 26px 0 22px;
}

.form-heading h3 {
  margin-bottom: 6px;
  font-size: 1.55rem;
  line-height: 1.15;
}

.form-heading p,
.panel p,
.person-card p {
  color: var(--muted);
}

label,
.form-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #40515a;
  font-weight: 700;
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fbfdfd;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(8, 127, 140, 0.12);
}

textarea {
  resize: vertical;
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 4px 0 22px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.check-label input {
  width: auto;
}

.access-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.access-choice-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
  font-weight: 800;
}

.access-choice-grid input {
  width: auto;
  margin: 0;
}

a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.link-action {
  border: 0;
  padding: 0;
  color: var(--teal);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.link-action:hover,
a:hover {
  color: #075e66;
}

.primary-action,
.panel-head button,
.nav-list button,
.icon-button,
.user-chip {
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.primary-action {
  width: 100%;
  padding: 14px 18px;
  color: white;
  background: linear-gradient(135deg, #087f8c, #11949d);
  box-shadow: 0 12px 24px rgba(8, 127, 140, 0.22);
}

.primary-action:hover {
  background: linear-gradient(135deg, #076f7b, #087f8c);
}

.login-switch-action {
  width: 100%;
  margin-top: 10px;
}

.whatsapp-api-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.whatsapp-api-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
  color: var(--navy);
  font-weight: 850;
}

.whatsapp-api-actions button:hover {
  border-color: rgba(8, 127, 140, 0.45);
  color: var(--teal);
}

.whatsapp-api-actions button.danger-action {
  color: #8a2020;
  background: #fff8f8;
}

.whatsapp-message-panel {
  max-width: 960px;
}

.whatsapp-message-form {
  display: grid;
  gap: 14px;
}

.whatsapp-message-form textarea {
  min-height: 150px;
  resize: vertical;
}

.searchable-customer-field {
  display: grid;
  gap: 8px;
}

.searchable-customer-field input[type="search"] {
  min-height: 42px;
  border-color: rgba(8, 127, 140, 0.16);
  background: #fbfdfd;
}

.searchable-customer-field select {
  min-height: 46px;
}

#locationCustomerProvider {
  min-height: 42px;
  color: #075f69;
  background: #e8f7f4;
  font-weight: 900;
}

.whatsapp-message-form .form-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(2, minmax(150px, 0.8fr));
  gap: 10px;
}

.whatsapp-message-form .form-actions button {
  min-height: 46px;
  border: 1px solid rgba(8, 127, 140, 0.22);
  border-radius: 8px;
  color: #075f69;
  background: #e8f7f4;
  font-weight: 850;
  box-shadow: 0 10px 20px rgba(8, 127, 140, 0.08);
}

.whatsapp-message-form .form-actions .primary-action {
  border-color: transparent;
  color: #ffffff;
  background: linear-gradient(135deg, #078a95, #0f9f91);
  box-shadow: 0 14px 28px rgba(8, 127, 140, 0.22);
}

.whatsapp-message-form .form-actions .primary-action:disabled {
  color: rgba(255, 255, 255, 0.82);
  background: linear-gradient(135deg, #8fcdd1, #95d7ce);
  box-shadow: none;
  cursor: not-allowed;
}

.whatsapp-message-form .form-actions .danger-action {
  border-color: rgba(176, 42, 42, 0.24);
  color: #9a1515;
  background: #fff4f4;
  box-shadow: 0 10px 20px rgba(176, 42, 42, 0.08);
}

.whatsapp-message-form .form-actions button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.whatsapp-message-form .form-actions .danger-action:hover:not(:disabled) {
  background: #ffecec;
}

.whatsapp-log-details {
  cursor: pointer;
}

.whatsapp-log-details:hover {
  color: #075f69;
}

.whatsapp-log-summary {
  display: block;
  max-width: 760px;
  color: #16323a;
  line-height: 1.45;
}

.whatsapp-log-actions {
  margin-top: 8px;
}

.whatsapp-log-actions .row-action {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(8, 127, 140, 0.2);
  border-radius: 8px;
  color: #075f69;
  background: #e8f9f6;
  font-size: 0.82rem;
  cursor: pointer;
}

.whatsapp-log-actions .row-action:hover {
  background: #d7f3ef;
}

.whatsapp-log-actions .muted-action {
  color: #6b3f06;
  background: #fff4dc;
  border-color: rgba(185, 120, 25, 0.22);
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: rgba(8, 127, 140, 0.045);
}

.log-group-row td {
  padding: 10px 12px;
  background: #eef8f6;
  border-bottom: 1px solid rgba(8, 127, 140, 0.16);
}

.log-year-row td {
  background: #e7f3ef;
}

.log-month-row td {
  padding-left: 24px;
  background: #f0f8f5;
}

.log-date-row td {
  padding-left: 48px;
  background: #f7fbfa;
}

.log-detail-row td {
  background: #ffffff;
}

.log-group-toggle {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 1px solid rgba(8, 127, 140, 0.14);
  border-radius: 8px;
  color: #064f5a;
  background: #ffffff;
  font-weight: 900;
  text-align: left;
}

.log-year-row .log-group-toggle {
  color: #ffffff;
  background: linear-gradient(135deg, #0a7f8b, #0e9a8d);
  box-shadow: 0 12px 22px rgba(8, 127, 140, 0.14);
}

.log-month-row .log-group-toggle {
  color: #053f49;
  background: #dff5ef;
}

.log-date-row .log-group-toggle {
  color: #25333d;
  background: #ffffff;
}

.resolved-ticket-panel {
  margin-top: 18px;
}

.resolved-folder-row td {
  background: #effaf6;
}

.resolved-ticket-detail td {
  background: #ffffff;
}

.resolved-folder-toggle {
  min-height: 36px;
}

.employee-location-folder-row td {
  padding: 10px 12px;
  background: #f0fbf8;
}

.employee-location-folder-row + tr td {
  border-top-color: #e3f2ef;
}

.folder-toggle {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #bfe7e2;
  border-radius: 8px;
  padding: 8px 12px;
  color: #062c35;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.folder-toggle:hover {
  border-color: #0a8e99;
  box-shadow: 0 6px 18px rgba(8, 72, 82, 0.08);
}

.folder-toggle strong,
.folder-toggle small {
  display: block;
}

.folder-toggle small,
.folder-meta {
  color: #5a6c78;
  font-size: 0.82rem;
}

.folder-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #006f78;
  background: #ddf6f0;
  font-weight: 900;
}

.sms-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 24, 31, 0.58);
  backdrop-filter: blur(5px);
}

.sms-panel {
  width: min(760px, 96vw);
  max-height: min(720px, 88vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(8, 127, 140, 0.18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(3, 22, 28, 0.28);
}

.sms-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f8fdfc, #eef8f6);
}

.sms-head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.sms-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.sms-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #076b73;
  background: #e4f7f3;
  font-size: 0.78rem;
  font-weight: 850;
}

.sms-body {
  min-height: 0;
  overflow: auto;
  background: #ffffff;
}

.sms-message-box {
  min-height: 220px;
  margin: 0;
  padding: 18px 22px;
  color: #102936;
  background: #ffffff;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sms-qr-preview {
  margin: 0;
  padding: 0 22px 18px;
}

.sms-qr-preview img {
  width: min(220px, 70vw);
  height: auto;
  display: block;
  border: 1px solid rgba(8, 127, 140, 0.18);
  border-radius: 12px;
  background: #f8fbfb;
}

.sms-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
  background: #fbfdfd;
}

.sms-actions button {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid rgba(8, 127, 140, 0.16);
  border-radius: 8px;
  color: #08717d;
  background: #e8f7f4;
  font-weight: 850;
}

.sms-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.whatsapp-qr-result {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.whatsapp-qr-result span {
  color: var(--muted);
  font-size: 0.9rem;
}

.whatsapp-qr-result img {
  width: min(220px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.whatsapp-qr-result a {
  color: var(--teal);
  font-weight: 850;
}

.whatsapp-qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.whatsapp-qr-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9ffff;
  color: var(--teal);
  cursor: pointer;
  font-weight: 850;
  padding: 9px 12px;
}

.whatsapp-qr-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.isp-site {
  min-height: 100vh;
  padding: 24px clamp(18px, 4vw, 56px) 56px;
}

.isp-header {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.isp-brand {
  color: inherit;
}

.isp-brand h1 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.isp-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.isp-nav a,
.secondary-action,
.portal-grid a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 850;
  text-decoration: none;
}

.isp-nav .nav-login,
.secondary-action:hover,
.portal-grid a:hover {
  border-color: rgba(8, 127, 140, 0.25);
  color: var(--teal);
  background: #e2f5f0;
}

.isp-hero {
  max-width: 1180px;
  min-height: calc(100vh - 132px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  gap: clamp(32px, 7vw, 92px);
  align-items: center;
}

.isp-hero-copy h2 {
  max-width: 740px;
  margin: 22px 0 18px;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 1.02;
}

.isp-hero-copy > p:not(.status-pill) {
  max-width: 620px;
  color: #526873;
  font-size: 1.08rem;
  line-height: 1.65;
  font-weight: 650;
}

.isp-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.isp-actions .link-action {
  width: auto;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.isp-hero-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.isp-hero-panel div,
.isp-card {
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(220, 230, 232, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.isp-hero-panel span,
.isp-card span {
  color: var(--muted);
  font-weight: 750;
}

.isp-hero-panel strong,
.isp-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.isp-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 20px;
}

.section-heading h2,
.split-section h2 {
  margin: 6px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.isp-card-grid,
.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.isp-card p,
.split-section p {
  color: var(--muted);
  line-height: 1.55;
  font-weight: 650;
}

.plan-card {
  display: flex;
  flex-direction: column;
}

.plan-card .plan-price {
  margin: 10px 0 8px;
  color: var(--teal);
  font-size: 1.08rem;
  font-weight: 900;
}

.plan-card a {
  width: fit-content;
  margin-top: auto;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--teal);
  background: #e2f5f0;
  font-weight: 900;
  text-decoration: none;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 28px;
  align-items: center;
}

.support-box {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
}

.employee-portal {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  background: #eef4f3;
}

.sidebar {
  min-height: 100vh;
  padding: 24px;
  color: white;
  background: var(--navy);
}

.sidebar .eyebrow,
.sidebar p {
  color: #a7c7c9;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-list button {
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  color: #d7e6e7;
  background: transparent;
}

.nav-list button.active,
.nav-list button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-card {
  margin-top: 28px;
  padding: 18px;
  color: var(--ink);
}

.sidebar-card strong {
  display: block;
  margin: 8px 0;
  font-size: 1.6rem;
}

.profile-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

.profile-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-list dt {
  color: var(--muted);
  font-weight: 700;
}

.profile-list dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.employee-profile-grid {
  align-items: start;
  grid-template-columns: minmax(320px, 1.1fr) minmax(280px, 0.9fr);
}

.employee-profile-card {
  min-height: 100%;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0 8px;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  color: #ffffff;
  background: var(--nav);
  font-size: 1.35rem;
  font-weight: 900;
}

.profile-hero span {
  color: var(--muted);
  font-weight: 700;
}

.profile-hero strong {
  display: block;
  margin-top: 4px;
  font-size: 1.6rem;
}

.profile-hero p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.profile-actions button {
  min-height: 40px;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  color: var(--teal);
  background: #e2f5f0;
  font-weight: 900;
}

.profile-detail-list {
  gap: 0;
}

.profile-detail-list div {
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.attendance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.attendance-actions button {
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--teal);
  background: #e2f5f0;
  font-weight: 800;
}

.attendance-actions button.danger-action {
  color: #8a2020;
  background: #ffe5e5;
}

.workspace {
  padding: 24px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sidebar-toggle-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-content: center;
  gap: 4px;
  flex: 0 0 auto;
  border: 1px solid rgba(8, 127, 140, 0.24);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(12, 35, 45, 0.08);
}

.sidebar-toggle-button span {
  width: 17px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: #536a75;
}

.sidebar-toggle-button:hover,
.sidebar-toggle-button:focus-visible {
  border-color: rgba(8, 127, 140, 0.42);
  background: #f3fbfa;
  outline: 0;
}

.sidebar-collapsed .dashboard {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar-collapsed #dashboard > .sidebar {
  display: none;
}

.topbar h2 {
  margin-bottom: 0;
  font-size: 1.8rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-box {
  width: min(360px, 42vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.search-box input {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.search-icon {
  width: 15px;
  height: 15px;
  position: relative;
  flex: 0 0 auto;
  border: 2px solid var(--muted);
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  width: 7px;
  height: 2px;
  position: absolute;
  right: -6px;
  bottom: -3px;
  background: var(--muted);
  transform: rotate(45deg);
  transform-origin: left center;
}

.topbar-whatsapp-action,
.topbar-support-action {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(8, 127, 140, 0.22);
  border-radius: 8px;
  color: #075f69;
  background: linear-gradient(135deg, #e6f8f4, #d4f1eb);
  font-weight: 900;
  white-space: nowrap;
}

.topbar-whatsapp-action:hover,
.topbar-support-action:hover {
  border-color: rgba(8, 127, 140, 0.38);
  background: linear-gradient(135deg, #d9f2ee, #c6ebe4);
}

.topbar-support-action {
  color: #ffffff;
  border-color: rgba(16, 32, 42, 0.16);
  background: #10202a;
}

.topbar-support-action:hover {
  border-color: rgba(16, 32, 42, 0.28);
  background: #173242;
}

.icon-button,
.user-chip {
  width: 42px;
  height: 42px;
  color: white;
  background: var(--ink);
}

.logout-action {
  width: auto;
  min-width: 72px;
  padding: 0 14px;
}

.profile-shortcut {
  width: auto;
  min-width: 76px;
  padding: 0 14px;
}

.view,
.employee-view,
.subscriber-view {
  display: none;
}

.view.active,
.employee-view.active,
.subscriber-view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.metric-card,
.panel,
.person-card {
  padding: 18px;
}

.metric-card p {
  margin: 8px 0 0;
  color: var(--mint);
  font-weight: 800;
}

.refresh-note {
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.billing-grid {
  align-items: start;
}

#billing .billing-grid {
  grid-template-columns: minmax(0, 1fr);
}

.network-grid {
  grid-template-columns: minmax(430px, 1.08fr) minmax(520px, 0.92fr);
  align-items: start;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-head h3 {
  margin-bottom: 0;
}

.panel-head button {
  padding: 9px 12px;
  color: var(--teal);
  background: #e2f5f0;
}

.panel-head select,
.panel-head input[type="month"] {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.panel-head button.danger-action {
  color: #8a2020;
  background: #ffe5e5;
}

.status-select {
  min-width: 116px;
  padding: 8px 10px;
  border-radius: 999px;
  border-color: var(--line);
  background: #fbfdfd;
  font-weight: 800;
}

.status-note {
  display: block;
  max-width: 220px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.location-form {
  width: min(720px, calc(100vw - 28px));
  max-height: min(92vh, 760px);
  overflow-y: auto;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.location-form label {
  margin-bottom: 12px;
}

.location-form .form-grid label {
  margin-bottom: 0;
}

.location-form input,
.location-form select {
  min-height: 48px;
}

.location-form .full-action {
  width: 100%;
  justify-content: center;
  margin: 4px 0 12px;
  border-color: rgba(8, 127, 140, 0.18);
  color: #086f7a;
  background: #e8f7f4;
}

.ticket-status-select {
  min-width: 150px;
  padding: 8px 10px;
  border-radius: 6px;
  border-color: var(--line);
  background: #fbfdfd;
  font-weight: 700;
}

.ticket-remarks {
  min-width: 220px;
  padding: 8px 10px;
}

.ticket-remarks-wrap {
  display: grid;
  gap: 7px;
  min-width: 240px;
}

.ticket-mini-history {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.ticket-lock-note {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  color: #0a6b54;
  background: #dcf8ee;
  font-size: 0.76rem;
  font-weight: 900;
}

.locked-ticket {
  background: linear-gradient(90deg, rgba(220, 248, 238, 0.72), rgba(255, 255, 255, 0.96));
}

.locked-ticket .ticket-status-select,
.locked-ticket .ticket-remarks {
  color: #5d6b78;
  background: #eef4f4;
  cursor: not-allowed;
}

.ticket-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.row-action {
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--teal);
  background: #e2f5f0;
  font-weight: 800;
}

.row-action.reminder-action {
  color: #11664e;
  background: #dff7e8;
}

.row-action.good-action {
  color: #0a6b3f;
  background: #d9f8e8;
}

.ticket-contact {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ticket-contact strong {
  color: #102936;
  font-weight: 850;
  line-height: 1.25;
}

.ticket-contact span {
  overflow: hidden;
  color: #60717a;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-time-meta {
  display: block;
  margin-top: 0.25rem;
  color: #60717a;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.35;
  white-space: normal;
}

.row-action.map-action {
  color: #0d5c66;
  background: #dff4ff;
}

.row-action.danger-action {
  color: #8a2020;
  background: #ffe5e5;
}

.muted-action {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.health-list {
  display: grid;
  gap: 12px;
}

.health-list div {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.health-list em {
  color: var(--muted);
  font-style: normal;
}

.dot,
.node {
  border-radius: 50%;
}

.dot {
  width: 10px;
  height: 10px;
}

.good {
  background: #dff7ee;
  color: #11664e;
}

.dot.good,
.node.good {
  background: var(--mint);
}

.warn {
  background: #fff0dc;
  color: #87500b;
}

.dot.warn,
.node.warn {
  background: var(--amber);
}

.bad {
  background: #ffe5e5;
  color: #8a2020;
}

.dot.bad,
.node.bad {
  background: var(--red);
}

.bar-chart {
  height: 230px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  align-items: end;
  padding-top: 20px;
}

.bar-chart span {
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #19a984, #087f8c);
}

.table-panel {
  overflow-x: auto;
}

#network .table-panel {
  max-height: 560px;
  scrollbar-gutter: stable;
}

.network-location-search {
  flex: 1 1 260px;
  max-width: 360px;
}

.network-location-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(8, 127, 140, 0.22);
  border-radius: 8px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  background: #fff;
  color: #0f2533;
}

.network-location-search input:focus {
  outline: 2px solid rgba(8, 127, 140, 0.22);
  border-color: #087f8c;
}

.network-table {
  min-width: 980px;
}

.network-table th {
  white-space: nowrap;
  font-size: 0.76rem;
}

.network-table td {
  vertical-align: middle;
}

.employee-table {
  min-width: 980px;
}

.employee-table th {
  white-space: nowrap;
}

.employee-row td {
  padding-top: 16px;
  padding-bottom: 16px;
  vertical-align: middle;
}

.employee-name {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  min-width: 170px;
}

.employee-avatar {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #087f8c, #1f9d78);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(8, 127, 140, 0.18);
}

.employee-name strong,
.employee-name span {
  min-width: 0;
}

.employee-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-name span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.employee-role {
  max-width: 140px;
  color: #2e434d;
  font-weight: 750;
  line-height: 1.35;
}

.employee-contact {
  max-width: 260px;
  overflow-wrap: anywhere;
  color: #16323d;
  font-size: 0.9rem;
}

.employee-phone {
  color: #243b45;
  font-weight: 750;
  white-space: nowrap;
}

.access-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 270px;
}

.access-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #0d5c66;
  background: #e8f7f4;
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.full-access-chip {
  color: #11664e;
  background: #dff7ee;
}

.muted-chip {
  color: var(--muted);
  background: #eef3f3;
}

.location-row td {
  padding-top: 18px;
  padding-bottom: 18px;
}

.location-customer-cell {
  min-width: 150px;
}

.location-customer-cell strong,
.location-customer-cell span {
  display: block;
}

.location-customer-cell strong {
  margin-bottom: 4px;
  font-weight: 850;
  line-height: 1.25;
}

.location-customer-cell span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.coord-cell {
  color: #23434d;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  white-space: nowrap;
}

.hardware-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  max-width: 136px;
  padding: 5px 9px;
  border: 1px solid rgba(8, 127, 140, 0.14);
  border-radius: 999px;
  color: #105766;
  background: #effaf7;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.empty-chip {
  color: #6c7a83;
  background: #f2f6f6;
}

.compact-table-panel table {
  min-width: 0;
  table-layout: fixed;
}

.compact-table-panel th,
.compact-table-panel td {
  overflow-wrap: anywhere;
}

.invoice-panel {
  overflow-x: visible;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.subscriber-panel {
  padding: 0;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid rgba(8, 127, 140, 0.12);
}

.subscriber-panel .panel-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(127, 153, 160, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f8fcfb 100%);
}

.subscriber-panel .panel-head h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.05rem;
}

.subscriber-panel .panel-head h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #087f8c;
  box-shadow: 0 0 0 5px rgba(8, 127, 140, 0.12);
}

.subscriber-panel .panel-actions {
  gap: 8px;
}

.subscriber-panel .panel-actions button {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid rgba(8, 127, 140, 0.14);
  border-radius: 8px;
  color: #08717d;
  background: #e8f7f4;
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 850;
}

.subscriber-filter {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 20px 14px;
  padding: 10px 12px;
  border: 1px solid rgba(8, 127, 140, 0.16);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 44, 54, 0.06);
}

.subscriber-filter input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #102936;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 750;
}

.subscriber-filter input::placeholder {
  color: #687985;
}

.subscriber-filter select {
  flex: 0 0 150px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(8, 127, 140, 0.14);
  border-radius: 9px;
  color: #102936;
  background: #f8fcfc;
  font-weight: 850;
}

.subscriber-table {
  min-width: 0;
  table-layout: fixed;
}

.subscriber-table th,
.subscriber-table td {
  vertical-align: middle;
}

.subscriber-table th {
  padding: 12px 12px;
  background: #fbfdfd;
  box-shadow: inset 0 -1px 0 var(--line);
  font-size: 0.76rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.subscriber-table td {
  padding: 11px 10px;
  background: #fff;
}

.subscriber-table tr:hover td {
  background: #f7fbfa;
}

.subscriber-table th:nth-child(1),
.subscriber-table td:nth-child(1) {
  width: 20%;
}

.subscriber-table th:nth-child(2),
.subscriber-table td:nth-child(2) {
  width: 17%;
}

.subscriber-table th:nth-child(3),
.subscriber-table td:nth-child(3) {
  width: 16%;
}

.subscriber-table th:nth-child(4),
.subscriber-table td:nth-child(4) {
  width: 9%;
}

.subscriber-table th:nth-child(5),
.subscriber-table td:nth-child(5) {
  width: 8%;
}

.subscriber-table th:nth-child(6),
.subscriber-table td:nth-child(6) {
  width: 8%;
}

.subscriber-table th:nth-child(7),
.subscriber-table td:nth-child(7) {
  width: 22%;
}

.subscriber-customer,
.subscriber-contact,
.subscriber-plan {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.subscriber-customer strong,
.subscriber-contact strong,
.subscriber-plan strong {
  min-width: 0;
  overflow: hidden;
  color: #102936;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscriber-customer span,
.subscriber-contact span,
.subscriber-plan span {
  min-width: 0;
  overflow: hidden;
  color: #60717a;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscriber-money,
.subscriber-expiry {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscriber-money {
  padding: 4px 9px;
  border-radius: 999px;
  color: #047857;
  background: #e8f7f0;
  font-size: 0.78rem;
  font-weight: 850;
}

.subscriber-money.warn {
  color: #9f4f00;
  background: #fff2db;
}

.subscriber-expiry {
  color: #475b65;
  font-size: 0.78rem;
  font-weight: 800;
}

.subscriber-expiry.warn {
  color: #9f4f00;
  font-weight: 900;
}

.subscriber-expiry.bad {
  color: #9b1c1c;
  font-weight: 900;
}

.subscriber-table .badge {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 0.78rem;
}

.subscriber-table .row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(54px, 1fr));
  gap: 5px;
  align-items: stretch;
  min-width: 0;
}

.subscriber-table .row-action {
  min-height: 28px;
  min-width: 0;
  padding: 6px 5px;
  border-radius: 7px;
  font-size: 0.74rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.bsnl-panel {
  padding: 0;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid rgba(8, 127, 140, 0.12);
}

.bsnl-panel .panel-head {
  position: sticky;
  left: 0;
  z-index: 2;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(127, 153, 160, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f8fcfb 100%);
}

.bsnl-panel .panel-head h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.05rem;
}

.bsnl-panel .panel-head h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1f9d78;
  box-shadow: 0 0 0 5px rgba(31, 157, 120, 0.14);
}

.bsnl-panel .panel-actions {
  gap: 8px;
}

.bsnl-panel .panel-actions button {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid rgba(8, 127, 140, 0.14);
  border-radius: 8px;
  color: #08717d;
  background: #e8f7f4;
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 850;
}

.bsnl-panel .panel-actions button:hover {
  border-color: rgba(8, 127, 140, 0.28);
  background: #d9f2ee;
}

.bsnl-filter {
  position: sticky;
  left: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 18px minmax(260px, 1fr) minmax(130px, 0.35fr) minmax(150px, 0.45fr) minmax(180px, 0.6fr);
  align-items: center;
  gap: 10px;
  margin: 0 20px 14px;
  padding: 10px 12px;
  border: 1px solid rgba(8, 127, 140, 0.16);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 44, 54, 0.06);
}

.bsnl-filter input,
.bsnl-filter select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #102936;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 750;
}

.bsnl-filter select {
  min-height: 38px;
  padding: 0 10px;
  border-left: 1px solid rgba(8, 127, 140, 0.14);
  border-radius: 8px;
  cursor: pointer;
}

.bsnl-filter input::placeholder {
  color: #687985;
}

.bsnl-table {
  min-width: 0;
  table-layout: fixed;
}

.bsnl-table th,
.bsnl-table td {
  vertical-align: middle;
}

.bsnl-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 12px;
  background: #fbfdfd;
  box-shadow: inset 0 -1px 0 var(--line);
  font-size: 0.76rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.bsnl-table td {
  padding: 13px 12px;
  background: #fff;
}

.bsnl-table tr:hover td {
  background: #f7fbfa;
}

.bsnl-table th:nth-child(1),
.bsnl-table td:nth-child(1) {
  width: 20%;
}

.bsnl-table th:nth-child(2),
.bsnl-table td:nth-child(2) {
  width: 13%;
}

.bsnl-table th:nth-child(3),
.bsnl-table td:nth-child(3) {
  width: 14%;
}

.bsnl-table th:nth-child(4),
.bsnl-table td:nth-child(4) {
  width: 8%;
}

.bsnl-table th:nth-child(5),
.bsnl-table td:nth-child(5) {
  width: 8%;
}

.bsnl-table th:nth-child(6),
.bsnl-table td:nth-child(6) {
  width: 16%;
}

.bsnl-table th:nth-child(7),
.bsnl-table td:nth-child(7) {
  width: 7%;
}

.bsnl-table th:nth-child(8),
.bsnl-table td:nth-child(8) {
  width: 14%;
}

.bsnl-customer,
.bsnl-contact,
.bsnl-user {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bsnl-customer strong,
.bsnl-contact strong,
.bsnl-user strong {
  min-width: 0;
  overflow: hidden;
  color: #102936;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bsnl-customer span,
.bsnl-contact span,
.bsnl-user span {
  min-width: 0;
  overflow: hidden;
  color: #60717a;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bsnl-olt-chip,
.bsnl-plan,
.bsnl-password {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bsnl-olt-chip {
  padding: 4px 9px;
  border: 1px solid rgba(8, 127, 140, 0.14);
  border-radius: 999px;
  color: #075f69;
  background: #effaf7;
  font-size: 0.78rem;
  font-weight: 850;
}

.bsnl-plan {
  color: #183842;
  font-size: 0.8rem;
  font-weight: 800;
}

.bsnl-password {
  color: #475b65;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.bsnl-table .badge {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 0.78rem;
}

.bsnl-table .row-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}

.bsnl-table .row-action {
  min-height: 28px;
  min-width: 0;
  padding: 6px 4px;
  border-radius: 7px;
  font-size: 0.72rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.invoice-table {
  min-width: 0;
  table-layout: fixed;
}

.invoice-table th:nth-child(1),
.invoice-table td:nth-child(1) {
  width: 18%;
}

.invoice-table th:nth-child(2),
.invoice-table td:nth-child(2) {
  width: 24%;
}

.invoice-table th:nth-child(3),
.invoice-table td:nth-child(3) {
  width: 16%;
}

.invoice-table th:nth-child(4),
.invoice-table td:nth-child(4) {
  width: 17%;
}

.invoice-table th:nth-child(5),
.invoice-table td:nth-child(5) {
  width: 12%;
}

.invoice-table th:nth-child(6),
.invoice-table td:nth-child(6) {
  width: 13%;
}

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

.invoice-table th,
.invoice-table td {
  padding: 16px 10px;
  vertical-align: middle;
}

.invoice-table td:first-child,
.invoice-table td:nth-child(3) {
  font-weight: 700;
}

.invoice-table .row-actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.invoice-table .row-action {
  min-width: 58px;
  text-align: center;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.empty-cell {
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.assigned-ticket td {
  background: #f5fbf8;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
}

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

.person-card {
  min-height: 190px;
}

.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--teal);
  font-weight: 900;
}

.person-card h3 {
  margin: 18px 0 6px;
}

.person-card strong {
  color: var(--mint);
}

.node-map {
  min-height: 390px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(8, 127, 140, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(8, 127, 140, 0.08) 1px, transparent 1px),
    #f9fcfb;
  background-size: 44px 44px;
}

.node {
  width: 24px;
  height: 24px;
  position: absolute;
  box-shadow: 0 0 0 8px rgba(31, 157, 120, 0.12);
}

.n1 { left: 16%; top: 22%; }
.n2 { left: 42%; top: 34%; }
.n3 { left: 67%; top: 20%; }
.n4 { left: 74%; top: 64%; }
.n5 { left: 25%; top: 70%; }

.earth-map {
  min-height: 520px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #15313d;
  background:
    radial-gradient(circle at 28% 26%, rgba(119, 172, 94, 0.95) 0 8%, transparent 9%),
    radial-gradient(circle at 66% 34%, rgba(85, 142, 79, 0.9) 0 10%, transparent 11%),
    radial-gradient(circle at 44% 70%, rgba(152, 133, 72, 0.9) 0 11%, transparent 12%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 35%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    #143746;
  background-size: auto, auto, auto, auto, 54px 54px, 54px 54px, auto;
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.35),
    0 18px 48px rgba(14, 48, 58, 0.12);
}

.earth-map.real-map {
  background: #e7f0ed;
  border-color: var(--line);
  box-shadow: 0 18px 48px rgba(14, 48, 58, 0.12);
}

.earth-map.real-map::before,
.earth-map.real-map::after {
  content: none;
}

.earth-map .leaflet-container,
.earth-map .leaflet-pane,
.earth-map .leaflet-map-pane {
  border-radius: 8px;
}

.earth-map .leaflet-container,
.earth-map .leaflet-control-container,
.earth-map .leaflet-pane,
.earth-map .leaflet-top,
.earth-map .leaflet-bottom {
  z-index: 1;
}

.map-empty,
.map-fallback-note {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 2;
  padding: 8px 10px;
  border-radius: 8px;
  color: #10353b;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(14, 48, 58, 0.12);
}

.earth-map::before {
  content: "Google Earth Style View";
  position: absolute;
  left: 14px;
  top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #dff7ee;
  background: rgba(8, 24, 32, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.earth-map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 48%, rgba(0, 0, 0, 0.28));
}

.location-marker {
  width: 36px;
  height: 36px;
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 2px solid white;
  border-radius: 50% 50% 50% 4px;
  color: white;
  transform: translate(-50%, -50%) rotate(-45deg);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.12),
    0 10px 22px rgba(0, 0, 0, 0.34);
}

.location-marker span {
  display: block;
  font-size: 0.68rem;
  font-weight: 900;
  transform: rotate(45deg);
}

.location-marker.online {
  background: var(--mint);
}

.location-marker.warning {
  background: var(--amber);
}

.location-marker.offline {
  background: var(--red);
}

/* Professional CRM theme refresh */
body {
  background: linear-gradient(135deg, #eef5f6 0%, #f6f8fb 48%, #eef2ed 100%);
}

.dashboard,
.employee-portal {
  background: transparent;
}

.sidebar {
  position: sticky;
  top: 0;
  background:
    linear-gradient(180deg, #0f2938 0%, #173747 48%, #112936 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 12px 0 34px rgba(11, 30, 42, 0.13);
}

.sidebar .brand-block.compact {
  margin-bottom: 10px;
}

.sidebar .brand-block h2 {
  color: #ffffff;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.sidebar .eyebrow,
.sidebar p {
  color: #a9c6cf;
}

.nav-list {
  gap: 6px;
}

.nav-list button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #dbe8ec;
  font-weight: 850;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.nav-list button.active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.13);
}

.nav-list button:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.09);
}

.workspace {
  padding: 26px;
}

.topbar {
  min-height: 52px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(116, 139, 151, 0.18);
}

.topbar h2 {
  color: #0d2534;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  font-weight: 950;
}

.search-box {
  min-height: 44px;
  border-color: rgba(126, 151, 163, 0.28);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.topbar-whatsapp-action,
.topbar-support-action,
.panel-head button,
.subscriber-panel .panel-actions button,
.bsnl-panel .panel-actions button,
.profile-actions button,
.attendance-actions button {
  border: 1px solid rgba(8, 122, 134, 0.2);
  border-radius: 8px;
  color: var(--accent-dark);
  background: #e8f5f3;
  box-shadow: none;
}

.topbar-whatsapp-action:hover,
.topbar-support-action:hover,
.panel-head button:hover,
.subscriber-panel .panel-actions button:hover,
.bsnl-panel .panel-actions button:hover,
.profile-actions button:hover,
.attendance-actions button:hover {
  border-color: rgba(8, 122, 134, 0.36);
  background: #d9efec;
}

.topbar-support-action {
  color: #ffffff;
  background: #10202a;
  border-color: rgba(16, 32, 42, 0.16);
}

.topbar-support-action:hover {
  color: #ffffff;
  background: #173242;
}

.icon-button,
.user-chip {
  border-radius: 8px;
  background: #10202a;
  box-shadow: 0 10px 24px rgba(12, 29, 39, 0.12);
}

.quick-stats div,
.login-card,
.panel,
.metric-card,
.person-card,
.sidebar-card {
  border-color: rgba(205, 218, 225, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.metric-card {
  min-height: 122px;
  border-top: 3px solid rgba(14, 141, 153, 0.62);
}

.metric-card strong {
  color: #071c2d;
  font-size: 1.85rem;
}

.metric-card p {
  color: #087a5d;
}

.metric-shortcut {
  position: relative;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.metric-shortcut::after {
  content: "Open";
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #075f6b;
  background: #e7f5f2;
  font-size: 0.72rem;
  font-weight: 950;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.metric-shortcut:hover,
.metric-shortcut:focus-visible {
  border-color: rgba(8, 122, 134, 0.42);
  box-shadow: 0 18px 42px rgba(13, 43, 54, 0.12);
  transform: translateY(-2px);
  outline: 0;
}

.metric-shortcut:hover::after,
.metric-shortcut:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.field-app-mode .dashboard {
  grid-template-columns: minmax(0, 1fr);
}

.field-app-mode .sidebar {
  display: none;
}

.field-app-mode.field-sidebar-open .sidebar {
  width: min(78vw, 270px);
  max-height: calc(100vh - 20px);
  display: block;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 80;
  overflow: auto;
  border-radius: 12px;
  box-shadow: 0 26px 70px rgba(8, 24, 31, 0.34);
}

.field-app-mode.field-sidebar-open .sidebar .brand-block.compact {
  display: flex;
}

.field-app-mode.field-sidebar-open .sidebar .brand-block.compact > div:last-child {
  display: block;
}

.field-app-mode.field-sidebar-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(8, 22, 29, 0.42);
}

.field-app-mode .workspace {
  min-height: 100vh;
  padding: 14px;
}

.field-app-mode .topbar {
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.field-app-mode .topbar-actions {
  justify-content: flex-end;
}

.field-app-mode .sidebar-toggle-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 125;
}

.field-app-mode .search-box,
.field-app-mode .topbar-whatsapp-action,
.field-app-mode .topbar-support-action,
.field-app-mode .profile-shortcut {
  display: none;
}

.field-app-mode #overview > .metric-grid,
.field-app-mode #overview > .refresh-note {
  display: none;
}

.field-app-mode .topbar-title {
  padding-left: 50px;
}

.field-app-actions {
  display: grid;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
}

.field-app-head {
  padding: 14px 14px 4px;
}

.field-app-head h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 950;
}

.field-app-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.field-app-action {
  width: 100%;
  min-height: 76px;
  display: grid;
  align-content: center;
  padding: 18px 20px;
  border: 1px solid rgba(8, 122, 134, 0.28);
  border-radius: 8px;
  color: #0d2534;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.field-app-action strong {
  font-size: 1.12rem;
  font-weight: 950;
}

.field-app-action:hover,
.field-app-action:focus-visible {
  border-color: rgba(8, 122, 134, 0.5);
  background: #f4fbfa;
  outline: 0;
}

.field-app-mode .subscriber-panel,
.field-app-mode .bsnl-panel,
.field-app-mode .table-panel {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.field-app-mode .subscriber-table,
.field-app-mode .bsnl-table {
  min-width: 720px;
}

.field-app-mode .subscriber-table th:last-child,
.field-app-mode .subscriber-table td:last-child,
.field-app-mode .bsnl-table th:last-child,
.field-app-mode .bsnl-table td:last-child {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  padding-left: 6px;
  padding-right: 6px;
}

.field-app-mode .subscriber-table .row-actions,
.field-app-mode .bsnl-table .row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.field-app-mode .subscriber-table .row-action,
.field-app-mode .bsnl-table .row-action {
  min-height: 26px;
  padding: 5px 4px;
  border-radius: 6px;
  font-size: 0.68rem;
  line-height: 1;
}

.panel-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(116, 139, 151, 0.16);
}

.panel-head h3 {
  color: #122836;
  font-size: 1.05rem;
  font-weight: 950;
}

table {
  color: #102533;
}

th {
  color: #586b78;
  background: #f7fafb;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

td {
  border-bottom-color: rgba(126, 151, 163, 0.2);
}

tr:hover td,
.subscriber-table tr:hover td,
.bsnl-table tr:hover td {
  background: #f6fbfa;
}

.subscriber-panel,
.bsnl-panel,
.table-panel,
.compact-table-panel {
  border-color: rgba(205, 218, 225, 0.9);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.subscriber-filter,
.bsnl-filter {
  border-color: rgba(126, 151, 163, 0.26);
  box-shadow: none;
}

.badge,
.status-chip,
.access-chip {
  border-radius: 999px;
  font-weight: 900;
}

.row-action,
.subscriber-table .row-action,
.bsnl-table .row-action,
.invoice-table .row-action {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid rgba(8, 122, 134, 0.14);
  border-radius: 7px;
  color: #076b74;
  background: #e6f5f2;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.row-action:hover,
.subscriber-table .row-action:hover,
.bsnl-table .row-action:hover,
.invoice-table .row-action:hover {
  background: #d4ece7;
}

.danger-action,
.row-action.danger,
button.danger-action {
  color: #941f1f !important;
  background: #fff0f0 !important;
  border-color: rgba(198, 66, 66, 0.2) !important;
}

input,
select,
textarea {
  border-color: rgba(126, 151, 163, 0.28);
  border-radius: 8px;
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(8, 122, 134, 0.7);
  box-shadow: 0 0 0 3px rgba(8, 122, 134, 0.12);
  outline: 0;
}

.modal,
.history-modal,
.sms-modal,
.complaint-modal,
.location-form {
  border-radius: 8px;
  box-shadow: 0 26px 70px rgba(8, 25, 34, 0.24);
}

.login-panel > .brand-block,
.login-card {
  border-radius: 8px;
}

.login-card::before {
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--accent), #243f5f, var(--amber));
}

@media (max-width: 720px) {
  .two-columns,
  .three-columns {
    grid-template-columns: 1fr;
  }

  .whatsapp-message-form .form-actions {
    grid-template-columns: 1fr;
  }

  .location-form {
    width: min(460px, calc(100vw - 18px));
  }
}

.field-app-mode .subscriber-table th:last-child,
.field-app-mode .subscriber-table td:last-child,
.field-app-mode .bsnl-table th:last-child,
.field-app-mode .bsnl-table td:last-child {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  padding-left: 6px;
  padding-right: 6px;
}

.field-app-mode .subscriber-table .row-actions,
.field-app-mode .bsnl-table .row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.field-app-mode .subscriber-table .row-action,
.field-app-mode .bsnl-table .row-action {
  min-height: 26px;
  padding: 5px 4px;
  border-radius: 6px;
  font-size: 0.68rem;
  line-height: 1;
}

.subscriber-portal {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  color: var(--ink);
  background: linear-gradient(135deg, #dcefeb 0%, #eef7f4 52%, #e6f2ee 100%);
}

.subscriber-workspace {
  position: relative;
}

.subscriber-console-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.subscriber-side-nav {
  margin-top: 22px;
}

.subscriber-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px 0 12px;
  background: var(--navy);
  box-shadow: 0 8px 24px rgba(23, 33, 38, 0.14);
}

.subscriber-logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 3px solid white;
  border-radius: 50%;
  color: white;
  background: radial-gradient(circle at 35% 28%, #34c6a3 0 22%, #087f8c 23% 62%, #f0fffb 63% 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.subscriber-logo span {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: lowercase;
}

.subscriber-nav {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.subscriber-nav button {
  min-width: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: white;
  background: transparent;
  font-weight: 800;
}

.subscriber-nav button.active {
  border-bottom-color: #79ead0;
  background: rgba(255, 255, 255, 0.08);
}

.nav-home,
.nav-support,
.nav-profile {
  width: 16px;
  height: 16px;
  position: relative;
  display: inline-block;
}

.nav-home::before {
  content: "";
  position: absolute;
  inset: 6px 3px 1px;
  background: white;
  border-radius: 1px;
}

.nav-home::after {
  content: "";
  width: 12px;
  height: 12px;
  position: absolute;
  left: 2px;
  top: 0;
  background: white;
  transform: rotate(45deg);
  clip-path: polygon(0 0, 100% 0, 100% 55%, 0 55%);
}

.nav-support {
  border: 2px solid white;
  border-bottom-color: transparent;
  border-radius: 10px 10px 4px 4px;
}

.nav-support::before,
.nav-support::after {
  content: "";
  width: 4px;
  height: 8px;
  position: absolute;
  top: 7px;
  background: white;
  border-radius: 2px;
}

.nav-support::before { left: -3px; }
.nav-support::after { right: -3px; }

.nav-profile {
  border: 2px solid white;
  border-radius: 50%;
}

.nav-profile::before,
.nav-profile::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: white;
  transform: translate(-50%, -50%);
}

.nav-profile::before {
  width: 2px;
  height: 8px;
}

.nav-profile::after {
  width: 8px;
  height: 2px;
}

.subscriber-content {
  min-height: calc(100vh - 50px);
  padding: 18px 28px 96px;
}

.subscriber-main {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(350px, 372px);
  gap: 24px;
  align-items: start;
  max-width: 1360px;
  margin: 0 auto;
}

.subscriber-left {
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: calc(100vh - 168px);
  padding-right: 4px;
}

.subscriber-greeting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 2px 0 10px;
  border-bottom: 1px solid rgba(8, 127, 140, 0.12);
}

.subscriber-greeting h2 {
  margin: 2px 0 0;
  font-size: 1.25rem;
  font-weight: 500;
}

.subscriber-greeting strong {
  color: var(--teal);
  font-weight: 700;
}

.complaint-button {
  min-width: 122px;
  border: 0;
  border-radius: 6px;
  padding: 10px 20px;
  color: white;
  background: var(--amber);
  box-shadow: 0 8px 16px rgba(201, 121, 20, 0.2);
  font-weight: 800;
}

.subscriber-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.payment-request-button {
  min-width: 152px;
  border: 0;
  border-radius: 6px;
  padding: 10px 20px;
  color: white;
  background: var(--teal);
  box-shadow: 0 8px 16px rgba(8, 127, 140, 0.22);
  font-weight: 800;
}

.subscriber-payment-panel {
  width: min(430px, 100%);
  margin-top: 24px;
}

.subscriber-summary {
  width: 100%;
  display: grid;
  gap: 12px;
}

.subscriber-card {
  padding: 18px;
  color: var(--teal);
  background: white;
  border: 1px solid rgba(8, 127, 140, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.12);
}

.subscriber-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.subscriber-card h3,
.subscriber-card p {
  margin: 0;
}

.subscriber-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.subscriber-card-head p {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.online-dot {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 50%;
  background: #b8e6bd;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.72fr);
  align-items: center;
  gap: 12px;
}

.detail-list dt {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 500;
}

.detail-list dd {
  margin: 0;
  text-align: left;
  font-weight: 500;
}

.mini-icon {
  width: 16px;
  height: 16px;
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  color: var(--teal);
}

.user-icon,
.status-icon,
.globe-icon,
.clock-icon,
.usage-icon {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.user-icon::before {
  content: "";
  width: 4px;
  height: 4px;
  position: absolute;
  left: 4px;
  top: 3px;
  border-radius: 50%;
  background: currentColor;
}

.user-icon::after {
  content: "";
  width: 8px;
  height: 4px;
  position: absolute;
  left: 2px;
  bottom: 3px;
  border-radius: 8px 8px 0 0;
  background: currentColor;
}

.status-icon::before {
  content: "";
  width: 6px;
  height: 6px;
  position: absolute;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: currentColor;
}

.globe-icon::before,
.globe-icon::after {
  content: "";
  position: absolute;
  border-color: currentColor;
  border-style: solid;
}

.globe-icon::before {
  inset: 2px 5px;
  border-width: 0 1px;
}

.globe-icon::after {
  left: 2px;
  right: 2px;
  top: 6px;
  border-width: 1px 0 0;
}

.ticket-icon,
.calendar-icon,
.plan-icon {
  border-radius: 2px;
  background: currentColor;
}

.ticket-icon::after {
  content: "";
  width: 6px;
  height: 8px;
  position: absolute;
  right: -4px;
  bottom: -2px;
  border: 2px solid currentColor;
  border-left: 0;
  border-top: 0;
}

.usage-strip {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid #e6cd8c;
}

.usage-strip p {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
}

.usage-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.usage-values span {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.upload-icon,
.download-icon,
.transfer-icon {
  width: 14px;
  height: 16px;
  position: relative;
  display: inline-block;
}

.upload-icon::before,
.download-icon::before,
.transfer-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  width: 2px;
  height: 13px;
  background: var(--teal);
}

.upload-icon::after,
.download-icon::after,
.transfer-icon::after {
  content: "";
  width: 7px;
  height: 7px;
  position: absolute;
  left: 3px;
  border-left: 1px solid var(--teal);
  border-top: 1px solid var(--teal);
}

.upload-icon::before { top: 2px; }
.upload-icon::after {
  top: 1px;
  transform: rotate(45deg);
}

.download-icon::before { top: 0; }
.download-icon::after {
  bottom: 1px;
  transform: rotate(225deg);
}

.transfer-icon::before {
  top: 1px;
  box-shadow: 6px 0 0 var(--teal);
}

.transfer-icon::after {
  top: 1px;
  transform: rotate(45deg);
  box-shadow: 6px 6px 0 -1px white, 6px 6px 0 0 var(--teal);
}

.plan-chart {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: conic-gradient(var(--teal) 0 75%, transparent 75% 100%);
  border: 1px solid var(--teal);
}

.plan-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 4px;
  height: 2px;
  background: white;
  box-shadow: 0 4px 0 white;
}

.calendar-icon::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 2px;
  background: white;
}

.clock-icon::before {
  content: "";
  width: 2px;
  height: 6px;
  position: absolute;
  left: 6px;
  top: 3px;
  background: currentColor;
}

.clock-icon::after {
  content: "";
  width: 5px;
  height: 2px;
  position: absolute;
  left: 6px;
  top: 8px;
  background: currentColor;
}

.floating-chat {
  min-width: 118px;
  height: 48px;
  position: fixed;
  right: 430px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  text-decoration: none;
  z-index: 12;
}

.floating-chat span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  font-size: 0.74rem;
  font-weight: 900;
}

.floating-chat em {
  color: white;
  font-style: normal;
  font-weight: 900;
}

.history-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 24, 31, 0.58);
  backdrop-filter: blur(5px);
}

.history-panel {
  width: min(920px, 96vw);
  max-height: min(720px, 88vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(8, 127, 140, 0.18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(3, 22, 28, 0.28);
}

.history-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f8fdfc, #eef8f6);
}

.history-head h2 {
  margin: 0;
  font-size: 1.55rem;
}

.history-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.history-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #076b73;
  background: #e4f7f3;
  font-size: 0.8rem;
  font-weight: 850;
}

.history-timeline {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 24px 22px;
}

.history-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fbfdfd;
}

.history-card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.history-card-top strong {
  font-size: 1rem;
}

.history-card-top span,
.history-actor,
.history-note {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.history-actor {
  margin: 5px 0 9px;
}

.history-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.history-change-row {
  max-width: 100%;
  min-height: 34px;
  display: inline-grid;
  grid-template-columns: auto minmax(42px, max-content) auto minmax(70px, 1fr);
  gap: 6px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid rgba(8, 127, 140, 0.08);
  border-radius: 999px;
  background: #ffffff;
}

.history-change-field {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.history-change-row del,
.history-change-row ins {
  text-decoration: none;
  min-width: 0;
  max-width: min(260px, 30vw);
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 800;
}

.history-change-row del {
  color: #8a4a4a;
}

.history-change-row ins {
  color: #08705f;
}

.history-change-arrow {
  color: #60717a;
  font-size: 0.78rem;
  font-weight: 900;
}

.ticket-history-panel {
  width: min(780px, 96vw);
}

.ticket-history-card {
  border-left: 4px solid var(--teal);
}

.ticket-history-details {
  display: grid;
  gap: 8px;
}

.ticket-history-detail {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(8, 127, 140, 0.08);
  border-radius: 8px;
  background: #ffffff;
}

.ticket-history-detail span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.ticket-history-detail strong,
.ticket-history-detail a {
  min-width: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

@media (max-width: 680px) {
  .history-change-row {
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
    border-radius: 8px;
  }

  .history-change-row del,
  .history-change-row ins {
    max-width: none;
  }

  .ticket-history-detail {
    grid-template-columns: 1fr;
  }
}

.whatsapp-support {
  background: #25d366;
}

.whatsapp-support:hover {
  background: #1fb457;
}

.subscriber-workspace .floating-chat {
  right: 24px;
}

.complaint-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 33, 38, 0.42);
}

.complaint-form {
  width: min(460px, 100%);
  padding: 22px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.subscriber-form {
  width: min(920px, calc(100vw - 32px));
  max-height: min(88vh, 820px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 18px;
  padding: 0 24px 24px;
  overflow-y: auto;
  border-top: 4px solid var(--teal);
}

.subscriber-form .complaint-head,
.subscriber-form input[type="hidden"],
.subscriber-form .primary-action,
.subscriber-form .form-success {
  grid-column: 1 / -1;
}

.subscriber-form .complaint-head {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 -24px 4px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(127, 153, 160, 0.22);
  background: white;
}

.subscriber-form > label {
  grid-column: span 2;
}

.subscriber-form label,
.subscriber-form .form-field {
  margin: 0;
}

.subscriber-form span {
  color: #2f4650;
  font-size: 0.82rem;
  letter-spacing: 0;
}

.subscriber-form input,
.subscriber-form select {
  min-height: 48px;
  padding: 12px 13px;
  background: #fbfdfd;
}

.subscriber-bsnl-grid {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 14px;
  padding: 14px;
  border: 1px solid rgba(8, 127, 140, 0.16);
  border-radius: 8px;
  background: #f6fbfa;
}

.subscriber-bsnl-grid label {
  margin: 0;
}

.subscriber-expiry-grid {
  grid-column: span 2;
  grid-template-columns: 1fr;
}

#subscriberMobileLocationButton,
.subscriber-form > label:has(#subscriberPassword) {
  grid-column: span 2;
}

#subscriberMobileLocationButton {
  min-height: 48px;
  align-self: end;
  justify-content: center;
  margin: 0;
  border-color: rgba(8, 127, 140, 0.18);
  color: #08717d;
  background: #e8f7f4;
}

.subscriber-form .primary-action {
  min-height: 50px;
  margin-top: 2px;
}

.form-helper {
  max-width: 520px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.complaint-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.complaint-head h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.close-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font-weight: 900;
}

#employeeForm {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  padding: 26px;
  overflow-y: auto;
}

#employeeForm .complaint-head,
#employeeForm input[type="hidden"],
#employeeForm label:first-of-type,
#employeeForm .form-field,
#employeeForm .primary-action,
#employeeForm .form-success {
  grid-column: 1 / -1;
}

#employeeForm label,
#employeeForm .form-field {
  margin: 0;
}

#employeeForm .complaint-head {
  position: sticky;
  top: -26px;
  z-index: 2;
  padding: 0 0 14px;
  background: white;
}

#employeeForm .close-button {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

#employeeForm .access-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

#employeeForm .access-choice-grid label {
  min-height: 46px;
  border-color: #cfe4e5;
  background: #f7fbfb;
}

#employeeForm .primary-action {
  margin-top: 4px;
}

.form-success {
  margin: 12px 0 0;
  color: #11664e;
  font-weight: 800;
}

#whatsappApiActionResult {
  line-height: 1.6;
  white-space: pre-line;
}

@media (max-width: 980px) {
  .isp-header,
  .split-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .isp-header {
    display: flex;
  }

  .isp-hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .isp-hero {
    min-height: auto;
    padding: 54px 0 28px;
  }

  .isp-card-grid,
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .login-grid,
  .dashboard,
  .subscriber-portal,
  .employee-portal,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .login-panel {
    overflow: visible;
  }

  .login-copy h2 {
    max-width: 760px;
    font-size: clamp(2.1rem, 7vw, 3.4rem);
  }

  .login-card {
    width: min(100%, 520px);
  }

  .sidebar {
    min-height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-grid,
  .employee-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subscriber-greeting {
    margin-bottom: 22px;
  }

  .subscriber-main {
    grid-template-columns: 1fr;
  }

  .subscriber-console-grid {
    grid-template-columns: 1fr;
  }

  .subscriber-left {
    min-height: 0;
  }

  .subscriber-payment-panel {
    width: 100%;
    margin-bottom: 22px;
  }

  .subscriber-summary {
    width: 100%;
  }

  .floating-chat {
    right: 24px;
  }
}

@media (max-width: 760px) {
  .subscriber-form {
    grid-template-columns: 1fr;
    width: min(520px, calc(100vw - 18px));
    max-height: calc(100vh - 18px);
    padding: 0 16px 18px;
  }

  .subscriber-form .complaint-head {
    margin: 0 -16px 2px;
    padding: 18px 16px 14px;
  }

  .subscriber-form > label,
  .subscriber-expiry-grid,
  #subscriberMobileLocationButton,
  .subscriber-form > label:has(#subscriberPassword) {
    grid-column: 1 / -1;
  }

  .subscriber-bsnl-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .subscriber-filter,
  .bsnl-filter {
    grid-template-columns: 18px 1fr;
    flex-wrap: wrap;
    margin: 0 12px 14px;
  }

  .subscriber-filter select,
  .bsnl-filter select {
    grid-column: 1 / -1;
    flex: 1 1 100%;
    width: 100%;
    border-left: 0;
    border-top: 1px solid rgba(8, 127, 140, 0.14);
  }

  .invoice-panel {
    overflow-x: auto;
  }

  .invoice-table {
    min-width: 640px;
  }
}

@media (max-width: 640px) {
  .isp-site {
    padding: 18px 14px 42px;
  }

  .isp-nav,
  .isp-actions {
    width: 100%;
  }

  .isp-nav a,
  .isp-actions a,
  .support-box a {
    width: 100%;
  }

  .isp-hero-copy h2 {
    font-size: 2.25rem;
  }

  .isp-hero-panel {
    grid-template-columns: 1fr;
  }

  .login-panel,
  .workspace,
  .sidebar {
    padding: 18px;
  }

  .login-panel {
    gap: 22px;
  }

  .brand-block:not(.compact) .brand-mark {
    width: 54px;
    height: 54px;
  }

  .login-copy h2 {
    font-size: 2rem;
    line-height: 1.08;
  }

  .login-lede {
    font-size: 0.96rem;
    margin-bottom: 20px;
  }

  .login-card {
    padding: 22px;
  }

  .quick-stats,
  .metric-grid,
  .employee-grid,
  .nav-list {
    grid-template-columns: 1fr;
  }

  .topbar,
  .topbar-actions,
  .form-row {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .role-tabs {
    grid-template-columns: 1fr;
  }

  .subscriber-header {
    height: auto;
    align-items: flex-start;
    padding: 8px 10px;
    gap: 12px;
  }

  .subscriber-nav {
    flex: 1;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .subscriber-nav button {
    min-width: 0;
    padding: 10px 8px;
  }

  .subscriber-content {
    padding: 18px 12px 84px;
  }

  .subscriber-greeting {
    flex-direction: column;
  }

  .subscriber-actions {
    width: 100%;
    flex-direction: column;
  }

  .complaint-button,
  .payment-request-button {
    width: 100%;
  }

  .floating-chat {
    right: 14px;
    bottom: 14px;
    min-width: 56px;
    border-radius: 50%;
  }

  .floating-chat em {
    display: none;
  }

  .detail-list div,
  .usage-values {
    grid-template-columns: 1fr;
  }

  .detail-list dd {
    text-align: left;
    padding-left: 24px;
  }
}

/* Reliable dashboard tab drawer: keep this after every responsive rule. */
#dashboard.tabs-hidden > .sidebar,
.sidebar-collapsed #dashboard > .sidebar {
  display: none !important;
}

/* Removed modules: keep old data/code inert, but hide Billing, Payments, and Subscriber Login UI. */
[data-role="subscriber"],
[data-view="billing"],
[data-view="payments"],
[data-subscriber-view="subscriberInvoices"],
[data-subscriber-view="subscriberPayments"],
#billing,
#payments,
#subscriberInvoices,
#subscriberPayments,
#overviewPaymentsCard,
.payment-request-button,
#addPaymentRequestButton,
#createInvoiceButton {
  display: none !important;
}

#dashboard.tabs-hidden {
  grid-template-columns: minmax(0, 1fr) !important;
}

@media (max-width: 980px) {
  #dashboard > .sidebar {
    display: none !important;
  }

  #dashboard.tabs-open > .sidebar,
  .field-sidebar-open #dashboard > .sidebar {
    width: min(78vw, 270px) !important;
    max-height: calc(100vh - 20px);
    display: block !important;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 120;
    overflow: auto;
    border-radius: 12px;
    box-shadow: 0 26px 70px rgba(8, 24, 31, 0.34);
  }

  #dashboard.tabs-open::before,
  .field-sidebar-open #dashboard::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(8, 22, 29, 0.42);
  }
}

.field-app-mode #dashboard > .sidebar {
  display: none !important;
}

.field-app-mode #dashboard.tabs-open > .sidebar,
.field-app-mode.field-sidebar-open #dashboard > .sidebar {
  width: min(78vw, 270px) !important;
  max-height: calc(100vh - 20px);
  display: block !important;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 120;
  overflow: auto;
  border-radius: 12px;
  box-shadow: 0 26px 70px rgba(8, 24, 31, 0.34);
}

/* CRM responsive mode: phone browser gets app-like mobile layout, desktop stays full CRM. */
@media (max-width: 980px) {
  body:not(.field-app-mode) #dashboard {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.field-app-mode) .workspace {
    min-height: 100vh;
    padding: 14px;
  }

  body:not(.field-app-mode) .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
  }

  body:not(.field-app-mode) .topbar-title {
    padding-left: 50px;
  }

  body:not(.field-app-mode) .sidebar-toggle-button {
    width: 44px;
    height: 44px;
    display: inline-grid;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 125;
  }

  body:not(.field-app-mode) .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body:not(.field-app-mode) .topbar-actions > * {
    width: 100%;
    min-height: 42px;
  }

  body:not(.field-app-mode) .search-box {
    width: 100%;
    order: 2;
  }

  body:not(.field-app-mode) .view-card,
  body:not(.field-app-mode) .table-panel,
  body:not(.field-app-mode) .subscriber-panel,
  body:not(.field-app-mode) .bsnl-panel {
    border-radius: 10px;
  }

  body:not(.field-app-mode) .metric-grid,
  body:not(.field-app-mode) .employee-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body:not(.field-app-mode) .metric-card {
    min-height: 112px;
    padding: 14px;
  }

  body:not(.field-app-mode) .subscriber-panel,
  body:not(.field-app-mode) .bsnl-panel,
  body:not(.field-app-mode) .table-panel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.field-app-mode) .subscriber-table,
  body:not(.field-app-mode) .bsnl-table,
  body:not(.field-app-mode) .network-table,
  body:not(.field-app-mode) .employee-table {
    min-width: 720px;
  }

  body:not(.field-app-mode) .subscriber-table th:last-child,
  body:not(.field-app-mode) .subscriber-table td:last-child,
  body:not(.field-app-mode) .bsnl-table th:last-child,
  body:not(.field-app-mode) .bsnl-table td:last-child {
    width: 132px;
    min-width: 132px;
    max-width: 132px;
    padding-left: 6px;
    padding-right: 6px;
  }

  body:not(.field-app-mode) .subscriber-table .row-actions,
  body:not(.field-app-mode) .bsnl-table .row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  body:not(.field-app-mode) .subscriber-table .row-action,
  body:not(.field-app-mode) .bsnl-table .row-action {
    min-height: 26px;
    padding: 5px 4px;
    border-radius: 6px;
    font-size: 0.68rem;
    line-height: 1;
  }
}

@media (max-width: 640px) {
  body:not(.field-app-mode) .workspace {
    padding: 10px;
  }

  body:not(.field-app-mode) .topbar h2 {
    font-size: 1.55rem;
    line-height: 1.1;
  }

  body:not(.field-app-mode) .metric-grid,
  body:not(.field-app-mode) .employee-grid {
    grid-template-columns: 1fr;
  }

  body:not(.field-app-mode) .topbar-actions {
    grid-template-columns: 1fr;
  }
}
