:root{
  --bg1:#060a16;
  --bg2:#0b1633;
  --card: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.12);
  --text:#eaf0ff;
  --muted: rgba(234,240,255,.72);
  --gold:#d9b56f;
  --bad:#ff6b6b;
  --ok:#57d18f;

  /* layout */
  --pagePad:16px;
  --wrapMax:980px;
}

*{box-sizing:border-box}
html, body{width:100%; max-width:100%; overflow-x:hidden;}

body{
  margin:0;
  font-family: ui-sans-serif, -apple-system, system-ui, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(120,140,255,.18), transparent 60%),
    radial-gradient(1000px 500px at 90% 20%, rgba(217,181,111,.12), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  min-height:100vh;
}

/* Viktigt: en och samma “container” bredd för ALLT */
.wrap{
  width: min(var(--wrapMax), calc(100vw - (var(--pagePad) * 2)));
  margin: 0 auto;
  padding: var(--pagePad);
}

/* Förhindra att något inuti råkar trycka ut sidan */
img, svg, canvas, video{max-width:100%; height:auto;}
.grid, .table, .row, .card{max-width:100%;}

.card{
  width:100%;
  border:1px solid var(--stroke);
  border-radius:18px;
  padding:14px;
  margin:12px 0;
}

.glass{
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.topbar{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  width:100%;
}

.brand .h1{font-size:22px; font-weight:800}
.muted{color:var(--muted); font-size:13px}

.nav{display:flex; gap:10px; flex-wrap:wrap}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.18);
  color:var(--text);
  text-decoration:none;
  font-weight:700;
  font-size:14px;
}

.btn:hover{border-color: rgba(255,255,255,.22)}
.btn.active{background: rgba(217,181,111,.16); border-color: rgba(217,181,111,.35)}
.btn.warn{background: rgba(255,107,107,.12); border-color: rgba(255,107,107,.28)}

.notice{font-weight:800}
.notice.ok{color:var(--ok)}
.notice.bad{color:var(--bad)}

.grid{
  width:100%;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width:820px){
  .grid{grid-template-columns: 1fr}
}

.table{width:100%; display:flex; flex-direction:column; gap:8px}

.row{
  width:100%;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.16);
  overflow:hidden; /* stoppar att långa saker “drar” bredd */
}

.row .left{display:flex; flex-direction:column; gap:3px; min-width:0}
.tag{font-size:12px; color:var(--muted); word-break:break-word}
.pill{
  padding:6px 10px; border-radius:999px;
  background: rgba(255,255,255,.06); border:1px solid var(--stroke);
  font-weight:800; font-size:12px;
  white-space:nowrap;
}
.pill.ok{border-color:rgba(87,209,143,.35); background:rgba(87,209,143,.12)}
.pill.bad{border-color:rgba(255,107,107,.35); background:rgba(255,107,107,.12)}
.pill.gold{border-color:rgba(217,181,111,.4); background:rgba(217,181,111,.14)}

input, textarea, select{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline:none;
}
textarea{min-height:110px}

.form{display:grid; gap:10px}
.form .cols{display:grid; grid-template-columns:1fr 1fr; gap:10px}
@media (max-width:820px){ .form .cols{grid-template-columns:1fr} }

hr{border:none; border-top:1px solid var(--stroke); margin:10px 0}

.calendar{
  width:100%;
  border:1px solid var(--stroke);
  border-radius:18px;
  overflow:hidden;
  background: rgba(0,0,0,.14);
}
.cal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px;
  border-bottom:1px solid var(--stroke);
}
.cal-title{font-weight:900}
.cal-controls{display:flex; gap:10px; flex-wrap:wrap}
.cal-grid{
  width:100%;
  display:grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-dow, .cal-cell{
  padding:10px;
  border-right:1px solid rgba(255,255,255,.06);
  border-bottom:1px solid rgba(255,255,255,.06);
  min-height:78px;
}
.cal-dow{font-weight:900; color:var(--muted); background: rgba(255,255,255,.03)}
.cal-cell{position:relative}
.cal-num{font-weight:900; font-size:13px; color:var(--muted)}
.cal-badges{margin-top:6px; display:flex; flex-direction:column; gap:6px}
.badge{
  border-radius:12px;
  padding:6px 8px;
  font-weight:900;
  font-size:12px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
}
.badge.pending{border-color:rgba(217,181,111,.45); background:rgba(217,181,111,.14)}
.badge.confirmed{border-color:rgba(87,209,143,.45); background:rgba(87,209,143,.14)}
.badge.cancelled{border-color:rgba(180,180,180,.35); background:rgba(180,180,180,.12); color:rgba(255,255,255,.8)}

/* Green confirm buttons */
.btn.ok,
.btn.confirm{
  background: rgba(87,209,143,.16);
  border-color: rgba(87,209,143,.45);
}
.btn.ok:hover,
.btn.confirm:hover{
  border-color: rgba(87,209,143,.65);
}