:root {
  color-scheme: light;
  --bg: #f4f0e7;
  --card: #fffaf2;
  --ink: #171411;
  --muted: #766f65;
  --line: #ded5c7;
  --accent: #c99343;
  --accent-dark: #7a5528;
  --wood: #2a2119;
  --soft: #f7efe3;
  --danger: #a83220;
  --danger-soft: #fff0ed;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(201, 147, 67, .18) 0, transparent 34rem),
    linear-gradient(180deg, #eceff2 0, #f5f1e9 44%, #ebe3d7 100%);
  color: var(--ink);
}

.topbar {
  background:
    linear-gradient(135deg, #110f0d 0, #2b2118 58%, #1a1511 100%);
  border-bottom: 4px solid var(--accent);
  color: #fff;
}

.topbar-inner {
  width: min(1320px, calc(100% - 48px));
  min-height: 112px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 18px 0;
}

.logo-wrap img {
  width: 260px;
  max-width: 48vw;
  display: block;
}

.system-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, auto));
  justify-content: flex-end;
  gap: 12px;
  font-size: 13px;
  color: #e8dfd0;
}

.meta-card {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  padding: 11px 14px;
  background: rgba(255,255,255,.075);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  min-width: 170px;
  text-align: right;
}

.meta-card span {
  display: block;
  color: #d6c7ae;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.meta-card strong {
  display: block;
  margin-top: 5px;
  color: #fffaf2;
  font-size: 14px;
  white-space: nowrap;
}

.page {
  width: min(1180px, calc(100% - 40px));
  margin: 42px auto;
}

.card {
  background: rgba(255, 250, 241, .96);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 36px 40px 40px;
  box-shadow: 0 28px 80px rgba(42, 33, 25, 0.16);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), #ead8ba, var(--wood));
}

.brand,
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -.035em;
  color: #18130f;
}

h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

h3 {
  margin: 0 0 12px;
}

.lead {
  max-width: 820px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  margin-bottom: 28px;
}

.muted {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  white-space: nowrap;
  border-radius: 999px;
  padding: 10px 15px;
  background: #2a2119;
  color: #fff6e8;
  font-size: 14px;
  font-weight: 800;
}

.alerts {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.alert {
  border: 1px solid #e9b8ad;
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 14px;
  padding: 12px 14px;
}

/* ---- Spolecna navigace mezi aplikacemi (rozcestnik) ---- */
.appnav {
  background: #1a1511;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.appnav-inner {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
}

.appnav a {
  color: #e8dfd0;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.appnav a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.appnav a.active {
  background: var(--accent);
  color: #2a2119;
}

.appnav .appnav-home {
  margin-right: 6px;
  border-color: rgba(255, 255, 255, .22);
}

/* ---- Dlazdice aplikaci ---- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin: 18px 0 8px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  padding: 20px 20px 18px;
  box-shadow: 0 10px 24px rgba(42, 33, 25, .07);
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.tile:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 16px 30px rgba(42, 33, 25, .13);
}

.tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tile h2 {
  margin: 0;
  font-size: 1.25rem;
}

.tile .tagline {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 13.5px;
  margin: 0;
}

.tile p.desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.tile-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
}

.tile-open {
  font-weight: 800;
  color: var(--accent-dark);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.status .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c9bda9;
  box-shadow: 0 0 0 3px rgba(201, 189, 169, .25);
}

.status.ok .dot {
  background: #2f8f4e;
  box-shadow: 0 0 0 3px rgba(47, 143, 78, .18);
}

.status.bad .dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(168, 50, 32, .18);
}

.step-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

/* ---- Postup prace ---- */
.workflow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 6px;
}

.workflow-step {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
  padding: 16px 16px 14px;
}

.workflow-step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--wood);
  color: #fff;
  font-weight: 800;
  margin-bottom: 8px;
}

.workflow-step h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.workflow-step p {
  margin: 0 0 8px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

.workflow-step a {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
}

@media (max-width: 720px) {
  .appnav-inner {
    width: calc(100% - 28px);
  }

  .appnav a {
    padding: 7px 11px;
    font-size: 12.5px;
  }
}
