:root {
  --blue: #0f70b8;
  --blue-2: #77a7e8;
  --bg: #f4f7fb;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #d9e2ef;
  --orange: #F79724;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Tahoma, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--blue); text-decoration: none; }
.topbar { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 12px 22px; box-shadow: 0 2px 14px rgba(31,41,55,.06); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--blue); }
.brand-mark { background: var(--blue); color: #fff; border-radius: 12px; padding: 8px 10px; letter-spacing: 1px; }
.nav { display: flex; gap: 10px; flex-wrap: wrap; }
.nav a { padding: 9px 11px; border-radius: 10px; color: #374151; }
.nav a:hover { background: #edf4fa; color: var(--blue); }
.container { max-width: 1180px; margin: 24px auto; padding: 0 18px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px; box-shadow: 0 12px 30px rgba(31,41,55,.06); margin-bottom: 18px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(430px, 100%); }
.logo-big { text-align: center; color: var(--blue); font-size: 34px; font-weight: 900; letter-spacing: 1px; margin-bottom: 4px; }
.subtle { color: var(--muted); }
h1, h2, h3 { margin: 0 0 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-row { margin-bottom: 14px; }
label { display: block; font-weight: 700; margin-bottom: 7px; }
input, textarea, select { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px; font-size: 15px; background: #fff; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(15,112,184,.12); }
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; padding: 11px 16px; background: var(--blue); color: #fff; font-weight: 800; cursor: pointer; gap: 8px; }
.btn:hover { opacity: .93; }
.btn.secondary { background: #e9eef6; color: #374151; }
.btn.danger { background: #dc2626; }
.btn.orange { background: var(--orange); }
.btn-group { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.data th { background: #f8fafc; font-weight: 900; }
.badge { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.badge-draft { background: #fff7ed; color: #c2410c; }
.badge-ready { background: #eff6ff; color: #1d4ed8; }
.badge-exported { background: #ecfdf5; color: #047857; }
.alert { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.stepper { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 18px; }
.step { padding: 7px 11px; border-radius: 999px; background: #e9eef6; color: #475569; font-weight: 800; }
.step.active { background: var(--blue); color: #fff; }
.search-box { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; align-items: end; }
.preview-shell { background: #d9e2ef; padding: 22px 0; border-radius: 18px; overflow-x: auto; }
.preview-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.stat { background: linear-gradient(135deg,#fff,#edf4fa); border: 1px solid var(--border); border-radius: 18px; padding: 18px; }
.stat .num { font-size: 28px; font-weight: 900; color: var(--blue); }
@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .form-grid, .search-box, .stats { grid-template-columns: 1fr; }
  .container { margin: 16px auto; padding: 0 12px; }
  .card { padding: 16px; border-radius: 14px; }
}
.header-preview-box { background: #edf4fa; border: 1px solid var(--border); border-radius: 16px; padding: 14px; margin: 16px 0 20px; overflow-x: auto; }
.header-preview-box img { display: block; width: 100%; max-width: 980px; height: auto; border-radius: 8px; background: #fff; }
