﻿:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #52617a;
  --line: #d8dee8;
  --accent: #017e84;
  --accent-2: #1d4ed8;
  --danger: #b42318;
  --warn: #b45309;
  --ok: #047857;
  --shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(#f7f9fc, #eef2f7);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

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

button,
.file-btn {
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

button.secondary {
  background: var(--accent-2);
}

button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

button.danger {
  background: var(--danger);
}

button.po-created {
  background: #16a34a;
  color: #fff;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 82px;
  resize: vertical;
}

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.92), rgba(23, 32, 42, 0.92));
}

.login-panel {
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  padding: 30px;
  display: grid;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.login-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: #e2231a;
}

.login-brand-block {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.login-brand-block img {
  width: 210px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: 4px;
}

.login-brand-block h1 {
  margin-bottom: 2px;
  font-size: 30px;
}

.login-panel button[type="submit"] {
  background: #17202a;
  padding: 12px 16px;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 8px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.muted,
small {
  color: var(--muted);
}

.error {
  color: var(--danger);
  min-height: 20px;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

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

.logo {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f766e, #1d4ed8);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.25);
  position: relative;
}

.logo::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 6px;
}

.logo span {
  position: relative;
  z-index: 1;
  font-size: 24px;
  line-height: 1;
}

nav {
  display: grid;
  gap: 6px;
}

nav button {
  background: transparent;
  color: var(--ink);
  text-align: left;
  border: 1px solid transparent;
}

nav button.active {
  border-color: var(--line);
  background: #eef8f6;
  color: var(--accent);
}

.main {
  min-width: 0;
  padding: 22px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.top-search {
  flex: 1;
  max-width: 560px;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.file-btn input {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.stat strong {
  display: block;
  font-size: 30px;
}

.stat-card {
  width: 100%;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
  display: grid;
  gap: 10px;
}

.stat-card span {
  color: var(--muted);
  font-weight: 500;
}

.stat-card strong {
  font-size: 30px;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 14px;
}

.toolbar > * {
  min-width: 160px;
}

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

.form-grid .wide {
  grid-column: span 2;
}

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

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

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #eef8f8;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  background: #edf4ff;
  color: #1d4ed8;
}

.badge.warn {
  background: #fff7ed;
  color: var(--warn);
}

.badge.danger {
  background: #fef3f2;
  color: var(--danger);
}

.badge.ok {
  background: #ecfdf3;
  color: var(--ok);
}

.product-img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: #eef2f7;
}

.order-lines {
  display: grid;
  gap: 10px;
}

.line-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 44px;
  gap: 8px;
  align-items: end;
}

.notice {
  border-left: 4px solid var(--accent-2);
  background: #edf4ff;
  padding: 12px;
  border-radius: 6px;
  color: #1e3a8a;
}

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

  .sidebar {
    position: relative;
    height: auto;
  }

  .topbar,
  .line-row {
    display: grid;
  }

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: 1 / -1;
  }

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

  .form-grid .wide {
    grid-column: 1;
  }
}


.image-logo {
  background: #fff;
  width: 76px;
  height: 42px;
  padding: 3px;
}

.image-logo::after {
  display: none;
}

.image-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.activity-side {
  display: grid;
  gap: 12px;
}

.activity-item {
  border-left: 3px solid var(--accent);
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 6px;
}

.bill-link {
  color: var(--accent-2);
  font-weight: 700;
}


.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-2);
  background: #fff;
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
}

.record-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.record-head h2 {
  font-size: 34px;
  margin: 6px 0 10px;
}

.inline-check {
  display: inline-flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  margin-right: 14px;
  color: var(--ink);
}

.inline-check input {
  width: auto;
}

.record-photo {
  width: 170px;
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.record-photo img,
.record-photo span {
  width: 170px;
  height: 120px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: contain;
  background: #f8fafc;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.record-form textarea {
  min-height: 110px;
}

@media (max-width: 720px) {
  .record-head {
    display: grid;
  }

  .record-photo,
  .record-photo img,
  .record-photo span {
    width: 100%;
  }
}

.qty-input {
  width: 86px;
  padding: 6px 8px;
}

.diff-warn {
  color: #e11d48;
  font-weight: 800;
}

.report-table-wrap {
  max-height: calc(100vh - 330px);
  min-height: 360px;
  overflow: auto;
  border: 1px solid #9db4d6;
  background: #fff;
}

.report-table-wrap .po-report-table {
  min-width: 1480px;
  border-collapse: separate;
  border-spacing: 0;
}

.report-table-wrap .purchase-voucher-report-table {
  min-width: 1720px;
}

.po-report-table th {
  background: #0b84bd;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 3;
}

.po-report-table th .sort-link {
  width: 100%;
  margin-bottom: 5px;
  border: 0;
  border-radius: 4px;
  background: #00878a;
  color: #fff;
  padding: 8px 10px;
  text-align: left;
}

.po-report-table th input {
  width: 100%;
  min-width: 90px;
  border-color: #c7d5ea;
  background: #fff;
}

.po-report-table td,
.po-report-table th {
  border: 1px solid #9db4d6;
  padding: 5px 7px;
  font-weight: 700;
}

.empty-report {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  color: var(--ink);
}

.empty-report h3 {
  margin: 0 0 6px;
}

.toggle-line {
  display: flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.toggle-line input {
  width: auto;
}

.autocomplete {
  position: relative;
  min-width: 260px;
}

.autocomplete-menu {
  display: none;
  position: absolute;
  z-index: 50;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 14px 36px rgba(23, 32, 42, 0.16);
}

.autocomplete-menu.open {
  display: grid;
}

.autocomplete-menu button {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #fff;
  color: var(--ink);
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 8px 12px;
}

.autocomplete-menu button:hover,
.autocomplete-menu button.active {
  background: #eef8f6;
}

.autocomplete-menu .autocomplete-add {
  color: var(--accent);
  font-weight: 800;
}

.autocomplete-menu span,
.autocomplete-menu .empty {
  color: var(--muted);
  padding: 8px 12px;
}

.autocomplete-menu button:not(:has(span)) {
  grid-template-columns: 1fr;
}

.party-head {
  align-items: flex-start;
}

.party-avatar {
  width: 124px;
  height: 124px;
  border-radius: 6px;
  background: #2f80ed;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 62px;
  font-weight: 500;
  flex: 0 0 auto;
}

.party-title {
  flex: 1;
}

.party-title h2 {
  font-size: 34px;
  margin: 6px 0 10px;
}

.smart-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 560px;
}

.smart-buttons div {
  min-width: 112px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}

.smart-buttons strong {
  color: var(--accent);
}

.smart-buttons span {
  color: var(--muted);
  font-size: 12px;
}

.text-ok {
  color: var(--ok);
  font-weight: 800;
}

/* Odoo-style top app navigation */
.app {
  display: block;
}

.sidebar {
  border-right: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  height: auto;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(23, 32, 42, 0.06);
}

.brand {
  min-width: 220px;
}

nav {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
}

nav button {
  text-align: center;
  min-width: 92px;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 10px;
}

.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f3f4f6;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.main {
  padding: 18px 22px 22px;
}

.app-launcher {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 18px;
}

.app-launcher button {
  min-height: 110px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  gap: 8px;
}

.app-launcher span {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e2231a, #0f766e);
  color: #fff;
  font-weight: 900;
}

.accounting-launcher {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.accounting-launcher button {
  min-height: 118px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: left;
  display: grid;
  align-content: center;
  gap: 6px;
}

.accounting-launcher span {
  font-size: 18px;
  font-weight: 900;
}

.accounting-launcher small {
  color: var(--muted);
  font-weight: 600;
}

.accounting-launcher strong {
  color: var(--accent);
  font-size: 16px;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.summary-row div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.summary-row span {
  color: var(--muted);
}

.summary-row strong {
  font-size: 24px;
}

.match-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  margin: 10px 0 12px;
}

.match-filters input {
  min-height: 34px;
}

.po-pending-info {
  border: 1px solid #f0d48a;
  background: #fff8db;
  padding: 8px 10px;
  margin: 8px 0;
  display: grid;
  gap: 4px;
  font-weight: 800;
}

.pending-po-qty[readonly],
[name="unit"][readonly] {
  background: #eef2f7;
  color: #111827;
  font-weight: 800;
  cursor: not-allowed;
}

.accounting-menu-panel {
  min-height: 240px;
}

.accounting-menu-page {
  display: grid;
  gap: 14px;
  align-content: start;
}

.accounting-menubar {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.accounting-dd {
  position: relative;
}

.accounting-dd > button {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  min-width: 170px;
  text-align: left;
}

.accounting-dd > button:hover,
.accounting-dd:focus-within > button {
  border-color: var(--accent);
  color: var(--accent);
}

.accounting-dd-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
  z-index: 80;
  padding: 6px 0;
}

.accounting-dd:hover .accounting-dd-menu,
.accounting-dd:focus-within .accounting-dd-menu {
  display: grid;
}

.accounting-dd-menu button {
  background: #fff;
  color: var(--ink);
  border-radius: 0;
  border: 0;
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
}

.accounting-dd-menu button:hover {
  background: #eef8f6;
  color: var(--accent);
}

.accounting-dd-menu small {
  color: var(--accent);
  font-weight: 800;
}

.accounting-quick-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.accounting-quick-section h3 {
  margin: 0;
}

.accounting-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.accounting-quick-actions button {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.accounting-quick-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ledger-panel {
  background: #f7f7ff;
}

.ledger-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px 140px auto;
  gap: 10px;
  align-items: end;
  margin: 10px 0 12px;
}

.ledger-tax-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}

.ledger-tax-toggle button {
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.ledger-tax-toggle button.active {
  background: var(--accent);
  color: #fff;
}

.ledger-head,
.ledger-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 8px 0;
  font-weight: 800;
}

.ledger-scroll {
  max-height: 520px;
  overflow: auto;
  border: 1px solid #9aa4b2;
  background: #fff;
}

.ledger-detail-table {
  min-width: 1100px;
  border-collapse: collapse;
}

.ledger-detail-table th,
.ledger-detail-table td {
  border: 1px solid #c7ccd6;
  padding: 6px 8px;
}

.ledger-detail-table th {
  background: #e8e8e8;
  color: #111;
  font-size: 13px;
  text-transform: none;
}

.ledger-detail-table td:nth-child(5),
.ledger-detail-table td:nth-child(6),
.ledger-detail-table td:nth-child(7) {
  text-align: right;
  font-weight: 800;
}

.ledger-detail-table tbody tr:hover {
  background: #eaf2ff;
}

@media (max-width: 900px) {
  .match-filters {
    grid-template-columns: 1fr 1fr;
  }

  .accounting-menubar {
    display: grid;
  }

  .ledger-filters {
    grid-template-columns: 1fr;
  }
}

.span-4 .form-grid,
.span-3 .form-grid {
  grid-template-columns: 1fr;
}

.span-4 .form-grid .wide,
.span-3 .form-grid .wide {
  grid-column: 1;
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    flex-wrap: wrap;
  }

  .brand {
    min-width: 180px;
  }

  nav button {
    min-width: 86px;
  }
}

.voucher-panel {
  background: #fffdd1;
}

.voucher-form {
  display: grid;
  gap: 12px;
}

.voucher-head {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.voucher-head .wide {
  grid-column: span 2;
}

.voucher-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
}

.voucher-table {
  background: #fff;
  font-size: 14px;
}

.voucher-table th,
.voucher-table td {
  border: 1px solid #7f8794;
  padding: 5px;
  vertical-align: top;
}

.voucher-table th {
  background: #eef0f2;
  color: #001f3f;
}

.voucher-table .autocomplete {
  min-width: 230px;
}

.voucher-table input,
.voucher-table select {
  min-height: 30px;
}

.voucher-table .qty-input {
  width: 86px;
}

.order-voucher-table {
  width: 100%;
  table-layout: fixed;
}

.order-voucher-table tr.line-row {
  display: table-row;
}

.order-voucher-table tr.line-row td {
  display: table-cell;
}

.order-voucher-table .autocomplete {
  min-width: 100%;
}

.order-voucher-table th:nth-child(1),
.order-voucher-table td:nth-child(1) {
  width: 46px;
}

.order-voucher-table th:nth-child(2),
.order-voucher-table td:nth-child(2) {
  width: 280px;
}

.order-voucher-table th:nth-child(3),
.order-voucher-table td:nth-child(3),
.order-voucher-table th:nth-child(6),
.order-voucher-table td:nth-child(6),
.order-voucher-table th:nth-child(7),
.order-voucher-table td:nth-child(7),
.order-voucher-table th:nth-child(8),
.order-voucher-table td:nth-child(8) {
  width: 86px;
}

.order-voucher-table th:nth-child(4),
.order-voucher-table td:nth-child(4) {
  width: 120px;
}

.order-voucher-table th:nth-child(5),
.order-voucher-table td:nth-child(5) {
  width: 190px;
}

.order-voucher-table th:nth-child(9),
.order-voucher-table td:nth-child(9) {
  width: 105px;
}

.order-voucher-table th:nth-child(10),
.order-voucher-table td:nth-child(10) {
  width: 92px;
}

.tiny {
  padding: 5px 8px;
  margin-left: 4px;
}

.voucher-side {
  display: grid;
  gap: 10px;
}

.voucher-side textarea {
  font-family: Consolas, monospace;
  font-size: 13px;
  background: #ffffc8;
}

.voucher-sundry {
  margin-top: 14px;
  max-width: 720px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: end;
}

.voucher-total {
  max-width: 520px;
  margin: 12px 0 0 auto;
  display: grid;
  gap: 6px;
}

.voucher-total span {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #bfc5ce;
  padding: 4px 0;
}

.voucher-total .grand {
  color: #b42318;
  font-size: 18px;
  font-weight: 900;
}

.voucher-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.modal-lite {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17, 24, 39, 0.45);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  width: min(940px, 96vw);
  max-height: 86vh;
  overflow: auto;
  background: #fff8e8;
  border: 2px solid #f97316;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.25);
  padding: 18px;
}

.modal-close {
  float: right;
  background: #c2410c;
}

.mc-list {
  display: grid;
  gap: 4px;
}

.mc-list button {
  display: flex;
  justify-content: space-between;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.party-quick-search {
  display: grid;
  gap: 10px;
}

.party-quick-search input {
  width: 100%;
}

.party-quick-list {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #fff;
}

.party-quick-list button {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 10px 12px;
}

.party-quick-list button:hover,
.party-quick-list button.active {
  background: #e8f7f4;
}

.party-quick-list span {
  color: var(--muted);
  font-size: 13px;
}

/* Odoo-like working screens */
.panel {
  border-radius: 4px;
  box-shadow: none;
  border: 1px solid var(--line);
}

.compact-card {
  padding: 16px;
}

.odoo-panel {
  padding: 0;
  overflow: hidden;
}

.odoo-form {
  display: grid;
  background: #f7f8fa;
}

.odoo-actionbar {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.status-steps {
  margin-left: auto;
  display: flex;
  border: 1px solid #c9d2df;
  background: #f1f5f9;
}

.status-steps span {
  padding: 8px 18px;
  font-weight: 700;
  color: var(--muted);
}

.status-steps .active {
  background: #e8fbfb;
  color: var(--accent);
  border-right: 1px solid #c9d2df;
}

.odoo-sheet {
  background: #fff;
  margin: 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  min-height: 540px;
  padding: 18px 20px;
}

.record-title {
  font-size: 34px;
  font-weight: 600;
  margin-bottom: 18px;
}

.odoo-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 56px;
  max-width: 1180px;
}

.odoo-fields .wide {
  grid-column: span 1;
}

.odoo-tabs {
  display: flex;
  gap: 0;
  margin-top: 24px;
  border-bottom: 1px solid var(--line);
}

.odoo-tabs span {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #f8fafc;
  font-weight: 600;
}

.odoo-tabs .active {
  background: #fff;
  color: #8a3f6d;
  border-top: 3px solid #8a3f6d;
}

.odoo-line-head,
.odoo-line-row {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) 120px 140px 120px 130px 76px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.odoo-line-head {
  color: #1f2a44;
  font-size: 13px;
  font-weight: 800;
}

.odoo-line-row label {
  display: block;
}

.odoo-line-row .autocomplete {
  min-width: 100%;
}

.odoo-line-row .line-tax {
  color: var(--muted);
  font-weight: 700;
}

.odoo-add-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
}

.odoo-add-row .ghost {
  border: 0;
  color: var(--accent);
  padding: 4px 0;
}

.terms {
  margin-top: 36px;
  color: #9aa4b2;
}

.payment-voucher-panel {
  background: #ffffcc;
  border-color: #b78600;
}

.payment-voucher {
  display: grid;
  gap: 14px;
  background: #ffffcc;
  color: #111;
}

.voucher-ribbon {
  justify-self: center;
  background: #c84f5a;
  color: #fff;
  padding: 3px 18px;
  font-weight: 800;
}

.pay-head {
  display: grid;
  grid-template-columns: 170px 150px 180px 170px 180px;
  gap: 18px;
  align-items: end;
}

.pay-work {
  display: grid;
  grid-template-columns: minmax(0, 900px) 250px;
  gap: 10px;
}

.payment-grid th,
.payment-grid td {
  padding: 3px 5px;
}

.payment-grid input,
.payment-grid select,
.payment-voucher textarea {
  background: #fffef1;
  border-radius: 0;
  padding: 4px 6px;
}

.payment-grid td:first-child,
.payment-grid td:nth-child(2),
.payment-grid td:nth-child(4),
.payment-grid td:nth-child(5) {
  text-align: right;
  font-weight: 800;
}

.pay-credit-cell {
  background: #111;
  color: #fff;
}

.pay-debit-cell {
  color: #8a2c00;
}

.long-narration {
  margin-top: 10px;
}

.payment-voucher .voucher-actions {
  border-top: 1px solid #b78600;
  padding-top: 8px;
}

.payment-voucher .voucher-actions button {
  background: #f5f5f5;
  color: #111;
  border: 1px solid #999;
  border-radius: 0;
  padding: 5px 12px;
}

.sidebar {
  padding: 6px 10px;
  gap: 10px;
}

.brand {
  min-width: 300px;
}

.brand h1 {
  font-size: 16px;
}

.brand small {
  font-size: 12px;
}

.image-logo {
  width: 72px;
  height: 44px;
  border-radius: 4px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

nav {
  align-items: stretch;
  justify-content: center;
  overflow: visible;
}

nav .nav-link,
.nav-menu button {
  min-width: 0;
  padding: 8px 11px;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  border: 0;
  display: block;
  text-align: left;
  white-space: nowrap;
}

nav .nav-link.active,
.nav-dropdown.active > .nav-link,
.nav-menu button.active {
  background: #eaf7f8;
  color: var(--accent);
  border: 1px solid #bfe4e6;
}

.nav-dropdown {
  position: relative;
  display: grid;
  align-items: stretch;
}

.nav-menu {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 190px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
  padding: 6px 0;
  z-index: 120;
}

.nav-dropdown:hover .nav-menu,
.nav-dropdown:focus-within .nav-menu {
  display: grid;
}

/* Khula hua top menu neeche wali Company/Masters patti (#ehMenubar, z-index 50) ke upar dikhe */
.sidebar:has(.nav-dropdown:hover),
.sidebar:has(.nav-dropdown:focus-within) {
  z-index: 70;
}

.nav-menu button {
  width: 100%;
  border-radius: 0;
  padding: 9px 18px;
}

.nav-menu button:hover {
  background: #eef8f6;
  color: var(--accent);
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f4f6f8;
}

.main {
  padding: 14px;
}

.main-header {
  margin-bottom: 14px;
}

.main-header h1 {
  font-size: 32px;
}

table {
  background: #fff;
}

.line-toolbar {
  position: sticky;
  top: 56px;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 0;
  background: var(--panel);
}

th {
  color: #35445b;
  font-size: 12px;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .voucher-work {
    grid-template-columns: 1fr;
  }

  .voucher-head,
  .voucher-sundry {
    grid-template-columns: 1fr 1fr;
  }
}

/* Late-order eligibility is calculated in OrderCompletion; styles never decide it. */
.late-card.selected { outline: 3px solid #087e8b; background: #e6f7f8; }
tr.overdue > td { background: #fff0f0; }
span.overdue { color: #b01818; font-weight: 750; background: #ffe1e1; padding: 3px 6px; border-radius: 4px; }
tr.due-today > td, span.due-today { background: #fff2c8; color: #604b00; }
.vendor-picker { position: relative; min-width: 250px; }
#reportVendorSuggestions:not(:empty) { max-height: 230px; overflow-y: auto; border: 1px solid #adbcca; border-radius: 5px; background: white; padding: 5px; }
#reportVendorSuggestions [role="option"] { display: block; width: 100%; text-align: left; margin: 3px 0; background: #eff6fa; color: #17324b; }
/* Application branding/layout only; printed document identity is unchanged. */
.brand > div > strong { font-size: 19px; white-space: nowrap; }
.dashboard-card { grid-column: span 2; min-width: 0; padding: 12px; }
.dashboard-card .stat-card { min-width: 0; width: 100%; height: 100%; white-space: normal; }
.dashboard-card .stat-card span { overflow-wrap: anywhere; font-size: 13px; }
.daily-notify-card { display: flex; flex-direction: column; gap: 5px; justify-content: space-between; }
.daily-notify-card small { overflow-wrap: anywhere; }
.daily-notify-card button { white-space: normal; padding: 6px 9px; }
.late-orders-panel { grid-column: 1 / -1; min-width: 0; overflow-x: auto; }
[data-unsaved-guard] { max-width: 440px; border: 1px solid #087e8b; border-radius: 8px; padding: 22px; }
[data-unsaved-guard] button { margin: 5px; white-space: normal; }
@media (max-width: 1000px) { .dashboard-card { grid-column: span 4; } }
@media (max-width: 600px) { .dashboard-card { grid-column: span 6; } .brand > div > strong { font-size: 17px; } }
@media (max-width: 360px) { .dashboard-card { grid-column: 1 / -1; } }
@media (max-width: 720px) {
  .sidebar { position: relative; }
  .sidebar nav { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-start; gap: 5px; }
  .sidebar nav > button, .sidebar .nav-dropdown { flex: 0 0 auto; }
  .sidebar .nav-dropdown { position: static; }
  .sidebar .nav-link { padding: 8px 10px; white-space: nowrap; }
  .sidebar .nav-menu { left: 10px; right: 10px; top: 100%; min-width: 0; max-height: 60vh; overflow-y: auto; }
}

/* Exact-line drilldown; no business-state styling. */
.order-drill-link{background:transparent;color:#087b87;text-decoration:underline;padding:4px;border:0;font-weight:700}.order-line-details input[type=checkbox]{width:18px;height:18px}[data-late-detail]>td{background:#f3f9fa;padding:14px}.closure-history{border-top:1px solid #ccdadd;padding:8px 0}[data-late-status]:empty{display:none}

/* Seven summary cards; existing six retained. */
.dashboard-card {grid-column:span 3;}
@media(min-width:1200px){.grid:has(.dashboard-card){grid-template-columns:repeat(14,minmax(0,1fr));}.dashboard-card{grid-column:span 2;}.late-orders-panel{grid-column:1 / -1;}}
@media(max-width:1000px){.dashboard-card{grid-column:span 4;}}
@media(max-width:600px){.dashboard-card{grid-column:span 6;}}
.receipt-scroll{max-width:100%;overflow:auto;}
.receipt-dialog{max-width:min(1100px,94vw);max-height:90vh;overflow:auto;}
.receipt-dialog label{display:block;margin:8px 0;}

@media(max-width:360px){.dashboard-card{grid-column:1 / -1;}}

.actual-demo-banner{padding:6px 12px;background:#fff0cc;color:#633c00;font-size:13px;border-bottom:1px solid #c79329;}
[data-legacy-review-dialog]{max-width:min(1180px,95vw);}
[data-legacy-review-dialog] th,[data-legacy-review-dialog] td{white-space:normal;}
[data-receipt-card]{gap:5px;justify-content:flex-start;text-align:left;}
[data-receipt-card] strong{font-size:16px;line-height:1.3;overflow-wrap:anywhere;}
[data-receipt-card] small{font-size:11px;line-height:1.3;}
[data-legacy-table] th:last-child,[data-legacy-table] td:last-child{position:sticky;right:0;min-width:165px;background:#fff;border-left:2px solid #dbe3e8;z-index:1;}
[data-legacy-table] th:last-child{background:#eef2f5;z-index:2;}
[data-legacy-table] td:last-child button{display:block;white-space:normal;width:100%;margin:4px 0;}

/* List paging (10/20/50/100/500 per page) */
.list-pager{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:10px 0 4px;}
.list-pager .pager-sizes,.list-pager .pager-nav{display:flex;flex-wrap:wrap;align-items:center;gap:4px;}
.list-pager button{padding:4px 10px;min-height:30px;font-size:13px;}
.list-pager button[disabled]{opacity:.45;cursor:default;}
.list-pager .pager-page{padding:0 8px;font-weight:600;color:var(--muted);}

/* Master SKU */
.master-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:6px 0 10px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#f4f8fb;}
.master-bar strong{font-size:15px;}
.master-link{background:none;border:0;padding:0;min-height:0;color:#1d5fa8;text-decoration:underline;cursor:pointer;font:inherit;}
.master-link:hover{color:#0d3f78;}
.record-photo small{display:block;color:var(--muted);margin:4px 0;}

/* ================================================================
   NAYA ROOP (Teal) - 2026-11-11
   Purana roop wapas chahiye to sirf yeh poora block (yahan se file ke
   aakhir tak) hata dein. Data ya kaam par koi asar nahi.
   ================================================================ */
:root { --accent: #017e84; --accent-dark: #01585c; --accent-soft: #e6f4f4; --line: #e1e6ed; --ink: #1b2430; --muted: #5a6577; }
body { font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; background: #f3f5f8; color: var(--ink); }
button, .file-btn { border-radius: 6px; font-weight: 600; transition: background-color .15s, color .15s, border-color .15s, filter .15s; }
button:hover:not([disabled]), .file-btn:hover { filter: brightness(.94); }
button.secondary { background: #fff; color: var(--accent); border: 1px solid #b7d8da; }
button.secondary:hover:not([disabled]) { background: var(--accent-soft); filter: none; }
button.danger { background: #fff; color: var(--danger); border: 1px solid #f0bcb6; }
button.danger:hover:not([disabled]) { background: #fef3f2; filter: none; }
input, select, textarea { border-radius: 6px; border-color: #d3dae3; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(1, 126, 132, .15); }

/* Upar wali menu patti */
.sidebar { background: var(--accent-dark); border-bottom: 0; box-shadow: 0 2px 10px rgba(1, 60, 62, .25); }
.sidebar .brand, .sidebar .brand strong { color: #fff; }
.sidebar .brand small { color: rgba(255, 255, 255, .75); }
nav .nav-link { color: rgba(255, 255, 255, .9); border: 1px solid transparent; }
nav .nav-link:hover { background: rgba(255, 255, 255, .14); color: #fff; filter: none; }
nav .nav-link.active, .nav-dropdown.active > .nav-link { background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255, 255, 255, .25); }
.nav-menu { border-radius: 8px; border-color: var(--line); }
.nav-menu button { color: var(--ink); }
.nav-menu button:hover, .nav-menu button.active { background: var(--accent-soft); color: var(--accent); border: 0; filter: none; }
.sidebar #logoutBtn { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .45); }
.sidebar #logoutBtn:hover { background: rgba(255, 255, 255, .14); }
.sidebar .eh-plan-chip { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; }
body #ehMenubar > .m.open > button, body #ehMenubar > .m > button:hover, body #ehMenubar .dd button.f, body #ehMenubar .dd button:hover { background: var(--accent); color: #fff; }

/* Page heading */
.topbar h1, #pageTitle { font-size: 22px; font-weight: 700; margin-bottom: 2px; }
#pageSubtitle { color: var(--muted); font-size: 13px; margin: 0; }

/* Dabbe (cards) */
.panel { border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(16, 24, 40, .05); }
.panel > h2 { font-size: 17px; font-weight: 700; color: var(--ink); }
.dashboard-card { border-top: 3px solid var(--accent); }
.stat-card strong { color: var(--ink); }

/* Table: ek line chhod kar halka rang, mouse rakhne par highlight */
th { background: #f5f7fa; color: #4a5568; font-weight: 700; letter-spacing: .02em; }
.table-filter-row th { background: #fbfcfd; }
:where(tbody tr:nth-child(even)) > td { background: #fafbfc; }
:where(tbody tr:hover) > td { background: #eef7f7; }
td { border-bottom-color: #edf0f4; }

/* Status pill */
.badge { font-weight: 700; padding: 3px 9px; white-space: nowrap; }

/* Paging aur Master SKU */
.list-pager button[data-pager-size]:not(.secondary) { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.master-bar { background: var(--accent-soft); border-color: #b7d8da; }
.master-link { color: var(--accent); }

/* Login page */
.login-shell { background: linear-gradient(135deg, #01585c, #0b2f3a); }
.login-panel { border-radius: 12px; }
.login-panel::before { width: 6px; }
.login-panel button[type="submit"] { background: var(--accent); border-radius: 8px; }

/* Late PO / SO paging */
.late-pager{display:flex;align-items:center;justify-content:center;gap:14px;margin:12px 0 4px}
.late-pager span{color:var(--muted);font-weight:600}
.late-pager button:disabled{opacity:.45;cursor:default}
.late-size{display:inline-flex;align-items:center;gap:6px;margin-left:8px;font-weight:600}
.late-size select{width:auto;min-width:72px}
