* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

body {
  background: #e8efe6;
  color: #2d3a2a;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navbar – theme match */
.navbar {
  background: #fff;
  box-shadow: 0 2px 16px rgba(45, 58, 42, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f7036;
  text-decoration: none;
}

.logo img {
  height: 36px;
  margin-right: 10px;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: #2d3a2a;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: #1f7036;
  left: 0;
  bottom: -6px;
  transition: width 0.2s;
}

.nav-links a:hover { color: #1f7036; }
.nav-links a:hover::after { width: 100%; }

.btn {
  padding: 10px 20px;
  background: #1f7036;
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn:hover {
  background: #2d5a3d;
}

#menu-toggle { display: none; }

.menu-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-icon span {
  height: 3px;
  width: 24px;
  background: #2d3a2a;
  margin: 3px 0;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .menu-icon { display: flex; }
  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    gap: 16px;
    padding: 20px 0;
    display: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  }
  #menu-toggle:checked ~ .nav-links { display: flex; }
}

/* Auth pages (login / register) – flex:1 so footer stays at bottom */
.page-wrap {
  flex: 1;
  min-height: 0;
}

.auth-page .auth-sec {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  min-height: calc(100vh - 70px);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(45, 58, 42, 0.12);
  overflow: hidden;
}

.auth-card-inner {
  padding: 40px 36px;
}

.auth-card h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f7036;
  margin-bottom: 6px;
  text-align: center;
}

.auth-subtitle {
  font-size: 0.95rem;
  color: #5a6b57;
  text-align: center;
  margin-bottom: 28px;
}

.auth-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2d3a2a;
  margin-bottom: 6px;
}

.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c5d0c0;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 18px;
  transition: border-color 0.2s;
}

.auth-form input:focus {
  outline: none;
  border-color: #1f7036;
  box-shadow: 0 0 0 3px rgba(31, 112, 54, 0.15);
}

.auth-form input::placeholder {
  color: #9aaa9a;
}

.btn-auth {
  width: 100%;
  padding: 14px;
  background: #1f7036;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-auth:hover {
  background: #2d5a3d;
}

.auth-divider {
  text-align: center;
  color: #8a9a85;
  font-size: 0.9rem;
  margin: 20px 0 16px;
}

.auth-link {
  display: block;
  text-align: center;
  color: #1f7036;
  font-weight: 600;
  text-decoration: none;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.auth-link:hover {
  background: rgba(31, 112, 54, 0.08);
  color: #2d5a3d;
}

/* Dashboard (login-sec / login-elements kept for compatibility) */
.login-sec {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
}

.login-elements {
  max-width: 720px;
  width: 100%;
  padding: 40px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(45, 58, 42, 0.1);
}

.login-elements h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f7036;
  margin-bottom: 24px;
  text-align: center;
}

.dashboard-info {
  font-size: 0.95rem;
  color: #5a6b57;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

.products-single {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.breakdown {
  font-size: 0.9rem;
  color: #5a6b57;
  text-align: center;
  margin: 12px 0 16px;
  min-height: 1.4em;
}

.qty-unit {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3a2a;
  margin-left: 2px;
}

#liters {
  min-width: 28px;
  display: inline-block;
  text-align: center;
}

hr.my-line {
  border: none;
  border-top: 1px solid #d4e0d4;
  margin: 24px 0;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.login-elements h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: #5a6b57;
  margin-bottom: 16px;
  text-align: center;
}

.btn21 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: #1f7036;
  color: #fff !important;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.btn21:hover {
  background: #2d5a3d;
}

/* Dashboard products grid */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  margin-bottom: 24px;
}

.product-card {
  border: 1px solid #d4e0d4;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  background: #f8faf8;
}

.product-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3a2a;
  margin-bottom: 8px;
}

.product-card p {
  color: #1f7036;
  font-weight: 600;
  margin-bottom: 12px;
}

.qty {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.qty button {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 1.1rem;
  background: #1f7036;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.qty button:hover {
  background: #2d5a3d;
}

.qty span {
  min-width: 24px;
  font-weight: 600;
  color: #2d3a2a;
}

.login-elements button {
  padding: 12px 28px;
  background: #1f7036;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.login-elements button:hover {
  background: #2d5a3d;
}

.logout-btn {
  margin-top: 20px;
  margin-left: 0;
  padding: 12px 28px;
  background: transparent;
  color: #ffffff !important;
  border: 2px solid #1f7036;
}

.logout-btn:hover {
  background: rgba(31, 112, 54, 0.08);
}

/* Mes commandes (dashboard) */
.my-orders-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f7036;
  margin: 24px 0 8px;
  font-family: "Montserrat", sans-serif;
}

.my-orders-hint {
  font-size: 0.9rem;
  color: #5a6b57;
  margin-bottom: 16px;
}

.my-orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-orders-empty {
  font-size: 0.95rem;
  color: #8a9a85;
  margin: 0;
}

.my-orders-error {
  color: #b91c1c;
  font-weight: 500;
}

.my-order-card {
  background: #f8faf8;
  border: 1px solid #d4e0d4;
  border-radius: 10px;
  padding: 14px 18px;
}

.my-order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.my-order-date {
  font-size: 0.9rem;
  color: #5a6b57;
}

.my-order-status {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.my-order-status-pending {
  background: #fef3c7;
  color: #92400e;
}

.my-order-status-confirmed {
  background: #dbeafe;
  color: #1e40af;
}

.my-order-status-shipped {
  background: #e0e7ff;
  color: #3730a3;
}

.my-order-status-delivered {
  background: #d1fae5;
  color: #065f46;
}

.my-order-items {
  font-size: 0.9rem;
  color: #2d3a2a;
  margin-bottom: 6px;
  word-break: break-word;
}

.my-order-total {
  font-size: 1rem;
  font-weight: 700;
  color: #1f7036;
}
