:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0f766e;
  --primary-dark: #0b5b55;
  --secondary: #0b132b;
  --danger: #b91c1c;
  --warning: #a16207;
  --border: #e2e8f0;
  --success: #166534;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Tahoma, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
textarea { width: 100%; min-height: 100px; resize: vertical; }
input, select, textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
label { display: flex; flex-direction: column; gap: 0.45rem; font-weight: 700; color: var(--secondary); }
.container { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.main-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.nav-shell { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 0.8rem; font-size: 1.2rem; font-weight: 800; color: var(--secondary); }
.brand-logo { width: 42px; height: 42px; object-fit: cover; border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.nav-links a, .link-button {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--secondary);
}
.nav-links a:hover, .link-button:hover { background: #eef2ff; }
.page-grid, .planner-page, .narrow-page, .two-columns { padding: 1.5rem 0 3rem; }
.pad-top { padding-top: 2.5rem; }
.narrow-page { max-width: 780px; margin: 0 auto; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; align-items: stretch; }
.card {
  background: var(--card);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.9);
  margin-bottom: 1rem;
}
.card-accent { background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%); }
.card-danger { border-color: rgba(185, 28, 28, 0.2); }
.card-warning { border-color: rgba(161, 98, 7, 0.2); }
.sub-card { background: #f8fafc; border-radius: 14px; padding: 1rem; border: 1px solid var(--border); margin-bottom: 0.8rem; }
.notice { width: min(1180px, calc(100% - 2rem)); margin: 1rem auto 0; padding: 1rem; border-radius: 14px; font-weight: 700; }
.notice-success { background: #dcfce7; color: var(--success); }
.notice-error { background: #fee2e2; color: var(--danger); }
.notice-warning { background: #fef3c7; color: var(--warning); }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.stat-card strong { font-size: 2rem; color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .full-row { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.inline-form { display: inline; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  font-weight: 700;
}
.btn-small { padding: 0.55rem 0.8rem; font-size: 0.9rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #e2e8f0; color: var(--secondary); }
.btn-danger { background: var(--danger); color: #fff; }
.badge, .tag, .status-pill {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 0.35rem 0.7rem; font-size: 0.88rem; font-weight: 700;
}
.badge { background: #dcfce7; color: var(--success); }
.tag { background: #ecfeff; color: #155e75; margin-left: 0.4rem; margin-bottom: 0.4rem; }
.status-pill { background: #e2e8f0; }
.status-active { background: #dcfce7; color: var(--success); }
.status-expired, .status-suspended { background: #fee2e2; color: var(--danger); }
.status-pending_activation { background: #fef3c7; color: var(--warning); }
.feature-list, .detail-list { margin: 0; padding-right: 1.1rem; }
.feature-list li, .detail-list li { margin-bottom: 0.6rem; }
.pricing-box { background: #0b132b; color: #fff; border-radius: 20px; padding: 1.2rem; }
.price-row { display: flex; gap: 1rem; margin-top: 1rem; }
.price-row div { background: rgba(255,255,255,0.08); padding: 1rem; border-radius: 14px; flex: 1; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
th, td { text-align: right; padding: 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: #f8fafc; }
.table-actions, .bulk-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.bulk-toolbar { margin-bottom: 0.8rem; }
.section-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.list-stack { display: grid; gap: 0.8rem; }
.center-text { text-align: center; }
.muted { color: var(--muted); }
.main-footer { background: #fff; border-top: 1px solid var(--border); margin-top: 2rem; }
.footer-shell { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; }
.social-links { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.checkbox-card { display: flex; flex-direction: row; align-items: center; gap: 0.8rem; background: #f8fafc; padding: 0.9rem; border-radius: 12px; border: 1px solid var(--border); }
.checkbox-card input { width: auto; }
.checkbox-card small { display: block; color: var(--muted); }
.compact-details summary { cursor: pointer; color: var(--primary); margin-bottom: 0.5rem; }
.mini-form { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
.planner-grid { display: grid; grid-template-columns: 310px 1fr; gap: 1rem; }
.planner-sidebar { background: #f8fafc; border-radius: 16px; padding: 1rem; border: 1px solid var(--border); }
.food-catalog, .exercise-catalog { display: grid; gap: 0.75rem; max-height: 600px; overflow: auto; }
.draggable-food { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 0.85rem; cursor: grab; display: grid; gap: 0.35rem; }
.macro-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.macro-summary > div { background: #ecfeff; padding: 0.9rem; border-radius: 14px; border: 1px solid #bae6fd; }
.meal-columns, .exercise-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.meal-dropzone, .exercise-dropzone { background: #f8fafc; border: 2px dashed #cbd5e1; min-height: 180px; padding: 1rem; border-radius: 16px; }
.meal-dropzone.drag-over, .exercise-dropzone.drag-over { border-color: var(--primary); background: #f0fdfa; }
.planner-item { background: #fff; border: 1px solid var(--border); padding: 0.8rem; border-radius: 12px; margin-bottom: 0.65rem; }
.planner-item-row { display: flex; gap: 0.6rem; align-items: center; justify-content: space-between; }
.planner-item input { max-width: 120px; }
.remove-btn { background: transparent; border: none; color: var(--danger); cursor: pointer; font-weight: 700; }
.exercise-days .exercise-dropzone { min-height: 150px; }
.print-page { padding-top: 1rem; }
.print-card { max-width: 1000px; margin: 0 auto; }
.print-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.print-logo { width: 90px; height: 90px; object-fit: cover; }
.print-meal { margin-top: 1.5rem; }
.no-print { margin-top: 1rem; }
@media print {
  .main-header, .main-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: none; }
}
@media (max-width: 980px) {
  .hero, .two-columns, .planner-grid, .meal-columns, .exercise-days { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .checkbox-grid { grid-template-columns: 1fr; }
  .nav-shell, .footer-shell, .section-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
}
