/* HotelKanal — čistý moderný štýl (Apple/Google inšpirácia) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-bg:        #f5f5f7;
  --c-surface:   #ffffff;
  --c-border:    #e8e8ed;
  --c-input-brd: #d2d2d7;
  --c-primary:   #0071e3;
  --c-primary-h: #0077ed;
  --c-danger:    #ff3b30;
  --c-danger-h:  #e0321f;
  --c-success:   #34c759;
  --c-warn:      #ff9500;
  --c-text:      #1d1d1f;
  --c-muted:     #86868b;
  --radius:      18px;
  --radius-sm:   12px;
  --radius-pill: 980px;
  --shadow:      0 2px 12px rgba(0,0,0,.06);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.12);
}

html { -webkit-font-smoothing: antialiased; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
  line-height: 1.5;
}

/* ── Navigácia ───────────────────────────────────────────────────────────── */
nav {
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.07);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 54px;
  position: sticky;
  top: 0;
  z-index: 100;
}
nav .brand {
  color: var(--c-text);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -.02em;
  text-decoration: none;
  margin-right: 2rem;
  white-space: nowrap;
}
nav a {
  color: var(--c-muted);
  text-decoration: none;
  padding: .85rem .9rem;
  font-size: .86rem;
  font-weight: 500;
  transition: color .18s;
}
nav a:hover, nav a.active { color: var(--c-text); }
nav .spacer { flex: 1; }
nav .user-info { color: var(--c-muted); font-size: .78rem; margin-right: .8rem; }

/* ── Hlavný obsah ────────────────────────────────────────────────────────── */
main { max-width: 1100px; margin: 2.2rem auto; padding: 0 1.5rem; }

h1 { font-size: 1.7rem; font-weight: 700; letter-spacing: -.025em; margin-bottom: 1.4rem; }
h2 { font-size: 1.18rem; font-weight: 650; letter-spacing: -.015em; margin-bottom: 1rem; }
h3 { font-size: .98rem; font-weight: 650; margin-bottom: .5rem; }

/* ── Flash správy ─────────────────────────────────────────────────────────── */
.flash-list { list-style: none; margin-bottom: 1.1rem; }
.flash {
  padding: .8rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: .5rem;
  font-size: .875rem;
  font-weight: 500;
}
.flash.success { background: #e8f8ed; color: #1d7a3a; }
.flash.error   { background: #ffebe9; color: #c1271c; }
.flash.info    { background: #e9f2ff; color: #0a5dc2; }

/* ── Karty / panely ──────────────────────────────────────────────────────── */
.card {
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  margin-bottom: 1.1rem;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

/* ── Tabuľky ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid #f0f0f2; }
th {
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-muted);
  border-bottom: 1px solid var(--c-border);
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; }
tbody tr:hover td { background: #fafafa; }
code {
  background: var(--c-bg);
  padding: .1rem .45rem;
  border-radius: 6px;
  font-size: .82em;
}

/* ── Formuláre ───────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.15rem; }
label {
  display: block;
  font-weight: 600;
  font-size: .8rem;
  margin-bottom: .35rem;
  color: var(--c-text);
}
input[type=text], input[type=email], input[type=password], input[type=number],
select, textarea {
  width: 100%;
  padding: .6rem .85rem;
  border: 1px solid var(--c-input-brd);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-family: inherit;
  color: var(--c-text);
  background: var(--c-surface);
  transition: border-color .18s, box-shadow .18s;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2386868b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  padding-right: 2.2rem;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(0,113,227,.14);
}
.form-hint { font-size: .78rem; color: var(--c-muted); margin-top: .3rem; }
.form-check { display: flex; align-items: center; gap: .55rem; }
.form-check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--c-primary); }
.form-check label { margin: 0; font-size: .9rem; font-weight: 500; }

/* ── Tlačidlá ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .5rem 1.15rem;
  border: none;
  border-radius: var(--radius-pill);
  font-size: .86rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s, transform .1s, box-shadow .18s;
  line-height: 1.4;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary  { background: var(--c-primary);  color: #fff; }
.btn-primary:hover  { background: var(--c-primary-h); }
.btn-danger   { background: var(--c-danger);   color: #fff; }
.btn-danger:hover   { background: var(--c-danger-h); }
.btn-secondary{ background: #e9e9ee; color: var(--c-text); }
.btn-secondary:hover{ background: #dededf; }
.btn-sm { padding: .32rem .8rem; font-size: .78rem; }
.btn-group { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Odznaky ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .22rem .6rem;
  border-radius: var(--radius-pill);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge-green   { background: #e8f8ed; color: #1d7a3a; }
.badge-red     { background: #ffebe9; color: #c1271c; }
.badge-gray    { background: #f0f0f2; color: var(--c-muted); }
.badge-blue    { background: #e9f2ff; color: #0a5dc2; }
.badge-yellow  { background: #fff4d6; color: #946300; }
.badge-orange  { background: #ffe9d6; color: #ad4d00; }

/* ── Grid kariet dashboardu ─────────────────────────────────────────────── */
.hotel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.1rem; }
.hotel-card { padding: 1.25rem; transition: box-shadow .2s, transform .2s; }
.hotel-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.hotel-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.hotel-card .meta { color: var(--c-muted); font-size: .82rem; }

/* ── Progress bar ────────────────────────────────────────────────────────── */
.progress { background: #e9e9ee; border-radius: var(--radius-pill); height: 8px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--c-primary); border-radius: var(--radius-pill); transition: width .4s cubic-bezier(.4,0,.2,1); }
.progress-bar.warn  { background: var(--c-warn); }
.progress-bar.danger{ background: var(--c-danger); }

/* ── Login stránka ───────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg);
  padding: 1rem;
}
.login-box {
  background: var(--c-surface);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 2.8rem 2.4rem;
  width: 100%;
  max-width: 400px;
}
.login-logo { text-align: center; margin-bottom: 2.2rem; }
.login-logo span { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--c-text); }
.login-logo small { display: block; color: var(--c-muted); font-size: .8rem; margin-top: .3rem; }

/* ── Dropzone (upload) ───────────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--c-input-brd);
  border-radius: var(--radius);
  padding: 2.6rem 1.5rem;
  text-align: center;
  color: var(--c-muted);
  font-size: .9rem;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: #fafafa;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--c-primary);
  background: #f0f7ff;
  color: var(--c-primary);
}
.dropzone .dz-icon { font-size: 2rem; display: block; margin-bottom: .5rem; }
.upload-status { margin-top: .8rem; font-size: .84rem; }
.upload-status .u-ok  { color: #1d7a3a; }
.upload-status .u-err { color: #c1271c; }

/* ── Zoznam súborov projektu ─────────────────────────────────────────────── */
.file-list { list-style: none; }
.file-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .65rem .5rem;
  border-bottom: 1px solid #f0f0f2;
  background: var(--c-surface);
  transition: background .15s, opacity .2s;
}
.file-item:last-child { border-bottom: none; }
.file-item.dragging { opacity: .4; }
.file-item .drag-handle {
  cursor: grab;
  color: var(--c-input-brd);
  font-size: 1.1rem;
  padding: 0 .2rem;
  user-select: none;
}
.file-item .thumb {
  width: 72px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--c-bg);
  flex-shrink: 0;
}
.file-item .thumb-ph {
  width: 72px;
  height: 48px;
  border-radius: 8px;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.file-item .f-name { flex: 1; min-width: 0; }
.file-item .f-name .n { font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .f-name .m { color: var(--c-muted); font-size: .76rem; }
.file-item input.dur {
  width: 64px;
  padding: .3rem .5rem;
  font-size: .82rem;
  text-align: center;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.text-muted  { color: var(--c-muted); }
.text-danger { color: var(--c-danger); }
.mt-1  { margin-top: .5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mb-1  { margin-bottom: .5rem; }
.mb-2  { margin-bottom: 1rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.justify-between { justify-content: space-between; }
.empty-state { text-align: center; color: var(--c-muted); padding: 3rem 1rem; }

/* ── Responzivita ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  nav { padding: 0 1rem; }
  nav a { padding: .85rem .45rem; font-size: .78rem; }
  nav .user-info { display: none; }
  main { padding: 0 1rem; margin: 1.2rem auto; }
  h1 { font-size: 1.35rem; }
  .hotel-grid { grid-template-columns: 1fr; }
  .file-item .thumb, .file-item .thumb-ph { width: 56px; height: 40px; }
}
