:root {
  --bg: #07151f;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-active: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f4f8fb;
  --muted: #a5b8c5;
  --muted-dark: #6e8494;
  --mint: #70f0d0;
  --mint-dim: rgba(112, 240, 208, 0.14);
  --mint-glow: rgba(112, 240, 208, 0.28);
  --cyan: #72d9ff;
  --cyan-dim: rgba(114, 217, 255, 0.14);
  --violet: #a69bff;
  --violet-dim: rgba(166, 155, 255, 0.14);
  --rose: #ff859d;
  --rose-dim: rgba(255, 133, 157, 0.14);
  --amber: #ffd166;
  --amber-dim: rgba(255, 209, 102, 0.14);
  --surface: #0a1b2a;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  background: radial-gradient(ellipse at 12% 8%, rgba(29, 154, 160, 0.22), transparent 34%),
              radial-gradient(ellipse at 92% 24%, rgba(88, 83, 196, 0.20), transparent 31%),
              linear-gradient(135deg, #07151f 0%, #0a1b2a 48%, #10172c 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
  z-index: -1;
}

.ambient {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  animation: float 16s ease-in-out infinite alternate;
}

.ambient.one {
  background: #14d9bd;
  top: 3%;
  left: -180px;
}

.ambient.two {
  background: #716cff;
  right: -180px;
  bottom: 4%;
  animation-delay: -6s;
}

@keyframes float {
  to {
    transform: translate(55px, 40px) scale(1.12);
  }
}

.shell {
  /* width: min(1360px, calc(100% - 44px)); */
  margin: auto;
  position: relative;
  padding: 60px;
}

/* Header */
header.app-header {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #06251f;
  font: 800 16px var(--font-display);
  background: linear-gradient(135deg, #9bffe9, #64d7d7 55%, #8bc9ff);
  box-shadow: 0 8px 24px rgba(44, 228, 196, 0.25);
  flex-shrink: 0;
}

.brand-name {
  font: 800 19px var(--font-display);
  letter-spacing: -0.5px;
}

.brand-name span {
  color: var(--mint);
}

.brand-sub {
  display: block;
  color: #91a7b5;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  color: #eefafa;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.045);
}

.header-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}

.header-link {
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  color: #eefafa;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.045);
  transition: 0.25s;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-link:hover {
  border-color: rgba(112, 240, 208, 0.6);
  background: rgba(112, 240, 208, 0.08);
  transform: translateY(-2px);
}

/* Hero */
.hero {
  text-align: center;
  padding: 44px 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(112, 240, 208, 0.25);
  background: rgba(112, 240, 208, 0.065);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  color: #aaf8e5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}

h1.hero-title {
  font: 800 clamp(30px, 4.4vw, 54px)/1.12 var(--font-display);
  letter-spacing: -2px;
  margin: 18px 0 12px;
}

.gradient {
  background: linear-gradient(100deg, #fff 5%, #a4f5e3 47%, #8dcaff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: #a8bbc8;
  font-size: 14px;
  line-height: 1.8;
  max-width: 680px;
  margin: 0 auto;
}

/* Glass Panels */
.glass-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(205, 248, 255, 0.16);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px;
  margin-bottom: 24px;
}

/* Dropzone */
.dropzone-container {
  border: 2px dashed rgba(112, 240, 208, 0.35);
  border-radius: var(--radius-lg);
  padding: 38px 24px;
  text-align: center;
  background: rgba(112, 240, 208, 0.025);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.dropzone-container:hover,
.dropzone-container.dragover {
  border-color: var(--mint);
  background: rgba(112, 240, 208, 0.08);
  box-shadow: 0 0 32px rgba(112, 240, 208, 0.18), inset 0 0 20px rgba(112, 240, 208, 0.05);
  transform: scale(1.006);
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(112, 240, 208, 0.18), rgba(114, 217, 255, 0.12));
  border: 1px solid rgba(112, 240, 208, 0.3);
  color: var(--mint);
  font-size: 26px;
  transition: transform 0.3s;
}

.dropzone-container:hover .dropzone-icon {
  transform: translateY(-4px) scale(1.08);
}

.dropzone-title {
  font: 700 20px var(--font-display);
  letter-spacing: -0.4px;
  margin: 0 0 8px;
  color: #fff;
}

.dropzone-sub {
  color: var(--muted);
  font-size: 13px;
  max-width: 580px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.dropzone-tags {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.dropzone-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: #cfdce4;
  text-transform: uppercase;
}

.dropzone-tag.g1 { color: #8bd2ff; border-color: rgba(139, 210, 255, 0.35); background: rgba(139, 210, 255, 0.08); }
.dropzone-tag.g2a { color: #f59bff; border-color: rgba(245, 155, 255, 0.35); background: rgba(245, 155, 255, 0.08); }
.dropzone-tag.g2b { color: #9bffb0; border-color: rgba(155, 255, 176, 0.35); background: rgba(155, 255, 176, 0.08); }
.dropzone-tag.g3b { color: #ffe68b; border-color: rgba(255, 230, 139, 0.35); background: rgba(255, 230, 139, 0.08); }
.dropzone-tag.g9 { color: #ff9b9b; border-color: rgba(255, 155, 155, 0.35); background: rgba(255, 155, 155, 0.08); }
.dropzone-tag.einv { color: #70f0d0; border-color: rgba(112, 240, 208, 0.35); background: rgba(112, 240, 208, 0.08); }

.gstr1 { color: #009cff; border-color: rgba(139, 210, 255, 0.35); background: rgb(79 79 210 / 14%); }
.gstr2a { color: #f59bff; border-color: rgba(245, 155, 255, 0.35); background: rgba(245, 155, 255, 0.08); }
.gstr2b { color: #9bffb0; border-color: rgba(155, 255, 176, 0.35); background: rgba(155, 255, 176, 0.08); }
.gstr3b { color: #ffe68b; border-color: rgba(255, 230, 139, 0.35); background: rgba(255, 230, 139, 0.08); }
.gstr9 { color: #ff9b9b; border-color: rgba(255, 155, 155, 0.35); background: rgba(255, 155, 155, 0.08); }
.einv { color: #70f0d0; border-color: rgba(112, 240, 208, 0.35); background: rgba(112, 240, 208, 0.08); }

.file-input-hidden {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

/* File Queue / Status Bar */
.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.queue-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.queue-counter strong {
  color: var(--mint);
  font-weight: 700;
}

.queue-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.queue-chip {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 6px 12px;
    /* background: rgba(255, 255, 255, 0.05); */
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font-size: 12px;
    color: var(--text);
    animation: fadeIn 0.25s ease;
    width: 232px;
    height: 27px;
    flex-direction: row;
    justify-content: space-between;
}

.queue-chip-type {
  font-weight: 800;
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.queue-chip-remove {
  cursor: pointer;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 10px;
  transition: 0.2s;
}

.queue-chip-remove:hover {
  background: var(--rose);
  color: #07151f;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  font-family: var(--font-body);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

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

.btn-primary {
  color: #06231f;
  background: linear-gradient(110deg, #9bffe9, #70f0d0 55%, #86ddff);
  box-shadow: 0 10px 28px rgba(67, 223, 195, 0.25);
  border: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(67, 223, 195, 0.35);
}

.btn-ghost {
  color: #eaf7fb;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.btn-ghost:hover:not(:disabled) {
  border-color: rgba(112, 240, 208, 0.6);
  background: rgba(112, 240, 208, 0.08);
  transform: translateY(-2px);
}

.btn-danger {
  color: #ffcad4;
  border: 1px solid rgba(255, 133, 157, 0.3);
  background: rgba(255, 133, 157, 0.08);
}

.btn-danger:hover:not(:disabled) {
  border-color: var(--rose);
  background: rgba(255, 133, 157, 0.18);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 11px;
}

/* Segment Navigation Tabs (GSTR-1, GSTR-2A, etc.) */
.segment-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.segment-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  color: var(--muted);
  font: 700 13px var(--font-display);
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}

.segment-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(112, 240, 208, 0.4);
}

.segment-btn.active {
  background: linear-gradient(135deg, rgba(112, 240, 208, 0.16), rgba(114, 217, 255, 0.12));
  color: var(--mint);
  border-color: var(--mint);
  box-shadow: 0 4px 18px rgba(112, 240, 208, 0.15);
}

.segment-btn .badge-count {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.segment-btn.active .badge-count {
  background: var(--mint);
  color: #07151f;
}

/* Sub-tabs (Summary, B2B, B2CS, CDNR, etc.) */
.sub-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sub-tab-btn {
  padding: 7px 15px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ab0bf;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.sub-tab-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.sub-tab-btn.active {
  background: rgba(112, 240, 208, 0.12);
  border-color: rgba(112, 240, 208, 0.5);
  color: var(--mint);
  font-weight: 700;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  transition: transform 0.25s, border-color 0.25s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(112, 240, 208, 0.4);
}

.kpi-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #8da1af;
  margin-bottom: 6px;
}

.kpi-value {
  font: 800 20px/1.1 var(--font-display);
  letter-spacing: -0.5px;
  color: #fff;
}

.kpi-value.accent-mint { color: var(--mint); }
.kpi-value.accent-cyan { color: var(--cyan); }
.kpi-value.accent-violet { color: var(--violet); }
.kpi-value.accent-rose { color: var(--rose); }

/* Table Controls Bar (Search, Limit, Export) */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  min-width: 260px;
}

.search-input {
  width: 100%;
  padding: 9px 14px 9px 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--mint);
  background: rgba(255, 255, 255, 0.08);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-dark);
  font-size: 13px;
  pointer-events: none;
}

.select-wrap select {
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: #0a1b2a;
  color: #dce6ec;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

/* Modern Data Table */
.table-panel {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(4, 14, 24, 0.4);
}

.table-scroll {
  overflow-x: auto;
  max-height: 620px;
  scrollbar-width: thin;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
  min-width: 820px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #091c2b;
  color: #c9fff3;
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 2px solid rgba(112, 240, 208, 0.3);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.035);
  color: #d8e5ec;
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.data-table tbody tr:hover {
  background: rgba(112, 240, 208, 0.06);
}

.data-table tfoot th,
.data-table tfoot td {
  position: sticky;
  bottom: 0;
  background: #0d2233;
  color: #fff;
  font-weight: 800;
  border-top: 2px solid var(--line);
  padding: 12px 14px;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.val-taxable {
  font-weight: 700;
  color: #f4f8fb;
}

.val-tax {
  color: var(--cyan);
}

.val-total {
  font-weight: 800;
  color: var(--mint);
}

/* Pagination */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: #dce6ec;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: rgba(112, 240, 208, 0.15);
  color: var(--mint);
  border-color: var(--mint);
}

.page-btn.active {
  background: var(--mint);
  color: #07151f;
  border-color: var(--mint);
}

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

/* Empty State */
.empty-state {
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
}

.empty-icon {
  font-size: 42px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.empty-state h3 {
  font: 700 18px var(--font-display);
  color: #fff;
  margin: 0 0 8px;
}

.empty-state p {
  font-size: 13px;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Notification Toast */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #0a1b2a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-msg.success {
  border-color: rgba(112, 240, 208, 0.5);
  color: #aaf8e5;
}

.toast-msg.error {
  border-color: rgba(255, 133, 157, 0.5);
  color: #ffb7c5;
}

/* Footer */
footer.app-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 24px 0;
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: #718b9a;
  font-size: 12px;
}

footer a {
  color: #a8c5d0;
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--mint);
}

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

/* Responsive adjustments */
@media (max-width: 900px) {
  .hero-title { font-size: 32px; }
  .table-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-left, .toolbar-right { justify-content: space-between; }
  .search-input-wrap { min-width: 100%; }
}

@media (max-width: 600px) {
  .shell { width: calc(100% - 24px); }
  header.app-header { height: 70px; }
  .brand-name { font-size: 17px; }
  .hero { padding: 32px 0 20px; }
  .dropzone-container { padding: 26px 14px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  footer.app-footer { flex-direction: column; text-align: center; }
}

