/* Společné styly pro všechny moduly e-shop nástrojů – FOMEI */

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  background: #f8fafc;
  line-height: 1.5;
  color: #1e293b;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header – jednotný vzhled (sticky, černý, logo, zpět) */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #000;
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.header-back {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 13px;
}
.header-back:hover {
  color: #fff;
  text-decoration: underline;
}
.header-logo {
  height: 30px;
  width: auto;
  display: block;
}
.header h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}
.header p {
  margin: 6px 0 0;
  opacity: 0.9;
  font-size: 14px;
}
.header-status {
  flex: 1;
  min-width: 120px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}
/* Střed hlavičky – aktuální činnost (status) */
.header-center {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
/* Pravý blok hlavičky: status serveru + tlačítko + logo – vše v jednom řádku, svisle zarovnáno */
.header-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.header-right .header-logo {
  height: 30px;
  width: auto;
  margin-left: 4px;
}
.header-right .server-status { margin: 0; }
.server-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}
.server-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.server-status.offline { color: #fca5a5; }
.server-status.online { color: #86efac; }

.app-footer {
  padding: 12px 24px;
  font-size: 12px;
  color: #64748b;
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.app-version {
  opacity: 0.85;
}

.app-version-sep {
  opacity: 0.5;
}

.main {
  margin: 0 auto;
  padding: 24px;
}

/* Kroky (step) – společné pro kontrolor, newsletter, editor */
.step {
  margin-bottom: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.step-head {
  padding: 12px 16px;
  font-weight: 600;
  font-size: 15px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #94c11e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.step-body { padding: 16px; }

/* Formulářové pole */
.field { margin-bottom: 12px; }
.field label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
}
.field textarea { min-height: 80px; resize: vertical; }
.field-hint {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}
.field-hint code {
  background: #f1f5f9;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
}

/* Tlačítka */
.btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
}
.btn-primary {
  background: #ffc000;
  color: #000;
}
.btn-primary:hover {
  background: #e6ad00;
  color: #000;
}
.btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.btn-secondary:hover { background: #e2e8f0; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Stavové zprávy */
.status {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
}
.status.loading { background: #fef9c3; color: #854d0e; }
.status.error { background: #fee2e2; color: #991b1b; }
.status.ok { background: #dcfce7; color: #166534; }

details { margin-top: 12px; }
details summary { cursor: pointer; font-size: 12px; color: #64748b; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
