/* ==========================================================================
   ORGANIC STORE - DASHBOARD, CHECKOUT, ORDER TRACKING & AUTH STYLES (dashboard.css)
   ========================================================================== */

/* General Layout Elements */
.container-full {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.page-hero {
  background: linear-gradient(135deg, #f3faec 0%, #e5f5d3 100%);
  padding: 40px 20px;
  text-align: center;
  border-bottom: 1px solid #ddecce;
  margin-bottom: 30px;
}

.page-hero h1 {
  font-size: 2.4em;
  color: #1f3d02;
  margin-bottom: 8px;
}

.page-hero p {
  color: #4b6e22;
  font-size: 1.1em;
}

/* Authentication (Login & Register) */
.auth-wrapper {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: #fbfdf9;
}

.auth-card {
  background: white;
  width: 100%;
  max-width: 460px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  padding: 35px;
}

.auth-header {
  text-align: center;
  margin-bottom: 25px;
}

.auth-header img {
  height: 60px;
  margin-bottom: 15px;
}

.auth-header h2 {
  font-size: 1.8em;
  color: #1a2e05;
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.95em;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-size: 0.9em;
  font-weight: 600;
  color: #333;
}

.form-control {
  padding: 12px 14px;
  border: 1.5px solid #d8e2d0;
  border-radius: var(--radius-sm);
  font-size: 1em;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(112, 187, 0, 0.15);
}

.btn-primary-block {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 1.05em;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary-block:hover {
  background: var(--primary-hover);
}

.quick-demo-accounts {
  margin-top: 20px;
  padding: 14px;
  background: #f7faf2;
  border-radius: var(--radius-sm);
  border: 1px dashed #cde2b8;
}

.quick-demo-accounts h5 {
  font-size: 0.88em;
  color: #4b6e22;
  margin-bottom: 8px;
}

.demo-btn-group {
  display: flex;
  gap: 8px;
}

.demo-btn {
  flex: 1;
  padding: 7px;
  background: white;
  border: 1px solid #cce4b5;
  border-radius: 4px;
  font-size: 0.82em;
  font-weight: 600;
  color: #2e5204;
  cursor: pointer;
  transition: var(--transition);
}

.demo-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* User & Admin Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  margin-top: 20px;
}

.dashboard-sidebar {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  height: fit-content;
  box-shadow: var(--shadow-sm);
}

.user-sidebar-profile {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #e9f7d8;
  color: #3b6602;
  font-size: 2.2em;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  border: 3px solid #bce68f;
}

.user-sidebar-profile h3 {
  font-size: 1.25em;
  margin: 0 0 4px;
  color: #222;
}

.user-sidebar-profile p {
  font-size: 0.85em;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.sidebar-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav-links li button,
.sidebar-nav-links li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: #444;
  font-weight: 600;
  font-size: 0.95em;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-nav-links li button:hover,
.sidebar-nav-links li a:hover,
.sidebar-nav-links li.active button,
.sidebar-nav-links li.active a {
  background: var(--primary-light);
  color: var(--primary-hover);
}

.sidebar-nav-links li.active button,
.sidebar-nav-links li.active a {
  font-weight: 700;
  border-left: 4px solid var(--primary-color);
}

.dashboard-content-area {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  min-height: 500px;
}

/* KPI Overview Cards */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #fdfdfd;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: #c9e6aa;
}

.stat-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
}

.stat-icon-green { background: #eaf8d9; color: #407500; }
.stat-icon-blue { background: #e0f2fe; color: #0284c7; }
.stat-icon-purple { background: #f3e8ff; color: #9333ea; }
.stat-icon-amber { background: #fef3c7; color: #d97706; }

.stat-info h4 {
  font-size: 0.85em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}

.stat-info .stat-value {
  font-size: 1.8em;
  font-weight: 800;
  color: #111;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95em;
}

.custom-table th {
  background: #f6faf1;
  padding: 14px 16px;
  font-weight: 700;
  color: #335500;
  border-bottom: 2px solid #e1eed4;
}

.custom-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.custom-table tr:hover td {
  background: #fafdf7;
}

/* Status Badges */
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pending { background: #fef3c7; color: #b45309; }
.status-processing { background: #e0f2fe; color: #0369a1; }
.status-shipped { background: #f3e8ff; color: #7e22ce; }
.status-out-for-delivery { background: #ffedd5; color: #c2410c; }
.status-delivered { background: #dcfce7; color: #15803d; }
.status-cancelled { background: #fee2e2; color: #b91c1c; }

/* Multi-Step Checkout */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 30px;
}

.checkout-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}

.checkout-card h3 {
  font-size: 1.25em;
  margin-bottom: 18px;
  color: #1a2e05;
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-tab-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.pay-tab-btn {
  flex: 1;
  min-width: 120px;
  padding: 12px;
  border: 1.5px solid #d4ecc0;
  background: #fbfdf9;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.pay-tab-btn.active {
  background: #eaf8d9;
  border-color: var(--primary-color);
  color: #274b00;
}

.interactive-card-preview {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 22px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: 0 10px 25px rgba(30, 60, 114, 0.3);
}

.card-chip {
  width: 42px;
  height: 30px;
  background: #f3c242;
  border-radius: 4px;
  margin-bottom: 16px;
}

.card-num-preview {
  font-family: 'Courier New', monospace;
  font-size: 1.3em;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.card-footer-preview {
  display: flex;
  justify-content: space-between;
  font-size: 0.85em;
  text-transform: uppercase;
}

/* Order Tracking Timeline */
.tracking-timeline {
  position: relative;
  margin: 30px 0;
  padding-left: 30px;
}

.tracking-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: #d4ecc0;
}

.timeline-step {
  position: relative;
  margin-bottom: 25px;
}

.timeline-step-dot {
  position: absolute;
  left: -30px;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 3px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7em;
  color: transparent;
}

.timeline-step.completed .timeline-step-dot {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.timeline-step.active .timeline-step-dot {
  background: white;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(112, 187, 0, 0.25);
}

.timeline-content h4 {
  margin: 0 0 4px;
  font-size: 1.05em;
}

.timeline-content time {
  font-size: 0.85em;
  color: var(--text-muted);
}

/* Printable Tax Invoice Styles */
.invoice-container {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 2px solid #335500;
  margin-bottom: 24px;
}

.invoice-header h2 {
  color: #1a2e05;
  font-size: 2em;
  margin-bottom: 6px;
}

.invoice-meta {
  text-align: right;
}

@media print {
  body * {
    visibility: hidden;
  }
  .invoice-container, .invoice-container * {
    visibility: visible;
  }
  .invoice-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .no-print {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .dashboard-grid,
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}
