:root {
  --primary: #0D47A1;
  --primary-dark: #0A3A84;
  --primary-light: #1565C0;
  --accent: #FF6F00;
  --accent-light: #FF8F00;
  --dark: #1a1a2e;
  --gray-900: #212121;
  --gray-700: #616161;
  --gray-500: #9E9E9E;
  --gray-300: #E0E0E0;
  --gray-100: #F5F5F5;
  --white: #FFFFFF;
  --success: #2E7D32;
  --warning: #F9A825;
  --danger: #C62828;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gray-900);
  line-height: 1.6;
  background: var(--white);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Header */
.header {
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: var(--primary);
  color: var(--white);
  font-size: 0.85rem;
  padding: 6px 0;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.header-top a {
  color: var(--white);
  opacity: 0.9;
  transition: var(--transition);
}

.header-top a:hover { opacity: 1; }

.header-top-left,
.header-top-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-main {
  padding: 12px 0;
}

.header-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 1.2rem;
}

.logo-text h1, .logo-text .logo-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.7rem;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.nav { display: flex; align-items: center; gap: 4px; }

.nav a {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--gray-700);
  transition: var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(13, 71, 161, 0.06);
}

.nav-cta {
  background: var(--accent) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--accent-light) !important;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-900);
  padding: 8px;
}

/* Hero */
.hero {
  background: linear-gradient(90deg, rgba(9,26,74,0.88) 0%, rgba(9,26,74,0.55) 45%, rgba(9,26,74,0.15) 75%), url('../images/hero/hero-home.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.02);
  border-radius: 50%;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Tracking Box in Hero */
.hero-tracking {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 40px;
}

.hero-tracking h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tracking-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tracking-input-group input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.tracking-input-group input::placeholder {
  color: rgba(255,255,255,0.6);
}

.tracking-input-group input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.2);
}

.hero-tracking .btn {
  width: 100%;
}

.tracking-hint {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 111, 0, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

.btn-secondary {
  background: var(--primary);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--primary);
}

.btn-white:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover {
  background: #1f5a23;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

/* Stats Bar */
.stats-bar {
  background: var(--white);
  padding: 40px 0;
  border-bottom: 1px solid var(--gray-300);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-item p {
  color: var(--gray-700);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-dark { background: var(--gray-100); }

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--gray-700);
  max-width: 600px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  background: rgba(13, 71, 161, 0.08);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--white);
  border-radius: 12px;
  padding: 36px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--gray-300);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: rgba(13, 71, 161, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--gray-900);
}

.service-card p {
  color: var(--gray-700);
  font-size: 0.95rem;
  line-height: 1.7;
}

.service-card .learn-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.service-card .learn-more:hover {
  gap: 10px;
}

/* How It Works */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step-card {
  text-align: center;
  padding: 30px 20px;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 auto 20px;
}

.step-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.step-card p {
  color: var(--gray-700);
  font-size: 0.9rem;
}

/* Tracking Page */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 50px 0;
  text-align: center;
}

.page-hero h1, .page-hero h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.page-hero p {
  opacity: 0.9;
  font-size: 1.1rem;
}

.page-hero.hero-about,
.page-hero.hero-services,
.page-hero.hero-products {
  background-size: cover;
  background-position: center;
  padding: 90px 0;
}

.page-hero.hero-about {
  background-image: linear-gradient(rgba(9,26,74,0.7), rgba(9,26,74,0.7)), url('../images/hero/hero-about.jpg');
}

.page-hero.hero-services {
  background-image: linear-gradient(rgba(9,26,74,0.7), rgba(9,26,74,0.7)), url('../images/hero/hero-services.jpg');
}


.page-hero.hero-products {
  background-image: linear-gradient(rgba(9,26,74,0.7), rgba(9,26,74,0.7)), url('../images/hero/hero-products.jpg');
}

.service-detail-img.sd-photo {
  background-size: cover;
  background-position: center;
  font-size: 0;
}

.service-detail-img.sd-air { background: url('../images/services/service-airfreight.jpg') center/cover no-repeat; }
.service-detail-img.sd-customs { background: url('../images/services/service-customs.jpg') center/cover no-repeat; }
.service-detail-img.sd-sourcing { background: url('../images/services/service-sourcing.jpg') center/cover no-repeat; }
.service-detail-img.sd-sea { background: url('../images/services/service-seafreight.jpg') center/cover no-repeat; }
.service-detail-img.sd-warehouse { background: url('../images/services/service-warehousing.jpg') center/cover no-repeat; }
.service-detail-img.sd-delivery { background: url('../images/services/service-delivery.jpg') center/cover no-repeat; }

/* About page photo tiles */
.about-image.ab-photo { font-size: 0; }
.about-image.ab-story { background: url('../images/about/about-story.jpg') center/cover no-repeat; }
.about-image.ab-dhaka { background: url('../images/about/about-dhaka.jpg') center/cover no-repeat; }
.about-image.ab-shenzhen { background: url('../images/about/about-shenzhen.jpg') center/cover no-repeat; }

.track-section {
  padding: 60px 0;
}

.track-box {
  max-width: 700px;
  margin: 0 auto 40px;
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-300);
}

.track-box h2, .track-box h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  text-align: center;
}

.track-form {
  display: flex;
  gap: 12px;
}

.track-form input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.track-form input:focus {
  border-color: var(--primary);
}

/* Tracking Result */
.tracking-result {
  display: none;
  max-width: 800px;
  margin: 0 auto;
}

.tracking-result.active { display: block; }

.result-header {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  border: 1px solid var(--gray-300);
}

.result-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.shipment-id {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.status-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-in-transit {
  background: rgba(13, 71, 161, 0.1);
  color: var(--primary);
}

.status-delivered {
  background: rgba(46, 125, 50, 0.1);
  color: var(--success);
}

.status-pending {
  background: rgba(249, 168, 37, 0.1);
  color: var(--warning);
}

.status-customs {
  background: rgba(198, 40, 40, 0.1);
  color: var(--danger);
}

.result-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.detail-item label {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.detail-item span {
  font-weight: 600;
  color: var(--gray-900);
}

/* Tracking Timeline */
.tracking-timeline {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-300);
}

.tracking-timeline h3 {
  font-size: 1.2rem;
  margin-bottom: 24px;
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-300);
}

.timeline-item {
  position: relative;
  padding-bottom: 28px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gray-300);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--gray-300);
}

.timeline-item.completed .timeline-dot {
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success);
}

.timeline-item.current .timeline-dot {
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), 0 0 0 6px rgba(13, 71, 161, 0.2);
}

.timeline-item h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.timeline-item .timeline-date {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.timeline-item .timeline-desc {
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-top: 4px;
}

.timeline-item.pending h4,
.timeline-item.pending .timeline-desc {
  color: var(--gray-500);
}

.timeline-item .timeline-loc {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-top: 2px;
}

.up-hint {
  color: var(--gray-500);
  font-size: 0.9rem;
}

/* "Request a pickup" hint under the tracking box */
.track-pickup-note {
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--gray-700);
}

.track-pickup-note a {
  color: var(--primary);
  font-weight: 700;
}

/* Notification toasts (fired on shipment create / update / received) */
.notify-toasts {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.notify-toast {
  position: relative;
  background: var(--white);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 38px 14px 16px;
  font-size: 0.9rem;
  color: var(--gray-900);
  animation: notifyIn 0.25s ease;
}

.notify-toast.notify-ok { border-left-color: var(--success); }
.notify-toast.notify-warn { border-left-color: var(--warning); }
.notify-toast.notify-draft { border-left-color: var(--primary); }

.notify-toast span { display: block; line-height: 1.4; }

.notify-toast-action {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  color: var(--primary);
}

.notify-toast-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0 2px;
}

.notify-toast-close:hover { color: var(--gray-900); }

@keyframes notifyIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bulk-update bar (admin shipments table) */
.bulk-bar {
  background: rgba(13,71,161,0.05);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.bulk-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.bulk-bar-head strong { font-size: 1rem; color: var(--primary); }

.bulk-bar-hint {
  color: var(--gray-700);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.ship-check,
#shipSelectAll { width: 16px; height: 16px; cursor: pointer; }

/* Why Choose Us */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--gray-300);
  transition: var(--transition);
}

.feature-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.feature-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: rgba(13, 71, 161, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.feature-item h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.feature-item p {
  color: var(--gray-700);
  font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* About Page */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--gray-900);
}

.about-text p {
  color: var(--gray-700);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-image {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 16px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 4rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.value-card {
  text-align: center;
  padding: 36px 24px;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--gray-300);
}

.value-card .icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.value-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.value-card p {
  color: var(--gray-700);
  font-size: 0.9rem;
}

/* Services Page */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  padding: 50px 0;
  border-bottom: 1px solid var(--gray-300);
}

.service-detail:nth-child(even) {
  direction: rtl;
}

.service-detail:nth-child(even) > * {
  direction: ltr;
}

.service-detail:last-child { border-bottom: none; }

.service-detail-img {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 16px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.service-detail-content h3 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.service-detail-content p {
  color: var(--gray-700);
  margin-bottom: 16px;
  line-height: 1.8;
}

.service-detail-content ul {
  list-style: none;
  margin-bottom: 20px;
}

.service-detail-content ul li {
  padding: 6px 0;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-detail-content ul li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}

/* Contact Page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info { padding: 20px 0; }

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-300);
}

.contact-item:last-child { border-bottom: none; }

.contact-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: rgba(13, 71, 161, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-item h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.contact-item p {
  color: var(--gray-700);
  font-size: 0.9rem;
}

.contact-form {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-300);
}

.contact-form h3 {
  font-size: 1.3rem;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--gray-900);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* FAQ Page */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover { border-color: var(--primary); }

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  color: var(--gray-900);
}

.faq-question .arrow {
  transition: var(--transition);
  font-size: 1.2rem;
  color: var(--gray-500);
}

.faq-item.active .faq-question .arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-content {
  padding: 0 24px 20px;
  color: var(--gray-700);
  line-height: 1.8;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* Quote Page */
.quote-section {
  padding: 60px 0;
}

.quote-form-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  padding: 50px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-300);
}

.quote-form-wrapper h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.quote-form-wrapper > p {
  color: var(--gray-700);
  margin-bottom: 30px;
}

.form-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 30px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gray-100);
}

/* Pricing Estimate */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.pricing-card {
  background: var(--white);
  border-radius: 12px;
  padding: 36px;
  text-align: center;
  border: 2px solid var(--gray-300);
  transition: var(--transition);
}

.pricing-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: var(--accent);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--white);
  padding: 4px 16px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pricing-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.pricing-card .price-note {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 20px;
}

.pricing-card ul { margin-bottom: 24px; }

.pricing-card ul li {
  padding: 8px 0;
  color: var(--gray-700);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-100);
}

/* Footer */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul li a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 12px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 0.9rem;
}

.social-links a:hover {
  background: var(--accent);
  color: var(--white);
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.6rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: var(--transition);
  cursor: pointer;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.testimonial-card {
  background: var(--white);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow);
}

.testimonial-card .stars {
  color: var(--accent);
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.testimonial-card p {
  color: var(--gray-700);
  font-style: italic;
  margin-bottom: 16px;
  line-height: 1.7;
}

.testimonial-card .author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-card .avatar {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
}

.testimonial-card .author-info h4 {
  font-size: 0.95rem;
}

.testimonial-card .author-info span {
  font-size: 0.8rem;
  color: var(--gray-500);
}
/* Admin */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--dark);
  padding: 24px;
  color: var(--white);
}

.admin-sidebar .logo {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar .logo h2 {
  font-size: 1.1rem;
  color: var(--white);
}

.admin-sidebar .logo span {
  font-size: 0.75rem;
  opacity: 0.6;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  margin-bottom: 4px;
  transition: var(--transition);
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.admin-main {
  background: var(--gray-100);
  padding: 30px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.admin-header h2 {
  font-size: 1.5rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.admin-stat-card {
  background: var(--white);
  padding: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.admin-stat-card .label {
  font-size: 0.85rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-stat-card .value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin: 4px 0;
}

.admin-stat-card .change {
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 600;
}

.admin-stat-card .change.down { color: var(--danger); }

/* Low-stock alert: highlight the Dashboard card when products need restocking */
.admin-stat-card.stat-low-alert { background: #fff8ec; box-shadow: inset 0 0 0 2px #f4c869, var(--shadow); }
.admin-stat-card.stat-low-alert .value,
.admin-stat-card.stat-low-alert .change { color: #9a6b00; }

.admin-table-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.admin-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-300);
}

.admin-table-header h3 { font-size: 1.1rem; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 12px 24px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-300);
}

.admin-table td {
  padding: 14px 24px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}

.admin-table tr:hover { background: var(--gray-100); }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-blue { background: rgba(13,71,161,0.1); color: var(--primary); }
.badge-green { background: rgba(46,125,50,0.1); color: var(--success); }
.badge-orange { background: rgba(255,111,0,0.1); color: var(--accent); }
.badge-red { background: rgba(198,40,40,0.1); color: var(--danger); }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .about-content { grid-template-columns: 1fr; }
  .service-detail { grid-template-columns: 1fr; }
  .service-detail:nth-child(even) { direction: ltr; }
  .contact-grid { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}


@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-lg);
  }
  .nav.active { display: flex; }
  .nav a { padding: 12px 16px; }
  .hero { padding: 50px 0; }
  .hero h1 { font-size: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; }
  .track-form { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-top { display: none; }
  .section { padding: 50px 0; }
  .section-header h2 { font-size: 1.8rem; }
  .quote-form-wrapper { padding: 30px 20px; }
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.2s; }
.fade-in:nth-child(4) { animation-delay: 0.3s; }

/* ===== Product Catalog ===== */
.catalog-intro { text-align: center; max-width: 720px; margin: 0 auto 32px; color: var(--gray-700); }
.catalog-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card { background: var(--white); border: 1px solid var(--gray-300); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-img { height: 180px; background: var(--gray-100); display: flex; align-items: center; justify-content: center; font-size: 3rem; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); font-weight: 700; margin-bottom: 6px; }
.product-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.product-card p { color: var(--gray-700); font-size: 0.9rem; flex: 1; margin: 0; }
.product-price { font-weight: 800; color: var(--gray-900); margin: 12px 0; }
.product-price-quote { color: var(--primary); font-weight: 700; font-size: 0.95rem; }
.product-card .btn { margin-top: auto; }
.catalog-empty { text-align: center; padding: 60px 20px; color: var(--gray-500); font-size: 1.05rem; }

/* Admin catalog helpers */
.cat-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--gray-100); border: 1px solid var(--gray-300); border-radius: 20px; padding: 6px 14px; margin: 0 8px 8px 0; font-size: 0.85rem; }
.cat-chip button { background: none; border: none; color: var(--danger); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0; }
.cat-chip button:hover { opacity: 0.7; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-form-grid .full { grid-column: 1 / -1; }

@media (max-width: 992px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .product-grid { grid-template-columns: 1fr; } .admin-form-grid { grid-template-columns: 1fr; } }

/* Product video embeds (public card) */
.product-video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 4px 0 14px; background: #000; border-radius: var(--radius); overflow: hidden; }
.product-video iframe, .product-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; object-fit: cover; }

/* Admin media inputs (URL or upload) */
.media-input-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.media-input-row input[type="text"] { flex: 1; min-width: 220px; }
.media-or { color: var(--gray-500); font-size: 0.85rem; }
.media-upload-btn { cursor: pointer; margin: 0; white-space: nowrap; }
.media-status { font-size: 0.82rem; margin-top: 6px; min-height: 1em; }

/* Product photo gallery (public card, e-commerce style) */
.product-gallery { display: flex; flex-direction: column; }
.product-main-img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--gray-100); }
.product-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; opacity: 0.65; transition: var(--transition); background: var(--white); }
.product-thumb:hover { opacity: 1; }
.product-thumb.active { border-color: var(--primary); opacity: 1; }

/* Admin multi-photo list */
.photo-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.photo-thumb { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--gray-300); background: var(--gray-100); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; padding: 0; border: none; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; font-size: 0.95rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.photo-thumb button:hover { background: var(--danger); }
.photo-count { flex-basis: 100%; font-size: 0.8rem; color: var(--gray-500); margin-top: 2px; }

/* ===========================================================================
   Invoices & Documents tool (admin)
   =========================================================================== */
/* Fields that only apply to certain document types (toggled via form class). */
.doc-quote-only, .doc-receipt-only, .doc-money-only { display: none; }
#docForm.kind-quote .doc-quote-only { display: block; }
#docForm.kind-receipt .doc-receipt-only { display: block; }
#docForm.kind-quote .doc-money-only,
#docForm.kind-invoice .doc-money-only { display: block; }
#docForm.kind-receipt #docItemsSection,
#docForm.kind-receipt #docTotalsArea { display: none; }

.doc-items-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.doc-items-table th { text-align: left; padding: 8px; background: var(--gray-100); border-bottom: 2px solid var(--gray-300); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--gray-700); white-space: nowrap; }
.doc-items-table td { padding: 6px 8px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.doc-items-table input { width: 100%; padding: 7px 8px; border: 1px solid var(--gray-300); border-radius: 6px; font-size: 0.88rem; font-family: inherit; }
.doc-items-table input:focus { outline: none; border-color: var(--primary); }
.doc-items-table input.num { text-align: right; }
.doc-line-amount { font-weight: 700; text-align: right; white-space: nowrap; color: var(--primary); }
.doc-line-del { background: none; border: none; color: var(--gray-500); cursor: pointer; font-size: 1.3rem; line-height: 1; padding: 0 4px; }
.doc-line-del:hover { color: var(--danger); }

.doc-totals { margin: 18px 0 0 auto; max-width: 360px; }
.doc-totals-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 0.92rem; gap: 12px; }
.doc-totals-row span { color: var(--gray-700); }
.doc-totals-row input { width: 120px; text-align: right; padding: 6px 8px; border: 1px solid var(--gray-300); border-radius: 6px; font-size: 0.9rem; font-family: inherit; }
.doc-totals-row input.pct { width: 56px; }
.doc-totals-row.grand { border-top: 2px solid var(--gray-300); margin-top: 6px; padding-top: 12px; font-size: 1.15rem; font-weight: 800; }
.doc-totals-row.grand span, .doc-totals-row.grand strong { color: var(--primary); }

.doc-receipt-info { font-size: 0.9rem; color: var(--gray-700); padding: 10px 12px; background: var(--gray-100); border-radius: 8px; line-height: 1.5; }
.doc-receipt-info:empty { display: none; }
.doc-receipt-info .dri-muted { color: var(--gray-500); }
.doc-receipt-info .dri-warn { color: #b8860b; }
.doc-receipt-info .dri-paid { color: var(--success, #1a8a4a); }
.doc-receipt-info .dri-due { color: var(--primary); }
.doc-saved-summary { font-size: 0.9rem; color: var(--gray-700); background: var(--gray-100); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.doc-saved-summary:empty { display: none; }
.doc-saved-summary .dss-due { color: #9a6b00; font-weight: 700; }
.doc-saved-summary .dss-paid { color: #1a8a4a; font-weight: 700; }
.doc-saved-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--gray-200); border-radius: 8px; margin-bottom: 8px; }
.doc-saved-item .meta { font-size: 0.85rem; color: var(--gray-500); }
.doc-status { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; vertical-align: middle; margin-left: 6px; white-space: nowrap; }
.doc-status-paid { background: #e4f5ea; color: #1a8a4a; }
.doc-status-due { background: #fdf0d5; color: #9a6b00; }
.doc-status-unpaid { background: var(--gray-100); color: var(--gray-500); }

/* Product inventory database */
.inv-summary { font-size: 0.9rem; color: var(--gray-700); background: var(--gray-100); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.inv-summary:empty { display: none; }
.inv-summary .inv-low-txt { color: #9a6b00; font-weight: 700; }
.inv-sub { font-size: 0.78rem; color: var(--gray-500); margin-top: 2px; }
.inv-badge { display: inline-block; font-size: 0.74rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.inv-badge.inv-low { background: #fdf0d5; color: #9a6b00; }
.inv-badge.inv-out { background: #fde2e2; color: #b42318; }
.doc-item-prod { width: 100%; padding: 6px 8px; border: 1px solid var(--gray-300); border-radius: 6px; font-size: 0.85rem; background: #fff; }

/* Preview overlay */
.doc-preview { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 10000; display: none; overflow: auto; padding: 24px; }
.doc-preview.open { display: block; }
.doc-preview-bar { position: sticky; top: 0; display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-bottom: 16px; z-index: 1; }

/* The printable "paper" */
.doc-paper { background: #fff; width: 210mm; max-width: 100%; margin: 0 auto; padding: 16mm 15mm; box-shadow: 0 12px 48px rgba(0,0,0,0.35); color: #1a1a1a; font-size: 13px; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-paper * { box-sizing: border-box; }
.dp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 3px solid var(--primary); padding-bottom: 16px; }
.dp-brand { display: flex; align-items: center; gap: 12px; }
.dp-logo { width: 56px; height: 56px; object-fit: contain; }
.dp-co { font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: 0.5px; }
.dp-tag { font-size: 11px; color: #666; margin-top: 2px; }
.dp-meta { text-align: right; font-size: 12px; }
.dp-title { font-size: 22px; font-weight: 800; color: var(--primary); text-transform: uppercase; margin-bottom: 6px; }
.dp-meta div { margin-top: 2px; }
.dp-parties { display: flex; gap: 24px; margin-top: 18px; }
.dp-party { flex: 1; }
.dp-plabel { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 4px; font-weight: 700; }
.dp-pname { font-weight: 700; font-size: 14px; }
.dp-party div { margin-top: 1px; }
.dp-ref { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; padding: 10px 14px; background: rgba(13,71,161,0.06); border-radius: 8px; font-size: 12px; }
.dp-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 12.5px; }
.dp-table th { background: var(--primary); color: #fff; text-align: left; padding: 9px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; }
.dp-table td { padding: 9px 10px; border-bottom: 1px solid #e5e5e5; vertical-align: top; }
.dp-table .r { text-align: right; }
.dp-table tfoot th { background: var(--gray-100); color: #1a1a1a; border-top: 2px solid var(--primary); }
.dp-totals { margin: 16px 0 0 auto; max-width: 300px; }
.dp-trow { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.dp-trow.dp-grand { border-top: 2px solid var(--primary); margin-top: 6px; padding-top: 10px; font-size: 16px; font-weight: 800; color: var(--primary); }
.dp-notes { margin-top: 22px; padding: 12px 14px; background: var(--gray-100); border-radius: 8px; font-size: 12px; }
/* Payment Information + Terms (quotations & invoices) */
.dp-payterms { display: flex; flex-wrap: wrap; gap: 18px 24px; margin-top: 24px; }
.dp-payterms .dp-pay { flex: 1 1 200px; }
.dp-payterms .dp-terms { flex: 2 1 320px; }
.dp-block-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); font-weight: 800; border-bottom: 1.5px solid var(--primary); padding-bottom: 4px; margin-bottom: 8px; }
.dp-block-body { font-size: 12px; line-height: 1.55; color: #333; }
.dp-pay .dp-block-body { background: rgba(13,71,161,0.05); border-radius: 8px; padding: 10px 12px; }
.dp-foot { margin-top: 28px; border-top: 1px solid #ddd; padding-top: 12px; text-align: center; font-size: 11px; color: #666; }
.dp-foot-note { margin-top: 4px; font-style: italic; }
/* Money Receipt */
.dp-rcpt-line { margin-top: 20px; font-size: 14px; line-height: 1.6; }
.dp-receipt-amount { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; background: rgba(13,71,161,0.06); border: 1px solid rgba(13,71,161,0.25); border-radius: 10px; }
.dp-receipt-amount .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: #888; font-weight: 700; }
.dp-receipt-amount .method { font-size: 12px; color: #666; margin-top: 3px; }
.dp-receipt-amount .amt { font-size: 26px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.dp-rcpt-meta { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 14px; font-size: 12.5px; }
/* Auto-calculated balance against the linked invoice (Money Receipt) */
.dp-balance { margin: 20px 0 0 auto; max-width: 340px; border: 1px solid rgba(13,71,161,0.25); border-radius: 10px; padding: 10px 16px; }
.dp-brow { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 13px; }
.dp-brow span:last-child { white-space: nowrap; }
.dp-brow.dp-bgrand { border-top: 2px solid var(--primary); margin-top: 5px; padding-top: 9px; font-size: 16px; font-weight: 800; color: var(--primary); }
.dp-sign { margin-top: 52px; display: flex; justify-content: flex-end; }
.dp-sign-box { text-align: center; font-size: 12px; color: #555; }
.dp-sign-line { width: 210px; border-top: 1px solid #555; margin-bottom: 5px; }

@media print {
  body > *:not(#docPreview) { display: none !important; }
  #docPreview { position: static !important; display: block !important; inset: auto; background: #fff; padding: 0; overflow: visible; }
  .doc-preview-bar { display: none !important; }
  .doc-paper { box-shadow: none !important; width: auto !important; max-width: none !important; margin: 0 !important; padding: 8mm 4mm !important; }
}

/* Screen-reader-only heading: fixes document heading-order (H1->H2->H3) for
   sections whose visible title is styled at H3/H4 by its own component class
   (e.g. .service-card h3), without changing any visible tag or style. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
