/* Marketing Sosmed — standalone app, neutral palette (not tied to any single business's brand
   colors, since this app serves AyamKoe/Ikimochi/Sewa iPhone equally). Light theme only, by
   design — see SKILL.md's non-goals note carried over from the original feature. */
:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --border: #e3e6ea;
  --text: #1f2430;
  --muted: #6b7280;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-bg: #eef0fe;
  --gray-bg: #f1f2f5;
  --red: #dc2626;
  --red-bg: #fde8e8;
  --green: #16a34a;
  --radius: 10px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
}
.topbar-left { display: flex; align-items: center; gap: 18px; }
.brand { font-weight: 700; font-size: 16px; color: var(--text); }
.business-switcher { display: flex; gap: 6px; }
.business-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--gray-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.business-pill-active { background: var(--primary); color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.topbar-link { color: var(--muted); }
.topbar-user { color: var(--muted); font-weight: 600; }
.btn-link { background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.btn-link:hover { color: var(--red); text-decoration: underline; }

.subnav {
  display: flex;
  gap: 4px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  overflow-x: auto;
}
.subnav a {
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.subnav a:hover { color: var(--text); text-decoration: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }

.muted-text { color: var(--muted); font-size: 13px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 18px; text-align: center; }
.stat-num { font-size: 32px; font-weight: 800; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat-card-good .stat-num { color: var(--green); }
.stat-card-bad .stat-num { color: var(--red); }

.dash-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.panel-title { font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.simple-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.simple-list li a { display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.simple-list li a:hover { text-decoration: none; opacity: 0.8; }

.simple-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.simple-table th { text-align: left; padding: 8px 10px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.simple-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); }

.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.template-card { padding: 0; overflow: hidden; }
.template-swatch { height: 60px; }
.template-card-body { padding: 14px; }

.photo-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 8px; }
.photo-pick { position: relative; cursor: pointer; border: 2px solid transparent; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.photo-pick img { width: 100%; height: 110px; object-fit: cover; display: block; }
.photo-pick input[type="radio"] { position: absolute; top: 6px; left: 6px; }
.photo-pick:has(input:checked) { border-color: var(--primary); }
.photo-pick span.muted-text { padding: 4px 6px; font-size: 11px; }
.photo-pick-none { align-items: center; justify-content: center; background: var(--gray-bg); min-height: 110px; padding: 10px; text-align: center; font-size: 13px; }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-columns { grid-template-columns: 1fr; }
}

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-header.actions-only { justify-content: flex-end; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover { background: var(--gray-bg); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.alert-error { background: var(--red-bg); color: var(--red); }
.alert-info { background: var(--primary-bg); color: var(--primary-dark); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge-gray { background: var(--gray-bg); color: var(--muted); }
.badge-blue { background: var(--primary-bg); color: var(--primary-dark); }
.badge-green { background: #e7f6ec; color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--muted); }
.form-group input, .form-group select, .form-group textarea {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
.form-actions { display: flex; gap: 10px; margin-top: 18px; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-panel { width: 320px; display: flex; flex-direction: column; gap: 14px; }
.login-title { margin: 0 0 4px; font-size: 18px; text-align: center; }

/* ---- calendar month-nav + day-strip (ported/translated from calendar-base.css) ---- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}
.calendar-panel { overflow-x: visible; }
.calendar-month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.calendar-month-nav-center { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: center; flex-wrap: wrap; }
.calendar-month-label { font-weight: 700; font-size: 17px; text-transform: capitalize; }
.calendar-today-link { font-size: 12px; font-weight: 600; color: var(--primary); background: var(--primary-bg); padding: 4px 10px; border-radius: 999px; text-decoration: none; }
.calendar-today-link:hover { text-decoration: none; background: var(--border); }
.calendar-week-arrow { width: 36px; height: 36px; border-radius: 50%; background: var(--gray-bg); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--text); flex-shrink: 0; }
.calendar-week-arrow:hover { background: var(--border); text-decoration: none; }
.calendar-day-strip { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 2px; }
.calendar-day-strip::-webkit-scrollbar { display: none; }
.calendar-day-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: var(--gray-bg); color: var(--text); text-decoration: none; flex: 0 0 auto; width: 46px; scroll-snap-align: center; }
.calendar-day-chip:hover { text-decoration: none; background: var(--border); }
.calendar-day-chip-name { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.calendar-day-chip-num { font-size: 15px; font-weight: 700; }
.calendar-day-chip-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.calendar-day-chip-dot-empty { background: transparent; }
.calendar-day-chip-today { background: var(--primary-bg); }
.calendar-day-chip-selected { background: var(--primary); color: #fff; }
.calendar-day-chip-selected .calendar-day-chip-name { color: rgba(255, 255, 255, 0.85); }
.calendar-day-chip-selected .calendar-day-chip-dot { background: #fff; }

/* ---- day-cards (ported from style-append.css) ---- */
.sosmed-day-cards { display: flex; gap: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 4px; }
.sosmed-day-cards::-webkit-scrollbar { display: none; }
.sosmed-day-card { flex: 0 0 auto; width: 260px; scroll-snap-align: start; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.sosmed-day-card-today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset, var(--shadow-card); }
.sosmed-day-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sosmed-day-card-title { font-weight: 700; font-size: 15px; text-transform: capitalize; }
.sosmed-day-card-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sosmed-day-card-add { width: 28px; height: 28px; border-radius: 50%; background: var(--gray-bg); color: var(--text); display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; text-decoration: none; flex-shrink: 0; }
.sosmed-day-card-add:hover { background: var(--primary-bg); color: var(--primary); text-decoration: none; }
.sosmed-day-card-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px 8px; border: 1.5px dashed var(--border); border-radius: calc(var(--radius) - 2px); color: var(--muted); font-size: 13px; text-decoration: none; flex: 1; min-height: 92px; }
.sosmed-day-card-empty:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; background: var(--primary-bg); }
.sosmed-post-list { display: flex; flex-direction: column; gap: 8px; }
.sosmed-post-item { display: flex; align-items: center; gap: 10px; background: var(--gray-bg); border-radius: calc(var(--radius) - 2px); padding: 8px; }
.sosmed-post-item-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: var(--text); }
.sosmed-post-item-link:hover { text-decoration: none; opacity: 0.85; }
.sosmed-post-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.sosmed-post-thumb-empty { display: flex; align-items: center; justify-content: center; background: var(--border); color: var(--muted); font-weight: 700; }
.sosmed-post-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sosmed-post-time { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sosmed-post-error { font-size: 11px; color: var(--red); }
.sosmed-post-actions { display: flex; gap: 4px; flex-shrink: 0; }
.sosmed-icon-btn { width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(15, 23, 42, 0.06); color: var(--muted); font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.sosmed-icon-btn:hover { background: var(--border); }
.sosmed-icon-btn-danger:hover { background: var(--red-bg); color: var(--red); }

@media (max-width: 640px) {
  .sosmed-day-card { width: 80vw; }
  .form-grid { grid-template-columns: 1fr; }
}
