body {
  font-family: Arial, sans-serif;
  padding: 2rem;
  background-color: #f2f2f2;
}

.container {
  max-width: 400px;
  margin: auto;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 10px #ccc;
}

input {
  width: 100%;
  padding: 0.5rem;
  margin: 0.5rem 0;
}

button {
  padding: 0.5rem 1rem;
 /* margin-top: 1rem; */
  margin-top: 1px;
  width: 100%;
}

.msg {
  margin-top: 1rem;
  font-weight: bold;
}

.device-container {
  max-width: 900px;
  margin: auto;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 10px #ccc;
}


.table-wrapper {
  max-width: 800px;
  margin: 0 auto;
  overflow-x: auto;
}

.device-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #ccc;
}

.device-table th,
.device-table td {
  /*  padding: 10px; */
  padding: 2px 5px; /* Manji padding gore/dolje, lijevo/desno */
  border: 1px solid #ddd;
  text-align: left;
}

.device-table th {
  background-color: #f5f5f5;
  font-weight: bold;
}

.device-table tr:nth-child(even) {
  background-color: #f9f9f9;
}


/* butoni u gridu */
action-buttons {
  white-space: nowrap; /* sprječava prijelom u novi red */
}

.action-buttons button {
  display: inline-block;
  margin-right: 6px;
  width: auto; /* osiguraj da ne rastegnu na cijelu širinu */
  padding: 8px 8px;
}

/* alerti i sucessi */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/*  lookup box  i gumbi za šifarnike */
.select-row {
  display: flex;
  gap: 20px;
  align-items: stretch; /* ← ovo osigurava iste visine */
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.select-group {
  display: flex;
  flex-direction: column;
}

.select-group label {
  margin-bottom: 4px;
}

.select-with-button {
  display: flex;
  align-items: center;
  height: 100%;
}

.select-with-button select {
  min-width: 180px;
  padding: 6px;
  height: 100%;
}

.lookup-button {
  text-decoration: none;
  font-size: 0.9em;
  background-color: #eee;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  cursor: pointer;
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
}