:root{
  /* Refined color palette */
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --soft: #f1f5f9;
  --radius: 14px;
  
  /* Accent colors */
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --success: #10b981;
  --success-soft: #d1fae5;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.08);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Full width app wrapper */
.app{
  width:100%;
  min-height:100vh;
  display:grid;
  grid-template-columns: 280px 1fr;
}

/* =========================================================
   LEFT SIDEBAR – Premium feel
   ========================================================= */
.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  overflow:auto;
  background:#fff;
  border-right:1px solid var(--border);
  padding:16px 14px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

/* Scrollbar styling */
.sidebar::-webkit-scrollbar{
  width:6px;
}
.sidebar::-webkit-scrollbar-track{
  background:transparent;
}
.sidebar::-webkit-scrollbar-thumb{
  background:var(--border);
  border-radius:3px;
}
.sidebar::-webkit-scrollbar-thumb:hover{
  background:var(--muted);
}

/* Brand header */
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:6px 4px;
  margin-bottom:6px;
}

.brand__pill{
  font-weight:700;
  padding:6px 12px;
  border-radius:8px;
  background: var(--primary);
  color:#fff;
  font-size:13px;
  letter-spacing:0.3px;
}

.brand__text{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.brand__title{
  font-weight:600;
  font-size:14px;
  color:var(--text);
}

.brand__sub{
  font-size:11px;
  color:var(--muted);
  font-weight:500;
}

/* Sidebar close button (mobile only) */
.sidebar-close {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.sidebar-close:hover {
  background: #e2e8f0;
}

/* Sidebar divider */
.navblock__divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

/* Logout nav item - wine red with arrow */
.nav-logout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #991b1b;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.nav-logout:hover {
  background: #fef2f2;
  color: #7f1d1d;
}

.nav-logout__arrow {
  font-size: 14px;
  opacity: 0.7;
}

/* Navigation blocks */
.navblock{
  margin-top:6px;
  padding-top:12px;
  border-top:1px solid var(--border);
}

.navblock:first-of-type{
  border-top:none;
  padding-top:6px;
}

.navblock--bottom {
  border-top: none;
  padding-top: 0;
}

.navblock__title{
  font-size:10px;
  font-weight:600;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:0.8px;
  margin-bottom:8px;
  padding-left:10px;
}

.nav{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.nav a{
  display:flex;
  align-items:center;
  gap:10px;
  height:36px;
  padding:0 10px;
  border-radius:8px;
  border:none;
  background:transparent;
  color:var(--text);
  text-decoration:none;
  font-weight:500;
  font-size:13px;
  transition: background 0.15s ease;
}

.nav a:hover{
  background:var(--soft);
  color:var(--text);
}

.nav a.active{
  background: var(--primary);
  color:#fff;
}

.nav a.active:hover{
  background: #2563eb;
}

/* Account box */
.accountbox{
  margin-top:auto;
  background:var(--soft);
  border:1px solid var(--border);
  border-radius:8px;
  padding:12px;
}

.accountbox__line{
  line-height:1.4;
  font-size:13px;
}

.accountbox__line b{
  font-weight:600;
  color:var(--text);
}

.accountbox .btn{
  margin-top:10px;
}

/* =========================================================
   FLASH MESSAGES – Legacy (deprecated)
   ========================================================= */
.flash{
  margin:10px 0;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.flash__item{
  padding:10px 12px;
  border-radius:8px;
  border:none;
  font-size:13px;
  font-weight:500;
  display:flex;
  align-items:center;
  gap:8px;
}

.flash__item.ok{
  background:var(--success-soft);
  color:#065f46;
}

.flash__item.err{
  background:var(--danger-soft);
  color:#991b1b;
}

/* =========================================================
   TOAST NOTIFICATIONS – Top center, auto-hide
   ========================================================= */
.toast-container{
  position:fixed;
  top:20px;
  left:50%;
  transform:translateX(-50%);
  z-index:9999;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  pointer-events:none;
}

.toast{
  padding:14px 24px;
  border-radius:12px;
  font-size:14px;
  font-weight:600;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  animation: toastIn 0.3s ease-out;
  pointer-events:auto;
  max-width:400px;
  min-width:200px;
  text-align:center;
}

.toast--ok{
  background:#059669;
  color:#fff;
}

.toast--err{
  background:#dc2626;
  color:#fff;
}

.toast--hide{
  animation: toastOut 0.4s ease-in forwards;
}

@keyframes toastIn{
  from{
    opacity:0;
    transform:translateY(-20px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

@keyframes toastOut{
  from{
    opacity:1;
    transform:translateY(0);
  }
  to{
    opacity:0;
    transform:translateY(-20px);
  }
}

/* =========================================================
   BUTTONS – Refined
   ========================================================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:36px;
  padding:0 14px;
  border-radius:8px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  font-weight:600;
  font-size:13px;
  cursor:pointer;
  text-decoration:none;
  transition: all 0.15s ease;
}

.btn:hover{
  background:var(--soft);
  border-color:#cbd5e1;
}

.btn--primary{
  background: var(--primary);
  border:none;
  color:#fff;
}

.btn--primary:hover{
  background: #2563eb;
}

.btn--danger{
  background: var(--danger);
  border:none;
  color:#fff;
}

.btn--danger:hover{
  background: #dc2626;
}

.btn--ghost{
  background:transparent;
  border:1px solid var(--border);
}

.btn--ghost:hover{
  background:var(--soft);
}

.btn--sm{
  height:30px;
  padding:0 10px;
  font-size:12px;
  border-radius:6px;
}

.btn--xs{
  height:26px;
  padding:0 8px;
  font-size:11px;
  border-radius:4px;
}

/* =========================================================
   CARDS & PANELS – Clean
   ========================================================= */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  padding:16px;
}

.panel{
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  padding:16px;
}

.panel--tight{
  padding:12px;
}

/* =========================================================
   RIGHT CONTENT AREA
   ========================================================= */
.main{
  padding:20px;
  min-width:0;
  background:var(--bg);
  height:100vh;
  overflow-y:auto;
}

/* =========================================================
   FORM ELEMENTS – Polished
   ========================================================= */
.field{
  margin-bottom:0;
}

.field label{
  display:block;
  font-size:11px;
  font-weight:700;
  color:var(--muted);
  margin-bottom:6px;
  text-transform:uppercase;
  letter-spacing:0.5px;
}

.input, select{
  width:100%;
  height:36px;
  border-radius:8px;
  border:1px solid var(--border);
  padding:0 12px;
  background:#fff;
  outline:none;
  font-size:14px;
  color:var(--text);
  transition: border-color 0.15s ease;
}

.input:focus, select:focus{
  border-color:var(--primary);
}

.input::placeholder{
  color:#94a3b8;
}

.input--mono{
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size:13px;
}

.input--color{
  padding:4px;
  height:40px;
  cursor:pointer;
}

/* =========================================================
   TABLES – Modern look
   ========================================================= */
.table-wrap{
  overflow-x:auto;
  margin:-4px;
  padding:4px;
}

.table-admin{
  width:100%;
  border-collapse:collapse;
}

.table-admin thead th{
  text-align:left;
  font-size:11px;
  color:var(--muted);
  font-weight:500;
  text-transform:uppercase;
  letter-spacing:0.3px;
  padding:8px 16px;
  border-bottom:1px solid var(--border);
}

.table-admin tbody tr{
  background:#fff;
  border-bottom:1px solid var(--border);
  transition: background 0.1s ease;
}

.table-admin tbody tr:last-child{
  border-bottom:none;
}

.table-admin tbody tr:hover{
  background:#fafbfc;
}

.table-admin tbody td{
  padding:10px 16px;
  vertical-align:middle;
  font-size:13px;
  color:var(--text);
}

.tr-card{
  border-radius:0;
  overflow:visible;
  box-shadow:none;
  border:none;
}

.tr-card td:first-child{
  border-radius:0;
}

.tr-card td:last-child{
  border-radius:0;
}

.cell-actions{
  text-align:right;
  white-space:nowrap;
}

/* =========================================================
   BADGES
   ========================================================= */
.badge-soft{
  display:inline-flex;
  align-items:center;
  height:22px;
  padding:0 8px;
  border-radius:4px;
  background:var(--soft);
  font-size:11px;
  font-weight:500;
  color:var(--muted);
}

.color-dot{
  width:28px;
  height:28px;
  border-radius:8px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}

/* =========================================================
   FORM LAYOUTS
   ========================================================= */
.form-admin{
  display:grid;
  grid-template-columns: 1.2fr 190px 190px 140px;
  gap:12px;
  align-items:end;
}

.form-card{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.form-grid{
  display:grid;
  gap:14px;
}

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

.form-grid--contact{
  grid-template-columns: 1fr 220px 180px;
}

.form-grid--account{
  grid-template-columns: 180px 220px 1fr 220px;
  align-items:end;
}

.form-section-title{
  font-size:12px;
  font-weight:700;
  letter-spacing:0.3px;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:8px;
}

.checkline{
  height:40px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
}

.checkline input[type="checkbox"]{
  width:18px;
  height:18px;
  accent-color:var(--primary);
}

.checkline span{
  font-size:13px;
  color:var(--text);
  font-weight:500;
}

.form-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:8px;
}

/* Inline edit in tables */
.inline-edit{
  display:inline-flex;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
  white-space:nowrap;
}

.inline-edit .input{
  height:36px;
}

.inline-edit select{
  height:36px;
}

/* =========================================================
   MODAL – Improved
   ========================================================= */
.modal{
  position:fixed;
  inset:0;
  z-index:1000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.modal:target{
  display:flex;
}

.modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
}

.modal__panel{
  position:relative;
  z-index:1;
  width:min(980px, calc(100vw - 40px));
  max-height:calc(100vh - 40px);
  overflow:auto;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  padding:20px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

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

.modal__title{
  font-weight:600;
  font-size:16px;
  color:var(--text);
}

.modal__footer{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:16px;
  padding-top:12px;
  border-top:1px solid var(--border);
}

.note{
  border:none;
  background:var(--soft);
  border-radius:8px;
  padding:12px 14px;
  font-size:13px;
  color:var(--text);
}

/* =========================================================
   PAGE LAYOUT
   ========================================================= */
.page{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.page__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
}

.page__title{
  font-weight:600;
  font-size:18px;
  line-height:1.3;
  color:var(--text);
}

.page__subtitle{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
  font-weight:400;
}

.sep, .hr{
  border:none;
  border-top:1px solid var(--border);
  margin:16px 0;
}

/* Week sidebar section */
.weekbox .meta{
  font-size:12px;
  color:var(--muted);
  margin-top:6px;
}
.weekbox .status{
  margin-top:6px;
  font-size:12px;
}
.weekbox .row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.weekbox form{ margin:0; }
.weekbox .stack{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
}

/* =========================================================
   RECUP PAGE
   ========================================================= */
.recup-shift-detail{
  display:inline-block;
  background:#f1f5f9;
  padding:2px 6px;
  border-radius:4px;
  margin:2px 4px 2px 0;
  font-size:11px;
  white-space:nowrap;
}

.recup-note{
  display:block;
  margin-top:4px;
  font-style:italic;
}

/* Recup potje samenvatting */
.recup-summary{
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 2px solid #c4b5fd;
}

.recup-summary__balance{
  display:flex;
  align-items:center;
  gap:16px;
}

.recup-summary__icon{
  font-size:48px;
  line-height:1;
}

.recup-summary__info{
  flex:1;
}

.recup-summary__label{
  font-size:14px;
  font-weight:600;
  color:#6b7280;
  margin-bottom:4px;
}

.recup-summary__value{
  font-size:32px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}

.recup-summary__value--pos{
  color:#7c3aed;
}

.recup-summary__value--neg{
  color:#dc2626;
}

.recup-summary__decimal{
  font-size:16px;
  font-weight:500;
  color:#6b7280;
  margin-left:8px;
}

.recup-summary__warning{
  margin-top:16px;
  padding:12px 16px;
  background:#fef2f2;
  border-radius:8px;
  color:#991b1b;
  font-size:13px;
  font-weight:500;
}

.text-success{
  color:#16a34a;
}

.text-danger{
  color:#dc2626;
}

/* =========================================================
   DASHBOARD
   ========================================================= */
.dashboard-header {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: var(--radius);
  padding: 30px 35px;
  color: white;
  margin-bottom: 10px;
}

.dashboard-greeting {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.dashboard-next-shift {
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0.95;
}

.dashboard-next-shift__label {
  font-size: 14px;
  opacity: 0.85;
}

.dashboard-next-shift__info {
  font-size: 16px;
}

.dashboard-next-shift__info strong {
  text-transform: capitalize;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Mobile menu button (hamburger) */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px;
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Sidebar backdrop for mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 140;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
}

@media (max-width: 1300px){
  .form-admin{
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1100px){
  .form-grid--person,
  .form-grid--contact,
  .form-grid--account{
    grid-template-columns: 1fr;
  }
  
  .app{
    grid-template-columns: 260px 1fr;
  }
}

@media (max-width: 900px){
  .app{
    grid-template-columns: 1fr;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  /* Hide hamburger when sidebar is open */
  body.sidebar-open .mobile-menu-btn {
    display: none;
  }
  
  .sidebar-backdrop {
    display: block;
    pointer-events: none;
  }
  
  .sidebar-backdrop.active {
    pointer-events: auto;
  }
  
  .sidebar{
    position: fixed;
    left: -300px;
    top: 0;
    width: 280px;
    height: 100vh;
    z-index: 150;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
  }
  
  .sidebar.open{
    left: 0;
  }
  
  /* Show close button on mobile */
  .sidebar-close {
    display: flex;
  }
  
  /* Add padding to brand for close button */
  .sidebar .brand {
    padding-right: 44px;
  }
  
  main {
    padding-top: 70px !important;
  }
  
  /* Prevent body scroll when sidebar open */
  body.sidebar-open {
    overflow: hidden;
  }
}

/* Extra small screens */
@media (max-width: 600px) {
  main {
    padding: 70px 12px 20px 12px !important;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }
  
  .page-header__actions {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .card {
    padding: 16px;
  }
  
  .form-admin {
    grid-template-columns: 1fr !important;
  }
}






