:root {
  --bg: #000000;
  --bg-2: #050505;
  --panel: #050505;
  --panel-2: #080808;
  --line: rgba(180, 24, 24, 0.24);
  --line-strong: rgba(180, 24, 24, 0.48);
  --text: #f4f4f4;
  --muted: #9d9d9d;
  --accent: #8f1010;
  --accent-2: #ba2020;
  --accent-3: #5d0808;
  --danger: #cf3b3b;
  --warning: #d96c6c;
  --shadow: 0 14px 40px rgba(0, 0, 0, .42);
  --shadow-soft: 0 0 0 rgba(0, 0, 0, 0);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  background: #000;
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('/static/images/upnatom-logo.png') center center / min(58vw, 760px) auto no-repeat;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
  filter: grayscale(1) contrast(1.08);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(110, 10, 10, 0.08), transparent 26%), linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.44));
  pointer-events: none;
  z-index: 0;
}
.site-bg-glow {
  position: fixed;
  inset: -20% -10% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(177, 20, 20, .16) 0%, rgba(120, 10, 10, .08) 30%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #090909;
  color: var(--text);
  padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, .12);
  background: #0d0d0d;
}
textarea { resize: vertical; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { color: #fff7ec; }
small, .muted { color: var(--muted); }
code { background: rgba(255,255,255,.08); padding: 2px 6px; border-radius: 6px; }
.btn {
  border: none;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 12px;
  transition: .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: #0d0d0d;
  color: #f4f4f4;
  border: 1px solid rgba(180, 24, 24, 0.42);
  box-shadow: none;
}
.btn-primary:hover { border-color: rgba(210, 44, 44, 0.62); background: #121212; }
.btn-secondary {
  background: #090909;
  color: white;
  border: 1px solid var(--line);
}
.btn-danger { background: rgba(217, 77, 105, .14); color: #ffb3c2; border: 1px solid rgba(255, 97, 97, .35); }
.btn-ghost { background: rgba(255,255,255,.02); border: 1px solid var(--line); color: var(--muted); }
.btn-small { padding: 9px 12px; }
.btn-lg { padding: 15px 18px; }
.w-100 { width: 100%; }
.full-width { grid-column: 1 / -1; }
.badge {
  display: inline-flex; padding: 8px 12px; border-radius: 999px; background: rgba(255, 176, 0, .12);
  color: #ffd188; border: 1px solid rgba(255, 176, 0, .28); font-size: 12px; margin-bottom: 12px;
}
.badge-danger { background: rgba(255, 77, 77, .12); color: #ffc0c0; border-color: rgba(255, 77, 77, .28); }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: min(640px, 100%);
  background: #050505;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 36px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 22px;
  backdrop-filter: blur(10px);
}
.danger-card { border-color: rgba(255, 77, 77, .35); }
.dev-login-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.flash-stack { position: fixed; top: 20px; right: 20px; display: grid; gap: 10px; z-index: 10000; }
.flash-message {
  background: rgba(25, 11, 10, 0.98);
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}
.section-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-card {
  background: #050505;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.stack-list { display: grid; gap: 16px; }
.form-stack { display: grid; gap: 16px; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.button-row { display: flex; gap: 12px; }
.button-row.wrap { flex-wrap: wrap; }
.empty-state { padding: 32px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; }
.empty-state.mini { padding: 16px; }
.status-pill {
  display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px; font-size: 12px;
  background: rgba(255, 176, 0, .12); color: #ffd188; border: 1px solid rgba(255, 176, 0, .24);
}
.metric-card, .info-box, .history-card, .table-row {
  background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
}
.metric-card span, .info-box span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.metric-card strong, .info-box strong { font-size: 24px; }
.margin-top { margin-top: 18px; }
.margin-bottom { margin-bottom: 18px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(28, 12, 10, 0.96); color: white; cursor: pointer;
}
.modal.hidden { display: none; }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.72); display: grid; place-items: center; z-index: 3000; padding: 24px;
}
.modal-card {
  width: min(640px, 100%);
  background: linear-gradient(180deg, rgba(24, 10, 9, 1), rgba(14, 7, 7, 1));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.modal-card.small { width: min(420px, 100%); }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.recipe-preview { width: 100%; border-radius: 14px; margin-bottom: 16px; }
.hidden { display: none !important; }
.brand-logo { width: min(240px, 100%); max-height: 120px; object-fit: contain; display: block; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-mark img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 176, 0, .22);
  box-shadow: var(--shadow-soft);
}
.auth-brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
@media (max-width: 900px) {
  .form-grid.two, .form-grid.three, .dev-login-grid { grid-template-columns: 1fr; }
  body::before { background-size: 95vw auto; opacity: 0.05; }
}


@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 12% 18%, rgba(177, 20, 20, 0.16), transparent 24%),
    radial-gradient(circle at 86% 12%, rgba(120, 10, 10, 0.10), transparent 20%),
    radial-gradient(circle at 50% 100%, rgba(140, 18, 18, 0.12), transparent 30%),
    linear-gradient(135deg, #020202 0%, #050505 35%, #0a0808 100%);
}
body::before {
  opacity: 0.045;
  background-size: min(62vw, 820px) auto;
  filter: grayscale(1) saturate(0) blur(.3px) drop-shadow(0 0 32px rgba(177, 20, 20, 0.16));
}
body::after {
  background:
    linear-gradient(180deg, rgba(5,2,2,0.18), rgba(5,2,2,0.78)),
    linear-gradient(90deg, rgba(255,255,255,0.015), rgba(255,255,255,0));
}
.site-bg-glow {
  width: 760px;
  height: 760px;
  filter: blur(12px);
}
.panel-card,
.auth-card,
.modal-card,
.flash-message {
  background:
    linear-gradient(180deg, rgba(34, 14, 12, 0.82), rgba(16, 8, 8, 0.92));
  border: 1px solid rgba(255, 150, 60, 0.16);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.42),
    0 14px 30px rgba(255, 90, 31, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
}
.panel-card:hover,
.auth-card:hover,
.modal-card:hover {
  border-color: rgba(255, 176, 0, 0.22);
}
.btn,
.sidebar-link,
.product-card,
.metric-card,
.history-card,
.table-row,
.product-chip,
.icon-btn,
.cart-item {
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease, background .24s ease, color .24s ease, opacity .24s ease;
}
.btn:hover,
.product-card:hover,
.metric-card:hover,
.history-card:hover,
.table-row:hover,
.cart-item:hover {
  transform: translateY(-3px);
}
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.22), transparent 70%);
  transform: translateX(-140%);
  transition: transform .5s ease;
}
.btn-primary:hover::after { transform: translateX(140%); }
.separator-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 150, 60, 0.35), transparent);
  margin: 8px 0 4px;
}
.section-inline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.accent-panel {
  position: relative;
  overflow: hidden;
}
.accent-panel::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 176, 0, 0.13), transparent 70%);
  pointer-events: none;
}
.inventory-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.inventory-list .table-row strong { font-size: 1rem; }
.inventory-create-form button { align-self: end; }
.luxury-list { gap: 12px; }


:root {
  --bg: #020202;
  --bg-2: #070707;
  --panel: rgba(10, 10, 10, 0.88);
  --panel-2: rgba(14, 14, 14, 0.94);
  --line: rgba(255, 173, 47, 0.14);
  --line-strong: rgba(255, 173, 47, 0.28);
  --text: #f7f3eb;
  --muted: #bba88f;
  --accent: #ff7a18;
  --accent-2: #ffd15a;
  --accent-3: #ff3b1f;
  --shadow: 0 28px 90px rgba(0, 0, 0, .62);
  --shadow-soft: 0 18px 50px rgba(255, 122, 24, .12);
}
body {
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 122, 24, 0.10), transparent 20%),
    radial-gradient(circle at 88% 10%, rgba(255, 209, 90, 0.08), transparent 18%),
    radial-gradient(circle at 50% 100%, rgba(255, 59, 31, 0.08), transparent 30%),
    linear-gradient(135deg, #010101 0%, #050505 45%, #0a0a0a 100%);
}
body::after {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.20), rgba(0,0,0,0.72)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 110px);
  opacity: .9;
}
.panel-card,
.auth-card,
.modal-card,
.flash-message,
.app-dialog-panel,
.app-toast,
.product-card,
.cart-sidebar,
.metric-card,
.info-box,
.history-card,
.table-row {
  background:
    linear-gradient(180deg, rgba(18,18,18,0.92), rgba(8,8,8,0.96));
  border: 1px solid rgba(255, 173, 47, 0.12);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.52),
    0 10px 24px rgba(255, 122, 24, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.04);
}
.panel-card:hover,
.product-card:hover,
.cart-sidebar:hover {
  border-color: rgba(255, 173, 47, 0.20);
}
.btn-primary {
  background: linear-gradient(135deg, #ff5a18, #ff8b20 56%, #ffd15a 100%);
  color: #1a1208;
}
.btn-secondary,
.btn-ghost {
  background: linear-gradient(180deg, rgba(20,20,20,.94), rgba(10,10,10,.98));
  color: #f5e7d2;
}
.status-pill,
.badge,
.role-pill {
  background: rgba(255, 173, 47, .12);
  border-color: rgba(255, 173, 47, .24);
}
.section-header h2,
.brand-title,
h1,h2,h3 { text-shadow: 0 0 22px rgba(255, 173, 47, .08); }
.ingredient-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.inventory-row-actions,
.section-inline-head,
.order-status-grid {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}


.recipe-builder {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #040404;
}
.recipe-builder-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.recipe-builder-head p,
.recipe-builder-note { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.ingredient-row-list {
  display: grid;
  gap: 10px;
}
.ingredient-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 110px auto;
  gap: 10px;
  align-items: center;
}
.brand-logo { filter: none; }
.auth-card, .panel-card, .brand-block, .app-dialog-panel, .modal-card, .metric-card, .info-box, .history-card, .table-row, .subpanel-card {
  background: #050505 !important;
  border-color: rgba(180, 24, 24, 0.22) !important;
}
.badge {
  background: rgba(143, 16, 16, 0.12);
  color: #f0d6d6;
  border-color: rgba(180, 24, 24, 0.28);
}
input, textarea, select {
  background: #0a0a0a;
  border-color: rgba(180, 24, 24, 0.22);
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(180, 24, 24, 0.46);
  box-shadow: 0 0 0 3px rgba(143, 16, 16, 0.12);
}
@media (max-width: 900px) {
  .ingredient-row {
    grid-template-columns: 1fr;
  }
}

/* === Black / Red overhaul === */
:root {
  --bg: #000000;
  --bg-2: #040404;
  --panel: rgba(8, 8, 8, 0.96);
  --panel-2: rgba(12, 12, 12, 0.98);
  --line: rgba(165, 24, 24, 0.22);
  --line-strong: rgba(205, 36, 36, 0.48);
  --text: #f5f5f5;
  --muted: #a4a4a4;
  --accent: #a41414;
  --accent-2: #cf2d2d;
  --accent-3: #6b0d0d;
  --danger: #e14646;
  --warning: #c53a3a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.72);
  --shadow-soft: 0 12px 30px rgba(164, 20, 20, 0.12);
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 14% 16%, rgba(164, 20, 20, 0.14), transparent 22%),
    radial-gradient(circle at 84% 10%, rgba(96, 8, 8, 0.12), transparent 20%),
    radial-gradient(circle at 50% 100%, rgba(132, 16, 16, 0.10), transparent 28%),
    linear-gradient(135deg, #000000 0%, #040404 42%, #090909 100%) !important;
  color: var(--text);
}
body::before {
  opacity: 0.055;
  filter: brightness(0) invert(1) grayscale(1) drop-shadow(0 0 22px rgba(207, 45, 45, 0.12));
  background-size: min(60vw, 780px) auto;
}
body::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.82)),
    linear-gradient(90deg, rgba(255,255,255,0.012), rgba(255,255,255,0));
}

h1, h2, h3, .brand-title {
  color: #ffffff !important;
  text-shadow: 0 0 20px rgba(164, 20, 20, 0.14) !important;
}
small, .muted, .brand-subtitle, label { color: var(--muted); }
a:hover { color: #ffffff; }
code {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(164, 20, 20, 0.18);
}

input, textarea, select,
.app-dialog-input {
  background: #090909 !important;
  border: 1px solid rgba(164, 20, 20, 0.22) !important;
  color: var(--text) !important;
}
input:focus, textarea:focus, select:focus,
.app-dialog-input:focus {
  border-color: rgba(205, 36, 36, 0.58) !important;
  box-shadow: 0 0 0 3px rgba(164, 20, 20, 0.16) !important;
  background: #0d0d0d !important;
}

.auth-card,
.panel-card,
.modal-card,
.flash-message,
.app-dialog-panel,
.app-toast,
.product-card,
.cart-sidebar,
.metric-card,
.info-box,
.history-card,
.table-row,
.subpanel-card,
.brand-block,
.recipe-builder,
.app-dialog-field,
.metric-badge,
.note-stat,
.deputy-meta-grid > div,
.cart-item,
.metric-mini {
  background: linear-gradient(180deg, rgba(10,10,10,0.97), rgba(4,4,4,0.99)) !important;
  border: 1px solid rgba(164, 20, 20, 0.18) !important;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.58),
    0 8px 18px rgba(164, 20, 20, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

.badge,
.status-pill,
.role-pill {
  background: rgba(164, 20, 20, 0.14) !important;
  border: 1px solid rgba(205, 36, 36, 0.24) !important;
  color: #f0d0d0 !important;
}
.badge-danger,
.btn-danger {
  background: rgba(225, 70, 70, 0.12) !important;
  border-color: rgba(225, 70, 70, 0.34) !important;
  color: #ffd7d7 !important;
}

.btn {
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #7f0f0f 0%, #a41414 55%, #cf2d2d 100%) !important;
  border: 1px solid rgba(225, 70, 70, 0.34) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(164, 20, 20, 0.18) !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #951414 0%, #ba2020 55%, #e14646 100%) !important;
  border-color: rgba(225, 70, 70, 0.46) !important;
}
.btn-primary::after {
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.15), transparent 68%) !important;
}
.btn-secondary,
.btn-ghost,
.icon-btn,
.dialog-icon-btn,
.product-chip,
.sidebar-link {
  background: #090909 !important;
  color: #efefef !important;
  border: 1px solid rgba(164, 20, 20, 0.18) !important;
}
.btn-secondary:hover,
.btn-ghost:hover,
.icon-btn:hover,
.dialog-icon-btn:hover,
.product-chip:hover,
.sidebar-link:hover {
  background: #101010 !important;
  border-color: rgba(205, 36, 36, 0.34) !important;
}

.separator-line {
  background: linear-gradient(90deg, transparent, rgba(205, 36, 36, 0.42), transparent) !important;
}
.empty-state,
.loading-state {
  background: rgba(255,255,255,0.02) !important;
  border-color: rgba(164, 20, 20, 0.22) !important;
}
.brand-logo,
.brand-mark img,
.brand-head img {
  filter: brightness(0) invert(1);
}
.brand-mark img,
.brand-head img {
  object-fit: contain !important;
  padding: 6px;
  background: #060606;
}
.focus-ring { outline-color: rgba(205, 36, 36, 0.82) !important; }


/* === FIX: sjednocení produktových obrázků v kartách === */
.product-visual,
.product-card .product-image,
.product-card .image-wrap,
.product-card .product-thumb {
  height: 160px !important;
  min-height: 160px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 14px !important;
  overflow: hidden !important;
  border-radius: 16px !important;
}

.product-visual img,
.product-card .product-image img,
.product-card .image-wrap img,
.product-card .product-thumb img {
  width: auto !important;
  height: auto !important;
  max-width: 88% !important;
  max-height: 88% !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
}

.product-card {
  min-width: 0;
}
