/* Hesaman Phase 8 — Navy / Gold / White visual system.
   UI-only stylesheet; no invoice, database or authentication logic changed. */
:root {
  --primary:#b58c28;
  --primary-dark:#92701c;
  --primary-light:#fff8e6;
  --primary-glow:rgba(181,140,40,.2);
  --secondary:#0b1930;
  --secondary-light:#142844;
  --bg-main:#f4f6fa;
  --bg-card:#fff;
  --border:#dce3ec;
  --border-hover:#c4a450;
  --text-main:#17263b;
  --text-muted:#63738a;
  --shadow:0 4px 20px rgba(11,25,48,.055);
  --shadow-lg:0 12px 32px rgba(11,25,48,.105);
}
body { background:var(--bg-main); color:var(--text-main); }
::selection { background:#ead79b; color:#0b1930; }
:focus-visible { outline:2px solid #b58c28; outline-offset:3px; }
.sidebar { background:linear-gradient(170deg,#0b1930 0%,#10233e 65%,#091529 100%); border-left:1px solid #30435c; }
.sidebar-header { border-color:#30435c; }
.logo-badge,.login-logo { background:#000000; border: 1.5px solid #d4af37; box-shadow:0 6px 20px rgba(0,0,0,.4); padding:0; overflow:hidden; }
.brand-info span { color:#d5bd72; }
.menu-category { color:#a9b9ca; }
.menu-item { color:#d2ddeb; }
.menu-item:hover { background:rgba(212,175,55,.1); color:#fff; }
.menu-item.active { background:linear-gradient(90deg,rgba(212,175,55,.13),rgba(212,175,55,.23)); color:#f6dc86; border-right:3px solid #d4af37; }
.sidebar-footer { background:#091529; border-color:#30435c; }
.topbar { background:#fff; border-bottom:1px solid var(--border); box-shadow:0 2px 12px rgba(11,25,48,.04); }
.topbar-title h2 { color:#0b1930; }
#topbarUserPill { background:#f7f5ee !important; border-color:#e9ddb9 !important; }
.card,.stat-card { background:#fff; border:1px solid var(--border); box-shadow:var(--shadow); }
.card-title { color:#0b1930; }
.stat-card { border-top:3px solid #d4af37; }
.stat-card:hover { border-color:#d4af37; box-shadow:var(--shadow-lg); }
.stat-icon.blue { background:#e9eef5; color:#142844; }
.stat-icon.orange { background:#fff5d7; color:#97711e; }
.stat-details h3 { color:#0b1930; }
.btn-primary { background:linear-gradient(135deg,#e2c15d,#d4af37); color:#0b1930; border:1px solid #b58c28; box-shadow:0 3px 10px rgba(181,140,40,.16); font-weight:800; }
.btn-primary:hover { background:linear-gradient(135deg,#f0d77e,#c69b2e); color:#0b1930; box-shadow:0 5px 14px rgba(181,140,40,.26); }
.btn-secondary { background:#f5f7fa; color:#17263b; border-color:#d7dfeb; }
.btn-secondary:hover { background:#e9eef5; color:#0b1930; }
.btn, .btn-sm { white-space: nowrap !important; flex-shrink: 0 !important; }
.form-control, input, select, textarea { accent-color:#b58c28; }
.form-control { border-color:#cad4e1; }
.form-control:focus, input:focus-visible, select:focus-visible, textarea:focus-visible { border-color:#b58c28; box-shadow:0 0 0 3px rgba(212,175,55,.18); }
.tax-id-banner { background:linear-gradient(115deg,#0b1930,#193657); border:1px solid #364f6d; }
.table-responsive { overflow-x:auto; border-radius: var(--radius-md, 8px); }
table { background:#fff; width: 100%; border-collapse: collapse; }
thead, thead tr { background:#0b1930 !important; }
thead th, th {
  background:#0b1930 !important;
  color:#ffffff !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
  border-bottom: 2px solid #b58c28 !important;
  padding: 12px 14px !important;
  white-space: nowrap;
}
#invoiceItemsTable thead th {
  background:#0b1930 !important;
  color:#ffffff !important;
  border-bottom: 2px solid #b58c28 !important;
  text-align: center;
  font-size: 12px !important;
}
#invoiceItemsTable td {
  padding: 8px 6px !important;
  vertical-align: middle;
}
#invoiceItemsTable .form-control {
  height: 38px;
  padding: 0 8px;
  background: #ffffff !important;
  color: #0b1930 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600;
  font-size: 12.5px;
}
#invoiceItemsTable select.form-control {
  background: #ffffff !important;
  color: #0b1930 !important;
}
.form-group label {
  color: #0b1930 !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
  margin-bottom: 5px;
}
tbody tr:hover { background:#fff9eb; }
.modal-content { border:1px solid #e1e6ed; box-shadow:0 22px 60px rgba(11,25,48,.2); }
.modal-header { border-bottom:1px solid #e8e2d4; }
.login-overlay { background:radial-gradient(circle at 18% 15%,#28456a 0%,transparent 37%),linear-gradient(135deg,#071225 0%,#0b1930 55%,#142844 100%); }
.login-card { border:1px solid rgba(212,175,55,.28); box-shadow:0 22px 65px rgba(0,0,0,.36); }
.login-header h2 { color:#0b1930; }
.login-header p { color:#64748b; }
@media (max-width: 992px) {
  .topbar { gap:10px; }
  .topbar-title,.topbar-actions { flex-wrap:wrap; }
  .sidebar { box-shadow:-12px 0 35px rgba(4,12,26,.28); }
}
@media (max-width: 640px) {
  .content-body { padding:14px !important; }
  .topbar { padding:12px 14px; }
  .card { padding:15px; }
  .stats-grid, .stats-grid[style] { grid-template-columns:1fr !important; gap:12px; }
  .form-grid { grid-template-columns:1fr; gap:12px; }
  .login-card { padding:26px 20px; }
  #topbarCompanySelect { max-width:100% !important; }
  .table-responsive { -webkit-overflow-scrolling:touch; }
}
@media (prefers-reduced-motion:reduce) {
  .stat-card,.menu-item,.btn,.sidebar { animation:none; transition:none; }
}
@media print {
  body { background:#fff !important; color:#000 !important; }
  table { background:#fff !important; }
  thead { background:#fff !important; color:#000 !important; }
  thead th { color:#000 !important; }
  .card { box-shadow:none !important; }
}
