:root{
  --bg:#080a0f;
  --panel:#121722;
  --panel2:#171d29;
  --line:#283244;
  --text:#f5f7fb;
  --muted:#9aa6b8;
  --green:#67e879;
  --danger:#ffb2a0;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}
button,input,select{font-family:inherit}

/* LOGIN */
.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.login-card{width:100%;max-width:390px;background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:26px}
.bestela-logo{display:block;width:180px;max-width:100%;height:auto;margin:0 auto 22px}
.login-card p{margin:0 0 20px;color:var(--muted);font-size:15px}
label{display:block;margin:13px 0 7px;color:#d8deea;font-size:14px}
input,select{width:100%;height:46px;border-radius:12px;border:1px solid #344159;background:#080b12;color:white;padding:0 14px;font-size:15px}
button{height:48px;border:0;border-radius:12px;background:var(--green);font-weight:800;color:#061008}

/* ADMIN LAYOUT */
.admin-page{min-height:100vh;background:var(--bg)}
.topbar{position:fixed;top:0;left:0;right:0;height:72px;background:#080b12;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 16px;z-index:300}
.topbar-logo{width:150px;height:auto;display:block}
.menu-btn{width:48px;height:48px;border-radius:14px;border:1px solid #36435c;background:var(--panel2);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
.menu-btn span{width:22px;height:2px;border-radius:9px;background:white;display:block}

.backdrop{display:none}
.sidebar{position:fixed;top:72px;right:-100%;width:78vw;max-width:310px;height:calc(100vh - 72px);background:var(--panel);border-left:1px solid var(--line);padding:18px;z-index:260;transition:right .2s ease}
body.menu-open .sidebar{right:0}
body.menu-open .backdrop{display:block;position:fixed;inset:72px 0 0;background:rgba(0,0,0,.45);z-index:240}
.sidebar-logo{display:none}

.nav{display:flex;flex-direction:column;gap:8px}
.nav-item{display:flex;align-items:center;min-height:46px;padding:0 14px;border-radius:12px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.05);color:#d7deeb;font-size:15px;font-weight:700}
.nav-item.active{background:rgba(103,232,121,.10);border-color:rgba(103,232,121,.35);color:white}
.nav-item.active:before{content:"";width:4px;height:20px;border-radius:999px;background:var(--green);margin-right:10px}
.nav-item.logout{color:var(--danger)}

.admin-content{padding:96px 16px 28px}
.hero{margin-bottom:18px}
.eyebrow{margin:0 0 7px;color:var(--green);font-size:11px;font-weight:900;letter-spacing:.14em}
.hero h1{font-size:30px;margin:0 0 8px;line-height:1.08}
.subtitle{font-size:15px;line-height:1.35;color:#cbd4e3;margin:0;max-width:680px}

/* DASHBOARD */
.cards{display:grid;grid-template-columns:1fr;gap:12px}
.card{background:var(--panel);border:1px solid rgba(255,255,255,.06);border-radius:16px;padding:18px}
.card span{display:block;color:var(--muted);font-size:14px;margin-bottom:10px}
.card strong{display:block;font-size:30px;line-height:1}
.card small{display:block;color:#748096;font-size:12px;margin-top:8px}

/* LIST */
.list-panel,.form-panel{background:var(--panel);border:1px solid rgba(255,255,255,.06);border-radius:18px;padding:16px}
.list-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.list-header h2{margin:0;font-size:22px}
.primary-action{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 14px;border-radius:12px;background:var(--green);color:#061008;font-weight:900;font-size:14px}

.restaurant-list{display:grid;gap:10px}
.restaurant-row{display:grid;grid-template-columns:1fr;gap:12px;padding:16px;border-radius:14px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.055)}
.restaurant-row strong{display:block;font-size:19px;margin-bottom:5px}
.restaurant-row span{color:var(--muted);font-size:14px}
.license-line{display:block;margin-top:6px;color:var(--green)!important;font-size:12px!important;letter-spacing:.03em;word-break:break-all}
.restaurant-meta{display:flex;gap:8px;flex-wrap:wrap}
.badge,.status-dot{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border-radius:999px;font-size:11px!important;font-weight:900;text-transform:uppercase}
.badge{background:rgba(103,232,121,.12);color:var(--green)!important}
.status-dot{background:rgba(255,255,255,.08);color:#d7deeb!important}

/* FORM */
.bestela-form{display:grid;gap:12px}
.form-submit{width:100%;height:50px;margin-top:8px;border-radius:14px;font-size:15px;background:var(--green);color:#061008;font-weight:900}

/* DESKTOP */
@media(min-width:1025px){
  .topbar{display:none}
  .backdrop{display:none!important}
  .sidebar{top:0;left:0;right:auto;width:250px;max-width:none;height:100vh;padding:22px;border-right:1px solid var(--line);border-left:0}
  .sidebar-logo{display:block;width:155px;margin:0 0 24px}
  .admin-content{margin-left:250px;padding:34px;max-width:1180px}
  .hero h1{font-size:34px}
  .subtitle{font-size:16px}
  .cards{grid-template-columns:repeat(3,1fr)}
  .restaurant-row{grid-template-columns:1fr auto;align-items:center}
}

.detail-box{
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.055);
  border-radius:14px;
  padding:14px;
}

.detail-box span{
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-bottom:6px;
}

.detail-box strong{
  display:block;
  color:var(--green);
  font-size:14px;
  word-break:break-all;
}

.secondary-action{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  border-radius:12px;
  background:rgba(255,255,255,.06);
  color:#d7deeb;
  font-weight:800;
}

.notice{
  border-radius:14px;
  padding:14px 16px;
  margin-bottom:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}

.notice strong{
  display:block;
  margin-bottom:6px;
}

.notice ul{
  margin:6px 0 0 18px;
  padding:0;
  color:var(--muted);
}

.notice.success{
  border-color:rgba(103,232,121,.35);
  background:rgba(103,232,121,.10);
}

.notice.info{
  border-color:rgba(255,255,255,.12);
}

textarea{
  width:100%;
  min-height:110px;
  border-radius:12px;
  border:1px solid #344159;
  background:#080b12;
  color:white;
  padding:14px;
  font-size:15px;
  resize:vertical;
}

.notes-panel{
  margin-top:16px;
}

.notes-list{
  display:grid;
  gap:10px;
  margin-top:18px;
}

.note-item{
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.055);
  border-radius:14px;
  padding:14px;
}

.note-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  margin-bottom:10px;
}

.note-top time{
  color:var(--muted);
  font-size:12px;
}

.note-status{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}

.status-info{background:rgba(120,160,255,.14);color:#9fb8ff}
.status-in_bearbeitung{background:rgba(255,205,80,.14);color:#ffd36b}
.status-erledigt{background:rgba(103,232,121,.14);color:var(--green)}
.status-abgelehnt{background:rgba(255,120,100,.14);color:#ff9d8e}

.note-item strong{
  display:block;
  font-size:16px;
  margin-bottom:8px;
}

.note-item p{
  margin:0 0 10px;
  color:#d7deeb;
  line-height:1.45;
  font-size:14px;
}

.note-item small,
.empty-text{
  color:var(--muted);
  font-size:12px;
}

.note-edit{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:0 10px;
  border-radius:10px;
  background:rgba(255,255,255,.06);
  color:#d7deeb;
  font-size:12px;
  font-weight:800;
  margin-top:10px;
}

.note-actions{
  display:flex;
  gap:8px;
  align-items:center;
  margin-top:10px;
  flex-wrap:wrap;
}

.note-actions form{
  margin:0;
}

.note-archive{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  height:32px;
  padding:0 10px;
  border-radius:10px;
  background:rgba(255,120,100,.12);
  color:#ff9d8e;
  font-size:12px;
  font-weight:800;
}

.archive-section{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid rgba(255,255,255,.08);
}

.archive-section h3{
  margin:0 0 12px;
  font-size:18px;
  color:var(--muted);
}

.note-item.archived{
  opacity:.72;
}

.restore-form{
  margin:10px 0 0;
}

.note-restore{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  height:32px;
  padding:0 10px;
  border-radius:10px;
  background:rgba(103,232,121,.12);
  color:var(--green);
  font-size:12px;
  font-weight:800;
}

.log-list{
  display:grid;
  gap:10px;
}

.log-row{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  padding:14px;
  border-radius:14px;
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.055);
}

.log-main strong{
  display:block;
  font-size:16px;
  margin-bottom:5px;
}

.log-main span{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:5px;
}

.log-main small{
  color:#d7deeb;
  font-size:13px;
}

.log-meta{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:12px;
}

.status-code{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:42px;
  height:28px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
}

.code-200{
  background:rgba(103,232,121,.12);
  color:var(--green);
}

.code-400,
.code-403,
.code-404,
.code-500{
  background:rgba(255,120,100,.12);
  color:#ff9d8e;
}

@media(min-width:1025px){
  .log-row{
    grid-template-columns:1fr auto;
    align-items:center;
  }

  .log-meta{
    justify-content:flex-end;
  }
}
