* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #1d2433;
}
    .header {
            background-color: #1A3FAA;
            color: #fff;
            padding: 10px;
            text-align: left;
            font-size: 25px;
            font-weight: bold;
            display: flex;
            justify-content: left;
            align-items: center;
        }
.layout {
  display: flex;
  min-height: 100vh;
}
.alert-success {
  background: #e8f8ec;
  color: #1f6b35;
  border: 1px solid #b7e4c3;
    border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
}
.sidebar {
  width: 340px;
  max-width: 100%;
  background: #ffffff;
  border-right: 1px solid #d9dfeb;
  padding: 20px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}

.main {
  flex: 1;
  padding: 24px;
}

.panel {
  background: #f9fbff;
  border: 1px solid #d9dfeb;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert {
  background: #ffe7e7;
  color: #8b1f1f;
  border: 1px solid #e8b3b3;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
}

input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c8d1e1;
  border-radius: 8px;
}

button {
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: #5a67d8;
  color: white;
  cursor: pointer;
  font-weight: 600;
}

button.secondary {
  background: #6b7280;
}

button.danger {
  background: #d14343;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.full-width {
  width: 100%;
}

.member-summary {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.member-photo {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #d9dfeb;
  background: #eef2f9;
}

.member-meta {
  flex: 1;
}

.hello-text {
  margin: 0 0 6px 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.balance-line {
  margin: 0;
  color: #5b6475;
  font-size: 0.95rem;
}

.balance-value {
  margin: 6px 0 0 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.icon {
  margin-right: 6px;
}

.basket-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.basket-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.basket-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e6ebf3;
}

.basket-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.muted {
  color: #6b7280;
  font-size: 0.9rem;
}

.tier-section {
  margin-bottom: 28px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: white;
  border: 1px solid #d9dfeb;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin: 0 0 8px 0;
}

.product-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #eef2f9;
  margin-bottom: 12px;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-price {
  font-weight: 700;
  margin: 0 0 8px 0;
}

.product-description {
  color: #5b6475;
  font-size: 0.95rem;
  flex: 1;
  margin: 0 0 14px 0;
}
.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  display: none;
  animation: spin 0.8s linear infinite;
}

.login-btn.loading .login-btn-text {
  opacity: 0.9;
}

.login-btn.loading .login-btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }

 .sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid #d9dfeb;
    position: static;
    height: auto;
    overflow-y: visible;
  }
  }