/* The Health Hub B2B Portal - Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  --navy: #021152;
  --coral: #d53949;
  --light: #f6f6f6;
  --cyan: #baf7fc;
  --white: #ffffff;
  --text: #333333;
  --border: #e0e0e0;
  --shadow: 0 4px 20px rgba(2,17,82,0.10);
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--light);
  color: var(--text);
}

/* ---- LOGIN PAGE ---- */
.login-page {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 100%;
  max-width: 440px;
  padding: 24px;
}

.login-card {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 3px;
  display: block;
}

.logo-sub {
  color: var(--coral);
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--navy);
}

.error-msg {
  background: #fff5f5;
  color: var(--coral);
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: #888;
}

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

/* ---- BUTTONS ---- */
.btn-primary {
  background: var(--coral);
  color: var(--white);
  border: none;
  border-radius: 40px;
  padding: 14px 32px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary:hover { background: #c0303d; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-full { width: 100%; }

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 40px;
  padding: 10px 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.btn-navy {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 40px;
  padding: 10px 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-navy:hover { background: #031a6e; }

/* ---- HEADER ---- */
.portal-header {
  background: var(--navy);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.header-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 3px;
  text-decoration: none;
}

.header-logo span { color: var(--coral); }

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

.nav-link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.2s;
}

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

.nav-link.active { color: var(--white); background: rgba(213,57,73,0.3); }

.cart-btn {
  background: var(--coral);
  color: var(--white);
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.cart-btn:hover { background: #c0303d; }

.cart-count {
  background: var(--white);
  color: var(--coral);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

/* ---- SHOP PAGE ---- */
.shop-container {
  display: flex;
  min-height: calc(100vh - 70px);
}

.shop-main {
  flex: 1;
  padding: 32px 40px;
}

.shop-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.shop-subtitle {
  color: #666;
  font-size: 14px;
  margin-bottom: 28px;
}

.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  align-items: center;
}

.search-input {
  flex: 1;
  max-width: 400px;
  padding: 12px 18px;
  border: 2px solid var(--border);
  border-radius: 40px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus { border-color: var(--navy); }

.category-filter {
  padding: 12px 18px;
  border: 2px solid var(--border);
  border-radius: 40px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  outline: none;
  background: var(--white);
  cursor: pointer;
  min-width: 180px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(2,17,82,0.15);
}

.product-category {
  background: var(--cyan);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 12px;
}

.product-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.4;
  flex: 1;
}

.product-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--coral);
  margin-bottom: 16px;
}

.product-price span {
  font-size: 13px;
  font-weight: 500;
  color: #888;
}

.product-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.qty-btn {
  background: var(--light);
  border: none;
  width: 32px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--navy);
  transition: background 0.1s;
}

.qty-btn:hover { background: var(--border); }

.qty-input {
  width: 48px;
  height: 36px;
  border: none;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  color: var(--navy);
}

.add-cart-btn {
  flex: 1;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.add-cart-btn:hover { background: #031a6e; }
.add-cart-btn.added { background: #16a34a; }

.loading-spinner {
  text-align: center;
  padding: 80px;
  color: #888;
  font-size: 16px;
}

/* ---- CART SIDEBAR ---- */
.cart-sidebar {
  width: 380px;
  background: var(--white);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
}

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

.cart-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-empty {
  text-align: center;
  padding: 60px 24px;
  color: #aaa;
}

.cart-empty-icon { font-size: 48px; margin-bottom: 12px; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--light);
}

.cart-item-info { flex: 1; }

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2px;
}

.cart-item-price {
  font-size: 12px;
  color: #888;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-qty-btn {
  background: var(--light);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty-num { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }

.cart-item-total { font-size: 14px; font-weight: 700; color: var(--navy); }

.cart-item-remove {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.cart-item-remove:hover { color: var(--coral); }

.cart-footer {
  padding: 20px 24px;
  border-top: 2px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-total-label { font-size: 14px; color: #666; }
.cart-total-amount { font-size: 22px; font-weight: 800; color: var(--navy); }

.order-notes {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  resize: vertical;
  min-height: 80px;
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.order-notes:focus { border-color: var(--navy); }

/* ---- ORDERS PAGE ---- */
.orders-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px;
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.page-subtitle { color: #666; font-size: 14px; margin-bottom: 32px; }

.orders-table-wrap {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.orders-table th {
  background: var(--navy);
  color: var(--white);
  padding: 16px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.orders-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--light);
  font-size: 14px;
}

.orders-table tr:last-child td { border-bottom: none; }
.orders-table tr:hover td { background: #f9f9f9; }

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-nieuw { background: var(--cyan); color: var(--navy); }
.status-verwerkt { background: #dcfce7; color: #16a34a; }
.status-verzonden { background: #dbeafe; color: #1d4ed8; }

.order-row { cursor: pointer; }

.order-detail-row { display: none; background: #f9fafb; }
.order-detail-row.open { display: table-row; }

.order-detail-cell { padding: 0 !important; }

.order-detail-inner {
  padding: 20px 40px;
  border-top: 1px solid var(--border);
}

.order-detail-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-items-list { list-style: none; }
.order-items-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

.order-items-list li:last-child { border-bottom: none; }

.empty-orders {
  text-align: center;
  padding: 80px;
  color: #aaa;
}

.empty-orders-icon { font-size: 56px; margin-bottom: 16px; }
.empty-orders h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }

/* ---- TOAST NOTIFICATION ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy);
  color: var(--white);
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #16a34a; }
.toast.error { background: var(--coral); }

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

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

.modal {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 440px;
  width: 90%;
  text-align: center;
}

.modal-icon { font-size: 64px; margin-bottom: 16px; }
.modal h2 { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.modal p { color: #666; margin-bottom: 24px; line-height: 1.6; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .portal-header { padding: 0 20px; }
  .shop-main { padding: 20px; }
  .cart-sidebar { display: none; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .orders-container { padding: 20px; }
  .header-logo { font-size: 14px; }
}
