:root {
  --primary: #1e293b;
  --primary-dark: #0f172a;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --radius: 10px;
  --danger: #b91c1c;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(160deg, #f8fafc 0%, #eef2f6 40%, #e8eef4 100%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
}

.container { max-width: 720px; margin: 0 auto; padding: 0 1rem; }
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }

.app-bar {
  height: 40px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.app-bar-inner {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-bar-title {
  font-weight: 600;
  font-style: italic;
  color: var(--primary);
}
.app-bar-tagline { font-size: 0.84rem; color: var(--text-muted); }
.app-bar-actions { display: flex; align-items: center; gap: 0.5rem; }

.accent-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #94a3b8);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--primary-dark); }
.btn-secondary {
  background: #fff;
  color: var(--text-main);
  border: 1px solid var(--border);
}
.btn-sm { padding: 0.25rem 0.55rem; font-size: 0.8rem; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
}
.card img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  margin-bottom: 0.65rem;
  background: #fff;
}
.label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.tab {
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}
.tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.chip {
  display: inline-block;
  background: #e2e8f0;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  margin: 0.15rem;
}

.wysiwyg-toolbar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}
.wysiwyg-editor {
  min-height: 180px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  background: #fff;
  margin-bottom: 0.75rem;
}

.cards { display: grid; gap: 0.85rem; }

.help-toggle {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.help-panel {
  display: none;
  position: fixed;
  bottom: 5rem;
  right: 1.25rem;
  width: min(340px, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.15rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  z-index: 99;
}
.help-panel.open { display: block; }
.help-panel h3 { color: var(--primary); margin-bottom: 0.6rem; }
.help-panel ol {
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
