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

:root {
  --brand: #0f2d4a;
  --brand2: #1a4568;
  --brand3: #24608a;
  --gold: #b8860b;
  --gold2: #d4a017;
  --gold-light: #fdf6e3;
  --green: #14532d;
  --green2: #166534;
  --green-bg: #dcfce7;
  --red: #7f1d1d;
  --red2: #991b1b;
  --red-bg: #fee2e2;
  --blue-bg: #dbeafe;
  --blue: #1e40af;
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface2: #f7fafc;
  --border: rgba(15, 45, 74, 0.10);
  --border2: rgba(15, 45, 74, 0.18);
  --text: #0f2d4a;
  --muted: #5a7a96;
  --light: #8faec4;
  --shadow: 0 2px 16px rgba(15, 45, 74, 0.10);
  --shadow2: 0 8px 32px rgba(15, 45, 74, 0.14);
  --r: 12px;
  --r2: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

#app-wrapper {
  min-height: 100vh;
}

/* ─── PROFESSIONAL WHITE LOGIN ─── */
.login-screen {
  width: 100%;
  min-height: 100vh;
  background: #f1f5f9;
  display: flex;
  align-items: stretch;
}
.login-left-panel {
  flex: 0 0 480px;
  background: #ffffff;
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 10;
  color: #1e293b;
  box-shadow: 10px 0 50px rgba(0,0,0,0.05);
}
.login-right-content {
  flex: 1;
  background: url('/img/shipping-bg.png') center/cover no-repeat;
  position: relative;
  z-index: 5;
}
.login-card-inner {
  width: 100%;
}
.login-input {
  width: 100%; padding: 16px; 
  background: #f8fafc; 
  border: 1px solid #e2e8f0; 
  border-radius: 10px; 
  color:#1e293b; 
  font-size:15px;
  margin-top: 8px;
  outline: none;
  transition: 0.2s;
}
.login-input:focus {
  background: #fff;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* ─── SIDEBAR ─── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: #e3f2dc; /* Pista Green Light */
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.05);
  border-right: 1px solid rgba(0,0,0,0.05);
}

.sidebar .logo-name, 
.sidebar .nav-item, 
.sidebar .nav-section, 
.sidebar .logo-sub,
.sidebar .comp-badge,
.sidebar button {
  color: #1a2e12 !important; /* Dark Green Text for contrast */
}

.sidebar .logo {
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.sidebar .nav-item:hover {
  background: rgba(0,0,0,0.04);
}

.sidebar .nav-item.active {
  background: rgba(0,0,0,0.08) !important;
  border-left: 4px solid #4a7c44 !important;
}

.sidebar #live-news-ticker {
  background: rgba(255,255,255,0.4) !important;
  border: 1px solid rgba(0,0,0,0.05) !important;
}

.sidebar #news-content {
  color: #2d4a27 !important;
}

.logo {
  padding: 28px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: #000 !important;
  font-weight: 900;
  line-height: 1.2;
}

.logo-sub {
  font-size: 11px;
  color: #000 !important;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 3px;
  opacity: 0.8;
}

.nav {
  flex: 1;
  padding: 18px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 400;
  transition: all 0.18s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  border-left: 3px solid var(--gold2);
  font-weight: 500;
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.nav-section {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 16px 20px 6px;
}

.sidebar-foot {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.comp-badge {
  background: var(--gold);
  color: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ─── MAIN ─── */
.main {
  margin-left: 260px;
  min-height: 100vh;
  padding: 0 0 40px;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 8px rgba(15, 45, 74, 0.06);
}

.topbar-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--brand);
}

.topbar-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

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

.date-badge {
  background: var(--brand);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
}

.content {
  padding: 20px 24px;
}

/* ─── SECTIONS ─── */
.section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

/* ─── CARDS ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--gold);
  border-radius: 2px;
}

/* ─── METRICS ─── */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.06;
}

.metric.m1::after {
  background: var(--green)
}

.metric.m2::after {
  background: var(--gold)
}

.metric.m3::after {
  background: var(--brand3)
}

.metric.m4::after {
  background: var(--red2)
}

.m-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.m-val {
  font-size: 26px;
  font-weight: 600;
  font-family: 'Playfair Display', serif;
  line-height: 1;
}

.m-val.green {
  color: var(--green2)
}

.m-val.gold {
  color: var(--gold)
}

.m-val.blue {
  color: var(--brand3)
}

.m-val.red {
  color: var(--red2)
}

.m-change {
  font-size: 11px;
  margin-top: 6px;
  color: var(--muted);
}

.m-change.up {
  color: var(--green2)
}

.m-change.dn {
  color: var(--red2)
}

/* ─── TABLE ─── */
.tbl-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tr:last-child td {
  border: none;
}

tr:hover td {
  background: var(--surface2);
}

.status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.s-paid {
  background: var(--green-bg);
  color: var(--green2);
}

.s-pending {
  background: var(--gold-light);
  color: var(--gold);
}

.s-overdue {
  background: var(--red-bg);
  color: var(--red2);
}

.s-draft {
  background: #e2e8f0;
  color: #475569;
}

.s-shipped {
  background: var(--blue-bg);
  color: var(--blue);
}

.s-hold {
  background: #fee2e2;
  color: #991b1b;
}

/* ─── FORM ─── */
.fgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fgrid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.fg {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fg.full {
  grid-column: 1/-1;
}

.fg label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.fg input,
.fg select,
.fg textarea {
  padding: 9px 12px;
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  transition: border 0.15s;
}

.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  outline: none;
  border-color: var(--brand3);
  box-shadow: 0 0 0 3px rgba(36, 96, 138, 0.10);
}

.fg textarea {
  resize: vertical;
  min-height: 60px;
}

/* ─── BUTTONS ─── */
.btn {
  padding: 10px 20px;
  border-radius: var(--r2);
  border: 1px solid var(--border);
  font-size: 13px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

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

.btn-gold {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

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

.btn-green {
  background: var(--green2);
  color: #fff;
  border-color: var(--green2);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--border2);
}

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

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ─── GRID LAYOUT ─── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.gap16 {
  gap: 16px;
}

.mb20 {
  margin-bottom: 20px;
}

.mb16 {
  margin-bottom: 16px;
}

/* ─── HSN SEARCH ─── */
.hsn-wrap {
  position: relative;
  z-index: 10;
}

.hsn-drop {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  z-index: 9999;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: var(--shadow2);
  margin-top: 2px;
}

.hsn-opt {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}

.hsn-opt:last-child {
  border: none;
}

.hsn-opt:hover {
  background: var(--surface2);
}

/* ══ PAGINATION ══ */
.pagination-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.pag-info {
  font-size: 12px;
  color: var(--muted);
}

.pag-btns {
  display: flex;
  gap: 5px;
  align-items: center;
}

.pag-btns button {
  padding: 4px 10px;
  min-width: 32px;
  font-size: 11px;
  cursor: pointer;
}

.pag-btns button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gst-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  background: var(--gold-light);
  color: var(--gold);
  margin-left: 6px;
}

/* ─── INVOICE ITEMS ─── */
table.items-tbl th {
  font-size: 10px;
  padding: 8px 8px;
}

table.items-tbl td {
  padding: 6px 6px;
  vertical-align: middle;
}

table.items-tbl input,
table.items-tbl select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  background: var(--surface);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
}

table.items-tbl input[type=number] {
  width: 75px;
}

table.items-tbl input[type=text] {
  width: 100%;
}

.del-btn {
  background: none;
  border: none;
  color: var(--red2);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 4px;
}

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

.add-row {
  background: none;
  border: none;
  color: var(--brand3);
  cursor: pointer;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  text-decoration: underline;
  margin-top: 10px;
  padding: 4px 0;
}

/* ─── TOTALS ─── */
.items-tbl-wrap {
  overflow-x: auto !important;
  min-height: 280px;
}

.totals-outer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.totals-box {
  min-width: 300px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
}

.tot-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.tot-row:last-child {
  border: none;
}

.amt-words {
  background: var(--gold-light);
  border: 1px solid #e8d078;
  border-radius: var(--r2);
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 12px;
}

.amt-words span {
  font-weight: 600;
  color: var(--gold);
}

/* ─── REG SECTION ─── */
.reg-item {
  margin-bottom: 20px;
}

.reg-item h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 10px;
  padding-left: 12px;
  border-left: 3px solid var(--gold);
}

.reg-list {
  list-style: none;
}

.reg-list li {
  font-size: 13px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
}

.reg-list li:last-child {
  border: none;
}

.reg-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-top: 7px;
}

/* ─── T&C ─── */
.tc-item {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--surface2);
  border-radius: var(--r2);
  border-left: 3px solid var(--brand3);
}

.tc-item h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 5px;
}

.tc-item p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

/* ─── SHIPMENT ─── */
.ship-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ship-dot.done {
  background: var(--green2);
}

.ship-dot.active {
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-light);
}

.ship-dot.pending {
  background: #e2e8f0;
}

/* ─── DOC CHECKLIST ─── */
.doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 12px;
  margin: 4px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--surface);
}

.doc-chip:hover {
  border-color: var(--brand3);
}

.doc-chip.done {
  background: var(--green-bg);
  border-color: #86efac;
  color: var(--green2);
  font-weight: 500;
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* ─── PROGRESS ─── */
.prog-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0;
}

.prog-fill {
  height: 100%;
  border-radius: 3px;
}

.country-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.country-row:last-child {
  border: none;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}

/* ─── RESPONSIVE ─── */
@media(max-width:900px) {
  .sidebar {
    width: 60px;
  }

  .logo {
    padding: 28px 10px 20px;
  }

  .nav-item {
    justify-content: center;
    padding: 12px 0;
  }

  .logo-name,
  .logo-sub,
  .nav-item span:not(.nav-icon),
  .nav-section,
  .comp-badge,
  #live-news-ticker {
    display: none;
  }

  .main {
    margin-left: 60px;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 16px;
  }

  .topbar {
    padding: 12px 16px;
  }

  /* Login Page Mobile */
  .login-screen {
    flex-direction: column;
  }

  .login-left {
    flex: none;
    width: 100%;
    padding: 40px 20px;
  }

  .login-right {
    display: none;
  }

  .login-form-box {
    max-width: 100%;
  }

  /* Table Overflow Mobile Fix */
  .items-tbl-wrap {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding-bottom: 20px;
  }

  table.items-tbl {
    min-width: 850px;
  }
}

@media(max-width:600px) {
  .metrics {
    grid-template-columns: 1fr;
  }

  .fgrid,
  .fgrid3 {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .topbar-sub {
    display: none;
  }

  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  /* Login Page Adjustments */
  .login-left {
    padding: 30px 16px;
  }

  .login-card img {
    height: 50px !important;
  }

  .login-card h2 {
    font-size: 22px !important;
  }

  .card {
    padding: 16px;
  }
}

/* ─── PRINT ─── */
@media print {
  body>*:not(#invModal) {
    display: none !important;
  }

  #invModal {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    display: block !important;
  }

  #invModal>div {
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  #invModal>div>div:first-child {
    display: none !important;
  }

  #invModalBody {
    padding: 0 !important;
  }
}

/* ─── ANALYTICS & HUB ─── */
.prog-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 6px;
}

.prog-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease-in-out;
}

.country-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text);
}

.doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.doc-chip.done {
  background: var(--green-bg);
  color: var(--green2);
  border-color: rgba(22, 101, 52, 0.15);
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ─── LIVE NEWS ANIMATION ─── */
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

#news-content {
  transition: opacity 0.5s ease;
}
.ticker-wrap { width: 100%; overflow: hidden; background: rgba(255, 255, 255, 0.4); border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 8px; padding: 12px 0; margin-top: 10px; } .ticker-move { display: flex; width: max-content; animation: ticker-scroll 50s linear infinite; } .ticker-item { padding: 0 30px; white-space: nowrap; font-size: 11.5px; color: #2d4a27; font-weight: 500; border-right: 1px solid rgba(0,0,0,0.1); } @keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } } #news-content { display: block; }
