:root {
  --navy: #10243f;
  --navy2: #18375f;
  --navy3: #071525;
  --gold: #c4912f;
  --gold2: #dfb95f;
  --goldpale: #fff6df;
  --teal: #0f8b8d;
  --teal2: #0b6f75;
  --teallight: #d7f4f1;
  --mint: #11b98f;
  --red: #d43d3d;
  --orange: #d18123;
  --green: #0c9b6f;
  --blue: #2563eb;
  --violet: #6d5bd0;
  --light: #f3f7f8;
  --white: #fff;
  --dark: #172033;
  --g8: #273243;
  --g6: #596579;
  --g4: #98a2b3;
  --g2: #dce4ea;
  --g1: #f6f8fb;
  --border: #dbe5ea;
  --surface: rgba(255, 255, 255, .92);
  --surface-solid: #ffffff;
  --focus: rgba(15, 139, 141, .18);
  --sh1: 0 1px 2px rgba(16, 36, 63, .06), 0 1px 1px rgba(16, 36, 63, .04);
  --sh2: 0 12px 28px rgba(16, 36, 63, .10);
  --sh3: 0 22px 55px rgba(16, 36, 63, .18);
  --ring: 0 0 0 4px var(--focus);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  letter-spacing: 0 !important;
}

html {
  scroll-behavior: smooth;
  min-width: 320px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Plus Jakarta Sans', 'Noto Sans Bengali', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(15, 139, 141, .07) 0, transparent 220px),
    linear-gradient(135deg, #f6faf9 0%, #edf4f6 45%, #f8fafc 100%);
  color: var(--dark);
  line-height: 1.5;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

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

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[data-action]:focus-visible,
[data-nav]:focus-visible,
[data-select-role]:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', 'Noto Sans Bengali', system-ui, sans-serif;
  letter-spacing: 0;
}

strong {
  font-weight: 800;
}

#app {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Sidebar */
.sidebar {
  width: 272px;
  background:
    linear-gradient(180deg, rgba(17, 185, 143, .11), transparent 320px),
    linear-gradient(180deg, var(--navy) 0%, var(--navy3) 100%);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 50;
  border-right: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 18px 0 42px rgba(7, 21, 37, .18);
  transition: transform .28s ease;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: .32;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar-brand {
  padding: 22px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  margin: 2px 10px;
  padding: 9px 12px;
  color: rgba(255, 255, 255, .68);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .95);
  border-color: rgba(255, 255, 255, .08);
  transform: translateX(2px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(196, 145, 47, .18), rgba(15, 139, 141, .12));
  color: #fff;
  border-color: rgba(223, 185, 95, .35);
  box-shadow: inset 3px 0 0 var(--gold), 0 10px 26px rgba(0, 0, 0, .18);
}

.sidebar-link .ico {
  font-size: 15px;
  opacity: .95;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sbadge {
  margin-left: auto;
  background: linear-gradient(135deg, var(--red), #ef6a45);
  color: white;
  font-size: 10px;
  font-weight: 900;
  min-width: 20px;
  height: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(212, 61, 61, .25);
}

/* Main shell */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.main {
  flex: 1;
  margin-left: 272px;
  width: calc(100% - 272px);
  max-width: calc(100% - 272px);
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: margin-left .28s ease;
}

.topbar {
  background: rgba(255, 255, 255, .86);
  min-height: 68px;
  padding: 0 30px;
  border-bottom: 1px solid rgba(219, 229, 234, .85);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(16, 36, 63, .06);
}

.topbar-heading,
.topbar-title-wrap,
.topbar-title,
.topbar-sub {
  min-width: 0;
}

.topbar-heading {
  flex: 1 1 auto;
}

.topbar-title-wrap {
  display: flex;
  flex-direction: column;
}

.topbar-title,
.topbar-sub,
.topbar-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  flex: 0 0 auto;
  min-width: 0;
}

.topbar-notification-btn {
  min-width: 42px;
  min-height: 42px;
  border-radius: 8px !important;
}

.page-body {
  flex: 1;
  width: 100%;
  max-width: 1500px;
  min-width: 0;
  padding: 30px;
  overflow-x: hidden;
}

/* Cards */
.card,
.stat-card {
  max-width: 100%;
  min-width: 0;
  background: var(--surface);
  border-radius: 8px !important;
  border: 1px solid rgba(219, 229, 234, .9);
  box-shadow: var(--sh1);
  backdrop-filter: blur(16px);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover,
.stat-card:hover {
  border-color: rgba(15, 139, 141, .22);
  box-shadow: var(--sh2);
}

.card-body {
  max-width: 100%;
  min-width: 0;
  padding: 24px 26px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
}

.stat-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--blue));
  opacity: .78;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 10px 18px;
  border-radius: 8px !important;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
  line-height: 1;
  user-select: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  color: white;
  box-shadow: 0 10px 22px rgba(16, 36, 63, .22);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #183860, #234a76);
  box-shadow: 0 14px 28px rgba(16, 36, 63, .28);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #172033;
  box-shadow: 0 12px 25px rgba(196, 145, 47, .28);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #d0a043, #eccd75);
  box-shadow: 0 16px 32px rgba(196, 145, 47, .34);
}

.btn-teal {
  background: linear-gradient(135deg, var(--teal), var(--teal2));
  color: white;
  box-shadow: 0 12px 25px rgba(15, 139, 141, .24);
}

.btn-teal:hover {
  background: linear-gradient(135deg, #129b9e, #0b7f86);
  box-shadow: 0 16px 32px rgba(15, 139, 141, .30);
}

.btn-success {
  background: linear-gradient(135deg, var(--green), #14b985);
  color: white;
  box-shadow: 0 10px 20px rgba(12, 155, 111, .20);
}

.btn-success:hover {
  background: linear-gradient(135deg, #087f5b, #11a577);
}

.btn-danger {
  background: linear-gradient(135deg, var(--red), #b4233c);
  color: white;
  box-shadow: 0 10px 20px rgba(212, 61, 61, .20);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #bd3030, #9f1f35);
}

.btn-outline {
  background: rgba(255, 255, 255, .62);
  color: var(--navy);
  border-color: rgba(151, 163, 179, .36);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset;
}

.btn-outline:hover {
  background: white;
  border-color: rgba(15, 139, 141, .38);
  color: var(--teal2);
}

.btn-ghost {
  background: transparent;
  color: var(--g6);
  border-color: transparent;
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(15, 139, 141, .08);
  color: var(--navy);
}

.btn-lg {
  min-height: 46px;
  padding: 13px 26px;
  font-size: 14px;
}

.btn-sm {
  min-height: 32px;
  padding: 8px 13px;
  font-size: 12px;
}

.btn-xs {
  min-height: 28px;
  padding: 6px 10px;
  font-size: 11px;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Forms */
.form-group {
  margin-bottom: 17px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 850;
  color: var(--g8);
  margin-bottom: 7px;
}

.form-label.req::after {
  content: ' *';
  color: var(--red);
}

.form-control {
  width: 100%;
  min-height: 42px;
  padding: 11px 13px;
  border: 1px solid rgba(151, 163, 179, .42);
  border-radius: 8px !important;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  background: rgba(255, 255, 255, .86);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  outline: none;
}

.form-control:hover {
  border-color: rgba(15, 139, 141, .40);
  background: white;
}

.form-control:focus {
  border-color: var(--teal);
  background: white;
  box-shadow: var(--ring);
}

.form-control:disabled {
  background: #edf2f5;
  color: var(--g4);
  cursor: not-allowed;
}

.form-control::placeholder {
  color: #9aa7b7;
  font-weight: 500;
}

textarea.form-control {
  min-height: 118px;
  resize: vertical;
  line-height: 1.65;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24' stroke='%23596579'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
  cursor: pointer;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--teal);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-active {
  background: #e9fbf4;
  color: #057a58;
  border-color: #bcefdc;
}

.badge-pending {
  background: #fff8e6;
  color: #a86409;
  border-color: #f5d58a;
}

.badge-escalated {
  background: #fff0f0;
  color: #bd3030;
  border-color: #fac6c6;
}

.badge-resolved {
  background: #eef5ff;
  color: #225fc8;
  border-color: #cbdffc;
}

.badge-closed {
  background: var(--g1);
  color: var(--g6);
  border-color: var(--g2);
}

.badge-showcause,
.badge-appellate {
  background: #f5f1ff;
  color: var(--violet);
  border-color: #ddd6fe;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 850;
  border: 1px solid transparent;
  white-space: nowrap;
}

.priority-H {
  background: #fff0f0;
  color: #9c2222;
  border-color: #fac6c6;
}

.priority-M {
  background: #fff8e6;
  color: #8a5106;
  border-color: #f5d58a;
}

.priority-L {
  background: #e9fbf4;
  color: #056449;
  border-color: #bcefdc;
}

/* Tables */
.tbl-container {
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 8px;
  scrollbar-gutter: stable;
  contain: inline-size;
}

.tbl {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.tbl th {
  background: linear-gradient(180deg, #fbfcfd, #f3f7f8);
  padding: 12px 15px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 900;
  color: var(--g6);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.tbl td {
  padding: 14px 15px;
  border-bottom: 1px solid rgba(219, 229, 234, .82);
  color: var(--dark);
  vertical-align: middle;
}

.tbl tr:last-child td {
  border-bottom: none;
}

.tbl tbody tr {
  transition: background .16s ease, box-shadow .16s ease;
}

.tbl tbody tr:hover td {
  background: rgba(15, 139, 141, .045);
  cursor: pointer;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.tab-btn {
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 850;
  color: var(--g6);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.tab-btn:hover:not(.active) {
  color: var(--dark);
  background: rgba(15, 139, 141, .05);
}

/* Steps */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 32px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  min-width: 0;
}

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 17px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
}

.step-item.done:not(:last-child)::after,
.step-item.active:not(:last-child)::after {
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--g2);
  color: var(--g6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  position: relative;
  z-index: 1;
  border: 3px solid var(--light);
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}

.step-item.active .step-circle {
  background: var(--teal);
  color: white;
  box-shadow: 0 0 0 5px rgba(15, 139, 141, .14);
}

.step-item.done .step-circle {
  background: var(--mint);
  color: white;
}

.step-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--g4);
  margin-top: 8px;
  text-align: center;
  line-height: 1.35;
  padding: 0 6px;
}

.step-item.active .step-label {
  color: var(--teal2);
}

.step-item.done .step-label {
  color: var(--g6);
}

/* OTP */
.otp-grid {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.otp-box {
  width: 56px;
  height: 64px;
  text-align: center;
  font-size: 25px;
  font-weight: 900;
  border: 1px solid var(--border);
  border-radius: 8px !important;
  outline: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--navy);
  background: linear-gradient(180deg, white, #f8fafc);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.otp-box:focus {
  border-color: var(--teal);
  box-shadow: var(--ring);
  transform: translateY(-1px);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--teal), var(--border));
}

.tl-item {
  position: relative;
  padding-bottom: 22px;
}

.tl-dot {
  position: absolute;
  left: -32px;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  z-index: 1;
  border: 2px solid white;
  box-shadow: 0 6px 15px rgba(16, 36, 63, .14);
}

/* Modals */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(7, 21, 37, .62);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(10px);
  overflow-y: auto;
}

.modal-box {
  background: var(--surface-solid);
  border-radius: 10px !important;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--sh3);
  border: 1px solid rgba(255, 255, 255, .4);
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .95);
  z-index: 1;
  border-radius: 10px 10px 0 0 !important;
  backdrop-filter: blur(14px);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 15px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: #f8fafc;
}

/* Isolated PDF export surface. Keeps html2pdf from measuring/mutating the live UI. */
.pdf-export-host {
  position: fixed;
  top: 0;
  left: 0;
  width: 760px;
  background: #fff;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

.pdf-report-export {
  width: 760px !important;
  min-width: 760px !important;
  max-width: 760px !important;
  overflow: visible !important;
  background: #fff !important;
  color: var(--dark) !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
  animation: none !important;
}

body.pdf-exporting .modal-bg {
  z-index: 200;
}

.pdf-report-export,
.pdf-report-export * {
  box-sizing: border-box;
  animation: none !important;
  transition: none !important;
}

.pdf-report-export .grid4 {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.pdf-report-export .grid2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.pdf-report-export .report-chart-card {
  min-height: 270px !important;
  overflow: visible !important;
}

.pdf-report-export .report-donut-wrap {
  width: 168px !important;
  height: 168px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}

.pdf-report-export .report-donut {
  width: 168px !important;
  height: 168px !important;
  display: block !important;
  overflow: visible !important;
}

.pdf-report-export .tbl {
  width: 100% !important;
  min-width: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  table-layout: auto !important;
}

.pdf-report-export .tbl th,
.pdf-report-export .tbl td {
  white-space: normal !important;
  word-break: normal;
  overflow-wrap: anywhere;
}

.pdf-report-export .tbl tbody tr:hover td {
  background: transparent;
}

/* Upload */
.upload-zone {
  border: 1.5px dashed rgba(15, 139, 141, .38);
  border-radius: 8px !important;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(246, 250, 249, .92));
}

.upload-zone:hover {
  border-color: var(--teal);
  background: rgba(15, 139, 141, .055);
  transform: translateY(-1px);
  box-shadow: var(--sh2);
}

/* SLA */
.sla-track {
  height: 7px;
  background: #e6edf1;
  border-radius: 999px;
  overflow: hidden;
}

.sla-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .5s ease;
}

.sla-ok {
  background: linear-gradient(90deg, var(--green), var(--mint));
}

.sla-warn {
  background: linear-gradient(90deg, var(--orange), var(--gold2));
}

.sla-breach {
  background: linear-gradient(90deg, var(--red), #f97316);
}

/* Alerts */
.alert {
  border-radius: 8px !important;
  padding: 14px 16px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid transparent;
}

.alert-info {
  background: #eef7ff;
  border-color: #c9e2ff;
  color: #1f4f8d;
}

.alert-success {
  background: #e9fbf4;
  border-color: #bcefdc;
  color: #075e45;
}

.alert-warning {
  background: #fff8e6;
  border-color: #f5d58a;
  color: #7f4b05;
}

.alert-error {
  background: #fff0f0;
  border-color: #fac6c6;
  color: #952222;
}

.alert-gold {
  background: var(--goldpale);
  border-color: #e9c978;
  color: #735114;
}

/* Toast */
#toast-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(23, 32, 51, .96);
  color: white;
  padding: 13px 18px;
  border-radius: 8px !important;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--sh3);
  display: flex;
  align-items: center;
  gap: 9px;
  pointer-events: all;
  animation: toastIn .28s ease-out;
  max-width: 360px;
  border: 1px solid rgba(255, 255, 255, .10);
}

.toast-success {
  background: #087f5b;
}

.toast-error {
  background: #952222;
}

.toast-info {
  background: var(--teal2);
}

.toast-gold {
  background: #a96f12;
}

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

/* Processing effects */
@keyframes scanPulse {
  0% { top: 0%; opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.scan-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.scan-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, rgba(15, 139, 141, .78) 50%, transparent 100%);
  animation: scanPulse 1.8s ease-in-out infinite;
  top: 0;
}

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

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(196, 145, 47, .22);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}

/* Hero */
.hero-mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(115deg, rgba(196, 145, 47, .16) 0%, transparent 28%, rgba(15, 139, 141, .14) 64%, transparent 100%),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
  pointer-events: none;
}

.hero-mesh::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, rgba(7, 21, 37, .38));
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes waveAnim {
  0%, 100% { transform: scaleY(.35); }
  50% { transform: scaleY(1); }
}

.anim-fu {
  animation: fadeUp .48s ease-out both;
}

.anim-fi {
  animation: fadeIn .36s ease-out both;
}

.d1 { animation-delay: .08s; }
.d2 { animation-delay: .16s; }
.d3 { animation-delay: .24s; }
.d4 { animation-delay: .32s; }
.d5 { animation-delay: .40s; }

/* Misc */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #b7c5cf;
  border-radius: 999px;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 18px 0;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}

.grid2 > *,
.grid3 > *,
.grid4 > *,
.page-body [style*="display:grid"] > *,
.page-body [style*="display: grid"] > *,
.page-body [style*="display:flex"] > *,
.page-body [style*="display: flex"] > *,
.card [style*="display:grid"] > *,
.card [style*="display: grid"] > *,
.card [style*="display:flex"] > *,
.card [style*="display: flex"] > * {
  min-width: 0;
}

.page-title {
  font-size: 1.58rem;
  color: var(--navy);
  margin-bottom: 5px;
  font-weight: 900;
}

.page-sub {
  font-size: 13px;
  color: var(--g6);
  font-weight: 600;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 10px 20px rgba(16, 36, 63, .14);
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conf-bar {
  height: 5px;
  background: var(--g2);
  border-radius: 999px;
  margin-top: 4px;
}

.conf-fill {
  height: 100%;
  border-radius: 999px;
}

.ocr-field {
  background: rgba(196, 145, 47, .09);
  border: 1px solid rgba(196, 145, 47, .30);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  display: block;
  width: 100%;
  min-height: 40px;
}

@keyframes waveBar {
  0%, 100% { transform: scaleY(.35); }
  50% { transform: scaleY(1); }
}

.wave-bar {
  width: 4px;
  border-radius: 3px;
  background: var(--gold2);
  animation: waveBar .62s ease-in-out infinite;
}

.menu-btn {
  display: none;
  font-size: 20px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(151, 163, 179, .30);
  cursor: pointer;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--navy);
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

/* New presentational view hooks */
.public-nav {
  padding: 0 32px !important;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 36, 63, .88) !important;
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(7, 21, 37, .22);
}

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

.landing-page {
  background:
    linear-gradient(150deg, var(--navy3) 0%, var(--navy) 48%, #0a313c 100%) !important;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.landing-hero {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 58px 32px 62px;
  position: relative;
  z-index: 1;
}

.landing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(330px, .78fr) !important;
  gap: 56px;
  align-items: center;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(196, 145, 47, .15);
  border: 1px solid rgba(223, 185, 95, .32);
  border-radius: 999px !important;
  padding: 7px 14px;
  margin-bottom: 22px;
}

.landing-title {
  font-size: 3.05rem !important;
  color: white;
  line-height: 1.08;
  margin-bottom: 18px;
  font-weight: 900;
  max-width: 720px;
}

.landing-subtitle {
  font-size: 15px !important;
  color: rgba(255, 255, 255, .70) !important;
  line-height: 1.8;
  max-width: 600px;
  margin-bottom: 32px;
  font-weight: 500;
}

.landing-actions,
.landing-stats {
  display: flex;
  flex-wrap: wrap;
}

.landing-actions {
  gap: 12px;
  margin-bottom: 40px;
}

.landing-stats {
  gap: 26px;
}

.landing-card {
  padding: 30px !important;
  border-color: rgba(255, 255, 255, .68) !important;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .35) !important;
}

.feature-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px;
  background: rgba(15, 139, 141, .06) !important;
  border: 1px solid rgba(15, 139, 141, .12);
  border-radius: 8px !important;
}

.auth-page {
  min-height: 100vh;
  background: var(--light);
  display: flex;
  flex-direction: column;
}

.auth-shell {
  flex: 1;
  display: flex;
  align-items: stretch;
}

.auth-panel {
  width: 430px !important;
  background:
    linear-gradient(145deg, rgba(196, 145, 47, .14), transparent 40%),
    linear-gradient(180deg, var(--navy), var(--navy3)) !important;
  padding: 46px !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh3);
}

.auth-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px;
}

.auth-form-card {
  width: 100%;
  max-width: 390px;
  background: rgba(255, 255, 255, .84);
  border: 1px solid rgba(219, 229, 234, .85);
  border-radius: 8px;
  box-shadow: var(--sh2);
  padding: 30px;
}

/* Rating */
.rating-btn-container {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.rating-btn {
  flex: 1;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .86);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.rating-btn:hover {
  background: white;
  border-color: rgba(15, 139, 141, .35);
  transform: translateY(-1px);
  box-shadow: var(--sh2);
}

.rating-btn.selected[data-rating="Good"] {
  background: #e9fbf4;
  border-color: var(--green);
  color: var(--green);
}

.rating-btn.selected[data-rating="Average"] {
  background: #fff8e6;
  border-color: var(--orange);
  color: var(--orange);
}

.rating-btn.selected[data-rating="Bad"] {
  background: #fff0f0;
  border-color: var(--red);
  color: var(--red);
}

.track-result,
.track-result-grid,
.track-detail-grid,
.track-ticket-header,
.track-search-row,
.track-action-row {
  min-width: 0;
  max-width: 100%;
}

.track-result-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr) !important;
}

.track-detail-grid > div,
.track-result .card,
.track-result .alert,
.track-result .timeline,
.track-result .tl-item {
  min-width: 0;
}

.track-result strong,
.track-result .tl-item div,
.track-result .alert div {
  overflow-wrap: anywhere;
}

.track-search-row .form-control {
  min-width: 0;
}

.notification-modal {
  max-width: min(760px, calc(100vw - 24px));
}

.notification-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 94px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.notification-card[data-action] {
  cursor: pointer;
}

.notification-card[data-action]:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 139, 141, .32);
  box-shadow: var(--sh2);
}

.notification-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-top: 6px;
  flex: 0 0 auto;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(15, 139, 141, .12);
}

.notification-title {
  font-size: 13px;
  font-weight: 850;
  color: var(--navy);
}

.notification-body {
  font-size: 12px;
  color: var(--g6);
  margin-top: 2px;
}

.notification-target {
  display: inline-flex;
  margin-top: 9px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--g1);
  color: var(--g6);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.notification-red .notification-dot {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(212, 61, 61, .12);
}

.notification-blue .notification-dot {
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, .12);
}

.notification-gold .notification-dot {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(196, 145, 47, .15);
}

.notification-purple .notification-dot {
  background: var(--violet);
  box-shadow: 0 0 0 5px rgba(109, 91, 208, .14);
}

.report-chart-card,
.report-donut-wrap,
.report-donut {
  max-width: 100%;
}

.report-donut-wrap {
  overflow: visible;
}

.report-donut {
  display: block;
  flex: 0 0 auto;
  overflow: visible;
}

.queue-card,
.queue-card *,
.queue-meta,
.queue-badge-row,
.queue-action-panel,
.queue-actions {
  min-width: 0;
}

.queue-badge-row {
  flex-wrap: wrap;
}

.queue-card .badge,
.queue-card .tag {
  max-width: 100%;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.queue-card .btn {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.queue-meta {
  overflow-wrap: anywhere;
}

.topbar-profile-trigger {
  cursor: pointer;
}

.profile-modal {
  max-width: 520px;
}

.profile-details {
  display: grid;
  gap: 9px;
}

.profile-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--g1);
  font-size: 12.5px;
}

.profile-detail-row span {
  color: var(--g6);
  font-weight: 750;
}

.profile-detail-row strong {
  color: var(--navy);
  text-align: right;
  overflow-wrap: anywhere;
}

.wb-file-head,
.wb-evidence-row,
.wb-audit-grid,
.wb-actions {
  min-width: 0;
}

/* Responsiveness */
@media (max-width: 1180px) {
  .grid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-grid {
    grid-template-columns: 1fr !important;
    gap: 34px;
  }

  .landing-card {
    max-width: 620px;
  }
}

@media (max-width: 900px) {
  .page-body [style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .page-body [style*="height:calc(100vh"] {
    height: auto !important;
    min-height: 0 !important;
  }

  .auth-shell {
    flex-direction: column;
  }

  .auth-panel {
    width: 100% !important;
    min-height: auto;
    gap: 26px;
  }

  .auth-panel [style*="max-height:260px"] {
    max-height: 190px !important;
  }
}

@media (max-width: 768px) {
  .menu-btn {
    display: inline-flex;
  }

  .sidebar {
    width: min(292px, 86vw);
    transform: translateX(-100%);
    box-shadow: 0 0 38px rgba(0, 0, 0, .32);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    padding-top: 64px;
  }

  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0 16px;
    min-height: 64px;
    gap: 8px;
    overflow: hidden;
  }

  .topbar-heading {
    flex: 1 1 auto;
    max-width: calc(100% - 132px);
  }

  .topbar-title {
    max-width: 100%;
    font-size: 12px !important;
  }

  .topbar-sub,
  .topbar-user-name,
  .topbar-divider {
    display: none !important;
  }

  .topbar-actions {
    gap: 8px !important;
  }

  .topbar-actions .avatar {
    width: 32px !important;
    height: 32px !important;
  }

  .topbar-notification-btn {
    min-width: 40px;
    min-height: 40px;
  }

  .page-body {
    padding: 18px;
    max-width: 100%;
  }

  .grid2,
  .grid3,
  .grid4 {
    grid-template-columns: 1fr;
  }

  .card-body {
    padding: 20px;
  }

  .tbl-container {
    margin-inline: -1px;
    border-radius: 8px;
  }

  .tbl {
    font-size: 12px;
  }

  .tbl th,
  .tbl td {
    padding: 11px 12px;
  }

  .tbl th {
    font-size: 10px;
  }

  .tbl-container::after {
    content: "Swipe table horizontally";
    position: sticky;
    left: 0;
    bottom: 0;
    display: inline-flex;
    margin: 8px 0 0 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(16, 36, 63, .82);
    color: white;
    font-size: 10px;
    font-weight: 800;
    pointer-events: none;
  }

  .public-nav {
    position: sticky;
    top: 0;
    z-index: 70;
    padding: 0 16px !important;
    gap: 12px;
  }

  .public-nav-actions {
    gap: 6px;
    overflow-x: auto;
    justify-content: flex-end;
  }

  .landing-hero {
    padding: 42px 18px 46px;
  }

  .landing-title {
    font-size: 2.18rem !important;
  }

  .landing-subtitle {
    font-size: 14px !important;
  }

  .landing-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .landing-stats > div[style*="width:1px"] {
    display: none !important;
  }

  .landing-stats > div {
    min-width: 0;
  }

  .landing-stats div {
    overflow-wrap: anywhere;
  }

  .landing-page [style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .steps {
    gap: 6px;
  }

  .step-label {
    display: none;
  }

  .otp-grid {
    gap: 6px;
  }

  .otp-box {
    width: 44px;
    height: 54px;
    font-size: 21px;
  }

  .track-result-grid,
  .track-detail-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .track-search-row {
    flex-direction: column;
    max-width: none !important;
  }

  .track-search-row .btn {
    width: 100%;
  }

  .track-ticket-header {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 10px;
  }

  .track-action-row {
    flex-direction: column;
  }

  .track-action-row .btn {
    width: 100%;
  }

  .queue-card > .card-body {
    padding: 18px;
  }

  .queue-action-panel {
    flex: 1 1 100% !important;
    width: 100%;
    min-width: 0 !important;
  }

  .queue-decision-box {
    text-align: left !important;
  }

  .queue-actions {
    justify-content: stretch !important;
  }

  .queue-actions .btn,
  .queue-card .btn-xs {
    width: 100%;
    height: auto !important;
    min-height: 34px;
    padding: 8px 10px;
    line-height: 1.25;
  }

  .notification-list {
    grid-template-columns: 1fr;
  }

  .notification-item {
    min-height: 0;
  }

  .wb-queue-header {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 10px;
  }

  .wb-file-head > div,
  .wb-file-head .tag {
    width: 100%;
    text-align: left !important;
  }

  .wb-evidence-row {
    flex-direction: column;
    gap: 7px !important;
  }

  .wb-audit-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  .wb-actions {
    justify-content: stretch !important;
    flex-direction: column;
  }

  .profile-detail-row {
    flex-direction: column;
    gap: 3px;
  }

  .profile-detail-row strong {
    text-align: left;
  }

  #toast-root {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .btn {
    white-space: normal;
    line-height: 1.25;
  }

  .topbar {
    padding: 0 12px;
  }

  .topbar-heading {
    max-width: calc(100% - 116px);
  }

  .landing-actions .btn,
  .auth-form-card .btn,
  .modal-footer .btn {
    width: 100%;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .public-nav {
    min-height: 66px;
    height: auto !important;
    flex-wrap: wrap;
    align-items: flex-start;
    padding-block: 10px !important;
  }

  .public-nav > [data-action="go-landing"] {
    width: 100%;
  }

  .public-nav > [data-action="go-landing"] [style*="white-space:nowrap"] {
    white-space: normal !important;
  }

  .public-nav-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .public-nav-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 8px 6px !important;
    font-size: 11px !important;
  }

  .rating-btn-container {
    flex-direction: column;
  }
}

@media print {
  body.printing-complaint-form #app,
  body.printing-complaint-form #toast-root {
    display: none !important;
  }

  body.printing-complaint-form .modal-bg {
    position: static;
    display: block;
    background: white;
    padding: 0;
  }

  body.printing-complaint-form .modal-header,
  body.printing-complaint-form .modal-footer {
    display: none !important;
  }

  body.printing-complaint-form .modal-box {
    box-shadow: none;
    border: none;
    max-height: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
