/* Layout System - Only styles used by index.html */

/* Hero Section */
.hero-section {
  background: linear-gradient(180deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
  text-align: center;
  padding: 28px 20px;
  border-radius: 0 0 24px 24px;
}

.hero-icon {
  width: 70px;
  height: 70px;
  background: white;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.hero-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: white;
}

.hero-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.4;
  max-width: 280px;
  margin: 0 auto;
}

/* Small Hero Section - Compact variant */
.hero-section.hero-small {
  padding: 16px 20px;
}

.hero-small .hero-icon {
  width: 40px;
  height: 40px;
  font-size: 24px;
  margin-bottom: 8px;
}

.hero-small .hero-title {
  font-size: 20px;
  margin-bottom: 4px;
}

.hero-small .hero-subtitle {
  font-size: 14px;
  max-width: 100%;
}

/* Short Hero Section - Medium variant */
.hero-section.hero-short {
  padding: 24px 20px;
}

.hero-short .hero-icon {
  width: 60px;
  height: 60px;
  font-size: 32px;
  margin-bottom: 12px;
}

.hero-short .hero-title {
  font-size: 24px;
  margin-bottom: 6px;
}

.hero-short .hero-subtitle {
  font-size: 16px;
  max-width: 320px;
}

/* App Container */
.app-container {
  max-width: 428px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* App Body - Web component that adds footer */
app-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100vh;
  max-width: 428px;
  margin: 0 auto;
  width: 100%;
  padding: 56px 20px 0 20px; /* 56px top padding for fixed header */
  box-sizing: border-box;
}


/* Divider Component */
.divider {
  text-align: center;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 0.5px;
  background: var(--border-color);
}

.divider-text {
  background: var(--bg-secondary);
  padding: 0 16px;
  position: relative;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

/* Card Component System */
.card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-green-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.card-body {
  flex: 1;
  text-align: left;
}

.card-body-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.card-body-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.3;
  margin: 0;
}

.card-arrow {
  color: #BFBFBF;
  font-size: 24px;
  font-weight: 300;
}

.card-input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

/* Card section label - for labeling groups of inputs */
.card-label {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
}

/* Info Card Variant */
.info-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.info-card-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.info-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.info-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.3;
  margin: 0;
}

/* Card Grid Layout */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}


/* Modal Component */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-overlay .card {
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #718096;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #f7fafc;
  color: #2d3748;
}

/* Footer Component */
.footer {
  text-align: center;
  padding: 40px 20px 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* Safe Area */
.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* ============================================
   Shared Layout Widgets
   Canonical definitions — do not duplicate in page CSS
   ============================================ */

/* Modal Content (inner panel inside modal-overlay) */
.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
}

/* Section Card (generic content container) */
.section-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  margin-bottom: 16px;
}

/* Stats Grid — default 2-column */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

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

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.2;
}

.stat-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

/* Summary Card */
.summary-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.summary-card .count {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
}

.summary-card .label {
  font-size: 13px;
  color: #64748b;
}

/* Loading Spinner */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e0e0e0;
  border-top-color: var(--primary-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

/* Companion Visual (centered orb container) */
.companion-visual {
  text-align: center;
  padding: 20px 0;
}