
/* =======================================================
   WOW-APP DESIGN – farblich betonte, finale Version
   ======================================================= */

:root{
  --teal:#0f766e; --teal-d:#0b5f59;
  --blue:#2563eb; --blue-d:#1d4ed8;
  --green:#16a34a; --red:#dc2626;
  --bg:#f6fafb; --card:#fff;
  --line:#e2e8f0; --text:#1f2937;
  --muted:#64748b;
  --shadow:0 8px 24px rgba(2,8,23,0.08);
}

*{box-sizing:border-box;}
html,body{
  margin:0;padding:0;
  background:var(--bg);color:var(--text);
  font:15px/1.5 "Inter",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

/* ================= HEADER ================= */
header{
  position:fixed;top:0;left:0;right:0;
  background:var(--teal);color:#fff;z-index:1000;
  box-shadow:0 2px 10px rgba(0,0,0,.15);
}
.header-row{
  display:flex;align-items:center;justify-content:space-between;
  gap:16px;padding:10px 16px 6px;
}
header h1{margin:0;font-size:22px;font-weight:800;letter-spacing:.2px;}

.nav-inline{display:flex;justify-content:space-between;align-items:center;gap:12px;}
.nav-right{display:flex;align-items:center;gap:6px;}
#global-search,#admin-code{
  height:32px;padding:4px 8px;border-radius:8px;
  border:1px solid rgba(255,255,255,.5);
  background:rgba(255,255,255,.1);color:#fff;outline:none;
}
#global-search::placeholder,#admin-code::placeholder{color:#e9f0ff;}
#btn-global-search{
  width:36px;height:32px;border:none;border-radius:8px;cursor:pointer;
  background:linear-gradient(180deg,#3b82f6,#2563eb);color:#fff;
}
#btn-global-search:hover{filter:brightness(1.05);}

#global-sums{
  display:flex;gap:24px;align-items:center;
  padding:6px 16px 10px;font-weight:600;
}
#global-sums strong{font-weight:800;}
#sum-top-sold{color:#c7f9cc;}
#sum-top-red{color:#ffd7d5;}
#sum-top-open{color:#cdd9ff;}

/* ================= SIDEBAR ================= */
.sidebar{
  position:fixed;top:84px;left:0;width:250px;
  height:calc(100vh - 84px);background:var(--card);
  border-right:1px solid var(--line);box-shadow:var(--shadow);
  padding:12px 0;z-index:900;
}
.sidebar h2{margin:0 16px 10px;color:var(--teal);font-size:16px;font-weight:800;}
.sidebar .nav-btn{
  display:flex;align-items:center;gap:12px;
  width:100%;border:none;background:none;color:#334155;
  padding:10px 16px;border-radius:10px;cursor:pointer;
  transition:background .15s ease,transform .05s ease;
}
.sidebar .nav-btn:hover{background:#eef2ff;color:var(--blue);}
.sidebar .nav-btn:active{transform:translateY(1px);}
/* Aktive Sidebar-Buttons behalten ihre eigene Farbe, werden nur heller */
.sidebar .nav-btn.active {
  filter: brightness(1.15);
  transform: translateY(0);
  margin: 4px 8px;
}

.sidebar .nav-btn i{width:20px;height:20px;}
/* Eigene Farben für bestimmte Sidebar-Buttons */
.sidebar .nav-btn-green {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 4px 10px rgba(22,163,74,0.25);
}
.sidebar .nav-btn-green:hover {
  filter: brightness(1.1);
}

.sidebar .nav-btn-red {
  background: linear-gradient(180deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 10px rgba(220,38,38,0.25);
}
.sidebar .nav-btn-red:hover {
  filter: brightness(1.1);
}
/* ⭐ NEU: Blauer Button für "Felder leeren" */
.sidebar .nav-btn-blue {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 4px 10px rgba(37,99,235,0.25);
}
.sidebar .nav-btn-blue:hover {
  filter: brightness(1.1);
}
/* ================= MAIN ================= */
main{
  margin-left:250px;padding:110px 24px 60px;
}
.panel{display:none;animation:fadeIn .25s ease;}
.panel.visible{display:block;}
h2{margin:0 0 12px;font-size:22px;font-weight:800;}
h3{margin:18px 0 8px;font-size:16px;font-weight:800;color:#0f172a;}
.muted{color:var(--muted);}
/* Buttons */
button,.btn{
  background:linear-gradient(180deg,#3b82f6,#2563eb);
  border:none;color:#fff;font-weight:700;
  padding:8px 14px;border-radius:10px;cursor:pointer;
  box-shadow:0 6px 14px rgba(37,99,235,.25);
  transition:transform .05s,filter .15s;
}
/* Zusatzfarben für Gutschein-Buttons */
.btn-green {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  box-shadow: 0 6px 14px rgba(22,163,74,0.25);
}
.btn-red {
  background: linear-gradient(180deg, #ef4444, #dc2626);
  box-shadow: 0 6px 14px rgba(220,38,38,0.25);
}

.btn:hover{filter:brightness(1.05);}
.btn:active{transform:translateY(1px);}
.btn-ghost{background:#eef2ff;color:#1e3a8a;box-shadow:none;}

.form-grid2{
  display:grid;grid-template-columns:160px 1fr 160px 1fr;
  gap:10px 14px;align-items:center;max-width:980px;
  background:var(--card);border:1px solid var(--line);
  border-radius:12px;padding:14px;box-shadow:var(--shadow);
}
.form-grid2 label{font-weight:700;color:#0f172a;}
.form-grid2 input,.form-grid2 select{
  height:36px;padding:6px 9px;border-radius:8px;
  border:1px solid #cbd5e1;background:#fff;
  transition:border-color .15s,box-shadow .15s;
}
.form-grid2 input:focus,.form-grid2 select:focus{
  border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15);
}
.actions-row{margin-top:10px;display:flex;gap:8px;}

/* Tabellen */
.table-wrap{
  background:var(--card);border:1px solid var(--line);
  border-radius:12px;overflow:auto;max-height:360px;box-shadow:var(--shadow);
}
table{width:100%;border-collapse:collapse;}
thead th{
  position:sticky;top:0;z-index:1;
  background:#f1f5f9;color:#475569;font-weight:800;
  text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);
}
tbody td{padding:10px 12px;border-bottom:1px solid var(--line);}
tbody tr:hover{background:#f9fafb;}

/* Berichte */
.reports-split{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.report-summary{
  display:flex;justify-content:center;align-items:center;gap:36px;
  margin:14px 0;padding:10px 0;background:#fff;
  border:1px solid var(--line);border-radius:12px;
  box-shadow:var(--shadow);font-weight:800;
}
.sum-green{color:var(--green);}
.sum-red{color:var(--red);}
.sum-blue{color:var(--blue);}
.center{display:flex;justify-content:center;}

/* Verwaltung */
.admin-scroll{
  max-height:calc(100vh - 220px);
  overflow-y:auto;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  box-shadow:var(--shadow);
  padding:8px;
}
.admin-scroll table{width:100%;border-collapse:collapse;}
.admin-scroll th,.admin-scroll td{
  padding:8px 10px;border-bottom:1px solid var(--line);
}
.admin-scroll th{
  background:#f1f5f9;font-weight:700;color:#475569;position:sticky;top:0;
}
.admin-scroll tr:hover{background:#f9fafb;}
.admin-toolbar{
  display:flex;gap:10px;align-items:center;margin-bottom:12px;
}

/* Dialoge */
dialog{
  border:none;border-radius:14px;background:#fff;padding:18px 20px;
  box-shadow:0 24px 80px rgba(2,8,23,.25);
  animation:fadeInScale .25s ease;
}
dialog::backdrop{
  background:rgba(2,6,23,.45);backdrop-filter:blur(2px);
}
.correction-grid{
  display:grid;grid-template-columns:160px 1fr;gap:10px 14px;align-items:center;
}
.correction-grid h3{grid-column:1/3;margin:0 0 6px;}
.correction-grid input,.correction-grid select{
  height:36px;padding:6px 9px;border-radius:8px;border:1px solid #cbd5e1;
}
.correction-grid button{grid-column:1/3;justify-self:center;min-width:120px;}

@media (max-width:1200px){
  .form-grid2{grid-template-columns:160px 1fr;}
  .reports-split{grid-template-columns:1fr;}
}
@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}
@keyframes fadeInScale{from{opacity:0;transform:scale(.97);}to{opacity:1;transform:scale(1);}}
#redeem-status {
  background: #e6f7fb;
  border: 2px solid #00acc1;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  color: #084c61;
  font-weight: 600;
  font-size: 1.05em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.remaining-box {
  background: #ecfdf5;
  border-left: 5px solid #10b981;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: -4px;
  font-size: 1.05em;
}
.ean-with-button {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ean-with-button input {
  flex: 1;
}

.btn-small {
  padding: 6px 12px;
  height: 36px;
}
/* ================= SORTIERUNG ================= */
th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}

th.sortable::after {
  content: " ↕";
  opacity: 0.4;
  font-size: 12px;
  margin-left: 4px;
}

th.sortable.asc::after {
  content: " ↑";
  opacity: 1;
}

th.sortable.desc::after {
  content: " ↓";
  opacity: 1;
}

