/* Excel-stil filter / sort u zaglavlju tabele */
.excel-th {
  position: relative;
  padding: 0 !important;
  white-space: nowrap;
}
.excel-th-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: inherit;
}
th.text-right .excel-th-btn {
  justify-content: flex-end;
}
th.text-center .excel-th-btn {
  justify-content: center;
}
.excel-th-btn:hover,
.excel-th-btn.is-open {
  background: #e2e8f0;
  color: #0f172a;
}
.excel-th-btn.is-filtered,
.excel-th-btn.is-sorted {
  color: #184a96;
  background: #d6e4f7;
}
.excel-th-ind {
  font-size: 0.7rem;
  opacity: 0.7;
  line-height: 1;
}
.excel-th-btn.is-filtered .excel-th-ind,
.excel-th-btn.is-sorted .excel-th-ind {
  opacity: 1;
  font-weight: 700;
}

.excel-filter-panel {
  position: absolute;
  z-index: 80;
  width: 260px;
  max-height: min(70vh, 420px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  font-size: 0.8125rem;
}
.excel-filter-head {
  padding: 0.65rem 0.75rem;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
}
.excel-filter-sort {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #e2e8f0;
}
.excel-filter-sort button {
  text-align: left;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #334155;
}
.excel-filter-sort button:hover {
  background: #f1f5f9;
}
.excel-filter-search-wrap {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}
.excel-filter-search {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.8125rem;
  outline: none;
}
.excel-filter-search:focus {
  border-color: #1f5bb0;
  box-shadow: 0 0 0 2px rgba(31, 91, 176, 0.2);
}
.excel-filter-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}
.excel-filter-actions button {
  background: none;
  border: 0;
  padding: 0;
  color: #184a96;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.excel-filter-actions button:hover {
  text-decoration: underline;
}
.excel-filter-list {
  overflow-y: auto;
  flex: 1;
  min-height: 80px;
  max-height: 200px;
  padding: 0.25rem 0;
}
.excel-filter-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  color: #334155;
}
.excel-filter-item:hover {
  background: #f8fafc;
}
.excel-filter-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.excel-filter-foot {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 0 0 0.5rem 0.5rem;
}
.excel-btn-primary {
  flex: 1;
  background: #1f5bb0;
  color: #fff;
  border: 0;
  border-radius: 0.375rem;
  padding: 0.4rem 0.6rem;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
}
.excel-btn-primary:hover {
  background: #184a96;
}
.excel-btn-ghost {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  color: #475569;
  cursor: pointer;
}
.excel-btn-ghost:hover {
  background: #f1f5f9;
}

.obracun-cijena-input {
  width: 6.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #2f7d33;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.35rem 0.5rem;
  background: #fff;
}
.obracun-cijena-input:focus {
  outline: none;
  border-color: #1f5bb0;
  box-shadow: 0 0 0 2px rgba(31, 91, 176, 0.18);
}

#obracun_table tr[data-excel-row].is-selected {
  background: rgba(31, 91, 176, 0.08);
}
