:root {
  --sidebar-width: 230px;
  --brand-color: #2b3a67;
}
body {
  background-color: #f4f6f9;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}
/* Number values are changed deliberately with keyboard input only. */
input[type="number"] {
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}
.app-navbar {
  background-color: var(--brand-color);
  padding: 0.6rem 1rem;
}
.app-navbar .navbar-brand {
  color: #fff;
  font-weight: 600;
}
.app-wrapper {
  display: flex;
  min-height: calc(100vh - 56px);
}
.app-sidebar {
  width: var(--sidebar-width);
  background-color: #1f2a4d;
  min-height: 100%;
  flex-shrink: 0;
  padding-top: 1rem;
  transition: margin-left 0.2s ease-in-out;
}
.app-sidebar .nav-link {
  color: #cfd6ea;
  padding: 0.65rem 1.25rem;
  font-size: 0.92rem;
}
.app-sidebar .nav-link i {
  width: 20px;
  display: inline-block;
}
.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-left: 3px solid #4e8cff;
}
.app-content {
  flex-grow: 1;
  padding: 1.5rem;
}
.card {
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border-radius: 0.5rem;
}
.quotation-legacy-table { display: none; }
.quotation-legacy-summary { display: none; }
.invoice-charges-disabled { display: none !important; }
.quotation-legacy-add { display: none; }
.quotation-items-card .list-group-item { padding: 14px 16px; }
.modal .list-group { max-height: 240px; overflow-y: auto; }
.pagination-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.pagination-tools .pagination { margin: 0; }
.pagination-tools .page-size { width: auto; min-width: 90px; }
#quotationItemEdit .modal-dialog { max-width: 500px; }
#quotationItemEdit .modal-content { border-radius: 8px; }
#quotationItemEdit .modal-body { padding: 24px 16px; }
#quotationItemEdit .modal-footer { padding: 12px 16px 16px; }
.stat-card {
  color: #fff;
  border-radius: 0.6rem;
}
.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
}
.bg-brand { background-color: var(--brand-color); }
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2b3a67, #4e8cff);
}
.login-card {
  width: 100%;
  max-width: 400px;
  border-radius: 0.75rem;
}
table.table thead {
  background-color: #eef1f8;
}
@media (max-width: 991px) {
  .app-sidebar {
    position: fixed;
    z-index: 1040;
    top: 56px;
    bottom: 0;
    margin-left: calc(-1 * var(--sidebar-width));
  }
  .app-sidebar.show {
    margin-left: 0;
  }
}

/* Print / invoice styles */
.invoice-box {
  background: #fff;
  padding: 25px;
  border: 1px solid #333;
  max-width: 900px;
  margin: 0 auto;
}
.invoice-box table {
  width: 100%;
  border-collapse: collapse;
}
.invoice-box table th, .invoice-box table td {
  border: 1px solid #333;
  padding: 6px 8px;
  font-size: 0.9rem;
}
.invoice-box .no-border td, .invoice-box .no-border th {
  border: none;
}
@media print {
  .no-print { display: none !important; }
  .app-sidebar, .app-navbar { display: none !important; }
  .app-content { padding: 0; }
  body { background: #fff; }
}

/* Bottom-anchored flash notification toast */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1080;
  min-width: 280px;
  max-width: 90vw;
  width: 460px;
  padding: 14px 40px 14px 18px;
  border-radius: 0.6rem;
  transform: translate(-50%, 30px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}
.app-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}
.app-toast.hide {
  transform: translate(-50%, 30px);
  opacity: 0;
}
.app-toast .btn-close {
  position: absolute;
  top: 14px;
  right: 14px;
}
@media (max-width: 575px) {
  .app-toast {
    width: calc(100vw - 32px);
  }
}
