:root {
  --color-primary: #1d9ae1;
  --bg: #f5f7fa;
  --card-bg: #ffffff;
  --text: #1f2d3a;
  --radius: 12px;
  --shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.08);
  --spacing: 1rem;
  --transition: 0.3s cubic-bezier(0.4, 0.2, 0.2, 1);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --card-bg: #1f2d4a;
  --text: #d9e3fa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition:
    background var(--transition),
    color var(--transition);
}

/* Hide burger on desktop */
.mobile-menu-button {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

.container2 {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  max-width: 1250px;
  margin: 0 auto;
}

.container3 {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.75rem 0;
  max-width: 1250px;
  margin: 0 auto;
}

/* Mobile view */
@media (max-width: 1188px) {
  .nav {
    display: none;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    position: absolute;
    top: 70px; /* just below header */
    left: -35px;
    width: 100%;
    padding: 1rem;
    box-shadow: var(--shadow);
    border-radius: 0px !important;
    z-index: 999;
  }

  .nav.open {
    display: flex;
  }

  .actions {
    display: none; /* hide top-right buttons on mobile */
  }

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  /* Center logo + menu in mobile */
  .container2 {
    padding: 10px 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}


.container {
  max-width: 1350px;
  padding: 0 1rem;
  margin: 0 auto;
}

.site-header {
  background: rgba(255, 255, 255, 0.9);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .site-header {
  background: rgba(31, 45, 74, 0.9);
  border-color: rgba(255, 255, 255, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.nav {
  margin-left: 2rem;
  display: flex;
  gap: 1rem;
  flex: 1;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}

.nav a::after {
  content: "";
  position: absolute;
  height: 2px;
  width: 0;
  background: var(--color-primary);
  left: 0;
  bottom: -2px;
  transition: width var(--transition);
}

.nav a:hover::after {
  width: 100%;
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: all var(--transition);
}

.btn.primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 25px -5px rgba(29, 154, 225, 0.45);
}

.btn.primary:hover {
  filter: brightness(1.05);
}

.btn.outline,
.btn.outline:link {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn.large {
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
}

.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
}

.hero-inner {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1 1 400px;
  max-width: 600px;
}

.hero-text h1 {
  font-size: 2.75rem;
  margin: 0 0 0.75rem;
  line-height: 1.1;
}

.hero-text p {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  /* color: rgba(31,45,58,0.85); */
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.hero-illustration {
  flex: 1 1 350px;
  display: flex;
  justify-content: center;
}

.illustration-box {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
  font-family: monospace;
  font-size: 0.7rem;
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-flow {
  padding: 3.5rem 0 1rem;
}

.flow-cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.flow-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  flex: 1 1 240px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  position: relative;
  min-width: 200px;
  align-items: flex-start;
}

.flow-icon {
  flex-shrink: 0;
  background: rgba(29, 154, 225, 0.08);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.flow-content h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.flow-content p {
  margin: 0;
  font-size: 0.9rem;
  /* color: rgba(31,45,58,0.75); */
}

.clients {
  padding: 3rem 0 1rem;
}

.section-title {
  font-size: 2rem;
  margin: 0 0 0.25rem;
  font-weight: 600;
}

.section-sub {
  margin: 0 0 1.5rem;
  /* color: rgba(31,45,58,0.7); */
}

.client-logos {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  align-items: center;
}

.logo-wrapper {
  background: rgba(0, 0, 0, 0.03);
  padding: 8px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  min-width: 120px;
  justify-content: center;
}

.feature-cards {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  flex: 1 1 260px;
  box-shadow: var(--shadow);
  position: relative;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card .icon {
  font-size: 1.75rem;
}

.testimonial-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.testimonial-grid.second-row {
  justify-content: center;
  grid-template-columns: repeat(2, minmax(280px, 360px));
  margin-top: 1.75rem;
}

.testimonial {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem 1rem 1.25rem;
  position: relative;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.avatar-wrapper {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 4px;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: block;
}

.testimonial .content {
  margin-top: 20px;
  /* leave space for overlapping avatar */
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.stars {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.star {
  color: #ffb400;
  font-size: 1.1rem;
  margin: 0 2px;
}

.quote {
  margin: 0;
  font-style: italic;
  flex: 1;
  /* color: rgba(31,45,58,0.9); */
}

.author {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: end;
}

.author .name {
  font-weight: 700;
}

.pricing-cards {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.pricing .card {
  flex: 1 1 280px;
  position: relative;
}

.pricing .card.featured {
  border: 2px solid var(--color-primary);
}

.ribbon {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--color-primary);
  color: #fff;
  padding: 6px 12px;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pricing .price {
  font-size: 1.75rem;
  margin: 0.5rem 0;
  font-weight: 700;
}

.pricing ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.pricing ul li {
  margin: 0.35rem 0;
  position: relative;
  padding-left: 1.2rem;
}

.pricing ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.9rem;
  color: var(--color-primary);
}

.site-footer {
  padding: 3rem 0 1rem;
  background: var(--card-bg);
  margin-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .site-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1 1 220px;
  min-width: 180px;
}

.footer-col h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin: 0.5rem 0;
}

.footer-col a {
  text-decoration: none;
  color: var(--text);
}

.small-print {
  margin-top: 1.5rem;
  font-size: 0.8rem;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 50px;
  height: 50px;
  position: relative;
  overflow: hidden;
  padding: 0;
}

/* Sun */
.sun {
  position: absolute;
  width: 26px;
  height: 26px;
  background: yellow;
  border-radius: 50%;
  top: 12px;
  left: 12px;
  box-shadow: 0 0 15px rgba(255, 223, 0, 0.8);
  transition: all 0.5s ease-in-out;
}

/* Moon */
.moon {
  position: absolute;
  width: 26px;
  height: 26px;
  background: #f5f3ce;
  border-radius: 50%;
  top: 12px;
  left: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
  /* outer dark shadow */
  transition: all 0.5s ease-in-out;
}

/* Dark mode positions */
[data-theme="dark"] .sun {
  top: 60px;
  /* Move down out of view */
}

[data-theme="dark"] .moon {
  top: 12px;
  /* Slide in */
}

.clients {
  padding: 2rem 0;
}

.container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 1rem;
  /* text-align: center; */
}

.client-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.logo-wrapper {
  flex: 1 1 calc(25% - 2rem);
  /* 4 per row */
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 200px;
}

.logo-wrapper img {
  max-width: 100px;
  height: auto;
}

.section-container {
  margin: 50px 0px !important;
  padding: 0px !important;
}

@media (max-width: 768px) {
  .logo-wrapper {
    flex: 1 1 calc(50% - 2rem);
    /* 2 per row on tablets */
  }
}

@media (max-width: 480px) {
  .logo-wrapper {
    flex: 1 1 100%;
    /* 1 per row on small devices */
  }
}

@media (max-width: 1150px) {
  .hero-inner {
    flex-direction: column;
  }

  .hero-text {
    flex: 1 1 4px;
  }

  .nav {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  .hero-text h1 {
    font-size: 2.25rem;
  }

  .flow-cards {
    flex-direction: column;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-grid.second-row {
    grid-template-columns: 1fr;
  }

  .pricing-cards {
    flex-direction: column;
  }
}

/* Table-like layout */
.supplier-table {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.supplier-header,
.supplier-row {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
}

.supplier-header {
  font-weight: 600;
  background: rgba(29, 154, 225, 0.08);
}

.col {
  flex: 1;
}

.avatar-col {
  max-width: 80px;
}

.action-col {
  max-width: 100px;
  text-align: right;
}

.avatar {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.delete-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: opacity var(--transition);
}

.delete-btn:hover {
  opacity: 0.7;
}

/* Alert Box */
.alert-box {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333; /* visible on light and dark */
  color: #fff;      /* readable on #333 */
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  font-weight: 500;
  z-index: 55000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, top 0.3s ease;
}

.alert-box.show {
  opacity: 1;
  top: 40px;
  pointer-events: auto;
}

.hidden {
  display: none;
}

.search-bar {
  margin: 1rem 0 1.5rem 0;
  display: flex;
  justify-content: flex-start;
}

.search-bar input {
  width: 100%;
  max-width: 350px;
  padding: 0.6rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background: #f9f9f9;
  color: #111;
  transition: all 0.3s ease;
}

[data-theme="dark"] .search-bar input {
  background: #222;
  border: 1px solid #444;
  color: #fff;
}

.search-bar input:focus {
  outline: none;
  border-color: #1d9ae1;
  box-shadow: 0 0 0 2px rgba(29, 154, 225, 0.3);
}

.top-bar {
  margin: 1rem 0 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-btns button {
  margin-left: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: background 0.3s ease;
}

.invite-btn {
  background: #1d9ae1;
  color: #fff;
}

.invite-btn:hover {
  background: #0d7bbd;
}

.admin-btn {
  background: #eee;
  color: #111;
}

.admin-btn:hover {
  background: #ddd;
}

[data-theme="dark"] .admin-btn {
  background: #333;
  color: #fff;
}

[data-theme="dark"] .admin-btn:hover {
  background: #444;
}

/* Modal styling */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.6);
  z-index: 3000;
}

.modal.hidden { display: none; }
.modal.show { display: flex; }

/* Modal card */
.modal-content {
  background: #fff;
  color: #111;
  padding: 2rem;
  border-radius: 1rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: popIn 0.3s ease;
}

/* Dark theme support */
body.dark-mode .modal-content {
  background: #1e1e1e;
  color: #f5f5f5;
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.1);
}

/* Close button */
.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
}

.modal-content h3 {
  margin-bottom: 1rem;
}

.modal-content label {
  display: block;
  margin-top: 0.8rem;
  font-weight: 500;
}

/* Inputs */
.modal-content input {
  width: 100%;
  padding: 0.9rem 1rem;
  margin-bottom: 1.2rem;
  border: 1px solid #ccc;
  border-radius: 0.6rem;
  font-size: 1rem;
}

body.dark-mode .modal-content input {
  background: #2a2a2a;
  border: 1px solid #444;
  color: #eee;
}

/* Buttons - match create supplier */
.invite-btn,
.admin-btn,
.full-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: background 0.2s;
}

.invite-btn:hover,
.admin-btn:hover,
.full-btn:hover {
  background: #1d4ed8;
}

/* Full width button inside modal */
.full-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
}

/* Animation */
@keyframes popIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
