/* TransPrint — Complete Stylesheet */
:root {
  --teal: #1D9E75;
  --teal-d: #085041;
  --teal-l: #E1F5EE;
  --teal-mid: #0F6E56;
  --amber: #BA7517;
  --amber-d: #633806;
  --amber-l: #FAEEDA;
  --red: #A32D2D;
  --red-l: #FCEBEB;
  --green: #3B6D11;
  --green-l: #EAF3DE;
  --blue: #185FA5;
  --blue-l: #E6F1FB;
  --purple: #534AB7;
  --purple-l: #EEEDFE;
  --gray: #5F5E5A;
  --gray-l: #F1EFE8;
  --border: rgba(0,0,0,0.09);
  --border-md: rgba(0,0,0,0.14);
  --bg: #F5F4F0;
  --surface: #FFFFFF;
  --muted: #888780;
  --text: #1a1a18;
  --sidebar-w: 220px;
  --radius: 10px;
  --radius-sm: 6px;
}

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

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── LOGIN ── */
#login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-d);
  padding: 20px;
}
.login-wrap { width: 100%; max-width: 380px; }
.login-brand { text-align: center; margin-bottom: 32px; color: #fff; }
.login-logo {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.15);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 14px;
  border: 1px solid rgba(255,255,255,0.2);
}
.login-brand h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.login-brand p { font-size: 13px; opacity: 0.65; margin-top: 4px; }
.login-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.login-card h2 { font-size: 18px; font-weight: 500; margin-bottom: 20px; }
.login-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 14px; }

/* ── LAYOUT ── */
.layout { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--teal-d);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.sb-top { flex: 1; display: flex; flex-direction: column; }
.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sb-brand > .ti {
  font-size: 22px;
  color: #9FE1CB;
  flex-shrink: 0;
}
.sb-name { font-size: 16px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.sb-sub { font-size: 10px; color: rgba(255,255,255,0.45); margin-top: 1px; letter-spacing: 0.03em; }

.sb-nav { padding: 10px 8px; flex: 1; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.55);
  font-size: 13.5px;
  font-weight: 400;
  cursor: pointer;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  user-select: none;
}
.nav-link:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); }
.nav-link.active {
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-weight: 500;
}
.nav-link .ti { font-size: 17px; flex-shrink: 0; }

.sb-bottom {
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sb-avatar {
  width: 32px; height: 32px;
  background: var(--teal);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: #fff;
  flex-shrink: 0;
}
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { font-size: 12px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { font-size: 10px; color: rgba(255,255,255,0.4); }

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 24px 28px;
}

/* ── PAGES ── */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-head h1 { font-size: 22px; font-weight: 600; color: var(--text); letter-spacing: -0.02em; }
.page-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.page-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.card.accent-card { border-left: 3px solid var(--teal); }
.card-head {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.card-head .ti { font-size: 16px; color: var(--teal); }
.table-card { padding: 0; }

/* ── METRICS GRID ── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.2s;
}
.metric-card:hover { border-color: var(--border-md); }
.metric-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.metric-val { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.metric-val.teal { color: var(--teal-d); }
.metric-val.green { color: var(--green); }
.metric-val.amber { color: var(--amber-d); }
.metric-val.blue { color: var(--blue); }
.metric-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

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

/* ── FORMS ── */
label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}
input, select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--surface);
  margin-bottom: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.12);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ── TOGGLE GROUP ── */
.toggle-group { display: flex; gap: 6px; margin-bottom: 12px; }
.toggle-btn {
  flex: 1; padding: 7px 10px;
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 12px; font-family: 'DM Sans', sans-serif;
  color: var(--muted); cursor: pointer;
  transition: all 0.15s;
}
.toggle-btn:hover { background: var(--gray-l); }
.toggle-btn.active {
  background: var(--teal-l);
  border-color: var(--teal);
  color: var(--teal-d);
  font-weight: 500;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--teal-d); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}
.btn-sm:hover { background: var(--gray-l); }
.btn-icon {
  width: 32px; height: 32px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.15s;
}
.btn-icon:hover { background: rgba(255,255,255,0.16); color: #fff; }
.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  background: var(--purple-l);
  color: var(--purple);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.btn-dashed {
  width: 100%;
  padding: 14px;
  border: 1.5px dashed var(--border-md);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: border-color 0.15s, color 0.15s;
}
.btn-dashed:hover { border-color: var(--teal); color: var(--teal); }

/* ── PRICING ENGINE RESULTS ── */
.result-grid {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border: 1px solid var(--border);
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.result-row:last-child { border-bottom: none; }
.result-row span { color: var(--muted); }
.result-row strong { font-weight: 500; }
.layer-row { padding-left: 10px; }
.total-row { font-weight: 600 !important; font-size: 14px !important; }
.total-row strong { font-weight: 600; }
.price-row strong { font-size: 16px; font-weight: 600; color: var(--teal-d); }
.text-green { color: var(--green) !important; }
.text-amber { color: var(--amber-d) !important; }
.text-red { color: var(--red) !important; }

.verdict-box {
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 10px;
  text-align: center;
  background: var(--gray-l);
  color: var(--gray);
}
.verdict-beat { background: var(--teal-l); color: var(--teal-d); }
.verdict-warn { background: var(--amber-l); color: var(--amber-d); }
.verdict-fail { background: var(--red-l); color: var(--red); }

.summary-box {
  background: var(--blue-l);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 10px;
  border: 1px solid rgba(24,95,165,0.15);
}
.summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.sum-line { font-size: 13px; color: var(--blue); padding: 2px 0; }
.sum-highlight { font-weight: 600; font-size: 14px; }
.sum-note { font-size: 11px; color: #185FA5; opacity: 0.7; margin-top: 4px; }

/* ── ALERTS ── */
.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; }
.alert-error { background: var(--red-l); color: var(--red); border: 1px solid rgba(163,45,45,0.2); }
.alert-success { background: var(--teal-l); color: var(--teal-d); border: 1px solid rgba(29,158,117,0.2); }

/* ── STATUS DOT ── */
.status-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
}

/* ── PILLS / BADGES ── */
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 99px;
}
.pill-teal { background: var(--teal-l); color: var(--teal-d); }
.pill-amber { background: var(--amber-l); color: var(--amber-d); }
.pill-red { background: var(--red-l); color: var(--red); }
.pill-green { background: var(--green-l); color: var(--green); }
.pill-gray { background: var(--gray-l); color: var(--gray); }
.pill-blue { background: var(--blue-l); color: var(--blue); }
.pill-purple { background: var(--purple-l); color: var(--purple); }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 860px;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg);
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--border-md);
  white-space: nowrap;
}
.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #fafaf8; }
.data-table tfoot tr td,
.data-table tfoot tr th { background: var(--teal-l); font-weight: 600; padding: 10px 12px; }

/* ── ORDER ID STYLING ── */
.order-id { font-weight: 600; color: var(--teal-d); font-family: 'DM Mono', monospace; font-size: 12px; }

/* ── SEARCH INPUT ── */
.search-input {
  width: 220px;
  margin: 0;
  background: var(--surface);
}

/* ── TAB BAR ── */
.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  background: var(--surface);
  padding: 5px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: fit-content;
}
.tab-btn {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.tab-btn:hover { background: var(--gray-l); color: var(--text); }
.tab-btn.active { background: var(--teal-d); color: #fff; font-weight: 500; }

/* ── VENDOR CARDS ── */
.vendor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.vendor-card:hover { border-color: var(--border-md); }
.vendor-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; gap: 12px; }
.vendor-name { font-size: 15px; font-weight: 600; }
.vendor-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.vendor-score-big { font-size: 30px; font-weight: 700; color: var(--teal-d); text-align: right; line-height: 1; }
.score-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin-bottom: 12px; }
.score-item-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.score-item-val { font-weight: 500; color: var(--text); }
.bar-bg { background: var(--border-md); border-radius: 99px; height: 5px; }
.bar-fill { height: 5px; border-radius: 99px; transition: width 0.5s ease; }
.vendor-footer { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 60px;
  z-index: 100;
  animation: fadeIn 0.15s ease;
}
.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  width: 90%;
  max-width: 520px;
  border: 1px solid var(--border-md);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-section { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin: 14px 0 8px; padding-bottom: 5px; border-bottom: 1px solid var(--border); }

/* ── DASHBOARD FEED ROWS ── */
.feed-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.feed-row:last-child { border-bottom: none; }
.feed-name { font-weight: 500; font-size: 13px; }
.feed-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.feed-right { text-align: right; flex-shrink: 0; }
.feed-val { font-weight: 600; color: var(--teal-d); font-size: 13px; }

/* ── SPIN ANIMATION ── */
.spin { animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── NOTICE BOX ── */
.notice {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.notice-warn { background: var(--amber-l); color: var(--amber-d); }
.notice-info { background: var(--blue-l); color: var(--blue); }

/* ── LOADING STATE ── */
.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--muted);
  font-size: 13px;
  gap: 8px;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sidebar { display: none; }
  .main-content { padding: 16px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
}
