/* Hand-Me-Down Planner Styles */
:root {
  --sage: #7A8B6F;
  --sage-light: #A3B396;
  --sage-dark: #5A6B4F;
  --cream: #FAF8F4;
  --warm-white: #FFFFFF;
  --clay: #C4956A;
  --clay-light: #E8D5C0;
  --charcoal: #3A3A3A;
  --text: #4A4A4A;
  --text-light: #7A7A7A;
  --border: #E0DCD6;
  --success: #6B8F5E;
  --warning: #C4956A;
  --danger: #B85C5C;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--charcoal);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--sage);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
}

.main-nav {
  display: flex;
  gap: 24px;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.main-nav a:hover { color: var(--sage); border-bottom-color: var(--sage); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-dark) 100%);
  color: white;
  padding: 48px 0;
}

.hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  max-width: 600px;
}

.hero p {
  font-size: 16px;
  opacity: 0.9;
  max-width: 500px;
}

/* Layout */
.planner-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  padding: 32px 0;
}

@media (max-width: 900px) {
  .planner-layout { grid-template-columns: 1fr; }
}

/* Sidebar */
.sidebar {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 80px;
}

.sidebar h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--charcoal);
}

.child-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }

.child-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.child-card:hover { border-color: var(--sage-light); }

.child-card.active { border-color: var(--sage); background: #F0F4EC; }

.child-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.child-name { font-weight: 600; font-size: 15px; }

.child-badge {
  background: var(--sage-light);
  color: var(--sage-dark);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.child-details {
  font-size: 13px;
  color: var(--text-light);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--sage);
  color: white;
}

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

.btn-secondary {
  background: var(--cream);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--border); }

.btn-block { width: 100%; }

.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Main Panel */
.main-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel-card {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-header h2 { font-size: 20px; font-weight: 600; }

/* Inventory Table */
.inventory-table { width: 100%; border-collapse: collapse; }

.inventory-table th,
.inventory-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.inventory-table th {
  background: var(--cream);
  font-weight: 600;
  color: var(--text-light);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.inventory-table tr:hover { background: #FAFBF8; }

.condition-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.condition-excellent { background: var(--success); }
.condition-good { background: var(--clay); }
.condition-worn { background: var(--warning); }
.condition-damaged { background: var(--danger); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-season {
  background: var(--clay-light);
  color: var(--clay);
}

.badge-pass { background: #E8F0E4; color: var(--success); }
.badge-store { background: #FFF3E0; color: var(--clay); }
.badge-done { background: #E8E8E8; color: var(--text-light); }

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

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

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--cream);
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sage);
  background: var(--warm-white);
  box-shadow: 0 0 0 3px rgba(122, 139, 111, 0.15);
}

/* Suggestions */
.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.suggestion-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.2s;
}

.suggestion-card:hover { box-shadow: var(--shadow); }

.suggestion-card.pass-along { border-left: 4px solid var(--success); }
.suggestion-card.store { border-left: 4px solid var(--clay); }

.suggestion-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.suggestion-title { font-weight: 600; font-size: 15px; }

.suggestion-meta {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.suggestion-actions { display: flex; gap: 8px; }

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

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

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--sage);
}

.stat-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-light);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

/* Content Section */
.content-section {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.content-section h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--charcoal);
}

.content-section h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--charcoal);
}

.content-section p {
  margin-bottom: 14px;
  color: var(--text);
}

.content-section ul, .content-section ol {
  margin-bottom: 14px;
  padding-left: 24px;
}

.content-section li { margin-bottom: 8px; }

.tip-box {
  background: #F0F4EC;
  border-left: 4px solid var(--sage);
  padding: 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 16px 0;
}

.warning-box {
  background: #FFF8F0;
  border-left: 4px solid var(--clay);
  padding: 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 16px 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Toolbar */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}

/* Footer */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.7);
  padding: 32px 0;
  margin-top: 48px;
  font-size: 14px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-links a:hover { color: white; }

/* Print */
@media print {
  .site-header, .sidebar, .toolbar, .btn, .modal-overlay, .site-footer { display: none !important; }
  .planner-layout { display: block; }
  .panel-card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  body { background: white; }
}

/* Responsive */
@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
  .inventory-table { font-size: 13px; }
  .inventory-table th, .inventory-table td { padding: 8px 6px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* Utility */
.hidden { display: none !important; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
