/* Modernes Darkmode-Design */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #181c1f;
  color: #f3f6fa;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

#login-view, #app-view {
  background: #23272b;
  color: #f3f6fa;
  box-shadow: 0 4px 24px #000a;
  border-radius: 18px;
  padding: 2.5rem 2rem;
  margin: 3rem auto;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border: 1px solid #23272b;
  transition: box-shadow 0.2s, border 0.2s;
}

@media (max-width: 600px) {
  #login-view, #app-view {
    max-width: 100vw;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 1rem;
  }
}

input, select, textarea {
  padding: 0.75em 1em;
  border: 1.5px solid #2d333b;
  border-radius: 8px;
  margin-bottom: 1em;
  width: 100%;
  box-sizing: border-box;
  background: #23272b;
  color: #f3f6fa;
  font-size: 1.08em;
  transition: border 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px #58a6ff33;
}

button, input[type="submit"], input[type="button"] {
  background: linear-gradient(90deg, #005fa3 0%, #0078d4 100%);
  color: #fff;
  border: none;
  padding: 0.75em 1.5em;
  border-radius: 8px;
  font-size: 1.08em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px #0003;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}
button:hover, input[type="submit"]:hover, input[type="button"]:hover {
  background: linear-gradient(90deg, #0078d4 0%, #005fa3 100%);
  box-shadow: 0 4px 16px #0005;
  transform: translateY(-2px) scale(1.03);
}

header, footer {
  background: #23272a;
  color: #f4f4f4;
  padding: 1em;
  text-align: center;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 8px #0002;
}

main {
  padding: 2em;
  max-width: 800px;
  margin: 2rem auto;
  background: #23272a;
  border-radius: 18px;
  box-shadow: 0 2px 16px #0004;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 2em;
  background: #23272a;
  color: #f4f4f4;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px #0002;
}
th, td {
  border: 1px solid #2d333b;
  padding: 0.9em 1em;
  text-align: left;
}
th {
  background: #2d333b;
  color: #f4f4f4;
  font-weight: 700;
}
tr:nth-child(even) {
  background: #202225;
}

a {
  color: #58a6ff;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  text-decoration: underline;
  color: #90caff;
}

#error, .error {
  color: #d32f2f;
  margin-top: 0.5rem;
  font-weight: 600;
}

/* Popout-Overlay für Modals, angepasst auf index.html */
#scanner-popout {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(24,28,31,0.75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popout-fadein 0.2s cubic-bezier(.4,1.4,.6,1) both;
}
#scanner-popout[style*="display:none"] {
  display: none !important;
}
#scanner-popout .popout-content {
  background: #23272b;
  color: #f3f6fa;
  border-radius: 18px;
  box-shadow: 0 8px 32px #000c, 0 1.5px 8px #0006;
  padding: 2.5rem 2.5rem 2rem 2.5rem;
  max-width: 480px;
  width: 95vw;
  border: 1.5px solid #2d333b;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 1001;
  animation: popout-fadein 0.25s cubic-bezier(.4,1.4,.6,1) both;
  align-items: center;
}

/* Kamera-Preview im Popout responsiv und abgerundet */
#scanner-popout .popout-content video {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16/9;
  border-radius: 12px;
  background: #181c1f;
  object-fit: cover;
  box-shadow: 0 2px 12px #0005;
  margin-bottom: 1rem;
}

@keyframes popout-fadein {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 600px) {
  #scanner-popout .popout-content {
    max-width: 98vw;
    padding: 1.2rem 0.5rem;
    border-radius: 10px;
  }
  #scanner-popout {
    align-items: flex-start;
    padding-top: 2vh;
  }
}

/* Zentrierte Buttons */
.popout-content button,
.popout-content input[type="submit"],
.popout-content input[type="button"] {
  align-self: center;
  min-width: 220px;
}
button,
input[type="submit"],
input[type="button"] {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
