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

/* Header */
.header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.header-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--brand-cream);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.2s ease;
  line-height: 1;
  letter-spacing: 0.3px;
}
.header-logo:hover { opacity: 0.85; }

.header-logo .logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.header-logo .logo-text {
  color: var(--brand-cream);
}
.header-logo .logo-text span {
  color: var(--blue-primary);
}

/* App page header : back arrow + logo + app name */
.header-app {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-back {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.header-back:hover {
  background: var(--blue-primary);
  color: white;
  transform: translateX(-2px);
}
.header-app .logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.header-app .app-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-cream);
}
.header-app .app-title span {
  color: var(--blue-primary);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-nav a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--text-primary);
}

/* Footer */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 32px 0;
  margin-top: 60px;
}

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

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-copy {
  color: var(--text-disabled);
  font-size: 0.85rem;
}

/* Main content */
.main {
  padding: 40px 0;
  min-height: calc(100vh - 200px);
}

/* Grid */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Section */
.section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 1.6rem;
  margin-bottom: 24px;
}

/* Page header */
.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  margin-bottom: 8px;
}

.page-header p {
  font-size: 1.1rem;
}

/* Flex utilities */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

/* Text utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.25rem; }
.fw-bold { font-weight: 700; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 32px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 32px; }
