/* ============================================
   L'INSTANT ZEN - Boutique & Admin CSS
   ============================================ */

/* ========== STOCK BADGES ========== */
.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}

.stock-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stock-badge--available {
  background: rgba(39, 174, 96, 0.1);
  color: #27ae60;
}
.stock-badge--available::before { background: #27ae60; }

.stock-badge--low {
  background: rgba(243, 156, 18, 0.1);
  color: #e67e22;
}
.stock-badge--low::before {
  background: #e67e22;
  animation: stockPulse 1.5s ease-in-out infinite;
}

.stock-badge--out {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}
.stock-badge--out::before { background: #e74c3c; }

@keyframes stockPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.product-card__stock {
  margin-top: 0.5rem;
  text-align: center;
}

.product-card__body .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========== PROMO CODE FORM ========== */
.promo-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--off-white);
  border-radius: var(--radius-md);
  border: 1px dashed var(--gray-200);
}

.promo-form input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: border-color var(--transition);
}

.promo-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.promo-form button {
  white-space: nowrap;
}

.promo-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(39, 174, 96, 0.08);
  border: 1px solid rgba(39, 174, 96, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.promo-applied__info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #27ae60;
  font-weight: 600;
}

.promo-applied__remove {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.25rem;
  transition: color var(--transition);
}

.promo-applied__remove:hover { color: #e74c3c; }

.cart-summary__row--discount {
  color: #27ae60;
  font-weight: 600;
}

/* ========== CHECKOUT STEPS ========== */
.checkout-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 3rem;
  padding: 0;
  list-style: none;
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-400);
  position: relative;
  transition: all var(--transition);
}

.checkout-step__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-400);
  font-weight: 700;
  font-size: 0.85rem;
  transition: all var(--transition);
}

.checkout-step--active {
  color: var(--primary);
}

.checkout-step--active .checkout-step__number {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 84, 109, 0.3);
}

.checkout-step--done {
  color: #27ae60;
}

.checkout-step--done .checkout-step__number {
  background: #27ae60;
  color: white;
}

.checkout-step__separator {
  width: 40px;
  height: 2px;
  background: var(--gray-200);
  transition: background var(--transition);
}

.checkout-step--done + .checkout-step__separator,
.checkout-step--active + .checkout-step__separator {
  background: var(--primary);
}

@media (max-width: 600px) {
  .checkout-step span:not(.checkout-step__number) {
    display: none;
  }
  .checkout-step__separator {
    width: 24px;
  }
}

/* ========== CHECKOUT PANELS ========== */
.checkout-panel {
  display: none;
  animation: fadeInUp 0.4s ease-out;
}

.checkout-panel--active {
  display: block;
}

.checkout-form {
  max-width: 600px;
  margin: 0 auto;
}

.checkout-form .form-group {
  margin-bottom: 1.25rem;
}

.checkout-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.checkout-form label .required {
  color: #e74c3c;
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-100);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-sizing: border-box;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(19, 175, 240, 0.1);
}

.checkout-form input.error,
.checkout-form textarea.error {
  border-color: #e74c3c;
}

.checkout-form .form-error {
  font-size: 0.8rem;
  color: #e74c3c;
  margin-top: 0.3rem;
  display: none;
}

.checkout-form input.error + .form-error,
.checkout-form textarea.error + .form-error {
  display: block;
}

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

@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
}

.checkout-form textarea {
  min-height: 80px;
  resize: vertical;
}

.checkout-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  gap: 1rem;
}

.checkout-nav .btn--back {
  background: none;
  border: 2px solid var(--gray-200);
  color: var(--gray-500);
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  transition: all var(--transition);
}

.checkout-nav .btn--back:hover {
  border-color: var(--gray-400);
  color: var(--gray-700);
}

/* ========== CHECKOUT RECAP ========== */
.checkout-recap {
  max-width: 600px;
  margin: 0 auto;
}

.recap-section {
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.recap-section h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--primary);
}

.recap-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recap-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--gray-50, #f5f5f5);
}

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

.recap-item__name {
  font-weight: 500;
}

.recap-item__qty {
  color: var(--gray-400);
  font-size: 0.85rem;
}

.recap-item__price {
  font-weight: 700;
  color: var(--primary);
}

.recap-customer p {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  color: var(--gray-600);
}

.recap-customer strong {
  color: var(--gray-700);
}

.recap-totals {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--gray-100);
}

.recap-totals__row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.95rem;
}

.recap-totals__row--discount {
  color: #27ae60;
  font-weight: 600;
}

.recap-totals__row--total {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  border-top: 2px solid var(--primary);
}

/* ========== CHECKOUT PAYMENT / SPINNER ========== */
.checkout-loading {
  text-align: center;
  padding: 4rem 2rem;
}

.checkout-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-100);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5rem;
}

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

.checkout-loading p {
  color: var(--gray-500);
  font-size: 1rem;
}

.checkout-loading .checkout-loading__sub {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
}

/* ========== CONFIRMATION PAGE ========== */
.confirmation {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 0;
}

.confirmation__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: confirmPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.confirmation__icon--success {
  background: rgba(39, 174, 96, 0.1);
  color: #27ae60;
}

.confirmation__icon--error {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

.confirmation__icon--loading {
  background: var(--gray-100);
  color: var(--gray-400);
}

@keyframes confirmPop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.confirmation h2 {
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
}

.confirmation p {
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

.confirmation__details {
  text-align: left;
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

.confirmation__detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-50, #f5f5f5);
  font-size: 0.95rem;
}

.confirmation__detail-row:last-child { border-bottom: none; }

.confirmation__detail-row strong {
  color: var(--primary);
}

.confirmation__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ========== COMPTE PAGE ========== */
.compte-container {
  max-width: 800px;
  margin: 0 auto;
}

.compte-login {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 0;
}

.compte-login__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: confirmPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.compte-login__icon svg {
  width: 36px;
  height: 36px;
  color: white;
  stroke: white;
  fill: none;
}

.compte-login p {
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

.compte-login__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.compte-login__form input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-100);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-align: center;
  transition: border-color var(--transition);
}

.compte-login__form input:focus {
  outline: none;
  border-color: var(--accent);
}

.compte-login__form #compteCode {
  letter-spacing: 0.4em;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  border: 2px solid var(--primary);
  background: rgba(0, 84, 109, 0.02);
}

.compte-login__form #compteCode:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(19, 175, 240, 0.15);
}

.compte-login__form p {
  margin: 0;
}

.compte-login__form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.compte-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.compte-header h2 {
  font-family: var(--font-heading);
  margin: 0;
}

.compte-header .btn--logout {
  background: none;
  border: 1px solid var(--gray-200);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--gray-500);
  transition: all var(--transition);
}

.compte-header .btn--logout:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

.compte-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.compte-info__card {
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.compte-info__card label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  margin-bottom: 0.35rem;
}

.compte-info__card span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
}

.compte-orders h3 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
}

.compte-orders__empty {
  text-align: center;
  padding: 2rem;
  color: var(--gray-400);
}

/* ========== ORDERS TABLE ========== */
.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.orders-table th {
  text-align: left;
  padding: 0.75rem;
  background: var(--off-white);
  font-weight: 600;
  color: var(--gray-600);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.orders-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.orders-table tr:hover td {
  background: rgba(0, 84, 109, 0.02);
}

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.order-status--confirmed {
  background: rgba(39, 174, 96, 0.1);
  color: #27ae60;
}

.order-status--preparing {
  background: rgba(52, 152, 219, 0.1);
  color: #3498db;
}

.order-status--shipped {
  background: rgba(155, 89, 182, 0.1);
  color: #9b59b6;
}

.order-status--delivered {
  background: rgba(39, 174, 96, 0.15);
  color: #1e8449;
}

.order-status--cancelled {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

.order-status--processing {
  background: rgba(243, 156, 18, 0.1);
  color: #e67e22;
}

@media (max-width: 768px) {
  .orders-table { font-size: 0.8rem; }
  .orders-table th,
  .orders-table td { padding: 0.5rem; }
  .orders-table .hide-mobile { display: none; }
}

/* ========== ADMIN DASHBOARD ========== */
.admin-layout {
  min-height: 100vh;
  background: #f4f6f9;
  font-family: var(--font-body);
}

.admin-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 2rem;
}

.admin-login__card {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.admin-login__card h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.admin-login__card p {
  color: var(--gray-400);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.admin-login__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-login__form input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-100);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  text-align: center;
  transition: border-color var(--transition);
}

.admin-login__form input:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-login__error {
  color: #e74c3c;
  font-size: 0.85rem;
  display: none;
}

/* Admin Header */
.admin-header {
  background: white;
  border-bottom: 1px solid var(--gray-100);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--primary);
  text-decoration: none;
}

.admin-header__brand img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
}

.admin-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-header__link {
  color: var(--gray-400);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color var(--transition);
}

.admin-header__link:hover { color: var(--primary); }

.admin-header__logout {
  background: none;
  border: 1px solid var(--gray-200);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--gray-500);
  transition: all var(--transition);
}

.admin-header__logout:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  background: white;
  border-bottom: 1px solid var(--gray-100);
  padding: 0 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-tab {
  padding: 0.85rem 1.25rem;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-400);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--transition);
}

.admin-tab:hover {
  color: var(--primary);
}

.admin-tab--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Admin Content */
.admin-content {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.admin-panel {
  display: none;
  animation: fadeInUp 0.3s ease-out;
}

.admin-panel--active { display: block; }

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  margin-bottom: 0.5rem;
}

.kpi-card__value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-heading);
}

.kpi-card__sub {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 0.3rem;
}

/* Admin Tables */
.admin-table-wrapper {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.admin-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-table-header h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin: 0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--off-white);
  font-weight: 600;
  color: var(--gray-600);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table tr:hover td {
  background: rgba(0, 84, 109, 0.02);
}

.admin-table select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
}

.admin-table input[type="number"] {
  width: 80px;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-align: center;
}

.admin-table .btn--small {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  transition: all var(--transition);
}

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

.admin-table .btn--save:hover {
  background: var(--primary-dark);
}

.admin-table .btn--danger {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

.admin-table .btn--danger:hover {
  background: #e74c3c;
  color: white;
}

/* Admin Forms */
.admin-form {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-form h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.admin-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-form__group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 0.35rem;
}

.admin-form__group input,
.admin-form__group select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  box-sizing: border-box;
  transition: border-color var(--transition);
}

.admin-form__group input:focus,
.admin-form__group select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Charts */
.admin-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.admin-chart {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.admin-chart h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.admin-chart canvas {
  width: 100% !important;
  max-height: 300px;
}

@media (max-width: 768px) {
  .admin-header { padding: 0.75rem 1rem; }
  .admin-tabs { padding: 0 1rem; }
  .admin-content { padding: 1rem; }
  .admin-charts { grid-template-columns: 1fr; }
  .admin-table { font-size: 0.8rem; }
  .admin-table th,
  .admin-table td { padding: 0.5rem 0.6rem; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ========== LEGAL PAGES ========== */
.legal-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.legal-nav__link {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-500);
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.legal-nav__link:hover {
  color: var(--primary);
  background: rgba(0, 84, 109, 0.04);
}

.legal-nav__link--active,
.legal-nav__link:focus {
  color: var(--primary);
  background: rgba(0, 84, 109, 0.06);
  border-color: rgba(0, 84, 109, 0.15);
}

.legal-section {
  scroll-margin-top: 100px;
}

.legal-content {
  max-width: 860px;
  margin: 0 auto;
}

.legal-content h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.legal-update {
  font-size: 0.85rem;
  color: var(--gray-400);
  font-style: italic;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.legal-block {
  margin-bottom: 2rem;
}

.legal-block h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-100);
}

.legal-block h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.legal-block p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
}

.legal-block ul,
.legal-block ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-block li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--gray-600);
  margin-bottom: 0.3rem;
}

.legal-block a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

.legal-block a:hover {
  color: var(--primary);
}

.legal-block strong {
  color: var(--gray-700);
}

.legal-block code {
  background: var(--gray-100);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--primary);
}

/* Legal table */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.legal-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.legal-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-600);
  line-height: 1.5;
  vertical-align: top;
}

.legal-table tr:nth-child(even) td {
  background: var(--off-white);
}

.legal-table tr:last-child td {
  border-bottom: none;
}

/* Rights grid */
.legal-rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.legal-right {
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: box-shadow var(--transition), transform var(--transition);
}

.legal-right:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.legal-right h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--primary);
  margin: 0 0 0.4rem;
}

.legal-right p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--gray-500);
  margin: 0;
}

@media (max-width: 768px) {
  .legal-nav {
    flex-direction: column;
  }

  .legal-nav__link {
    text-align: center;
  }

  .legal-content h2 {
    font-size: 1.4rem;
  }

  .legal-table {
    font-size: 0.8rem;
  }

  .legal-table th,
  .legal-table td {
    padding: 0.5rem 0.6rem;
  }

  .legal-rights-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== UTILITIES ========== */
.text-success { color: #27ae60; }
.text-danger { color: #e74c3c; }
.text-muted { color: var(--gray-400); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
