/* ============================================================
   Cherry · Wardrobe — Design System
   Shared stylesheet for inventory, wear log, outfit ideas, lookbook
   ============================================================ */

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--off-white);
}

img { max-width: 100%; display: block; }

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =====================================================
   DESIGN TOKENS
   ===================================================== */
:root {
  --navy:          #1c2b4a;
  --charcoal:      #2c2c2c;
  --slate:         #555e6e;
  --silver:        #9ea3af;
  --indigo:        #3a5490;
  --indigo-light:  #e8edf5;
  --white:         #ffffff;
  --off-white:     #f8f7f5;
  --border:        #e2e4e8;
  --border-dark:   #c8cdd6;

  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  12px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.07);
  --shadow:     0 2px 8px rgba(0,0,0,0.09);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.13);

  --max-width: 1100px;
}

/* =====================================================
   LAYOUT
   ===================================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.page-body {
  padding: 40px 0 80px;
}

/* =====================================================
   SITE HEADER
   ===================================================== */
.site-header {
  background: var(--navy);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #ffffff;
}

.site-logo span {
  opacity: 0.5;
  font-weight: 400;
}

.site-nav {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
}

.site-nav a {
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
}

.site-nav a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* =====================================================
   HERO (index page)
   ===================================================== */
.hero {
  background: var(--navy);
  color: #ffffff;
  padding: 56px 0 48px;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  margin-top: 10px;
  max-width: 500px;
  line-height: 1.5;
}

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =====================================================
   PAGE HEADER (inner pages)
   ===================================================== */
.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 32px 0 24px;
  margin-bottom: 40px;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-subtitle {
  color: var(--slate);
  margin-top: 6px;
  font-size: 0.95rem;
}

.page-meta {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--silver);
}

/* =====================================================
   INDEX REPORT CARDS
   ===================================================== */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 40px 0 60px;
}

.report-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
}

.report-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--indigo);
  text-decoration: none;
}

.report-card-icon { font-size: 1.75rem; }

.report-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}

.report-card-meta {
  font-size: 0.8rem;
  color: var(--indigo);
  font-weight: 500;
}

.report-card-desc {
  font-size: 0.875rem;
  color: var(--slate);
  line-height: 1.55;
  flex: 1;
}

.report-card-arrow {
  font-size: 0.82rem;
  color: var(--indigo);
  font-weight: 600;
  margin-top: 8px;
}

/* =====================================================
   SUMMARY DASHBOARD (inventory stats)
   ===================================================== */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
}

.stat-number {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--slate);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

/* =====================================================
   TABLE OF CONTENTS
   ===================================================== */
.toc {
  background: var(--indigo-light);
  border: 1px solid #c5d0e6;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 40px;
}

.toc-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--indigo);
  margin-bottom: 14px;
}

.toc-group {
  margin-bottom: 10px;
}

.toc-group:last-child { margin-bottom: 0; }

.toc-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.toc-list li a {
  font-size: 0.84rem;
  color: var(--indigo);
}

/* =====================================================
   DATA TABLE (inventory)
   ===================================================== */
.table-section {
  margin-bottom: 48px;
  scroll-margin-top: 80px;
}

.section-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--indigo);
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section-count {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--silver);
}

.section-note {
  font-size: 0.82rem;
  color: var(--slate);
  font-style: italic;
  margin-bottom: 12px;
}

.subsection-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate);
  margin: 20px 0 8px;
}

/* Horizontal scroll wrapper on small screens */
.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.86rem;
  min-width: 640px;
}

.data-table th {
  background: var(--navy);
  color: rgba(255,255,255,0.88);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 9px 12px;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.45;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--indigo-light); }

/* Explicit column widths */
.col-thumb  { width: 72px; }
.col-brand  { width: 110px; font-weight: 500; }
.col-name   { width: 160px; }
.col-color  { width: 120px; }
.col-notes  { min-width: 280px; color: var(--slate); font-size: 0.82rem; }
.col-id     { width: 72px; font-family: monospace; font-size: 0.73rem;
              color: var(--silver); white-space: nowrap; }
.col-status { width: 42px; text-align: center; font-size: 1rem; }

.item-thumb {
  width: 60px;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
}

/* =====================================================
   OUTFIT SECTIONS & CARDS
   ===================================================== */
.outfit-section {
  margin-bottom: 64px;
  scroll-margin-top: 80px;
}

.outfit-section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--indigo);
  margin-bottom: 16px;
}

.outfit-section-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

.outfit-section-color {
  font-size: 0.82rem;
  color: var(--slate);
}

.outfit-section-id {
  font-size: 0.75rem;
  color: var(--silver);
  font-family: monospace;
  margin-left: auto;
}

.anchor-photo {
  width: 110px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.outfit-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--indigo);
  margin: 24px 0 10px;
}

.outfit-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.outfit-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 14px;
}

.outfit-row-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--silver);
  margin-bottom: 8px;
  margin-top: 14px;
}

.outfit-row-label:first-child { margin-top: 0; }

.photo-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.photo-item {
  text-align: center;
  width: 110px;
  flex-shrink: 0;
}

.photo-item img {
  width: 110px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.photo-label {
  font-size: 0.68rem;
  color: var(--slate);
  margin-top: 5px;
  line-height: 1.35;
}

.photo-placeholder {
  width: 110px;
  height: 120px;
  background: var(--indigo-light);
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: var(--silver);
  text-align: center;
  padding: 10px;
  line-height: 1.4;
}

.outfit-rationale {
  font-size: 0.84rem;
  color: var(--slate);
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 14px;
  line-height: 1.55;
}

/* =====================================================
   WEAR LOG ENTRIES
   ===================================================== */
.wear-entry {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.wear-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.wear-date {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.wear-occasion {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--indigo-light);
  color: var(--indigo);
  padding: 2px 9px;
  border-radius: 100px;
}

.wear-notes {
  font-size: 0.84rem;
  color: var(--slate);
  font-style: italic;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  line-height: 1.5;
}

/* =====================================================
   LOOKBOOK
   ===================================================== */
.occasion-section {
  margin-bottom: 64px;
  scroll-margin-top: 80px;
}

.occasion-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--indigo);
  margin-bottom: 6px;
}

.occasion-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--silver);
  font-family: monospace;
}

.occasion-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
}

.occasion-count {
  font-size: 0.78rem;
  color: var(--silver);
  margin-left: auto;
}

.occasion-desc {
  font-size: 0.875rem;
  color: var(--slate);
  font-style: italic;
  margin: 8px 0 20px;
}

/* =====================================================
   OCCASION BADGES
   ===================================================== */
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-daily    { background: var(--indigo-light); color: var(--indigo); }
.badge-evening  { background: var(--navy); color: rgba(255,255,255,0.85); }
.badge-travel   { background: #e6f5f0; color: #2a6b4a; }
.badge-outdoor  { background: #f0f5e8; color: #4a6b2a; }
.badge-occasion { background: #f5e8ed; color: #7a2a4a; }
.badge-gym      { background: #f5f0e8; color: #7a5a2a; }

/* =====================================================
   COMING SOON (placeholder pages)
   ===================================================== */
.coming-soon {
  text-align: center;
  padding: 80px 24px;
  color: var(--slate);
}

.coming-soon h2 {
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.coming-soon p {
  font-size: 0.9rem;
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.6;
}

/* =====================================================
   DIVIDERS
   ===================================================== */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--white);
  padding: 22px 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--silver);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .page-title { font-size: 1.35rem; }
  .hero-title { font-size: 1.75rem; }
  .hero { padding: 40px 0 32px; }
  .hero-stats { gap: 24px; }
  .hero-stat-num { font-size: 1.3rem; }

  /* hide full nav on mobile — report cards handle navigation */
  .site-nav { display: none; }

  .page-body { padding: 28px 0 60px; }

  .dashboard {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
  }
  .stat-number { font-size: 1.4rem; }

  .photo-item { width: 90px; }
  .photo-item img { width: 90px; }
  .photo-placeholder { width: 90px; height: 100px; }

  .outfit-card { padding: 16px; }
  .report-card { padding: 22px; min-height: auto; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.5rem; }
  .photo-grid { gap: 8px; }
  .photo-item { width: 80px; }
  .photo-item img { width: 80px; }
}
