/* /public/assets/css/app.css */
:root{
  --bg:#0b0f14;
  --card:#0f1621;
  --text:#e9eef5;
  --muted:#9fb0c3;
  --border:rgba(255,255,255,.10);
  --accent:#4ea1ff;
  --danger:#ff4e4e;

  --r:16px;
  --pad:14px;
  --max:1100px;

  /* Wichtig für native Form-Controls (Select etc.) */
  color-scheme: dark;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:linear-gradient(180deg,#06080c 0%, #0b0f14 60%, #070a0f 100%);
  color:var(--text);
}

a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

header{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(10px);
  background:rgba(10,14,20,.75);
  border-bottom:1px solid var(--border);
}

.nav{
  max-width:var(--max);
  margin:0 auto;
  padding:10px var(--pad);
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
}

.nav .brand{
  font-weight:800;
  margin-right:auto;
  color:var(--text);
  padding:8px 10px;
  border-radius:12px;
  background:transparent;
}

.nav a.navlink{
  color:var(--text);
  padding:8px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
}
.nav a.navlink:hover{
  background:rgba(255,255,255,.10);
  text-decoration:none;
}

.pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  color:var(--muted);
}

main{
  max-width:var(--max);
  margin:0 auto;
  padding:var(--pad);
}

h1{ margin: 10px 0 12px; font-size: 26px; }
h2{ margin: 0 0 10px; font-size: 18px; color: var(--text); }
p{ color: var(--text); }
small,.muted{ color: var(--muted); }

.card{
  background:rgba(15,22,33,.75);
  border:1px solid var(--border);
  border-radius:var(--r);
  padding:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  margin: 12px 0;
}

.row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.row > *{ flex:1 1 240px; }

label{
  display:block;
  font-size:14px;
  color: rgba(233,238,245,.78); /* Labels etwas heller */
  margin-bottom: 6px;
}

input, select, button, textarea{
  width:100%;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.05);
  color:var(--text);
  outline:none;
}

input:focus, select:focus, textarea:focus{
  border-color:rgba(78,161,255,.65);
  box-shadow:0 0 0 4px rgba(78,161,255,.18);
}

/* Buttons */
button{
  cursor:pointer;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(78,161,255,.18);
}
button:hover{ background:rgba(78,161,255,.26); }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
  color:var(--text);
}
.btn:hover{ background:rgba(255,255,255,.10); text-decoration:none; }

.btn-danger{
  border-color:rgba(255,78,78,.5);
  background:rgba(255,78,78,.12);
}
.btn-danger:hover{ background:rgba(255,78,78,.18); }

/* Tabellen */
table{
  width:100%;
  border-collapse:collapse;
  border:1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  overflow:hidden;
}
thead th{ background:rgba(255,255,255,.04); }
th, td{
  padding:10px 8px;
  border-bottom:1px solid rgba(255,255,255,.08);
  vertical-align:top;
}
th{ color:var(--muted); font-weight:600; }

.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.actions form{ margin:0; }
.actions button{ width:auto; }

/* Alerts */
.alert{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  padding:10px 12px;
  border-radius: 14px;
  margin: 10px 0;
}
.alert.error{
  border-color: rgba(255,78,78,.5);
  background: rgba(255,78,78,.10);
}
.alert.ok{
  border-color: rgba(78,161,255,.5);
  background: rgba(78,161,255,.10);
}

/* Layout Helfer */
.center{
  min-height: calc(100vh - 70px);
  display:grid;
  place-items:center;
}
.narrow{ width: min(520px, 100%); }

/* --- Fix: bessere Lesbarkeit in Select/Option (Dark UI) --- */
select, option, optgroup{
  color: var(--text) !important;
  background-color: rgba(255,255,255,.06) !important;
}

/* Custom Select Pfeil (wo unterstützt) */
select{
  -webkit-appearance: none;
  appearance: none;
  padding-right: 38px;

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(233,238,245,.9) 50%),
    linear-gradient(135deg, rgba(233,238,245,.9) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);

  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    calc(100% - 42px) 50%;

  background-size: 6px 6px, 6px 6px, 1px 60%;
  background-repeat: no-repeat;
}

input[type="file"]{
  padding: 10px;
}

/* Dropdown-Optionen (wirkt je nach Browser/OS unterschiedlich, hilft aber oft) */
option{
  background-color: #0f1621 !important;
  color: #e9eef5 !important;
}
/* Mobile table improvements */
.table-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
}
.table-wrap table{
  min-width: 920px; /* verhindert “zerquetschte” Spalten, passt sich an */
}

/* Optional: erste Spalte sticky */
.sticky-col{
  position: sticky;
  left: 0;
  background: rgba(15,22,33,.92);
}

/* Report list: table on desktop, cards on mobile */
.report-cards{ display:none; }
@media (max-width: 800px){
  .report-table{ display:none; }
  .report-cards{ display:block; }
  .report-card{
    border:1px solid rgba(255,255,255,.10);
    border-radius:16px;
    padding:12px;
    background:rgba(255,255,255,.03);
    margin:10px 0;
  }
  .report-card .meta{ color: var(--muted); font-size:12px; }
  .report-card .line{ margin-top:6px; }
}