*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #111827;
  background: #fff;
  line-height: 1.5;
}

a { color: var(--primary, #004CE8); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
.page { padding: 2rem 1rem; }

.site-header { border-bottom: 1px solid #e5e7eb; background: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; }
.logo-link { display: flex; align-items: center; gap: .75rem; font-weight: 700; color: inherit; text-decoration: none; }
.logo { width: 2.5rem; height: 2.5rem; object-fit: contain; }
.main-nav { display: flex; gap: 1.5rem; }
.main-nav a { color: #374151; font-weight: 500; }

.site-footer { margin-top: 3rem; padding: 2rem 0; background: #f9fafb; color: #6b7280; text-align: center; }

.setup-banner { background: #fef3c7; color: #92400e; padding: .75rem 0; }
.setup-banner p { margin: 0; text-align: center; font-size: .875rem; }

.search-hero { position: relative; color: #fff; padding: 4rem 0; overflow: hidden; }
.search-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.search-hero-content { position: relative; z-index: 1; }
.search-hero h1 { font-size: 2rem; margin: 0 0 .5rem; }
.search-form { margin-top: 2rem; background: rgba(255,255,255,.1); backdrop-filter: blur(8px); border-radius: 1rem; padding: 1rem; }
.search-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.search-tab { cursor: pointer; }
.search-tab input { position: absolute; opacity: 0; pointer-events: none; }
.search-tab span { display: block; padding: .5rem 1rem; border-radius: 999px; background: rgba(255,255,255,.15); }
.search-tab:has(input:checked) span { background: #fff; color: var(--primary); font-weight: 600; }
.search-fields { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .search-fields { grid-template-columns: 2fr 1fr 1fr auto; } }

.promo-strip { background: #7c3aed; color: #fff; text-align: center; padding: 1.5rem 1rem; font-weight: 700; }
.section { padding: 3rem 0; }
.section-muted { background: #f9fafb; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }

.offer-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .offer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .offer-grid { grid-template-columns: repeat(4, 1fr); } }

.offer-card { border: 1px solid #e5e7eb; border-radius: .75rem; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.offer-card-header { display: flex; gap: .75rem; padding: 1rem; border-bottom: 1px solid #f3f4f6; }
.offer-card-logo { width: 2.5rem; height: 2.5rem; object-fit: contain; }
.offer-card-brand { margin: 0; font-size: .75rem; color: #6b7280; }
.offer-card-unit { margin: 0; font-size: .875rem; font-weight: 600; }
.offer-card-body { padding: 1rem; flex: 1; }
.offer-card-body h3 { margin: 0 0 .75rem; font-size: 1rem; line-height: 1.35; }
.offer-card-footer { padding: 1rem; border-top: 1px solid #f3f4f6; }
.offer-location { color: #6b7280; font-size: .875rem; }
.price-old { color: #9ca3af; text-decoration: line-through; font-size: .875rem; }
.price-current { font-size: 1.5rem; font-weight: 700; margin: .25rem 0; }
.price-current span, .price-current.large span { font-size: .875rem; font-weight: 400; color: #6b7280; }
.price-current.large { font-size: 2rem; }
.price-meta { font-size: .75rem; color: #6b7280; }

.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.badge { display: inline-block; padding: .125rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-primary { background: #eff6ff; color: var(--primary); }
.badge-purple { background: #f3e8ff; color: #7c3aed; }
.badge-green { background: #dcfce7; color: #15803d; }

.course-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.course-card { display: block; padding: 1rem; border: 1px solid #e5e7eb; border-radius: .75rem; background: #fff; color: inherit; font-weight: 600; }
.course-card:hover { border-color: var(--primary); text-decoration: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: .625rem 1rem; border-radius: .5rem; border: 1px solid transparent; font-weight: 600; cursor: pointer; font-size: .875rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent, #FF6B00); color: #fff; }
.btn-outline { background: #fff; border-color: #d1d5db; color: #374151; }
.btn-block { width: 100%; }

.input, select.input, textarea.input {
  width: 100%; padding: .625rem .75rem; border: 1px solid #d1d5db; border-radius: .5rem; font: inherit;
}

.filter-bar { margin-bottom: 1.5rem; padding: 1rem; border: 1px solid #e5e7eb; border-radius: .75rem; background: #fff; }
.filter-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .filter-grid { grid-template-columns: repeat(4, 1fr); } }
.filter-grid label { display: block; font-size: .75rem; color: #6b7280; margin-bottom: .25rem; font-weight: 600; }
.filter-actions { display: flex; justify-content: space-between; margin-top: 1rem; gap: .75rem; }

.pagination { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.page-link { padding: .5rem .75rem; border: 1px solid #d1d5db; border-radius: .375rem; color: #374151; }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.empty-state { text-align: center; padding: 3rem; border: 1px solid #e5e7eb; border-radius: .75rem; background: #fff; }
.breadcrumb { font-size: .875rem; color: #6b7280; margin-bottom: 1rem; }
.page-subtitle { color: #6b7280; margin-top: -.5rem; margin-bottom: 1.5rem; }

.detail-grid { display: grid; gap: 2rem; }
@media (min-width: 1024px) { .detail-grid { grid-template-columns: 2fr 1fr; } }
.detail-stats { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.5rem 0; }
@media (min-width: 640px) { .detail-stats { grid-template-columns: repeat(3, 1fr); } }
.stat-card, .card { border: 1px solid #e5e7eb; border-radius: .75rem; padding: 1rem; background: #fff; }
.stat-label { font-size: .75rem; color: #6b7280; margin: 0; }
.stat-value { font-weight: 700; margin: .25rem 0 0; }
.detail-list { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .detail-list { grid-template-columns: 1fr 1fr; } }
.detail-list dt { color: #6b7280; font-size: .875rem; }
.detail-list dd { margin: 0; font-weight: 600; }
.detail-list .full { grid-column: 1 / -1; }
.detail-sidebar { position: sticky; top: 6rem; align-self: start; }

.wizard { max-width: 42rem; margin: 0 auto; padding: 1.5rem; }
.wizard-steps { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.wizard-step { flex: 1; height: .5rem; border-radius: 999px; background: #e5e7eb; }
.wizard-step.active { background: var(--primary); }
.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .25rem; }
.form-actions { display: flex; gap: .75rem; align-items: center; }
.summary-box { background: #f9fafb; border-radius: .5rem; padding: 1rem; margin-bottom: 1rem; font-size: .875rem; }
.checkbox-label { display: flex; gap: .5rem; align-items: flex-start; font-size: .875rem; margin-bottom: .5rem; }

.alert { padding: .75rem 1rem; border-radius: .5rem; margin-bottom: 1rem; font-size: .875rem; }
.alert-error { background: #fef2f2; color: #b91c1c; }
.alert-success { background: #ecfdf5; color: #047857; }
.alert-warning { background: #fffbeb; color: #b45309; }
.text-muted { color: #6b7280; font-size: .875rem; }
.text-success { color: #047857; font-weight: 600; }
.text-warning { color: #b45309; font-weight: 600; }
.text-center { text-align: center; }
.hint { font-size: .75rem; color: #6b7280; margin-top: .25rem; }

.admin-body { background: #f3f4f6; }
.admin-layout { display: grid; min-height: 100vh; }
@media (min-width: 900px) { .admin-layout { grid-template-columns: 240px 1fr; } }
.admin-sidebar { background: #111827; color: #fff; padding: 1.5rem; }
.admin-sidebar h2 { margin-top: 0; }
.admin-sidebar nav { display: grid; gap: .75rem; margin: 2rem 0; }
.admin-sidebar a { color: #d1d5db; }
.admin-main { padding: 2rem; }
.admin-cards { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.5rem 0; }
@media (min-width: 640px) { .admin-cards { grid-template-columns: 1fr 1fr; } }
.admin-section { margin-top: 1.5rem; }
.admin-auth-body { min-height: 100vh; display: grid; place-items: center; background: #f3f4f6; }
.admin-auth-card { width: 100%; max-width: 24rem; padding: 2rem; }
