/* ===== Motiv: černá / šedá / tmavě oranžová ===== */
:root {
  --bg: #0d0d0d;
  --panel: #161616;
  --panel-2: #1f1f1f;
  --border: #2c2c2c;
  --text: #ececec;
  --muted: #9a9a9a;
  --orange: #e8590c;
  --orange-2: #ff7a2f;
  --orange-dim: #6b2e08;
  --green: #2f9e44;
  --red: #e03131;
  --radius: 12px;
}

* { box-sizing: border-box; }

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

a { color: var(--orange-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; background: #000; border-bottom: 2px solid var(--orange);
}
.topbar .brand { font-weight: 700; letter-spacing: .5px; }
.topbar .brand span { color: var(--orange); }
.topbar .right { font-size: 14px; color: var(--muted); }
.topbar .right a { margin-left: 14px; }

.container { max-width: 1100px; margin: 0 auto; padding: 26px 20px; }
.narrow { max-width: 460px; }

.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.panel + .panel { margin-top: 18px; }

h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 19px; margin: 0 0 12px; }
.subtitle { color: var(--muted); margin: 0 0 18px; }

/* ===== Formuláře ===== */
label { display: block; font-weight: 600; margin: 14px 0 5px; font-size: 14px; }
.help { color: var(--muted); font-size: 12.5px; font-weight: 400; margin-top: 3px; }

/* (i) ikonka s nápovědou */
.info-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: 50%; font-size: 11px; font-style: italic;
  font-weight: 700; background: var(--orange-dim); color: var(--orange-2);
  border: 1px solid var(--orange); cursor: help; position: relative; vertical-align: middle;
  font-family: Georgia, serif;
}
.info-icon::after {
  content: attr(data-tip); position: absolute; bottom: 135%; left: 50%; transform: translateX(-50%);
  width: 260px; background: #000; color: var(--text); border: 1px solid var(--orange);
  border-radius: 8px; padding: 9px 11px; font-size: 12.5px; font-weight: 400; font-style: normal;
  line-height: 1.45; text-align: left; z-index: 50; white-space: normal;
  opacity: 0; visibility: hidden; transition: opacity .15s; pointer-events: none;
}
.info-icon:hover::after, .info-icon:focus::after { opacity: 1; visibility: visible; }

/* Zvýrazněné upozornění (např. nad grafikou) */
.notice { background: var(--panel-2); border: 1px solid var(--border);
  border-left: 3px solid var(--orange); border-radius: 9px; padding: 12px 14px;
  font-size: 13.5px; margin-bottom: 16px; }
.notice b { color: var(--orange-2); }
.notice.warn { border-left-color: #ffd43b; }
.notice.warn b { color: #ffd43b; }

/* Náhled výchozí obrazovky */
.default-preview { width: 100%; max-height: 260px; object-fit: contain; background: #000;
  border-radius: 8px; border: 1px solid var(--orange); margin: 8px 0; cursor: zoom-in; }
.graphic-preview { cursor: zoom-in; }
input[type=text], input[type=password], input[type=number], input[type=email],
textarea, select {
  width: 100%; padding: 11px 12px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 9px; color: var(--text);
  font-size: 15px;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--orange);
}
textarea { min-height: 80px; resize: vertical; }
input[type=color] {
  width: 56px; height: 40px; padding: 2px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 8px; vertical-align: middle;
}
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type=text] { max-width: 140px; }
.checkbox { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--orange); }
.checkbox label { margin: 0; }

/* ===== Tlačítka ===== */
.btn {
  display: inline-block; padding: 11px 18px; border-radius: 9px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; background: var(--panel-2);
  color: var(--text);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--orange); color: #1a1a1a; }
.btn-primary:hover { background: var(--orange-2); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-danger { background: transparent; border-color: var(--red); color: #ff8787; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ===== Flash zprávy ===== */
.flash { padding: 12px 14px; border-radius: 9px; margin-bottom: 12px; font-size: 14px; }
.flash.success { background: #14361d; border: 1px solid #2f9e44; }
.flash.error { background: #3a1515; border: 1px solid var(--red); }
.flash.info { background: #15293a; border: 1px solid #1971c2; }

/* ===== PIN ===== */
.pin-input {
  letter-spacing: 14px; font-size: 30px; text-align: center; font-weight: 700;
}

/* ===== Postup (progress) ===== */
.progress-wrap { margin: 8px 0 20px; }
.progress-bar { height: 12px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange-2));
  transition: width .4s ease; }
.progress-text { font-size: 13px; color: var(--muted); margin-top: 6px; }

.wizard-layout { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }
@media (max-width: 800px) { .wizard-layout { grid-template-columns: 1fr; } }

.steplist { list-style: none; padding: 0; margin: 0; }
.steplist li {
  border-radius: 8px; font-size: 14px; color: var(--muted);
  display: flex; align-items: center; gap: 9px; margin-bottom: 3px;
}
.steplist .steplink {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 12px; color: inherit; text-decoration: none; border-radius: 8px;
}
.steplist .steplink:hover { background: var(--panel-2); text-decoration: none; }
.steplist li.active { background: var(--panel-2); color: var(--text); border-left: 3px solid var(--orange); }
.steplist li.done { color: var(--text); }
.steplist .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.steplist li.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.steplist .dot-btn { background: transparent; color: var(--text); cursor: pointer; padding: 0; }
.steplist .dot-btn:hover { border-color: var(--orange); }
.steplist li.active .dot { border-color: var(--orange); }
.steplist .kgroup { font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--orange); margin: 14px 0 4px; padding-left: 6px; }

/* ===== Autosave indikátor ===== */
.savebar { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.savebar .dot-save { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.savebar.saving .dot-save { background: var(--orange); }
.savebar.saved .dot-save { background: var(--green); }

/* ===== Grafika (upload) ===== */
.graphic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.graphic-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; }
.graphic-card h3 { margin: 0 0 4px; font-size: 15px; }
.graphic-card .req { font-size: 11px; color: var(--orange); }
.graphic-card .spec { font-size: 12.5px; color: var(--muted); margin: 4px 0 10px; }
.graphic-preview { width: 100%; aspect-ratio: 9/16; max-height: 220px; object-fit: contain;
  background: #000; border-radius: 8px; border: 1px dashed var(--border); margin-bottom: 10px; }
.graphic-preview.banner { aspect-ratio: 27/10; }
.dropzone { border: 2px dashed var(--border); border-radius: 9px; padding: 16px; text-align: center;
  cursor: pointer; font-size: 13px; color: var(--muted); }
.dropzone:hover { border-color: var(--orange); color: var(--text); }
.upload-msg { font-size: 13px; margin-top: 8px; min-height: 18px; }
.upload-msg.ok { color: #69db7c; }
.upload-msg.err { color: #ff8787; }

/* ===== Tabulka admin ===== */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; }
.pin-badge { font-family: monospace; font-size: 18px; letter-spacing: 4px; background: #000;
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--orange); color: var(--orange-2); }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 99px; }
.badge.open { background: #2a2a2a; color: var(--muted); }
.badge.submitted { background: #15293a; color: #74c0fc; }
.badge.generated { background: #14361d; color: #69db7c; }
.mini-bar { height: 8px; width: 120px; background: var(--panel-2); border-radius: 99px; overflow: hidden; display: inline-block; vertical-align: middle; }
.mini-fill { height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange-2)); }

/* Patička s kontaktem na podporu (jen pro zákazníka ve wizardu) */
.support-footer { text-align: center; color: var(--muted); font-size: 13px;
  padding: 18px 20px; border-top: 1px solid var(--border); margin-top: 16px; }
.support-footer a { color: var(--orange-2); font-weight: 600; }

/* Loading overlay (při odesílání / generování) */
.loading-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.8);
  display: flex; align-items: center; justify-content: center; z-index: 1000; }
.loading-box { text-align: center; max-width: 360px; padding: 24px; }
.loading-box .spinner { width: 54px; height: 54px; margin: 0 auto 18px;
  border: 5px solid var(--panel-2); border-top-color: var(--orange);
  border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-msg { font-size: 18px; font-weight: 700; color: var(--text); }
.loading-sub { font-size: 14px; color: var(--muted); margin-top: 8px; }
