:root{
  --bg:#0b0e14;
  --panel:#0f1523;
  --card:#121826;
  --border:#1e2a44;
  --border2:#263552;
  --text:#e6e6e6;
  --muted:rgba(230,230,230,.75);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:14px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin:0;
}

/* FULLWIDTH LAYOUT */
.wrap{
  width: 100%;
  max-width: none;          /* wichtig: keine Begrenzung */
  margin: 0;
  padding: 14px 18px;
}

/* TOP BAR */
.bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(30,42,68,.9);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18,24,38,.95), rgba(12,16,28,.85));
  box-shadow: var(--shadow);

  position: sticky;
  top: 10px;
  z-index: 20;
  backdrop-filter: blur(8px);
}

.title{ font-size: 18px; font-weight: 700; }
.right{ display:flex; gap: 12px; align-items:center; }
.muted{ color: var(--muted); }

/* MAIN CARD FULLWIDTH */
.card{
  margin-top: 14px;
  background: linear-gradient(180deg, rgba(18,24,38,.92), rgba(12,16,28,.92));
  border: 1px solid rgba(30,42,68,.9);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* FILTERS: responsive grid */
.filters{
  display:grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(30,42,68,.85);
  background: rgba(15,21,35,.55);
}

.filters .span-2{ grid-column: span 2; }
.filters .span-3{ grid-column: span 3; }
.filters .span-4{ grid-column: span 4; }

.row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

label{ font-size: 12px; color: var(--muted); }

.filters input, .filters select{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(38,53,82,.9);
  background: rgba(12,16,28,.75);
  color: var(--text);
  outline:none;
}

.filters input:focus, .filters select:focus{
  border-color: rgba(122,162,247,.65);
  box-shadow: 0 0 0 3px rgba(122,162,247,.15);
}

/* make the multi-select not giant */
#level{
  min-height: 44px;
  height: 44px;
}
#level[multiple]{
  height: 44px;          /* statt riesig */
  overflow: hidden;
}

/* Buttons */
button{
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(42,58,92,.9);
  background: rgba(24,33,58,.85);
  color: var(--text);
  cursor:pointer;
  transition: filter .15s ease, transform .06s ease;
}
button:hover{ filter: brightness(1.12); }
button:active{ transform: translateY(1px); }
button:disabled{ opacity:.5; cursor:not-allowed; }

/* TABLE */
.tableWrap{
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid rgba(30,42,68,.9);
  overflow:auto;
  max-height: calc(100vh - 340px); /* nutzt Screen besser */
}

table{
  width:100%;
  border-collapse: collapse;
  background: rgba(12,16,28,.55);
  min-width: 1100px; /* damit columns nicht zerquetscht */
}

th, td{
  padding: 10px;
  border-bottom: 1px solid rgba(30,42,68,.8);
  vertical-align: top;
}

th{
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(16,23,42,.95);
  text-align:left;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: rgba(230,230,230,.85);
}

tbody tr:hover{ background: rgba(122,162,247,.07); }

.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

/* Pager */
.pager{
  display:flex;
  justify-content:center;
  gap: 12px;
  align-items:center;
  margin-top: 12px;
}

/* Responsive: smaller screens */
@media (max-width: 1100px){
  .filters{ grid-template-columns: 1fr 1fr; }
  .filters .span-2, .filters .span-3, .filters .span-4{ grid-column: span 2; }
}

.toggles{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.toggle{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(38,53,82,.9);
  background: rgba(12,16,28,.55);
  color: rgba(230,230,230,.9);
}

.toggle.active{
  background: rgba(122,162,247,.18);
  border-color: rgba(122,162,247,.55);
  box-shadow: 0 0 0 3px rgba(122,162,247,.10);
}

/* optional: level hints */
.toggle[data-level="warn"].active{
  background: rgba(255,209,102,.16);
  border-color: rgba(255,209,102,.45);
  box-shadow: 0 0 0 3px rgba(255,209,102,.10);
}
.toggle[data-level="error"].active{
  background: rgba(255,107,107,.16);
  border-color: rgba(255,107,107,.45);
  box-shadow: 0 0 0 3px rgba(255,107,107,.10);
}

tr.logRow { cursor: pointer; }
tr.details td { padding: 0; border-bottom: 1px solid rgba(30,42,68,.8); }

.detailsBox{
  padding: 12px;
  background: rgba(12,16,28,.65);
}

.detailsTop{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  flex-wrap:wrap;
  margin-bottom: 10px;
}

pre.ctx{
  margin: 0;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(38,53,82,.9);
  background: rgba(12,16,28,.85);
  overflow:auto;
  max-height: 280px;
}

.metaChip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(38,53,82,.9);
  background: rgba(12,16,28,.55);
  margin-right: 8px;
  margin-top: 6px;
}

.metaLink{
  color: rgba(122,162,247,.95);
  text-decoration: none;
}
.metaLink:hover{ text-decoration: underline; }

.miniBtn{
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(42,58,92,.9);
  background: rgba(24,33,58,.85);
  color: var(--text);
  cursor:pointer;
  font-size: 12px;
}
.miniBtn.copied{
  border-color: rgba(122,162,247,.65);
  box-shadow: 0 0 0 3px rgba(122,162,247,.12);
}

.dateRow{
  display:grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items:end;
}

.dateField label{
  display:block;
  margin-bottom: 6px;
}

.datePresets{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

@media (max-width: 900px){
  .dateRow{
    grid-template-columns: 1fr;
    align-items:stretch;
  }
  .datePresets{
    justify-content:flex-start;
  }
}

/* DateTime Picker Icon (Chrome / Edge / Brave) */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.2);
  opacity: 0.85;
  cursor: pointer;
}

input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
}

/* =========================
   LOGIN PAGE
========================= */

.loginWrap{
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.loginCard{
  width: 100%;
  max-width: 420px;
  padding: 32px 28px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18,24,42,.95), rgba(10,14,26,.95));
  border: 1px solid rgba(38,53,82,.9);
  box-shadow:
    0 30px 80px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.loginHeader{
  text-align: center;
  margin-bottom: 24px;
}

.loginLogo{
  max-width: 140px;
  margin-bottom: 14px;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.6));
}

.loginHeader h2{
  margin: 0;
  font-size: 22px;
}

.loginForm{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.loginForm input{
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(12,16,28,.85);
  border: 1px solid rgba(38,53,82,.9);
  color: var(--text);
}

.loginForm input:focus{
  outline: none;
  border-color: rgba(122,162,247,.8);
  box-shadow: 0 0 0 3px rgba(122,162,247,.15);
}

.loginForm button{
  margin-top: 8px;
  padding: 12px;
  border-radius: 999px;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(122,162,247,.95), rgba(92,130,230,.95));
  border: none;
  color: #0b1020;
  cursor: pointer;
}

.loginForm button:hover{
  filter: brightness(1.05);
}

.loginForm .err{
  margin-top: 6px;
  color: #ff6b6b;
  text-align: center;
}
