.card,
.panel,
.auth-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: var(--shadow);
}

.card,
.panel {
  padding: 16px;
}

.auth-card {
  width: min(460px, 100%);
  padding: 28px;
}

.auth-card.compact {
  text-align: center;
}

.auth-logo {
  width: 220px;
  margin: 0 auto 22px;
}

.card-header,
.panel-header,
.table-toolbar,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header,
.panel-header {
  margin-bottom: 14px;
}

.card-title,
.panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 760;
}

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

.small {
  font-size: 13px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel-strong);
  color: var(--text-primary);
  font-weight: 720;
  line-height: 1;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface-highest);
  color: var(--text-primary);
}

.button.primary {
  border-color: rgba(233, 93, 44, 0.85);
  background: linear-gradient(180deg, #E95D2C, #A63E1B);
  color: #fff8f4;
}

.button.success {
  border-color: var(--badge-green);
  background: var(--badge-green);
  color: var(--on-accent);
}

.button.warning {
  border-color: var(--badge-orange);
  background: var(--badge-orange);
  color: var(--on-accent);
}

.button.danger {
  border-color: var(--badge-red);
  background: var(--badge-red);
  color: var(--on-accent);
}

.button.ghost {
  background: transparent;
  border-color: rgba(176, 206, 226, 0.2);
  color: var(--text-secondary);
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel-strong);
  color: var(--text-primary);
}

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

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 7px;
}

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

label,
.field-label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-secondary) 78%, black 6%);
  color: var(--text-primary);
  padding: 9px 11px;
}

input[type="checkbox"] {
  width: auto;
  min-width: 18px;
  min-height: 18px;
  accent-color: var(--palette-flame);
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(233, 93, 44, 0.78);
  outline: none;
  box-shadow: var(--focus-ring);
}

.input-row {
  display: flex;
  gap: 8px;
}

.input-row input,
.input-row select {
  min-width: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.data-table {
  min-width: 860px;
  background: var(--panel-soft);
}

.data-table th,
.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.data-table th {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  background: rgba(176, 206, 226, 0.07);
}

.data-table tr:hover td {
  background: rgba(176, 206, 226, 0.06);
}

.data-table tr.low-stock td {
  color: var(--palette-flame);
  background: rgba(166, 62, 27, 0.26);
  border-bottom-color: rgba(233, 93, 44, 0.34);
}

.data-table tr.low-stock td:first-child {
  border-left: 4px solid var(--palette-flame);
}

.data-table tr.low-stock strong,
.item-card.low-stock strong,
.low-stock .summary-row strong {
  color: #E95D2C;
}

.item-card.low-stock {
  border-color: rgba(233, 93, 44, 0.58);
  background: rgba(166, 62, 27, 0.16);
  box-shadow: inset 4px 0 0 var(--palette-flame);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-card-list {
  display: none;
  gap: 10px;
}

.item-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 12px;
}

.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.blue,
.status-pill.active {
  color: var(--on-accent);
  background: var(--badge-blue);
  border-color: var(--badge-blue);
}

.badge.orange,
.status-pill.reserved {
  color: var(--on-accent);
  background: var(--badge-orange);
  border-color: var(--badge-orange);
}

.badge.red,
.status-pill.damaged,
.status-pill.out-of-service,
.badge.low-stock {
  color: var(--on-accent);
  background: var(--badge-red);
  border-color: var(--badge-red);
}

.badge.green {
  color: var(--on-accent);
  background: var(--badge-green);
  border-color: var(--badge-green);
}

.badge.purple {
  color: var(--on-accent);
  background: var(--badge-purple);
  border-color: var(--badge-purple);
}

.kpi-card {
  display: grid;
  gap: 9px;
  min-height: 116px;
}

.kpi-card span {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 750;
}

.kpi-card strong {
  font-size: 28px;
  line-height: 1.05;
}

.kpi-card small {
  color: var(--text-muted);
}

.thumbnail {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  object-fit: contain;
}

.photo-dropzone {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  padding: 12px;
  text-align: center;
}

.photo-dropzone.dragover {
  border-color: var(--palette-flame);
  background: rgba(233, 93, 44, 0.1);
}

.photo-dropzone.has-photo {
  border-style: solid;
}

.photo-dropzone img {
  width: 100%;
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
}

.photo-placeholder {
  display: grid;
  gap: 8px;
  place-items: center;
  color: var(--text-secondary);
}

.photo-dropzone.has-photo .photo-placeholder {
  display: none;
}

.summary-list {
  display: grid;
  gap: 9px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.summary-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.empty-state,
.error-state {
  display: grid;
  gap: 9px;
  place-items: center;
  min-height: 180px;
  padding: 22px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  text-align: center;
}

.error-state {
  color: var(--red);
  border-color: rgba(233, 93, 44, 0.44);
}

.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 36px));
}

.toast {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 13px 14px;
}

.toast.success {
  border-color: rgba(176, 206, 226, 0.52);
}

.toast.error {
  border-color: rgba(166, 62, 27, 0.62);
}

.toast.warning {
  border-color: rgba(233, 93, 44, 0.58);
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}

.modal-root.open {
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.modal {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.profile-info-panel {
  display: grid;
  gap: 16px;
}

.profile-info-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.profile-info-hero strong,
.profile-info-hero span {
  display: block;
}

.profile-info-hero strong {
  color: var(--text-primary);
  font-size: 18px;
}

.profile-info-hero span {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-info-photo {
  display: inline-grid;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--panel-strong);
  color: var(--text-primary);
  object-fit: cover;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.profile-info-photo.fallback {
  background: linear-gradient(180deg, rgba(176, 206, 226, 0.26), rgba(233, 93, 44, 0.28));
}

.profile-info-list {
  display: grid;
  gap: 10px;
}

.profile-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.profile-info-row:last-child {
  border-bottom: 0;
}

.profile-info-row span {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 760;
}

.profile-info-row strong {
  color: var(--text-primary);
  font-size: 14px;
  text-align: right;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.skeleton {
  min-height: 18px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(176, 206, 226, 0.08), rgba(176, 206, 226, 0.2), rgba(176, 206, 226, 0.08));
  background-size: 220% 100%;
  animation: skeleton 1.4s ease infinite;
}

@keyframes skeleton {
  to {
    background-position-x: -220%;
  }
}

.chart-bars {
  display: grid;
  gap: 10px;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(90px, 180px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 13px;
}

.chart-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(176, 206, 226, 0.15);
  overflow: hidden;
}

.chart-bar span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--palette-flame);
}

.chart-progress {
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(176, 206, 226, 0.15);
}

.chart-progress::-webkit-progress-bar {
  background: rgba(176, 206, 226, 0.15);
}

.chart-progress::-webkit-progress-value {
  background: var(--palette-flame);
}

.chart-progress::-moz-progress-bar {
  background: var(--palette-flame);
}

.config-warning {
  border: 1px solid rgba(233, 93, 44, 0.54);
  border-radius: var(--radius);
  background: rgba(166, 62, 27, 0.16);
  color: var(--palette-flame);
  padding: 12px 14px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.success-state {
  display: grid;
  gap: 9px;
  place-items: center;
  padding: 12px;
  border: 1px dashed rgba(74, 222, 128, 0.5);
  border-radius: var(--radius-lg);
  color: var(--green);
  text-align: center;
}
/* Birac jezika (i18n) */
.lang-switcher {
  position: relative;
  display: inline-flex;
}

.lang-switcher-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1;
}

.lang-switcher-trigger:hover {
  background: var(--panel-soft);
}

.lang-switcher-chevron {
  opacity: 0.6;
}

.lang-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 178px;
  display: grid;
  gap: 2px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  z-index: 80;
}

.lang-switcher-menu[hidden] {
  display: none;
}

.lang-switcher-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
}

.lang-switcher-option:hover {
  background: var(--panel-soft);
}

.lang-switcher-option.active {
  background: var(--panel-soft);
  font-weight: 700;
}

.lang-switcher-option svg,
.lang-switcher-trigger svg {
  flex: none;
}

