:root {
  --sidebar-width: 230px;
  --brand-color: #2b3a67;
  --brand-dark: #1b2547;
  --brand-light: #eef4ff;
  --brand-accent: #4e8cff;
  --brand-accent-2: #00c2a8;
  --text-color: #1f2937;
  --muted: #6b7280;
}
body {
  background-color: #f4f6f9;
  font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text-color);
}
/* 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;
  align-items: flex-start;
  min-height: calc(100vh - 56px);
}
.app-sidebar {
  width: var(--sidebar-width);
  background-color: #1f2a4d;
  height: calc(100vh - 56px);
  max-height: calc(100vh - 56px);
  position: sticky;
  top: 0;
  align-self: flex-start;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  padding-top: 1rem;
  transition: margin-left 0.2s ease-in-out;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.35) transparent;
}
.app-sidebar::-webkit-scrollbar {
  width: 7px;
}
.app-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.35);
  border-radius: 4px;
}
.app-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.55);
}
.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 .ledger-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.app-sidebar .ledger-toggle span {
  flex: 1;
}
.app-sidebar .ledger-toggle .ledger-chevron {
  width: auto;
  font-size: 0.72rem;
  transition: transform 0.25s ease;
}
.app-sidebar .ledger-menu.is-open > .ledger-toggle .ledger-chevron {
  transform: rotate(180deg);
}
.ledger-submenu {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: min(260px, calc(100vh - 220px));
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
  opacity: 1;
  transition: max-height 0.28s ease, opacity 0.2s ease;
}
.ledger-submenu::-webkit-scrollbar {
  width: 5px;
}
.ledger-submenu::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
}
.ledger-submenu[hidden] {
  display: block;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}
.ledger-submenu .nav-link {
  min-height: 0;
  padding-left: 3.1rem;
  font-size: 0.86rem;
}
.ledger-submenu .nav-link i {
  width: 18px;
}
.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;
  min-width: 0;
  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; }
.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-color: #dceaff;
  background-image: var(--login-background-image), linear-gradient(135deg, #dceaff, #f8fbff);
  background-size: cover;
  background-position: center;
  padding: 1.5rem;
}
.login-shell { width: min(100%, 1280px); height: min(820px, calc(100vh - 48px)); min-height: min(650px, calc(100vh - 48px)); display: grid; grid-template-columns: 52% 48%; overflow: hidden; border-radius: 24px; background: #fff; box-shadow: 0 18px 50px rgba(35, 72, 125, .2); }
.login-welcome { display: flex; align-items: center; justify-content: center; padding: 3rem 2rem; color: #123c78; text-align: center; background-image: linear-gradient(rgba(219, 233, 255, .78), rgba(224, 238, 255, .84)), var(--login-background-image); background-size: cover; background-position: center; }
.welcome-content { max-width: 420px; }
.welcome-symbol { color: #f4aa31; font-size: 4.3rem; line-height: 1; margin-bottom: 1rem; text-shadow: 0 2px 0 #fff; }
.welcome-content h1 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.2rem, 4vw, 3rem); margin: 0 0 .35rem; }
.welcome-content p { color: #536b8c; font-size: 1rem; margin-bottom: 1.25rem; }
.login-portraits { display: flex; align-items: flex-end; justify-content: center; gap: clamp(.35rem, 1vw, .85rem); height: clamp(180px, 22vw, 320px); margin: 0 auto 1.5rem; }
.login-portraits img { width: clamp(86px, 13.9vw, 200px); aspect-ratio: 5 / 7; height: auto; object-fit: cover; border: 4px solid #fff; border-radius: 20px; box-shadow: 0 10px 22px rgba(35, 85, 155, .28); }
.login-portraits img:nth-child(2) { width: clamp(100px, 16vw, 230px); aspect-ratio: 23 / 32; }
.welcome-content blockquote { margin: 0; color: #234a82; font-size: .93rem; line-height: 1.55; }
.login-disclaimer { margin: 1rem auto 0; max-width: 430px; color: #6d7f99; font-size: .68rem; line-height: 1.5; }
.welcome-content cite { display: block; margin-top: .7rem; color: #6b96d1; font-style: normal; }
.login-card {
  width: 100%;
  background: #fff !important;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  display: flex;
  align-items: center;
}
.login-card .card-body {
  width: 100%;
  padding: 3.25rem clamp(2rem, 5vw, 3rem) !important;
}
.login-card h2 { color: #123c78; text-align: center; font-size: 1.65rem; margin: .5rem 0 .25rem; }
.login-subtitle { color: #71809a; text-align: center; margin-bottom: 2.5rem; font-size: .92rem; }
.login-card .form-label { color: #183761; font-size: .8rem; font-weight: 700; margin-bottom: .45rem; }
.login-card .mb-3 { margin-bottom: 1.35rem !important; }
.login-field .input-group { border: 1px solid #d9e0eb; border-radius: 8px; overflow: hidden; }
.login-card .form-control,
.login-card .input-group-text {
  min-height: 45px;
  background: #fff;
  border: 0;
  color: #183761;
  font-size: .88rem;
}
.login-card .input-group-text {
  color: #244d84;
  padding-right: .3rem;
}
.login-card .form-control::placeholder {
  color: #8290a5;
}
.login-card .form-control:focus {
  background: #fff;
  color: #183761;
  box-shadow: none;
}
.login-field .input-group:focus-within { border-color: #2777df; box-shadow: 0 0 0 3px rgba(39, 119, 223, .12); }
.captcha-code { color: #1769d2 !important; font-size: 1.35rem !important; font-weight: 800; letter-spacing: .35rem; min-width: 135px; justify-content: center; background: #fbfdff !important; }
.login-password-toggle {
  min-height: 45px;
  background: #fff;
  border: 0;
  color: #244d84;
}
.login-password-toggle:hover,
.login-password-toggle:focus {
  background: #fff;
  color: #1769d2;
}
.login-remember { color: #183761; font-size: .78rem; font-weight: 600; }
.login-remember .form-check-input { margin-top: .16rem; }
.login-forgot { float: right; color: #2877d8; font-weight: 700; cursor: default; }
.login-card .btn-primary {
  min-height: 44px;
  font-size: .92rem;
  font-weight: 700;
  background: #1769d2;
  border-color: #1769d2;
  border-radius: 8px;
}
.login-logo {
  display: block;
  width: 68px;
  height: 68px;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto .5rem;
}
.login-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: .55rem; color: #9aa5b7; font-size: .75rem; margin-top: 2rem; }
.login-footer small { width: 100%; text-align: center; margin-top: .65rem; }
@media (max-width: 1100px) and (min-width: 768px) {
  .login-wrapper { padding: 1rem; }
  .login-card .card-body { padding: 2rem clamp(1.25rem, 3vw, 2.5rem) !important; }
  .login-subtitle { margin-bottom: 1.6rem; }
  .login-card .mb-3 { margin-bottom: .95rem !important; }
  .login-portraits { margin-bottom: 1rem; }
  .login-portraits img { border-width: 3px; border-radius: 16px; }
}
@media (max-width: 767px) {
  .login-wrapper {
    padding: .8rem;
  }
  .login-shell { display: block; width: 100%; height: auto; min-height: 0; border-radius: 16px; }
  .login-welcome { min-height: 245px; padding: 2rem 1rem 1.5rem; }
  .welcome-content p { margin-bottom: 1rem; }
  .login-portraits { height: auto; gap: .35rem; margin-bottom: 1rem; }
  .login-portraits img { width: 28%; height: auto; border-width: 2px; border-radius: 10px; }
  .login-portraits img:nth-child(2) { width: 32%; height: auto; }
  .welcome-symbol { font-size: 3rem; margin-bottom: .5rem; }
  .welcome-content h1 { font-size: 2.15rem; }
  .login-card .card-body { padding: 2rem 1.35rem !important; }
}
table.table thead {
  background-color: #eef1f8;
}
@media (max-width: 991px) {
  .app-sidebar {
    position: fixed;
    z-index: 1040;
    top: 56px;
    bottom: 0;
    height: calc(100vh - 56px);
    max-height: calc(100vh - 56px);
    margin-left: calc(-1 * var(--sidebar-width));
  }
  .app-sidebar.show {
    margin-left: 0;
  }
}

.landing-page {
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 42%, #ffffff 100%);
  color: var(--text-color);
}

.landing-nav {
  background: rgba(25, 35, 70, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.landing-nav .navbar-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5ea2ff, #2b3a67);
  color: white;
  border-radius: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(46, 93, 198, 0.35);
}

.landing-hero {
  padding: 90px 0 60px;
  background: radial-gradient(circle at top left, rgba(78,140,255,0.18), transparent 30%),
              linear-gradient(135deg, #15213f 0%, #243b72 46%, #1b2547 100%);
  color: white;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 14px;
  border-radius: 999px;
  color: #dfeeff;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.landing-hero h1 {
  font-size: clamp(2.5rem, 4vw, 4.4rem);
  line-height: 1.08;
  font-weight: 800;
  margin-bottom: 18px;
}

.landing-hero .lead {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 620px;
  color: rgba(255,255,255,0.8);
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-points {
  margin-top: 28px;
  display: grid;
  gap: 12px;
  color: rgba(255,255,255,0.9);
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.hero-points i {
  color: #7df0d3;
}

.dashboard-preview {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 55px rgba(5, 16, 46, 0.42);
  border-radius: 20px;
  overflow: hidden;
}

.preview-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(8, 14, 32, 0.35);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red { background: #ff6b6b; }
.dot.yellow { background: #ffc857; }
.dot.green { background: #3ddc97; }

.preview-body {
  padding: 20px;
}

.mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.mini-stat {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 15px;
}

.mini-stat small {
  display: block;
  color: rgba(255,255,255,0.73);
  margin-bottom: 6px;
}

.mini-stat strong {
  font-size: 1.45rem;
  color: #fff;
}

.chart-card, .table-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 16px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: rgba(255,255,255,0.82);
  font-size: 0.9rem;
}

.trend {
  color: #7df0d3;
  font-weight: 700;
}

.bars {
  height: 120px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding-top: 10px;
}

.bars span {
  display: block;
  flex: 1;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #7fb4ff, #4e8cff);
  box-shadow: 0 12px 24px rgba(78, 140, 255, 0.35);
}

.table-card {
  margin-top: 16px;
}

.table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
}

.table-row:last-child {
  border-bottom: none;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status.paid { background: rgba(61,220,151,0.18); color: #7df0d3; }
.status.draft { background: rgba(255,200,87,0.18); color: #ffd36d; }
.status.pending { background: rgba(155,162,255,0.18); color: #cdd5ff; }

.feature-section,
.process-section {
  padding: 90px 0;
}

.team-section {
  padding: 76px 0 84px;
  background: #ffffff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.team-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}

.team-intro h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
}

.team-intro p {
  max-width: 410px;
  margin: 0 0 2px;
  color: var(--muted);
  line-height: 1.7;
}

.team-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 112px;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--brand-accent-2);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.05);
}

.team-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #99f6e4);
  color: var(--brand-dark);
  font-size: 1.7rem;
  font-weight: 800;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 1.08rem;
  font-weight: 750;
}

.team-role {
  color: var(--brand-accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.team-role i {
  color: var(--brand-accent-2);
}

.section-heading {
  margin-bottom: 42px;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--brand-accent);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  color: var(--brand-dark);
  margin: 0;
}

.feature-card,
.step-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: 0 14px 28px rgba(31, 41, 55, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.12);
  height: 100%;
}

.icon-box {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(78,140,255,0.14), rgba(0,194,168,0.18));
  color: var(--brand-color);
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.feature-card h4,
.step-card h4 {
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--brand-dark);
}

.feature-card p,
.step-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.step-card {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.step-number {
  display: inline-block;
  margin-bottom: 16px;
  padding: 7px 12px;
  background: var(--brand-light);
  border-radius: 999px;
  color: var(--brand-color);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.cta-section {
  padding: 0 0 90px;
}

.cta-box {
  background: linear-gradient(135deg, #1d2d5f, #2b3a67, #2c5fce);
  border-radius: 26px;
  padding: 34px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 20px 40px rgba(28, 46, 96, 0.25);
}

.cta-box h3 {
  margin: 6px 0 0;
  color: #fff;
  font-weight: 700;
}

.text-white {
  color: #fff !important;
}

.landing-footer {
  padding: 24px 0 42px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 991px) {
  .landing-hero {
    padding-top: 72px;
  }

  .cta-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .team-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 575px) {
  .landing-hero h1 {
    font-size: 2.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .mini-stat-grid {
    grid-template-columns: 1fr;
  }
}

/* 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);
  }
}
