/* ── Stat karty (dashboard) ──────────────────────── */

.stat-card {
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.stat-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.stat-value-money {
  color: #1b5e20;
  font-size: 1.35rem;
}

/* ── Karty obecně ────────────────────────────────── */

.card {
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.card-header {
  border-bottom: 1px solid rgba(0,0,0,.06);
}

/* ── Navigace – sekce labely ─────────────────────── */

.nav-section-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .6;
}

/* ── Sidebar scrollbar ───────────────────────────── */

@media (min-width: 992px) {
  .navbar.navbar-vertical.navbar-expand-lg {
    overflow-y: auto;
  }
}

/* ── Logo v sidebaru ─────────────────────────────── */

.navbar-vertical .navbar-brand-image {
  height: 1.1rem !important;
}

/* ── Tabulky – řádky ─────────────────────────────── */

.table-vcenter tbody tr {
  transition: background 0.15s;
}

/* ── Lightbox ─────────────────────────────────────── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.75;
  width: auto;
  margin: 0;
}

.lightbox-close:hover {
  opacity: 1;
  background: none;
}

/* ── Attachments ─────────────────────────────────── */

.attachment-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  align-items: start;
}

.attachment-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid #e6e7e9;
  border-radius: 8px;
  padding: 0.6rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  width: 100%;
  height: 125px;
  box-sizing: border-box;
  margin: 0;
}

.attachment-thumb:hover {
  border-color: #206bc4;
  background: #f5f7ff;
  box-shadow: 0 2px 8px rgba(32,107,196,.12);
}

.attachment-thumb img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 5px;
}

.attachment-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #e6e7e9;
  border-radius: 8px;
  padding: 0.6rem;
  text-decoration: none;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  height: 125px;
  box-sizing: border-box;
}

.attachment-file:hover {
  border-color: #206bc4;
  background: #f5f7ff;
  box-shadow: 0 2px 8px rgba(32,107,196,.12);
}

.attachment-icon {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f6fb;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #666;
}

.attachment-name {
  font-size: 0.75rem;
  color: #333;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Comment bubbles ─────────────────────────────── */

.comment-bubble {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
  transition: box-shadow 0.15s;
}

.comment-bubble:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.comment-bubble-skryty {
  background: #fffbea;
  border-color: #ffc107;
}

.comment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.comment-badges-readonly {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.comment-nabidka-badge {
  display: inline-block;
  background: #d3f9d8;
  color: #2b8a3e;
  border: 1px solid #b2f2bb;
  border-radius: 5px;
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.comment-stav-badge {
  display: inline-block;
  border: 1px solid;
  border-radius: 5px;
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.comment-termin-badge {
  display: inline-block;
  background: #e3fafc;
  color: #0c8599;
  border: 1px solid #99e9f2;
  border-radius: 5px;
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.comment-resitel-badge {
  display: inline-block;
  background: #f3d9fa;
  color: #862e9c;
  border: 1px solid #e599f7;
  border-radius: 5px;
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ── Comment form grid ───────────────────────────── */

.comment-add-bottom {
  display: flex;
  gap: 0.75rem;
  flex-wrap: nowrap;
  width: 100%;
  align-items: flex-end;
}

.comment-add-col {
  display: flex;
  flex-direction: column;
  flex-grow: 2;
  flex-shrink: 1;
  flex-basis: 0%;
  min-width: 0;
}

.comment-add-col-sm {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 0%;
  min-width: 0;
}

.comment-add-col-md {
  display: flex;
  flex-direction: column;
  flex-grow: 1.5;
  flex-shrink: 1;
  flex-basis: 0%;
  min-width: 0;
}

.comment-add-col-lg {
  display: flex;
  flex-direction: column;
  flex-grow: 3;
  flex-shrink: 1;
  flex-basis: 0%;
  min-width: 0;
}

.comment-add-col-quarter {
  display: flex;
  flex-direction: column;
  flex-grow: 2.5;
  flex-shrink: 1;
  flex-basis: 0%;
  min-width: 0;
}

.comment-add-col-full {
  flex: 0 0 100%;
}

/* ── Comment existing files (edit mode) ──────────── */

.comment-existing-files {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid #e6e7e9;
  border-radius: 6px;
}

.comment-existing-label {
  font-size: 0.8rem;
  color: #888;
  font-weight: 600;
  margin-right: 0.25rem;
}

.comment-file-del-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}

.file-marked-delete .comment-file-del-name {
  text-decoration: line-through;
  color: #aaa;
}

.comment-file-del-name {
  font-size: 0.8rem;
  color: #444;
}

.btn-file-x {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.1rem;
  width: auto;
  margin: 0;
  transition: color 0.15s;
}

.btn-file-x:hover {
  color: #e03131;
  background: none;
}

.comment-file-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.5rem;
}

.comment-file-link {
  font-size: 0.8rem;
  color: #206bc4;
  text-decoration: none;
}

.comment-file-link:hover {
  text-decoration: underline;
}

/* ── Field pair (LV + Podíl) ─────────────────────── */

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ── Tlačítka ────────────────────────────────────── */

.btn {
  transition: all 0.15s ease;
}

/* ── Formuláře ───────────────────────────────────── */

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 3px rgba(27,150,235,.15);
  border-color: #1b96eb;
}

/* ── Mobile: comment form full width ────────────── */

@media (max-width: 767px) {
  .comment-add-bottom {
    flex-wrap: wrap;
  }
  .comment-add-col,
  .comment-add-col-sm,
  .comment-add-col-md,
  .comment-add-col-lg,
  .comment-add-col-quarter {
    flex: 0 0 100%;
  }
}

/* ── Utilities ───────────────────────────────────── */

.hidden {
  display: none !important;
}
