:root{
  --bg:#ffffff;
  --card:#ffffff;
  --dark:#49433d;
  --muted:#746c63;
  --line:#e8e0d5;
  --green:#b88a35;
  --green2:#96702b;
  --blue:#8b6728;
  --softblue:#f4ead7;
  --softgreen:#f7f0e3;
  --yellow:#fff5d9;
  --red:#f8e4df;
  --radius:8px;
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:#ffffff;
  color:var(--dark);
}

button,input,select,textarea{
  font:inherit;
}

.app{
  display:grid;
  grid-template-columns:280px 1fr;
  min-height:100vh;
}

.login-screen{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:28px;
  background:linear-gradient(145deg,#ffffff 0%,#faf7f1 55%,#f1e8da 100%);
}

.login-card{
  width:min(440px,100%);
  padding:42px;
  background:#ffffff;
  border:1px solid var(--line);
  box-shadow:0 20px 60px rgba(73,67,61,.12);
  text-align:center;
}

.login-brand,
.logo{
  font-family:Georgia,"Times New Roman",serif;
  color:var(--dark);
}

.login-brand{
  font-size:30px;
  letter-spacing:.5px;
  margin-bottom:6px;
}

.login-kicker{
  color:var(--green2);
  font-size:11px;
  letter-spacing:2px;
  font-weight:700;
  margin-bottom:24px;
}

.login-card label{
  display:block;
  text-align:left;
  margin:14px 0 6px;
  font-size:13px;
  font-weight:700;
}

.login-card .primary{
  width:100%;
  margin-top:20px;
}

.login-error{
  min-height:20px;
  margin:12px 0 0;
  color:#9e342a;
  font-size:13px;
}

.ornament{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--green);
  margin:18px 0;
}

.ornament:before,.ornament:after{
  content:"";
  height:1px;
  flex:1;
  background:var(--line);
}

.sidebar{
  background:#fbfaf7;
  backdrop-filter:blur(16px);
  padding:32px 24px;
  border-right:1px solid var(--line);
  position:sticky;
  top:0;
  height:100vh;
  overflow:auto;
}

.logo{
  font-size:30px;
  font-weight:400;
  letter-spacing:.2px;
  color:var(--dark);
}

.logo span{
  color:var(--green);
}

.sidebar-sub{
  margin:6px 0 30px;
  color:var(--muted);
  font-size:14px;
}

.role-box{
  background:#ffffff;
  border:1px solid var(--line);
  padding:14px;
  border-radius:16px;
  margin-bottom:24px;
}

.role-box small{
  display:block;
  color:var(--muted);
  margin-bottom:8px;
}

.nav-title{
  color:#a17b37;
  font-size:11px;
  letter-spacing:1.2px;
  font-weight:700;
  margin:22px 12px 8px;
}

.nav button{
  width:100%;
  border:0;
  background:transparent;
  color:var(--dark);
  padding:13px 14px;
  border-radius:13px;
  cursor:pointer;
  text-align:left;
  margin:3px 0;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.nav button:hover,
.nav button.active{
  background:#f2e9da;
  color:#8b6728;
}

.notification-dot{
  min-width:25px;
  height:25px;
  padding:0 7px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#ff4d5d;
  color:#fff;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
}

.main{
  padding:30px 34px 60px;
  min-width:0;
  background:#ffffff;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:24px;
}

.topbar h1{
  margin:0;
  font-size:28px;
  font-family:Georgia,"Times New Roman",serif;
  font-weight:400;
}

.top-user{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
}

.avatar{
  width:38px;
  height:38px;
  border-radius:50%;
  background:var(--softgreen);
  color:var(--green2);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
}

.page{
  display:block;
}

.hidden{
  display:none !important;
}

.hero{
  background:linear-gradient(135deg,#f8f3eb,#eee2d1);
  border-radius:var(--radius);
  padding:34px;
  color:var(--dark);
  margin-bottom:22px;
  overflow:hidden;
  position:relative;
}

.hero:after{
  content:"";
  width:260px;
  height:260px;
  border-radius:50%;
  background:rgba(184,138,53,.09);
  position:absolute;
  right:-60px;
  top:-90px;
}

.hero h2{
  font-family:Georgia,"Times New Roman",serif;
  font-weight:400;
  font-size:38px;
  margin:0 0 10px;
  letter-spacing:-1px;
}

.hero p{
  color:var(--muted);
  max-width:650px;
  line-height:1.6;
}

.grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
  margin-bottom:22px;
}

.card,
.section{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:22px;
  box-shadow:0 10px 30px rgba(73,67,61,.06);
}

.section{
  margin-bottom:20px;
}

.card small,
.muted{
  color:var(--muted);
}

.card strong{
  display:block;
  font-size:30px;
  margin-top:8px;
}

.section-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  margin-bottom:16px;
}

.section-header h2,
.section h2{
  margin-top:0;
  font-family:Georgia,"Times New Roman",serif;
  font-weight:400;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

input,
select,
textarea{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:13px;
  padding:12px 13px;
  outline:none;
}

input:focus,
select:focus,
textarea:focus{
  border-color:#c29b55;
  box-shadow:0 0 0 3px #f4ead7;
}

textarea{
  min-height:90px;
}

button.primary,
button.secondary,
button.dark,
button.danger{
  border:0;
  border-radius:13px;
  padding:11px 15px;
  font-weight:700;
  cursor:pointer;
}

.primary{
  background:var(--green);
  color:#fff;
}

.logout-button{
  border:1px solid var(--line);
  background:#fff;
  color:var(--dark);
  padding:8px 11px;
  border-radius:6px;
  cursor:pointer;
}

.primary:hover{
  background:var(--green2);
}

.secondary{
  background:var(--softblue);
  color:var(--blue);
}

.dark{
  background:#eee2d1;
  color:var(--dark);
}

.danger{
  background:var(--red);
  color:#c23030;
}

.actions{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:14px;
}

table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 8px;
}

th{
  color:var(--muted);
  text-align:left;
  padding:7px 10px;
  font-size:12px;
  font-weight:700;
}

td{
  padding:12px 10px;
  background:#fbfcff;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  vertical-align:middle;
}

td:first-child{
  border-left:1px solid var(--line);
  border-radius:12px 0 0 12px;
}

td:last-child{
  border-right:1px solid var(--line);
  border-radius:0 12px 12px 0;
}

.badge{
  display:inline-block;
  padding:6px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
}

.badge.green{
  background:var(--softgreen);
  color:#068358;
}

.badge.blue{
  background:var(--softblue);
  color:var(--blue);
}

.badge.yellow{
  background:var(--yellow);
  color:#956200;
}

.badge.red{
  background:var(--red);
  color:#ba3434;
}

.badge.gray{
  background:#eef1f5;
  color:#596274;
}

/* VAGTPLAN */

.week-wrapper{
  overflow:auto;
}

.week-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:16px;
  flex-wrap:wrap;
}

.week-toolbar-left,
.week-toolbar-right{
  display:flex;
  align-items:center;
  gap:8px;
}

.week-title{
  font-weight:800;
  min-width:190px;
  text-align:center;
}

.week-grid{
  min-width:1100px;
  display:grid;
  grid-template-columns:170px repeat(7,1fr);
  gap:1px;
  background:var(--line);
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
}

.week-grid > div{
  background:white;
  min-height:88px;
}

.week-head{
  padding:12px;
  font-weight:800;
  font-size:12px;
  color:var(--muted);
  min-height:auto !important;
}

.employee-cell{
  padding:14px 12px;
  background:#fbfcff !important;
}

.employee-cell strong{
  display:block;
}

.employee-cell small{
  color:var(--muted);
}

.drop-cell{
  padding:8px;
  transition:.15s ease;
}

.drop-cell.drag-over{
  background:#e8f0ff !important;
  outline:2px dashed var(--blue);
  outline-offset:-5px;
}

.shift-chip{
  background:var(--softblue);
  border-left:4px solid var(--blue);
  border-radius:10px;
  padding:8px 9px;
  font-size:12px;
  margin-bottom:6px;
  cursor:grab;
  transition:.15s ease;
  user-select:none;
}

.shift-chip:hover{
  transform:translateY(-1px);
  box-shadow:0 5px 16px rgba(61,103,255,.12);
}

.shift-chip.dragging{
  opacity:.45;
}

.shift-chip strong{
  display:block;
  margin-bottom:3px;
}

.shift-chip small{
  color:var(--muted);
}

.shift-chip .shift-actions{
  display:flex;
  gap:4px;
  margin-top:6px;
}

.shift-chip .mini{
  border:0;
  background:#fff;
  color:var(--blue);
  border-radius:7px;
  padding:4px 6px;
  font-size:10px;
  cursor:pointer;
}

/* øvrige */

.notify-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:15px;
  padding:15px;
  border:1px solid var(--line);
  border-radius:15px;
  margin-bottom:10px;
  background:#fbfcff;
}

.notify-item strong{
  display:block;
  margin-bottom:4px;
}

.empty{
  color:var(--muted);
  padding:16px 0;
}

pre{
  background:#f8f5ef;
  color:var(--dark);
  border:1px solid var(--line);
  padding:16px;
  border-radius:14px;
  overflow:auto;
}

.info-box{
  background:#faf6ef;
  border:1px solid var(--line);
  padding:14px 16px;
  border-radius:14px;
  color:var(--dark);
  margin-bottom:16px;
}

@media(max-width:1000px){
  .app{
    grid-template-columns:1fr;
  }

  .sidebar{
    position:relative;
    height:auto;
  }

  .grid,
  .form-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:650px){
  .main{
    padding:20px;
  }

  .grid,
  .form-grid{
    grid-template-columns:1fr;
  }

  .hero h2{
    font-size:30px;
  }

  .topbar{
    align-items:flex-start;
  }
}

/* =========================
   VAGTPLAN 2.3 – HURTIG PLANLÆGNING
========================= */
.schedule-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:14px;
}
.drop-cell{
  position:relative;
  cursor:pointer;
}
.drop-cell:hover{
  background:#f8fbff !important;
}
.drop-cell::after{
  content:"+";
  position:absolute;
  right:7px;
  bottom:6px;
  width:22px;
  height:22px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#e8f0ff;
  color:var(--blue);
  font-weight:900;
  opacity:0;
  transition:.15s ease;
  pointer-events:none;
}
.drop-cell:hover::after{opacity:1}
.employee-cell .week-total{
  display:block;
  margin-top:5px;
  color:var(--blue);
  font-weight:800;
  font-size:11px;
}
.employee-cell .plan-week-btn{
  margin-top:7px;
  border:0;
  border-radius:7px;
  padding:5px 7px;
  background:#eef4ff;
  color:#3566b8;
  font-size:10px;
  font-weight:800;
}
.shift-chip .shift-meta{
  display:flex;
  justify-content:space-between;
  gap:6px;
  margin-top:4px;
  color:var(--muted);
  font-size:10px;
}
.shift-chip .shift-actions{
  display:none;
  gap:4px;
  flex-wrap:wrap;
  margin-top:6px;
}
.shift-chip:hover .shift-actions{display:flex}
.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(18,29,48,.45);
  z-index:10000;
  display:grid;
  place-items:center;
  padding:18px;
}
.modal-card{
  width:min(720px,100%);
  max-height:92vh;
  overflow:auto;
  background:white;
  border-radius:18px;
  border:1px solid var(--line);
  box-shadow:0 30px 90px rgba(20,35,60,.25);
  padding:22px;
}
.modal-card h3{
  margin:0 0 6px;
  font-size:24px;
}
.modal-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.quick-times{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:8px;
}
.quick-times button{
  border:1px solid var(--line);
  background:white;
  border-radius:9px;
  padding:7px 10px;
  font-weight:700;
  color:var(--text);
}
.quick-times button:hover{background:var(--softblue)}
.multi-day-row{
  display:grid;
  grid-template-columns:52px 1fr 120px 120px 150px;
  gap:8px;
  align-items:center;
  padding:8px 0;
  border-bottom:1px solid var(--line);
}
.multi-day-row input[type=checkbox]{width:auto}
.people-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:8px;
}
.person-check{
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px;
  background:white;
}
.person-check label{
  display:flex;
  gap:8px;
  align-items:center;
  margin:0;
}
.person-check input{width:auto}
.day-planner-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.day-planner-card{
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  background:white;
}
.template-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  border-bottom:1px solid var(--line);
  padding:10px 0;
}
.template-days{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  margin-top:5px;
}
.template-day{
  padding:4px 7px;
  border-radius:999px;
  background:#eef4ff;
  color:#3566b8;
  font-size:10px;
  font-weight:800;
}
@media(max-width:760px){
  .modal-grid,.people-grid,.day-planner-grid{grid-template-columns:1fr}
  .multi-day-row{grid-template-columns:45px 1fr 1fr}
  .multi-day-row .day-role,.multi-day-row .day-date{grid-column:2 / -1}
}