/* PLANERY TEMPLATE: style.css (Del 1 av 2) */
:root[data-theme="light"] {
  --bg: #f9f9f8;
  --surface: #ffffff;
  --subtle: #f2f2f0;
  --text: #141413;
  --muted: #666662;
  --border: #e5e5e2;
  --radius: 12px;
}

:root[data-theme="dark"] {
  --bg: #111110;
  --surface: #191918;
  --subtle: #222220;
  --text: #f4f4f2;
  --muted: #9a9a94;
  --border: #2b2b28;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding: 16px;
}

.container {
  max-width: 640px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.back-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn, .lang-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--subtle);
  font-weight: 600;
}

/* PLANERY TEMPLATE: style.css (Del 2 av 2 - Klistra in direkt under Del 1) */
.app-header {
  margin-bottom: 24px;
}

.eyebrow {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.title-row h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.app-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.ad-slot {
  background: var(--subtle);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.ad-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.footer-link {
  color: var(--text);
  text-decoration: none;
}

/* PLANERY TEMPLATE: style.css (Del 3 av 3 - Klistra in direkt under Del 2) */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.input, .select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
}

.input:focus, .select:focus {
  outline: none;
  border-color: var(--text);
}

.btn-primary {
  width: 100%;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

:root[data-theme="dark"] .btn-primary {
  background: #f4f4f2;
  color: #111110;
  border-color: #f4f4f2;
}

.btn-secondary {
  background: var(--subtle);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.result-box {
  background: var(--subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 20px;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}

.pill-btn.active {
  background: var(--subtle);
  color: var(--text);
  border-color: var(--text);
  font-weight: 600;
}

/* PLANERY DEV-LÅS: Klistra in längst ned i style.css */
.dev-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

.dev-lock {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 999;
}

.dev-lock[hidden], .dev-badge[hidden], .pin-error[hidden] {
  display: none;
}

.lock-box {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.pin-input {
  text-align: center;
  font-size: 1.4rem;
  letter-spacing: 8px;
  font-weight: 700;
}

.pin-error {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 10px;
}

/* PLANERY: DateCounter - Klistra in allra längst ned i style.css */
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.saved-grid[hidden] {
  display: none;
}

.widget-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  position: relative;
}

.widget-days {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.widget-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 2px;
}

.widget-date {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.widget-del {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
}



