:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1b2430;
  --muted: #5e6b7a;
  --line: #e5e8ee;
  --primary: #133b5c;
  --accent: #f08a24;
  --shadow: 0 16px 40px rgba(19, 59, 92, 0.08);
  --radius: 20px;
  --whatsapp: #25d366;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.hidden { display: none !important; }

.login-corner {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 60;
}
.login-corner-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.95);
  color: var(--primary);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.login-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 20px;
}
.login-modal.open { display: flex; }
.login-panel {
  position: relative;
  width: min(440px, 100%);
  background: white;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 28px 70px rgba(0,0,0,.22);
}
.login-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
  font-size: 24px;
}
.login-panel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.login-panel-brand img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: white;
  padding: 6px;
}
.login-panel-brand strong { display: block; }
.login-panel-brand span { color: var(--muted); font-size: 14px; }
.login-panel h2 { margin: 0 0 8px; }
.login-panel p { color: var(--muted); margin: 0 0 18px; }
.login-form {
  display: grid;
  gap: 10px;
}
.login-form label,
.doc-field label,
.doc-meta-box label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}
.login-form input,
.doc-field input,
.doc-meta-box input,
.doc-textarea,
.doc-table input,
.doc-table textarea,
.doc-table select,
.summary-edit input {
  width: 100%;
  border: 1px solid #cfd7e3;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: white;
}
.login-error { color: #b42318; min-height: 18px; }
.login-help { margin-top: 12px; color: var(--muted); font-size: 13px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(229,232,238,0.8);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand strong { display: block; font-size: 15px; }
.brand span { display: block; font-size: 12px; color: var(--muted); }
.brand-logo {
  width: 94px;
  height: 94px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: white;
  padding: 6px;
  box-shadow: var(--shadow);
}

.menu {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.2s ease;
  border: 0;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow);
}
.btn-secondary {
  background: white;
  border: 1px solid var(--line);
}

.hero {
  padding: 72px 0 40px;
  background:
    radial-gradient(circle at top right, rgba(240, 138, 36, 0.12), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}
.eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
}
.hero h1, .section h2, .cta h2 {
  margin: 12px 0 16px;
  line-height: 1.05;
  font-size: clamp(34px, 4vw, 56px);
}
.lead, .section-head p, .about-grid p, .cta p, .footer p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin: 28px 0 22px;
  flex-wrap: wrap;
}
.badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.badges span {
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}
.hero-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.image-panel {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  min-height: 360px;
}
.image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-panel figcaption,
.work-pair figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(19, 59, 92, 0.86);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
}

.stats { padding: 14px 0 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stats article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  text-align: center;
}
.stats strong { display: block; font-size: 28px; margin-bottom: 8px; }
.stats span { color: var(--muted); }

.section { padding: 84px 0; }
.section.alt { background: #ffffff; }
.section-head {
  max-width: 760px;
  margin-bottom: 32px;
}
.section h2 { font-size: clamp(28px, 3vw, 44px); }
.cards-grid, .gallery-grid, .social-grid {
  display: grid;
  gap: 22px;
}
.cards-grid { grid-template-columns: repeat(3, 1fr); }
.real-work-grid { grid-template-columns: repeat(2, 1fr); }
.social-grid { grid-template-columns: repeat(3, 1fr); }
.card, .gallery-card, .social-card, .quote-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h3, .gallery-card h3 { margin-top: 0; margin-bottom: 10px; }
.card p, .gallery-card p, .social-card span { color: var(--muted); line-height: 1.6; }

.work-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.work-pair figure,
.single-work figure,
.logo-card figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #eef2f6;
}
.work-pair img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.single-work img,
.logo-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 16px;
}
.logo-card img {
  object-fit: contain;
  background: #fff;
  padding: 14px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 24px;
  align-items: center;
}
.check-list {
  padding-left: 18px;
  color: var(--text);
  line-height: 1.9;
}
.quote-box {
  background: linear-gradient(180deg, #133b5c, #1f4f78);
  color: white;
}
.quote-box p { color: white; font-size: 24px; line-height: 1.5; }
.quote-box span { opacity: 0.84; }
.social-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}
.social-card:hover { transform: translateY(-2px); }
.cta {
  padding: 84px 0;
}
.cta-box {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 26px;
  background: linear-gradient(180deg, #0f2e47, #133b5c);
  color: white;
  border-radius: 28px;
  padding: 34px;
  box-shadow: var(--shadow);
}
.cta p { color: rgba(255,255,255,0.82); }
.contact-form {
  display: grid;
  gap: 14px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 15px 16px;
  font: inherit;
}
.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}
.contact-form small { color: rgba(255,255,255,0.75); }
.footer {
  padding: 26px 0 40px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--whatsapp);
  color: white;
  padding: 14px 18px;
  border-radius: 999px;
  box-shadow: 0 18px 45px rgba(37, 211, 102, 0.35);
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(37, 211, 102, 0.42);
}
.whatsapp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 18px;
}
.whatsapp-text {
  line-height: 1;
}

.private-app {
  min-height: 100vh;
  background: linear-gradient(180deg, #eff3f8 0%, #f7f8fa 100%);
}
.private-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.private-header-inner,
.private-main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}
.private-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0 12px;
}
.private-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.private-brand img {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px;
  box-shadow: var(--shadow);
}
.private-brand strong { display: block; font-size: 18px; }
.private-brand span { color: var(--muted); }
.doc-tabs {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  gap: 12px;
  padding: 0 0 16px;
  flex-wrap: wrap;
}
.doc-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}
.doc-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.private-main {
  padding: 28px 0 36px;
}
.doc-screen { display: none; }
.doc-screen.active { display: block; }
.doc-page {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.doc-top {
  display: grid;
  grid-template-columns: 150px 1fr 220px;
  gap: 20px;
  align-items: center;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 18px;
}
.doc-logo-wrap {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-logo-wrap img {
  max-width: 120px;
  max-height: 100px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px;
}
.doc-title-wrap h1 {
  margin: 0 0 6px;
  font-size: 34px;
}
.doc-title-wrap p { margin: 0; color: var(--muted); }
.doc-meta-box {
  display: grid;
  gap: 8px;
  align-content: start;
}
.doc-grid.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.doc-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fcfcfd;
  padding: 18px;
}
.doc-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8edf3;
}
.doc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.doc-field.full { grid-column: 1 / -1; }
.doc-field.span-2 { grid-column: span 2; }
.doc-field.span-4 { grid-column: 1 / -1; }
.client-compact-fields {
  gap: 8px 10px;
}
.client-compact-fields label {
  font-size: 12px;
}
.client-compact-fields input {
  padding: 9px 10px;
}
.client-compact-8 {
  grid-template-columns: repeat(4, 1fr);
}
.client-compact-4 {
  grid-template-columns: repeat(4, 1fr);
}
.company-compact-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.company-compact {
  display: grid;
  gap: 8px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}
.company-compact p {
  margin: 0;
}
.company-compact strong {
  font-size: 17px;
}
.doc-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0 18px;
}
.doc-table-wrap { overflow-x: auto; }
.doc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}
.doc-table th,
.doc-table td {
  border: 1px solid #d8e0ea;
  padding: 10px;
  vertical-align: top;
}
.doc-table th {
  background: #0f172a;
  color: white;
  text-align: left;
  font-size: 14px;
}
.doc-table textarea {
  min-height: 70px;
  resize: none;
  overflow: hidden;
}
.align-right { text-align: right; }
.remove-line-btn {
  width: 100%;
  border: 0;
  background: #b42318;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}
.doc-summary {
  width: min(380px, 100%);
  margin: 22px 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.summary-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #e8edf3;
}
.summary-row:last-child { border-bottom: 0; }
.summary-edit { grid-template-columns: 1fr 110px; }
.summary-total {
  background: #0f172a;
  color: white;
  font-size: 18px;
}
.doc-textarea.large-area {
  min-height: 220px;
  resize: vertical;
}
.bottom-notes { margin-top: 24px; }

@page {
  size: A4;
  margin: 8mm;
}


.finance-section {
  padding-top: 34px;
}
.finance-box {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: center;
  background: linear-gradient(135deg, #0a4b8f 0%, #1f69b3 55%, #0f2e47 100%);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
  color: white;
  overflow: hidden;
}
.finance-logo-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 24px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
}
.finance-logo-card img {
  width: 100%;
  max-width: 220px;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}
.finance-content h2 {
  margin: 10px 0 12px;
  font-size: clamp(28px, 3vw, 44px);
  color: white;
}
.finance-content p {
  color: rgba(255,255,255,0.88);
  font-size: 17px;
  line-height: 1.7;
  max-width: 720px;
}
.finance-content .btn {
  margin-top: 10px;
}
@media print {
  .finance-section {
    display: none !important;
  }
}

@media print {
  html, body {
    background: #fff !important;
    color: #000;
    font-size: 11px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .login-corner, .login-modal, .private-header, .doc-toolbar, .remove-line-btn, .whatsapp-float {
    display: none !important;
  }

  .private-app {
    background: #fff !important;
    min-height: auto;
  }

  .private-main {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .doc-screen {
    display: none !important;
  }

  .doc-screen.active {
    display: block !important;
  }

  .doc-page {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    break-inside: avoid;
  }

  .doc-top {
    grid-template-columns: 70px 1fr 210px;
    gap: 10px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #0f172a;
    align-items: center;
  }

  .doc-logo-wrap {
    min-height: auto;
  }

  .doc-logo-wrap img {
    max-width: 60px;
    max-height: 46px;
    padding: 2px;
    border-radius: 6px;
  }

  .doc-title-wrap h1 {
    font-size: 18px;
    line-height: 1.05;
    margin: 0 0 2px;
  }

  .doc-title-wrap p {
    font-size: 10px;
    margin: 0;
  }

  .doc-meta-box {
    grid-template-columns: 1fr 1fr;
    gap: 6px 8px;
    align-items: end;
  }

  .doc-meta-box label,
  .doc-field label {
    font-size: 9px;
    margin-bottom: 2px;
  }

  .doc-meta-box input,
  .doc-field input,
  .doc-textarea,
  .doc-table input,
  .doc-table textarea,
  .doc-table select,
  .summary-edit input {
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 10px;
    line-height: 1.2;
  }

  .doc-grid.two-cols {
    gap: 10px;
    margin-top: 10px;
    break-inside: avoid;
  }

  .doc-card {
    padding: 8px 10px;
    border-radius: 10px;
    break-inside: avoid;
  }

  .doc-card h3 {
    font-size: 12px;
    margin: 0 0 6px;
    padding-bottom: 4px;
  }

  .company-compact {
    gap: 3px;
    font-size: 10px;
    line-height: 1.25;
  }

  .company-compact strong {
    font-size: 11px;
  }

  .doc-fields {
    gap: 6px 8px;
  }

  .doc-field.full {
    grid-column: 1 / -1;
  }

  .doc-field.span-2 {
    grid-column: span 2;
  }

  .doc-field.span-4 {
    grid-column: 1 / -1;
  }

  .client-compact-fields {
    gap: 4px 6px;
  }

  .client-compact-fields label {
    font-size: 8.5px;
  }

  .client-compact-fields input {
    padding: 4px 6px;
    font-size: 9px;
  }

  .doc-table {
    min-width: 0;
    table-layout: fixed;
  }

  .doc-table th,
  .doc-table td {
    padding: 5px 6px;
    font-size: 9.5px;
  }

  .doc-table th {
    font-size: 9.5px;
  }

  .doc-table textarea {
    min-height: 34px;
    resize: none;
    overflow: hidden;
  }

  .doc-summary {
    width: 260px;
    margin-top: 10px;
    border-radius: 10px;
  }

  .summary-row {
    padding: 7px 9px;
    gap: 8px;
    font-size: 10px;
  }

  .summary-total {
    font-size: 12px;
  }

  .bottom-notes {
    margin-top: 10px;
  }

  .doc-textarea.large-area {
    min-height: 82px;
  }

  .doc-card:last-child,
  .bottom-notes .doc-card {
    break-inside: avoid;
  }
}

@media (max-width: 980px) {
  .menu { display: none; }
  .hero-grid, .about-grid, .cta-box, .cards-grid, .real-work-grid, .social-grid, .stats-grid,
  .doc-grid.two-cols, .doc-top, .finance-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav { min-height: 70px; }
  .brand span, .topbar .btn { display: none; }
  .brand-logo { width: 60px; height: 60px; }
  .hero { padding-top: 42px; }
  .hero-split, .work-pair, .doc-fields, .client-compact-8, .client-compact-4 { grid-template-columns: 1fr; }
  .doc-field.span-2, .doc-field.span-4 { grid-column: 1 / -1; }
  .image-panel { min-height: 220px; }
  .footer-grid { flex-direction: column; }
  .whatsapp-float {
    right: 16px;
    bottom: 16px;
    padding: 14px;
  }
  .whatsapp-text { display: none; }
  .login-corner { top: 10px; left: 10px; }
}
