/* =========================================================
   DGS Registration Portal - Unified Design System (CSS)
   Centre: Digital Gramin Service Centre Nauwa Gaon
   ========================================================= */

:root {
  --p: #0757d9;
  --p-hover: #0546b0;
  --p-light: #eaf1ff;
  --bg: #f3f6fb;
  --c: #ffffff;
  --txt: #17243a;
  --txt-muted: #64748b;
  --border: #cbd6e4;
  --border-light: #e2e8f0;
  --green: #168844;
  --green-hover: #126e37;
  --green-light: #e6f7eb;
  --red: #cf1322;
  --red-hover: #a8071a;
  --red-light: #fff1f0;
  --orange: #d46b08;
  --orange-light: #fff7e6;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

/* Header & Banner */
header {
  background: linear-gradient(135deg, #0757d9 0%, #03368a 100%);
  color: #ffffff;
  padding: 16px 20px;
  text-align: center;
  border-bottom: 2px solid #e8eef5;
}

.header-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

header h1 {
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

header p {
  font-size: clamp(13px, 2.5vw, 15px);
  opacity: 0.9;
}

/* Sticky Navigation Bar */
.nav-container {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  max-width: 1440px;
  margin: auto;
  gap: 12px;
}

.nav-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.nav-toggle-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--p-light);
  color: var(--p);
  border: 1px solid #bfdbfe;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-toggle-btn:hover {
  background: var(--p);
  color: #ffffff;
}

.nav-current-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--txt-muted);
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: 20px;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Mobile Navbar Optimization */
@media (max-width: 640px) {
  .nav-bar-top {
    padding: 8px 12px;
    gap: 8px;
  }

  .nav-toggle-btn {
    padding: 6px 10px;
    font-size: 13px;
  }

  .nav-current-title {
    font-size: 13.5px;
    max-width: 140px;
  }

  .nav-user-badge {
    font-size: 11.5px;
    padding: 4px 8px;
    max-width: 110px;
  }

  .nav-user-badge span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Slide-out Menu Drawer */
nav.menu-drawer {
  display: none;
  background: #ffffff;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.menu-drawer.menu-open {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  max-width: 1440px;
  margin: auto;
}

@media (max-width: 480px) {
  nav.menu-drawer.menu-open {
    grid-template-columns: 1fr;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

nav.menu-drawer button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--txt);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

nav.menu-drawer button:hover {
  background: var(--p-light);
  color: var(--p);
  border-color: #bfdbfe;
}

nav.menu-drawer button.on {
  background: var(--p);
  color: #ffffff;
  border-color: var(--p);
  box-shadow: 0 2px 6px rgba(7, 87, 217, 0.25);
}

nav.menu-drawer button.red {
  background: var(--red-light);
  color: var(--red);
  border-color: #ffccc7;
}

nav.menu-drawer button.red:hover {
  background: var(--red);
  color: #ffffff;
}

/* Layout Wrapper */
.wrap {
  max-width: 1440px;
  margin: 20px auto;
  padding: 0 16px;
}

@media (max-width: 600px) {
  .wrap {
    margin: 12px auto;
    padding: 0 10px;
  }
}

/* Cards */
.card {
  background: var(--c);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .card {
    padding: 14px 12px;
    margin-bottom: 12px;
  }
}

.card h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--txt);
  margin-bottom: 6px;
}

.card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 8px;
}

.card p,
p.small {
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Form Elements & Spacing */
.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
  letter-spacing: 0.1px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: inherit;
  background: #ffffff;
  color: var(--txt);
  margin-bottom: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  line-height: 1.4;
  height: 42px;
  box-sizing: border-box;
}

textarea {
  min-height: 85px;
  height: auto;
  resize: vertical;
}

input[type="file"] {
  padding: 8px 12px;
  background: #f8fafc;
  cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(7, 87, 217, 0.15);
  background: #ffffff;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
  font-size: 13.5px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 18px;
  height: 42px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn.primary {
  background: var(--p);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--p-hover);
}

.btn.green {
  background: var(--green);
  color: #ffffff;
}

.btn.green:hover {
  background: var(--green-hover);
}

.btn.red {
  background: var(--red);
  color: #ffffff;
}

.btn.red:hover {
  background: var(--red-hover);
}

.btn.gray {
  background: #f1f5f9;
  color: #334155;
  border-color: var(--border);
}

.btn.gray:hover {
  background: #e2e8f0;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: dgs-spin 0.7s linear infinite;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px;
  color: #475569;
  font-size: 14px;
}

@keyframes dgs-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Reusable notifications and confirmation/input dialogs */
.app-toast-region {
  position: fixed;
  z-index: 11000;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 10px;
  width: min(390px, calc(100vw - 32px));
  pointer-events: none;
}

.app-toast {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe5f0;
  border-left: 4px solid #2563eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
  animation: app-toast-in .2s ease-out;
  pointer-events: auto;
}

.app-toast.is-leaving {
  animation: app-toast-out .18s ease-in forwards;
}

.app-toast--success {
  border-left-color: #15803d;
}

.app-toast--error {
  border-left-color: #dc2626;
}

.app-toast--warning {
  border-left-color: #d97706;
}

.app-toast__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 900;
}

.app-toast--success .app-toast__icon {
  background: #dcfce7;
  color: #15803d;
}

.app-toast--error .app-toast__icon {
  background: #fee2e2;
  color: #b91c1c;
}

.app-toast--warning .app-toast__icon {
  background: #fef3c7;
  color: #b45309;
}

.app-toast__body {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.app-toast__body strong {
  color: #0f172a;
  font-size: 13px;
}

.app-toast__close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.app-toast__close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

@keyframes app-toast-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes app-toast-out {
  to {
    opacity: 0;
    transform: translateX(18px);
  }
}

.app-dialog-layer {
  position: fixed;
  z-index: 11010;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(3px);
  animation: app-dialog-fade .16s ease-out;
}

.app-dialog-layer.is-leaving {
  animation: app-dialog-fade-out .16s ease-in forwards;
}

.app-dialog {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: min(460px, 100%);
  padding: 22px;
  border: 1px solid #dbe5f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
  animation: app-dialog-pop .18s ease-out;
}

.app-dialog__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 21px;
  font-weight: 800;
}

.app-dialog__icon.is-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.app-dialog__content {
  min-width: 0;
  flex: 1;
}

.app-dialog h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
}

.app-dialog p {
  margin: 7px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.app-dialog__input {
  box-sizing: border-box;
  width: 100%;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #b9c8db;
  border-radius: 8px;
  color: #0f172a;
  font: inherit;
  outline: none;
}

.app-dialog__input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.app-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

@keyframes app-dialog-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes app-dialog-fade-out {
  to {
    opacity: 0;
  }
}

@keyframes app-dialog-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 480px) {
  .app-toast-region {
    top: 10px;
    right: 10px;
    width: calc(100vw - 20px);
  }

  .app-dialog {
    padding: 18px;
    gap: 10px;
  }

  .app-dialog__actions {
    flex-wrap: wrap;
  }
}

/* Service Setup catalogue */
.service-setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}

.service-catalogue-search-controls {
  display: flex;
  flex: 0 1 400px;
  width: 400px;
  max-width: 100%;
  gap: 8px;
  align-items: center;
}

.service-catalogue-search-controls input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  margin: 0 !important;
}

.service-catalogue-search-controls .btn {
  flex: 0 0 auto;
  height: 42px;
  margin: 0 !important;
}

.service-setup-card {
  display: flex;
  flex-direction: column;
  min-height: 166px;
  overflow: hidden;
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .04);
}

.service-setup-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 13px 10px;
  background: linear-gradient(135deg, #f8fbff, #fff);
}

.service-setup-card__header h4 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.4;
}

.service-setup-count {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
}

.service-setup-fields {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  padding: 11px 13px;
}

.service-setup-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid #dbe5f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.service-setup-field--image {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.service-setup-field--pdf {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.service-setup-field b {
  color: #dc2626;
  font-size: 13px;
  line-height: 1;
}

.service-setup-empty {
  color: #94a3b8;
  font-size: 12px;
  font-style: italic;
}

.service-setup-pricing {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 13px 10px;
  color: #475569;
  font-size: 11.5px;
}

.service-setup-pricing span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  white-space: nowrap;
}

.service-setup-pricing b {
  color: #334155;
}

.service-setup-pricing strong {
  color: #0757d9;
}

.service-setup-public-summary {
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 10px 13px 11px;
  border-top: 1px solid #eef2f7;
}

.service-setup-public-summary__row {
  min-width: 0;
}

.service-setup-public-summary__label {
  display: block;
  margin-bottom: 3px;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.service-setup-public-summary__info {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.service-setup-document-list {
  display: flex;
  min-width: 0;
  gap: 5px;
  align-items: center;
}

.service-setup-document,
.service-setup-document-more {
  min-width: 0;
  padding: 3px 6px;
  overflow: hidden;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-setup-document {
  flex: 1 1 0;
  border: 1px solid #dbe5f0;
  background: #f8fafc;
  color: #334155;
}

.service-setup-document-more {
  flex: 0 0 auto;
  background: #eaf1ff;
  color: #1d4ed8;
}

.service-setup-card__actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 13px;
  border-top: 1px solid #e8eef5;
  background: #fcfdff;
}

.service-fields-modal__heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.service-fields-modal__heading>span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #eaf1ff;
  font-size: 19px;
}

.service-fields-modal__heading h3 {
  margin: 0;
  color: #0757d9;
  font-size: 18px;
}

.service-fields-modal__heading p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.service-fields-modal textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
}

/* Service-record table */
.service-record-table-wrap {
  overflow-x: auto;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
}

.service-record-table {
  width: 100%;
  min-width: 1140px;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.service-record-table th {
  padding: 13px 16px;
  background: #f7faff;
  border-bottom: 1px solid #dbe5f0;
  border-right: 1px solid #dbe5f0;
  color: #1e3a5f;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.service-record-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #e8eef5;
  border-right: 1px solid #e8eef5;
  color: #1e293b;
  font-size: 13px;
  vertical-align: middle;
}

.service-record-table tbody tr:last-child td {
  border-bottom: 0;
}

.service-record-table tbody tr:hover {
  background: #fbfdff;
}

.service-record-table th:last-child,
.service-record-table td:last-child {
  border-right: 0;
}

.service-record-table__date {
  width: 95px;
  white-space: nowrap;
}

.service-record-table__serial {
  width: 54px;
  text-align: center;
  white-space: nowrap;
}

/* Public legal policy pages and their portal footer links. */
.site-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 20px;
  color: #64748b;
  font-size: 13px;
}

.site-footer[hidden] {
  display: none !important;
}

.site-footer a,
.legal-page__back {
  color: #0757d9;
  text-decoration: none;
  font-weight: 700;
}

.site-footer a:hover,
.legal-page__back:hover {
  text-decoration: underline;
}

.legal-page__back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #eff6ff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.legal-page__back:hover {
  background: #dbeafe;
  border-color: #60a5fa;
  box-shadow: 0 4px 10px rgba(7, 87, 217, 0.14);
  text-decoration: none;
  transform: translateY(-1px);
}

.legal-page__back:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.legal-page {
  max-width: 900px;
}

.legal-page__card {
  margin-top: 24px;
  padding: clamp(20px, 4vw, 42px);
}

.legal-page__card h2 {
  margin: 18px 0 4px;
  color: #0757d9;
}

.legal-page__card h3 {
  margin: 24px 0 7px;
  color: #1e3a5f;
}

.legal-page__card p {
  color: #334155;
  line-height: 1.7;
}

.legal-page__updated {
  margin: 0;
  color: #64748b !important;
  font-size: 13px;
}

.legal-page__hindi {
  padding-left: 14px;
  border-left: 3px solid #bfdbfe;
}

.service-record-table__customer {
  width: 145px;
}

.service-record-table__customer strong {
  display: block;
  font-size: 14px;
}

.service-record-table__customer small {
  display: block;
  margin-top: 3px;
  color: #64748b;
}

.service-record-table__service {
  width: 170px;
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.service-record-table__service strong {
  display: block;
  max-width: 100%;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.service-record-table__details {
  width: 405px;
  min-width: 0;
}

.service-record-table__status {
  width: 155px;
  text-align: center;
}

.service-record-table__action {
  width: 174px;
  text-align: center;
  white-space: nowrap;
}

.service-record-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.service-record-action {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  font-size: 13px;
  line-height: 1;
}

.service-status {
  flex: 0 0 auto;
  max-width: 145px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.service-status.is-complete {
  background: #dcfce7;
  color: #166534;
}

.service-status.is-progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.service-status.is-rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.service-record-detail {
  display: grid;
  grid-template-columns: minmax(125px, 46%) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px dashed #dbe5f0;
  color: #334155;
  font-size: 13px;
}

.service-record-detail:first-of-type {
  border-top: 0;
}

.service-record-detail>span {
  min-width: 0;
  color: #475569;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.service-record-detail>div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.service-record-detail code {
  width: fit-content;
  padding: 3px 6px;
  border-radius: 5px;
  background: #eaf1ff;
  color: #1e40af;
}

/* Shared application modal: fixed header/footer with a scrollable body. */
.app-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(5px);
}

.app-modal-overlay.is-open {
  display: flex;
}

.app-modal-content {
  display: flex;
  justify-content: center;
  width: fit-content;
  max-width: calc(100vw - 40px);
  max-height: min(90vh, 900px);
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
  animation: modalZoom 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-modal {
  display: flex;
  flex-direction: column;
  width: fit-content;
  max-width: calc(100vw - 40px);
  max-height: min(90vh, 900px);
}

.app-modal--sm {
  max-width: 440px;
}

.app-modal--md {
  max-width: 640px;
}

.app-modal--lg {
  max-width: 860px;
}

.app-modal--xl {
  max-width: 1100px;
}

.app-modal__header,
.app-modal__footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
}

.app-modal__header {
  border-bottom: 1px solid #dbe5f0;
}

.app-modal__heading {
  min-width: 0;
}

.app-modal__heading h2 {
  margin: 0;
  color: #0f2d55;
  font-size: 20px;
  line-height: 1.3;
}

.app-modal__heading p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.app-modal__close {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid #cbd6e4;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.app-modal__close:hover {
  background: #eaf1ff;
  color: #0757d9;
}

.app-modal__body {
  min-height: 0;
  overflow: auto;
  padding: 20px;
  scrollbar-gutter: stable;
}

.app-modal__footer {
  justify-content: flex-end;
  border-top: 1px solid #dbe5f0;
  box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.05);
}

.service-record-print-document {
  color: #172033;
}

.service-record-print-document__title {
  margin: 0;
  color: #0757d9;
  font-size: 22px;
}

.service-record-print-document__meta {
  margin: 5px 0 16px;
  color: #64748b;
  font-size: 13px;
}

.service-record-print-document__table {
  width: 100%;
  border-collapse: collapse;
}

.service-record-print-document__table th,
.service-record-print-document__table td {
  padding: 10px;
  border: 1px solid #cbd6e4;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.service-record-print-document__table th {
  width: 36%;
  background: #f7faff;
}

@media print {
  body.printing-service-record>*:not(#appModalContainer) {
    display: none !important;
  }

  body.printing-service-record #appModalContainer,
  body.printing-service-record #appModalContent {
    display: block !important;
    position: static !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  body.printing-service-record .app-modal__header,
  body.printing-service-record .app-modal__footer {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .app-modal-overlay {
    padding: 10px;
  }

  .app-modal-content,
  .app-modal {
    max-width: calc(100vw - 20px);
    max-height: 94vh;
  }

  .app-modal__header,
  .app-modal__footer {
    padding: 13px 14px;
  }

  .app-modal__body {
    padding: 16px 14px;
  }

  .app-modal__heading h2 {
    font-size: 18px;
  }

  .service-record-table-wrap {
    border-radius: 8px;
  }

  .service-record-table th,
  .service-record-table td {
    padding: 11px 12px;
  }
}

/* Grid & Form Rows - Pixel-Perfect Alignment */
.row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: flex-end;
  /* CRITICAL: Aligns bottom baselines of inputs and action buttons */
}

.row>div,
.row>* {
  flex: 1;
  min-width: 0;
}

.row input,
.row select {
  margin-bottom: 0 !important;
  /* Removes extraneous bottom margin inside rows */
  height: 42px;
}

/* Reusable searchable select control (single and multiple modes). */
.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-host {
  width: 100%;
}

/* The original field remains the form/API source of truth but is visually replaced. */
.custom-select__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-select__control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 5px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: var(--txt);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.4;
  cursor: pointer;
}

.custom-select__control:focus,
.custom-select__control:focus-within {
  outline: none;
  border-color: #0757d9;
  box-shadow: 0 0 0 3px rgba(7, 87, 217, .12);
}

.custom-select__value {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: inherit;
}

.custom-select__placeholder {
  color: #94a3b8;
}

.custom-select__single-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select__arrow {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin: 0 3px 4px 4px;
  border-right: 2px solid #475569;
  border-bottom: 2px solid #475569;
  transform: rotate(45deg);
  transition: transform .16s ease;
}

.custom-select__control[aria-expanded="true"] .custom-select__arrow {
  margin-bottom: -3px;
  transform: rotate(-135deg);
}

.custom-select__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 5px 3px 8px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #0757d9;
  font-size: 12px;
  font-weight: 700;
}

.custom-select__remove {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #cfe0ff;
  color: #0757d9;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

/* Keep chip remove buttons compact even when the selector sits inside .row. */
.custom-select .custom-select__remove {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  flex: 0 0 18px;
}

.custom-select__remove:hover {
  background: #0757d9;
  color: #fff;
}

.custom-select__menu {
  position: absolute;
  z-index: 2000;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, .16);
}

.custom-select--upward .custom-select__menu {
  top: auto;
  bottom: calc(100% + 5px);
  box-shadow: 0 -16px 30px rgba(15, 23, 42, .16);
}

.custom-select__search-wrap {
  padding: 9px;
  border-bottom: 1px solid #e2e8f0;
}

.custom-select__search {
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
}

.custom-select__options {
  max-height: 230px;
  overflow-y: auto;
  padding: 5px;
}

.custom-select__option {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 9px;
  min-height: 38px;
  padding: 8px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
}

.custom-select__option:hover,
.custom-select__option.is-selected {
  background: #f4f8ff;
}

.custom-select__option--select-all {
  margin-bottom: 5px;
  border-bottom: 1px solid #dbe5f0;
  border-radius: 6px 6px 0 0;
  color: #0757d9;
  font-weight: 800;
}

.custom-select__check {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 1px solid #a8c5f3;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.custom-select__option.is-selected .custom-select__check {
  border-color: #0757d9;
  background: #0757d9;
}

.custom-select__empty {
  padding: 16px 10px;
  color: #64748b;
  text-align: center;
  font-size: 13px;
}

.row textarea {
  margin-bottom: 0 !important;
}

.row .btn,
.row button {
  height: 42px;
  margin-bottom: 0 !important;
}

.row>div[style*="display:flex"],
.btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 42px;
}

@media (max-width: 640px) {
  .row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 10px;
  }

  .row>div,
  .row>* {
    width: 100%;
    flex: auto;
  }

  .row .btn,
  .row button {
    width: 100%;
  }

  .row>div[style*="display:flex"],
  .btn-group {
    width: 100%;
    height: auto;
  }
}

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

/* Staff management: compact permission controls and profile cards */
#staffManageSection,
#staffManageSection .card,
#staffManageSection .grid,
#staffManageSection .permission-editor {
  min-width: 0;
  max-width: 100%;
}

#staffManageSection {
  overflow-x: hidden;
}

.permission-editor {
  border: 1px solid #dbe4f0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px;
}

.permission-editor__top,
.permission-editor__actions,
.staff-profile-card__footer,
.staff-profile-card__actions,
.staff-edit-photo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.permission-editor__top,
.staff-profile-card__footer {
  justify-content: space-between;
  flex-wrap: wrap;
}

.permission-editor__title {
  color: #17243a;
  font-size: 14px;
  font-weight: 800;
}

.permission-editor__hint {
  color: #64748b;
  font-size: 12px;
  margin-top: 2px;
}

.permission-count {
  color: #0757d9;
  background: #dbeafe;
  border-radius: 99px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.permission-action {
  border: 0;
  background: transparent;
  color: #0757d9;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 2px;
}

.permission-action:hover {
  text-decoration: underline;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.permission-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 0;
  padding: 8px 10px;
  color: #475569;
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  cursor: pointer;
  transition: .16s ease;
}

.permission-option input {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.permission-option__check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: transparent;
  background: #fff;
  border: 1.5px solid #b9c8dc;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 900;
}

.permission-option__label {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
}

.permission-option.is-selected {
  color: #0757d9;
  background: #eff6ff;
  border-color: #93c5fd;
}

.permission-option.is-selected .permission-option__check {
  color: #fff;
  background: #0757d9;
  border-color: #0757d9;
}

.staff-profile-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}

.staff-profile-card__stripe {
  height: 5px;
  background: #16a34a;
}

.staff-profile-card.is-left .staff-profile-card__stripe {
  background: #dc2626;
}

.staff-profile-card__body {
  padding: 15px;
}

.staff-profile-card__header {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.staff-profile-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  overflow: hidden;
  color: #0757d9;
  background: #dbeafe;
  border-radius: 50%;
  font-size: 21px;
  font-weight: 900;
}

.staff-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.staff-profile-card__identity {
  min-width: 0;
  flex: 1;
}

.staff-profile-card__identity h3 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
}

.staff-profile-card__identity>div {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-profile-card__mobile {
  margin-top: 3px;
}

.staff-status {
  max-width: 125px;
  padding: 4px 7px;
  color: #15803d;
  background: #dcfce7;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.staff-status.is-left {
  color: #b91c1c;
  background: #fee2e2;
}

.staff-profile-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 13px;
}

.staff-profile-details>div {
  min-width: 0;
  padding: 8px 9px;
  background: #f8fafc;
  border: 1px solid #edf1f6;
  border-radius: 8px;
}

.staff-profile-details__wide {
  grid-column: 1 / -1;
}

.staff-profile-details span,
.staff-profile-details b {
  display: block;
}

.staff-profile-details span {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.staff-profile-details b {
  overflow: hidden;
  margin-top: 2px;
  color: #334155;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-profile-card__footer {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid #edf1f6;
}

.staff-permission-summary {
  color: #64748b;
  font-size: 12px;
}

.staff-profile-card__actions .btn {
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.staff-edit-photo {
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.staff-edit-photo__avatar {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
}

.staff-edit-photo label {
  margin-bottom: 3px;
}

.staff-edit-photo input[type="file"] {
  margin-bottom: 0;
}

/* Keep the staff editor controls available while its long form scrolls. */
.staff-edit-modal__header,
.staff-edit-modal__footer {
  position: sticky;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
}

.staff-edit-modal__header {
  top: -20px;
  margin-bottom: 14px;
  padding: 20px 0 12px;
  border-bottom: 1px solid #e2e8f0;
}

.staff-edit-modal__footer {
  bottom: -20px;
  margin-top: 16px;
  padding: 12px 0 20px;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -8px 14px rgba(255, 255, 255, .96);
  justify-content: flex-end;
}

.staff-edit-modal__header .btn,
.staff-edit-modal__footer .btn {
  flex: 0 0 auto;
}

@media (max-width: 640px) {

  .permission-editor__actions,
  .staff-profile-card__actions {
    width: 100%;
  }

  .staff-profile-card__actions .btn {
    flex: 1;
    padding: 0 7px;
  }

  .staff-status {
    display: none;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
  }
}

/* Stat KPI Cards */
.stat {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat .num {
  font-size: 24px;
  font-weight: 900;
  margin-top: 4px;
}

/* Slot Buttons */
.slot {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.slot:hover {
  border-color: var(--p);
  background: var(--p-light);
  color: var(--p);
}

.slot.sel {
  background: var(--p);
  border-color: var(--p);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(7, 87, 217, 0.3);
}

/* Badges & Robust Table System */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}

/* =========================================================
   Table Scrolling & Non-Shrink Architecture
   Tables will smoothly scroll horizontally on mobile screens 
   without squishing, shrinking, or breaking column layouts.
   ========================================================= */

.table-responsive,
div[style*="overflow-x:auto"],
div[style*="overflow-x: auto"] {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  display: block !important;
  margin-top: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

/* Custom Scrollbar for sleek horizontal scrolling */
div[style*="overflow-x:auto"]::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
  height: 6px;
}

div[style*="overflow-x:auto"]::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
  background: #f1f5f9;
}

div[style*="overflow-x:auto"]::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
  background: #cbd6e4;
  border-radius: 3px;
}

div[style*="overflow-x:auto"]::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

table {
  width: 100%;
  min-width: 680px !important;
  /* CRITICAL: Prevents table from shrinking or squishing */
  border-collapse: collapse;
  font-size: 14px;
  background: #ffffff;
}

th,
td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap !important;
  /* Prevents ugly single-word column wrapping */
  vertical-align: middle;
}

th {
  background: #f8fafc;
  font-weight: 800;
  color: #334155;
  font-size: 13px;
  letter-spacing: 0.2px;
  position: sticky;
  top: 0;
  z-index: 2;
}

tr:hover td {
  background: #f8fafc;
}

/* Buttons inside tables */
td .btn,
td button {
  white-space: nowrap !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Reusable data table controls and pagination. */
.data-table__toolbar,
.data-table__footer {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.data-table__toolbar {
  margin: 10px 0 14px;
}

.data-table__control,
.data-table__per-page,
.data-table__reset-control {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.data-table__control--search {
  flex: 1 1 230px;
}

.data-table__toolbar input,
.data-table__toolbar select,
.data-table__per-page select {
  min-height: 38px;
}

.data-table__reset {
  margin-bottom: 0;
}

.data-table__reset-control {
  flex: 0 0 auto;
}

.data-table__reset-control button {
  margin-bottom: 20px;
}

.data-table__reset-control>span {
  line-height: 18px;
}

.data-table__message {
  text-align: center;
  padding: 24px;
}

.data-table__footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-end;
  margin-top: 12px;
  font-size: 13px;
  color: #64748b;
}

.data-table__count {
  padding-bottom: 9px;
}

.data-table__pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: center;
}

.data-table__per-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: end;
  margin-bottom: 0px;
  white-space: nowrap;
}

.data-table__per-page>span {
  display: inline-flex;
  align-items: center;
  height: 38px;
}

.data-table__per-page select {
  margin-bottom: 0px;
}

.data-table__page {
  min-width: 34px;
  padding: 6px 9px;
}

.data-table__ellipsis {
  padding: 0 4px;
}

@media (max-width: 560px) {
  .data-table__footer {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .data-table__pagination,
  .data-table__per-page {
    justify-self: center;
  }
}

/* Alert Boxes */
.warn {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  color: #ad6800;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

.success {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #389e0d;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

.hidden {
  display: none !important;
}

.small {
  font-size: 12.5px;
}

/* =========================================================
   Official Indian CSC / Government Tax Invoice Receipt Design
   ========================================================= */

.official-receipt-card {
  background: #ffffff;
  color: #0f172a;
  border: 2px solid #0f172a;
  border-radius: 8px;
  padding: 16px 20px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
  line-height: 1.4;
  position: relative;
}

.receipt-tricolor-bar {
  height: 4px;
  background: linear-gradient(90deg, #ff9933 0%, #ff9933 33.33%, #ffffff 33.33%, #ffffff 66.66%, #138808 66.66%, #138808 100%);
  border-radius: 2px;
  margin-bottom: 10px;
  border: 0.5px solid #cbd6e4;
}

.receipt-header {
  text-align: center;
  border-bottom: 1.5px solid #0f172a;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.receipt-gov-tag {
  display: inline-block;
  background: #eaf1ff;
  color: #0757d9;
  border: 1px solid #bfdbfe;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.receipt-centre-title {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  margin: 2px 0;
  letter-spacing: -0.3px;
  text-transform: uppercase;
}

.receipt-centre-sub {
  font-size: 12.5px;
  color: #334155;
  font-weight: 600;
}

.receipt-centre-address {
  font-size: 11.5px;
  color: #475569;
  margin-top: 2px;
}

.receipt-centre-contact {
  font-size: 11.5px;
  color: #0757d9;
  font-weight: 700;
  margin-top: 2px;
}

.receipt-doc-badge {
  text-align: center;
  margin: 8px 0;
}

.receipt-doc-badge span {
  display: inline-block;
  background: #f1f5f9;
  border: 1.5px solid #0f172a;
  padding: 3px 14px;
  font-weight: 900;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  border-radius: 4px;
  color: #0f172a;
}

.receipt-meta-grid {
  display: flex;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #cbd6e4;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12.5px;
  margin-bottom: 10px;
}

.receipt-meta-col {
  flex: 1;
}

.receipt-meta-row {
  margin-bottom: 3px;
}

.meta-label {
  color: #475569;
  font-weight: 600;
}

.meta-val {
  color: #0f172a;
  font-weight: 700;
}

.meta-val.highlight {
  color: #0757d9;
  font-family: monospace;
  font-size: 13.5px;
}

.receipt-items-table {
  width: 100% !important;
  min-width: 100% !important;
  border-collapse: collapse;
  border: 1.5px solid #0f172a;
  margin: 10px 0;
  font-size: 12.5px;
}

.receipt-items-table th {
  background: #e2e8f0;
  border: 1px solid #0f172a;
  padding: 6px 8px;
  font-weight: 800;
  color: #0f172a;
  font-size: 12px;
}

.receipt-items-table td {
  border: 1px solid #cbd6e4;
  padding: 6px 8px;
  color: #0f172a;
  vertical-align: middle;
}

.receipt-summary-container {
  display: flex;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #cbd6e4;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 10px;
  gap: 12px;
}

.receipt-summary-left {
  flex: 1.2;
  font-size: 11.5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.words-title {
  color: #475569;
  font-weight: 600;
}

.words-text {
  color: #0757d9;
  font-size: 12px;
}

.receipt-payment-mode {
  margin: 6px 0;
}

.receipt-terms {
  color: #64748b;
  font-size: 10.5px;
  line-height: 1.4;
  border-top: 1px dotted #cbd6e4;
  padding-top: 4px;
}

.receipt-summary-right {
  flex: 1;
  font-size: 12.5px;
  border-left: 1px dashed #cbd6e4;
  padding-left: 12px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  color: #334155;
}

.summary-line.grand-total {
  border-top: 1.5px solid #0f172a;
  border-bottom: 1.5px solid #0f172a;
  padding: 5px 0;
  font-weight: 900;
  font-size: 14.5px;
  color: #0757d9;
  margin: 4px 0;
}

.receipt-signatures-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid #cbd6e4;
}

.receipt-seal-box {
  flex: 0 0 70px;
}

.seal-circle {
  width: 64px;
  height: 64px;
  border: 1.5px dashed #0757d9;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #0757d9;
  background: #f0f7ff;
}

.receipt-signature-line {
  text-align: center;
  width: 140px;
}

.sign-space {
  height: 30px;
  border-bottom: 1px solid #0f172a;
  margin-bottom: 4px;
}

.sign-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #334155;
}

.receipt-footer-bottom {
  text-align: center;
  font-size: 10.5px;
  color: #64748b;
  margin-top: 8px;
  border-top: 1px dotted #cbd6e4;
  padding-top: 6px;
}

.receipt-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

/* Universal Clean Print Styles */
@media print {

  header,
  .nav-container,
  .no-print,
  button,
  .receipt-modal-actions {
    display: none !important;
  }

  body,
  html {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #appModalContainer {
    position: static !important;
    display: block !important;
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 0 !important;
  }

  #appModalContent {
    position: static !important;
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    background: transparent !important;
  }

  .official-receipt-card {
    border: 2px solid #000000 !important;
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    page-break-inside: avoid;
  }
}
