/* =============================================================
   AGNI CRM — SHARED STYLES
   Applies to all manufacturer portal pages.
   Designer reference: /CONTRIBUTING.md
   ============================================================= */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-color:       #f2f2f7;
  --light-bg:       #f2f2f7;
  --container-bg:   #ffffff;
  --white:          #ffffff;

  /* Text */
  --text-color:     #000000;

  /* Gray scale (used by Analytics / CPR / Orders group) */
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;

  /* Navigation */
  --nav-bg:     #faf0e6;
  --nav-border: #d1d1d6;
  --nav-text:   #9a6a32;

  /* Sidebar */
  --sidebar-bg:   #ffffff;
  --sidebar-text: #000000;

  /* Inputs / search */
  --search-bg:    #f2f2f7;
  --search-border: #d1d1d6;
  --input-border: #d1d1d6;
  --input-bg:     #ffffff;

  /* Semantic colours */
  --accent-color:    #9a6a32;
  --brand-color:     #ff8c00;
  --brand-hover:     #ff4500;
  --primary-color:   #ff8c00;
  --success-color:   #10b981;
  --warning-color:   #f59e0b;
  --danger-color:    #ef4444;
  --info-color:      #3b82f6;
  --secondary-color: #6c757d;
  --error-color:     #ff3b30;

  /* Status colours (enhanced contrast) */
  --status-pending:    #f59e0b;
  --status-processing: #3b82f6;
  --status-approved:   #10b981;
  --status-shipped:    #8b5cf6;
  --status-cancelled:  #ef4444;
  --status-draft:      #6b7280;

  /* Elevation */
  --shadow:    rgba(0, 0, 0, 0.1);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 16px 34px rgba(44, 35, 22, 0.08);

  /* Radii */
  --radius-sm:       5px;
  --radius-md:       6px;
  --radius-lg:       10px;
  --radius-xl:       14px;
  --border-radius:   6px;
  --border-radius-lg: 10px;

  /* Typography Scale */
  --text-xs:    11px;
  --text-sm:    13px;
  --text-base:  15px;
  --text-lg:    17px;
  --text-xl:    19px;
  --text-2xl:   23px;
  --text-3xl:   28px;
  --text-4xl:   34px;

  /* Font Weights */
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold: 600;
  --weight-bold:    700;
  --weight-extrabold: 800;

  /* Spacing Scale */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-7:   28px;
  --space-8:   32px;
  --space-9:   36px;
  --space-10:  40px;

  /* Motion */
  --transition: all 0.3s ease;
  --transition-fast: all 0.2s ease;
}

/* ── Dark Mode Overrides ────────────────────────────────────── */
body.dark-mode {
  --bg-color:     #1c1c1e;
  --light-bg:     #1c1c1e;
  --container-bg: #2c2c2e;
  --white:        #2c2c2e;
  --text-color:   #ffffff;

  --gray-100: #2c2c2e;
  --gray-200: #3a3a3c;
  --gray-300: #48484a;
  --gray-400: #636366;
  --gray-500: #8e8e93;
  --gray-600: #aeaeb2;
  --gray-700: #d1d1d6;
  --gray-800: #f2f2f7;
  --gray-900: #ffffff;

  --nav-bg:     #2c2c2e;
  --nav-border: #3a3a3c;
  --nav-text:   #d5a56a;

  --sidebar-bg:   #2c2c2e;
  --sidebar-text: #ffffff;

  --search-bg:    #3a3a3c;
  --search-border: #4f4f51;
  --input-border: #4f4f51;
  --input-bg:     #3a3a3c;

  --accent-color: #d5a56a;
  --error-color:  #ff453a;
  --shadow:       rgba(0, 0, 0, 0.3);
  --shadow-md:    0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-lg:    0 8px 20px rgba(0, 0, 0, 0.5);
  --shadow-xl:    0 16px 34px rgba(0, 0, 0, 0.6);

  --status-pending:    #fbbf24;
  --status-processing: #60a5fa;
  --status-approved:   #34d399;
  --status-shipped:    #a78bfa;
  --status-cancelled:  #f87171;
  --status-draft:      #9ca3af;
}

/* ── Base Reset ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  margin: 0;
  color: var(--text-color);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Main Content Layout ────────────────────────────────────── */
.main-content {
  padding: 90px 20px 20px;
  max-width: 1200px;
  margin: 0 auto;
  transition: margin-right 0.3s ease;
}

@media (min-width: 1024px) {
  .main-content {
    padding: 110px 40px 40px;
  }
}

/* ── Utility ────────────────────────────────────────────────── */
.page-description {
  font-size: 14px;
  color: var(--text-color);
  opacity: 0.7;
  margin-bottom: 30px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-color);
  opacity: 0.6;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.icon {
  margin-right: 12px;
  font-size: 20px;
}
