/* assets/style.css */

/* Grundlayout */
body {
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f6f4f1;
  color: #333;
}

/* Container */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

/* Header */
header {
  background-color: #d6b89a;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 1.1em;
  border-bottom: 3px solid #b89976;
}

.header-left {
  text-align: left;
}

.header-right {
  text-align: right;
  font-size: 1.3em;
  font-weight: 700;
}

header a {
  color: white;
  text-decoration: none;
  font-size: 14px;
}

/* Karten (z. B. Guthaben, Transaktionen etc.) */
.card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

/* Buttons */
button, .btn {
  display: inline-block;
  background-color: #b89976;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover, .btn:hover {
  background-color: #a58763;
}

/* Tabellen */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th, td {
  padding: 8px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

th {
  background-color: #eee;
  font-weight: 600;
}

/* Inputs */
input, select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
  margin-bottom: 10px;
  font-size: 15px;
}

/* Links */
a {
  color: #7a5c3f;
}

/* Responsive */
@media (max-width: 500px) {
  body { font-size: 16px; }
  th, td { font-size: 14px; }
  button { width: 100%; margin-top: 6px; }
}

/* Store-Items Desktop */
.store-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.store-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.store-item-info img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.store-item button {
    min-width: 90px;       /* Einheitliche Breite */
    padding: 10px 0;
    flex-shrink: 0;
}

/* Mobile Anpassung */
@media (max-width: 480px) {
    .store-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .store-item button {
        width: 100%;        /* Button unter Text, volle Breite */
        margin-top: 6px;
    }
}
/* --- Admin Formular Layout --- */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-form label {
  font-weight: 500;
  color: #444;
}

.admin-form input,
.admin-form select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-form button {
  align-self: flex-end;
  margin-top: 8px;
}

/* Statusmeldung */
.status-msg {
  background: #e6f6e6;
  border-left: 4px solid #4caf50;
  padding: 8px 10px;
  border-radius: 6px;
  color: #2e7d32;
  margin-bottom: 10px;
}

/* Tabellen leicht lesbarer machen */
table {
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}

table th {
  background: #f1f1f1;
  font-weight: 600;
}

table td {
  vertical-align: middle;
}

/* ----- User-Table: bessere Eingabefelder im Tabellen-Layout ----- */
.user-table {
  width: 100%;
  table-layout: fixed;       /* wichtige Zeile: Spaltenbreiten werden stabil verteilt */
  border-collapse: collapse;
}

/* Definierte Spaltenbreiten (anpassen falls nötig) */
.user-table th:nth-child(1),
.user-table td:nth-child(1) { width: 30%; }  /* Name */
.user-table th:nth-child(2),
.user-table td:nth-child(2) { width: 12%; }  /* Typ */
.user-table th:nth-child(3),
.user-table td:nth-child(3) { width: 18%; }  /* Guthaben */
.user-table th:nth-child(4),
.user-table td:nth-child(4) { width: 20%; }  /* RFID */
.user-table th:nth-child(5),
.user-table td:nth-child(5) { width: 20%; }  /* Aktion */

/* Eingaben in Zellen komplett füllen */
.user-table input[type="text"],
.user-table input[type="number"],
.user-table select {
  width: 100%;
  box-sizing: border-box;   /* wichtig damit padding nicht die Zelle sprengt */
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

/* Button in Aktions-Spalte: kompakt, aber volle Breite auf Mobil */
.user-table td form { display: flex; gap: 8px; align-items: center; }
.user-table td form input[type="text"] { flex: 1; } /* Input nimmt verbleibenden Platz */
.user-table td form button {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 6px;
  background: #b89976;
  color: #fff;
  border: none;
  cursor: pointer;
}

/* Auf kleinen Bildschirmen (mobil): Inputs untereinander, Buttons volle Breite */
@media (max-width: 600px) {
  .user-table { font-size: 14px; }
  .user-table td form { flex-direction: column; align-items: stretch; }
  .user-table td form button { width: 100%; margin-top: 6px; }
}
