:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --orange-light: #fff7ed;

  --navy: #172033;
  --navy-light: #253149;

  --bg: #f4f6f8;
  --card: #ffffff;

  --text: #18212f;
  --muted: #667085;
  --border: #e4e7ec;

  --green: #16a34a;
  --green-bg: #dcfce7;

  --blue: #2563eb;
  --blue-bg: #dbeafe;

  --red: #dc2626;
  --red-bg: #fee2e2;

  --yellow: #ca8a04;
  --yellow-bg: #fef9c3;

  --radius: 12px;
  --shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

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

/* =========================
   HLAVICKA
   ========================= */

header {
  background: var(--navy);
  color: white;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-inner {
  max-width: 1450px;
  margin: auto;
  padding: 18px 28px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--orange);

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: 800;
  font-size: 20px;
}

.brand-text strong {
  display: block;
  font-size: 21px;
  line-height: 1.1;
}

.brand-text span {
  display: block;
  color: #adb7c9;
  font-size: 12px;
  margin-top: 3px;
}

/* =========================
   NAVIGACE
   ========================= */

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  color: #d9dfeb;
  text-decoration: none;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 14px;
  transition: 0.15s;
}

nav a:hover {
  color: white;
  background: var(--navy-light);
}

nav a.active {
  background: var(--orange);
  color: white;
}

/* =========================
   OBSAH
   ========================= */

main {
  max-width: 1450px;
  margin: auto;
  padding: 28px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.page-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* =========================
   KARTY
   ========================= */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 22px;
}

.card-title {
  margin: 0 0 16px;
  font-size: 18px;
}

.card-orange {
  border-top: 4px solid var(--orange);
}

/* =========================
   PREHLEDOVE KARTY
   ========================= */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 25px;
}

.stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  margin-top: 5px;
  font-weight: 750;
  font-size: 28px;
}

.stat-orange {
  border-left: 5px solid var(--orange);
}

.stat-green {
  border-left: 5px solid var(--green);
}

.stat-blue {
  border-left: 5px solid var(--blue);
}

.stat-red {
  border-left: 5px solid var(--red);
}

/* =========================
   TLACITKA
   ========================= */

.btn,
button {
  appearance: none;
  border: 0;
  border-radius: 8px;

  padding: 10px 16px;

  font-family: inherit;
  font-size: 14px;
  font-weight: 650;

  cursor: pointer;
  text-decoration: none;
  display: inline-flex;

  align-items: center;
  justify-content: center;

  gap: 6px;

  transition:
    background 0.15s,
    transform 0.05s,
    box-shadow 0.15s;
}

.btn:active,
button:active {
  transform: translateY(1px);
}

.btn-primary,
button[type="submit"] {
  background: var(--orange);
  color: white;
  box-shadow: 0 2px 6px rgba(249,115,22,0.25);
}

.btn-primary:hover,
button[type="submit"]:hover {
  background: var(--orange-dark);
}

.btn-secondary {
  background: #eef1f5;
  color: var(--text);
}

.btn-secondary:hover {
  background: #e2e6ec;
}

.btn-danger {
  background: var(--red);
  color: white;
}

.btn-small {
  padding: 6px 10px;
  font-size: 12px;
}

/* =========================
   ODKAZY
   ========================= */

a {
  color: var(--orange-dark);
}

a:hover {
  color: var(--orange);
}

/* =========================
   TABULKY
   ========================= */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

thead {
  background: #f8fafc;
}

th {
  color: #475467;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:hover {
  background: #fffaf5;
}

td a {
  font-weight: 650;
  text-decoration: none;
}

/* =========================
   FORMULARE
   ========================= */

form {
  max-width: 900px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field {
  margin-bottom: 17px;
}

.form-field-full {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 6px;

  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;

  border: 1px solid #cfd5dd;
  border-radius: 8px;

  background: white;
  color: var(--text);

  padding: 10px 12px;

  font-family: inherit;
  font-size: 15px;

  outline: none;

  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--orange);

  box-shadow:
    0 0 0 3px rgba(249,115,22,0.13);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

/* =========================
   DETAIL
   ========================= */

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 25px;
}

.detail-row {
  padding: 11px 0;
  border-bottom: 1px solid #eef0f3;
}

.detail-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.detail-value {
  font-weight: 600;
}

/* =========================
   STAVY
   ========================= */

.badge {
  display: inline-flex;
  align-items: center;

  padding: 5px 9px;

  border-radius: 999px;

  font-size: 12px;
  font-weight: 700;
}

.badge-new {
  color: var(--blue);
  background: var(--blue-bg);
}

.badge-planned {
  color: #7c3aed;
  background: #ede9fe;
}

.badge-progress {
  color: var(--orange-dark);
  background: var(--orange-light);
}

.badge-done {
  color: var(--green);
  background: var(--green-bg);
}

.badge-billed {
  color: #0369a1;
  background: #e0f2fe;
}

.badge-critical {
  color: var(--red);
  background: var(--red-bg);
}

.badge-cancelled {
  color: #667085;
  background: #eaecf0;
}

/* =========================
   SEKCE / TIMELINE
   ========================= */

.section-title {
  font-size: 19px;
  margin: 0 0 15px;
}

.timeline {
  position: relative;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;

  left: 7px;
  top: 0;
  bottom: 0;

  width: 2px;
  background: #e3e7ec;
}

.timeline-item {
  position: relative;
  padding: 0 0 22px 10px;
}

.timeline-item::before {
  content: "";

  position: absolute;
  left: -25px;
  top: 5px;

  width: 11px;
  height: 11px;

  border-radius: 50%;

  background: var(--orange);
  border: 3px solid white;

  box-shadow: 0 0 0 1px var(--orange);
}

/* =========================
   CENA
   ========================= */

.price-summary {
  background: var(--navy);
  color: white;

  border-radius: var(--radius);
  padding: 22px;
}

.price-row {
  display: flex;
  justify-content: space-between;

  padding: 7px 0;

  border-bottom:
    1px solid rgba(255,255,255,0.10);
}

.price-total {
  display: flex;
  justify-content: space-between;

  margin-top: 14px;

  color: #ffb37c;

  font-size: 21px;
  font-weight: 800;
}

/* =========================
   FOTOGRAFIE
   ========================= */

.gallery {
  display: grid;
  grid-template-columns:
    repeat(auto-fill, minmax(180px, 1fr));

  gap: 15px;
}

.gallery-item {
  background: white;

  border: 1px solid var(--border);
  border-radius: 10px;

  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 160px;

  object-fit: cover;

  display: block;
}

.gallery-info {
  padding: 10px;
  font-size: 12px;
}

/* =========================
   PRAZDNY STAV
   ========================= */

.empty-state {
  text-align: center;
  padding: 45px 20px;

  color: var(--muted);
}

.empty-state strong {
  display: block;
  color: var(--text);

  font-size: 17px;

  margin-bottom: 6px;
}

/* =========================
   MOBIL
   ========================= */

@media (max-width: 900px) {

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {

  .header-inner {
    display: block;
    padding: 15px 18px;
  }

  nav {
    overflow-x: auto;
    margin-top: 14px;
    padding-bottom: 2px;
  }

  nav a {
    white-space: nowrap;
  }

  main {
    padding: 18px 14px;
  }

  .page-header {
    display: block;
  }

  .page-header .btn {
    margin-top: 12px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field-full {
    grid-column: auto;
  }

  .card {
    padding: 17px;
  }

  .page-title {
    font-size: 24px;
  }

  th,
  td {
    padding: 11px;
  }

  .gallery {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .gallery-item img {
    height: 130px;
  }
}

@media (max-width: 950px) {
  main > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}
