/* ═══════════════════════════════════════════════════════
   Dolmans Intranet – Huisstijl
   Primair:  #32373c (donker grafiet – nav/sidebar)
   Accent:   #800f18 (Dolmans rood)
═══════════════════════════════════════════════════════ */

:root {
  --c-primary:     #32373c;
  --c-primary-2:   #3d4449;
  --c-primary-3:   #23272b;
  --c-accent:      #800f18;
  --c-accent-dark: #6a0c13;
  --c-ntk:         #800f18;
  --c-ntk-bg:      #fce8ea;
  --c-ntn:         #1d5fa8;
  --c-ntn-bg:      #dbeafe;
  --c-bg:          #f2f3f5;
  --c-surface:     #FFFFFF;
  --c-surface-2:   #F8FAFC;
  --c-text:        #1a1a1a;
  --c-text-2:      #6B7280;
  --c-border:      #E2E8F0;
  --c-success:     #16A34A;
  --c-success-bg:  #DCFCE7;

  --sidebar-w:     248px;
  --topbar-h:      64px;
  --bottomnav-h:   68px;

  --r-sm:  6px;
  --r:     12px;
  --r-lg:  16px;
  --r-xl:  24px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
}

/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; }

/* ─── Layout Shell ──────────────────────────────────── */
.app-shell {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* ─── Sidebar ───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--c-primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.sidebar-logo-img {
  height: 30px;
  width: auto;
  max-width: 100%;
  filter: brightness(0) invert(1);
}

.sidebar-logo-divider { display: none; }

.sidebar-logo-label {
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255,255,255,.4);
  letter-spacing: .6px;
  text-transform: uppercase;
}

.topbar-logo-img {
  height: 28px;
  width: auto;
}

.sidebar-section {
  padding: 12px 10px 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding-left: 16px;
}

.sidebar nav {
  padding: 4px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  transition: all .15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item .material-icons-round {
  font-size: 20px;
  opacity: .8;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.nav-item.active {
  background: var(--c-accent);
  color: #fff;
  font-weight: 600;
}

.nav-item.active .material-icons-round { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--c-ntk);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info strong { display: block; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info span  { font-size: 11px; color: rgba(255,255,255,.45); }

/* ─── Main area ─────────────────────────────────────── */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ─── Topbar ────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
}

.topbar-mobile-logo {
  display: none;
  align-items: center;
  gap: 8px;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: 0 12px;
  flex: 1;
  max-width: 360px;
}

.topbar-search .material-icons-round { font-size: 18px; color: var(--c-text-2); }
.topbar-search input {
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--c-text);
  width: 100%;
  height: 38px;
  font-family: inherit;
}
.topbar-search input::placeholder { color: var(--c-text-2); }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  border: none;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-2);
  transition: all .15s;
  position: relative;
}
.icon-btn:hover { background: var(--c-border); color: var(--c-text); }
.icon-btn .material-icons-round { font-size: 20px; }

.notif-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background: var(--c-ntk);
  border-radius: 50%;
  border: 2px solid var(--c-surface);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--c-bg);
  border-radius: 99px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
}

.user-chip-avatar {
  width: 30px;
  height: 30px;
  background: var(--c-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* ─── Content area ──────────────────────────────────── */
.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  min-width: 0;
}

.section { display: none; max-width: 100%; }
.section.active { display: block; }

/* ─── Demo notice ───────────────────────────────────── */
.demo-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-left: 4px solid #F59E0B;
  border-radius: var(--r);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #92400E;
}
.demo-notice .material-icons-round { font-size: 20px; color: #F59E0B; flex-shrink: 0; margin-top: 1px; }
.demo-notice strong { display: block; font-weight: 600; margin-bottom: 2px; }
.demo-notice span { opacity: .85; line-height: 1.5; }

/* ─── Dashboard ─────────────────────────────────────── */
.db-welcome {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-2) 100%);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  color: #fff;
}

.db-welcome-text h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 3px;
}

.db-welcome-text p {
  font-size: 13px;
  opacity: .6;
}

.db-welcome-branch {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.12);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.db-welcome-branch .material-icons-round {
  font-size: 15px;
  color: var(--c-accent);
}

.db-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.db-stat {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.db-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.db-stat-icon .material-icons-round { font-size: 18px; }
.db-stat-info strong { font-size: 20px; font-weight: 700; display: block; line-height: 1.2; }
.db-stat-info span   { font-size: 11px; color: var(--c-text-2); }

.db-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}

.db-col-main, .db-col-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.db-block {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.db-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
}

.db-block-header h2 {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--c-text);
}

.db-block-header h2 .material-icons-round {
  font-size: 17px;
  color: var(--c-accent);
}

.db-more-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--c-accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: background .15s;
}

.db-more-btn:hover { background: var(--c-ntk-bg); }

/* Dashboard nieuws items */
.db-news-item {
  display: flex;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--c-border);
  transition: background .15s;
  cursor: default;
}

.db-news-item:last-child { border-bottom: none; }
.db-news-item:hover { background: var(--c-bg); }

.db-news-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.db-news-dot.ntk { background: var(--c-ntk); }
.db-news-dot.ntn { background: var(--c-ntn); }

.db-news-body { flex: 1; min-width: 0; }

.db-news-body strong {
  font-size: 13px;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-news-body p {
  font-size: 12px;
  color: var(--c-text-2);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.db-news-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}

/* Dashboard collega's */
.db-people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1px;
  background: var(--c-border);
}

.db-person {
  background: var(--c-surface);
  padding: 14px 10px;
  text-align: center;
  transition: background .15s;
  cursor: default;
}

.db-person:hover { background: var(--c-bg); }

.db-person-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.db-person strong {
  font-size: 12px;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-person span {
  font-size: 11px;
  color: var(--c-text-2);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dashboard agenda */
.db-agenda-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--c-border);
}

.db-agenda-item:last-child { border-bottom: none; }

.db-agenda-date {
  width: 38px;
  text-align: center;
  flex-shrink: 0;
}

.db-agenda-date .day-num {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: block;
}

.db-agenda-date .day-name {
  font-size: 10px;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.db-agenda-date.today .day-num { color: var(--c-accent); }

.db-agenda-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.db-agenda-info { flex: 1; min-width: 0; }
.db-agenda-info strong { font-size: 13px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-agenda-info span   { font-size: 11px; color: var(--c-text-2); }

/* Dashboard links */
.db-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--c-border);
}

.db-link {
  background: var(--c-surface);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
  border: none;
  text-align: left;
  color: var(--c-text);
}

.db-link:hover { background: var(--c-bg); }

.db-link .material-icons-round {
  font-size: 18px;
  flex-shrink: 0;
}

/* Dashboard spoednummers */
.db-spoed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--c-border);
}

.db-spoed-item:last-child { border-bottom: none; }

.db-spoed-item .material-icons-round {
  font-size: 18px;
  flex-shrink: 0;
}

.db-spoed-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-spoed-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-accent);
  white-space: nowrap;
  text-decoration: none;
}

.db-spoed-item.urgent .db-spoed-number { color: var(--c-ntk); }
.db-spoed-item.urgent .material-icons-round { color: var(--c-ntk); }

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

@media (max-width: 480px) {
  .db-welcome { flex-direction: column; align-items: flex-start; gap: 10px; }
  .db-stats { grid-template-columns: 1fr 1fr; }
}

/* ─── Page header ───────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
}

.page-header p {
  font-size: 13px;
  color: var(--c-text-2);
  margin-top: 2px;
}

/* ─── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 600;
  border: none;
  transition: all .15s;
}

.btn-primary {
  background: var(--c-accent);
  color: #fff;
}
.btn-primary:hover { background: var(--c-accent-dark); }

.btn-secondary {
  background: var(--c-surface);
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
.btn-secondary:hover { background: var(--c-bg); }

.btn-danger {
  background: var(--c-ntk-bg);
  color: var(--c-ntk);
}
.btn-danger:hover { background: #fca5a5; }

.btn .material-icons-round { font-size: 16px; }

/* ─── Cards ─────────────────────────────────────────── */
.card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
  padding: 20px;
}

/* ─── Filter bar ─────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-2);
  transition: all .15s;
}
.filter-chip:hover { border-color: var(--c-accent); color: var(--c-accent); }
.filter-chip.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

/* ─── News cards ─────────────────────────────────────── */
.news-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
  padding: 18px 20px;
  transition: box-shadow .15s, transform .15s;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.news-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.news-card.ntk { border-left: 4px solid var(--c-ntk); }
.news-card.ntn { border-left: 4px solid var(--c-ntn); }

.news-priority-indicator {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.news-card.ntk .news-priority-indicator {
  background: var(--c-ntk-bg);
  color: var(--c-ntk);
}

.news-card.ntn .news-priority-indicator {
  background: var(--c-ntn-bg);
  color: var(--c-ntn);
}

.news-priority-indicator .material-icons-round { font-size: 20px; }

.news-body { flex: 1; min-width: 0; }

.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-ntk {
  background: var(--c-ntk-bg);
  color: var(--c-ntk);
}

.badge-ntn {
  background: var(--c-ntn-bg);
  color: var(--c-ntn);
}

.badge-branch {
  background: var(--c-bg);
  color: var(--c-text-2);
  border: 1px solid var(--c-border);
}

.badge-global {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  color: var(--c-success);
  border: 1px solid #bbf7d0;
}

.news-date {
  font-size: 11px;
  color: var(--c-text-2);
  margin-left: auto;
}

.news-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 5px;
  line-height: 1.3;
}

.news-card p {
  font-size: 13px;
  color: var(--c-text-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.news-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-text-2);
}

.author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.news-action-btn {
  background: none;
  border: none;
  color: var(--c-text-2);
  padding: 4px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  opacity: 0;
  transition: all .15s;
}
.news-action-btn .material-icons-round { font-size: 16px; }
.news-card:hover .news-action-btn { opacity: 1; }
.news-action-btn:hover { background: var(--c-ntk-bg); color: var(--c-ntk); }
.news-action-btn:disabled { opacity: .4; cursor: default; }

/* ─── Calendar ───────────────────────────────────────── */
.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
}

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

.calendar-header h2 { font-size: 17px; font-weight: 700; }

.calendar-nav {
  display: flex;
  gap: 4px;
}

.cal-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-2);
  transition: all .15s;
}
.cal-nav-btn:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.cal-nav-btn .material-icons-round { font-size: 18px; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day-label {
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--c-text-2);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.cal-day {
  min-height: 70px;
  background: var(--c-surface);
  border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  padding: 6px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}

.cal-day:hover:not(.empty) { border-color: var(--c-accent); }
.cal-day.empty { background: transparent; cursor: default; }
.cal-day.today { border-color: var(--c-accent) !important; background: #fdf0f1; }
.cal-day.selected { background: var(--c-primary); }
.cal-day.selected .cal-day-num { color: #fff; }

.cal-day-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  display: block;
  margin-bottom: 4px;
}
.cal-day.today .cal-day-num { color: var(--c-accent); }
.cal-day.other-month .cal-day-num { color: var(--c-border); }

.cal-event-dot {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 5px;
  border-radius: 4px;
  margin-top: 2px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.cal-event-dot.type-meeting  { background: #DBEAFE; color: #1D4ED8; }
.cal-event-dot.type-training { background: #FEF3C7; color: #D97706; }
.cal-event-dot.type-social   { background: #F0FDF4; color: #16A34A; }
.cal-event-dot.type-deadline { background: #FEE2E2; color: #DC2626; }

.events-panel h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}

.event-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border);
}
.event-item:last-child { border-bottom: none; }

.event-color-bar {
  width: 4px;
  border-radius: 99px;
  flex-shrink: 0;
}

.event-color-bar.type-meeting  { background: #2563EB; }
.event-color-bar.type-training { background: #D97706; }
.event-color-bar.type-social   { background: #16A34A; }
.event-color-bar.type-deadline { background: #DC2626; }

.event-info { flex: 1; }
.event-info strong { font-size: 13px; font-weight: 600; display: block; }
.event-info span   { font-size: 12px; color: var(--c-text-2); }

/* ─── Smoelenboek ────────────────────────────────────── */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.person-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 20px 16px;
  text-align: center;
  border: 1px solid var(--c-border);
  transition: all .15s;
}

.person-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.person-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.person-card h4 { font-size: 14px; font-weight: 600; }
.person-card .role { font-size: 12px; color: var(--c-text-2); margin: 2px 0 8px; }
.person-card .dept {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--c-bg);
  color: var(--c-text-2);
  margin-bottom: 10px;
}
.person-card .branch-tag {
  display: block;
  font-size: 11px;
  color: var(--c-accent);
  font-weight: 500;
  margin-bottom: 10px;
}

.person-contact {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.person-contact-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c-bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-2);
  transition: all .15s;
}
.person-contact-btn:hover { background: var(--c-accent); color: #fff; }
.person-contact-btn .material-icons-round { font-size: 16px; }

.search-input-wrapper {
  position: relative;
  margin-bottom: 20px;
}
.search-input-wrapper .material-icons-round {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-2);
  font-size: 18px;
}
.search-input-wrapper input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r);
  font-size: 14px;
  font-family: inherit;
  background: var(--c-surface);
  color: var(--c-text);
  outline: none;
  transition: border-color .15s;
  max-width: 400px;
}
.search-input-wrapper input:focus { border-color: var(--c-accent); }

/* ─── Links ─────────────────────────────────────────── */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.link-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all .15s;
  text-decoration: none;
  color: inherit;
}

.link-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--c-accent);
}

.link-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}

.link-icon .material-icons-round { font-size: 22px; }

.link-info strong { font-size: 14px; font-weight: 600; display: block; }
.link-info span   { font-size: 12px; color: var(--c-text-2); }

/* ─── Spoednummers ───────────────────────────────────── */
.spoed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 12px;
}

.spoed-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all .15s;
}

.spoed-card:hover { box-shadow: var(--shadow); }

.spoed-card.urgent {
  background: linear-gradient(135deg, #fdf0f1, #fce8ea);
  border-color: #FECACA;
}

.spoed-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spoed-icon .material-icons-round { font-size: 22px; }

.spoed-info { flex: 1; min-width: 0; }
.spoed-info strong { font-size: 14px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spoed-info span   { font-size: 12px; color: var(--c-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.spoed-number {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-accent);
  white-space: nowrap;
}

.spoed-card.urgent .spoed-number { color: var(--c-ntk); }

/* ─── Poll ──────────────────────────────────────────── */
.poll-card {
  max-width: 560px;
}

.poll-question {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.4;
}

.poll-meta {
  font-size: 12px;
  color: var(--c-text-2);
  margin-bottom: 20px;
}

.poll-options { display: flex; flex-direction: column; gap: 10px; }

.poll-option {
  position: relative;
  cursor: pointer;
}

.poll-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.poll-option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r);
  border: 1.5px solid var(--c-border);
  transition: all .15s;
  cursor: pointer;
}

.poll-option input:checked ~ .poll-option-label {
  border-color: var(--c-accent);
  background: #fdf0f1;
}

.poll-option:hover .poll-option-label {
  border-color: var(--c-accent);
}

.poll-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--c-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.poll-option input:checked ~ .poll-option-label .poll-radio {
  border-color: var(--c-accent);
  background: var(--c-accent);
}

.poll-option input:checked ~ .poll-option-label .poll-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.poll-option-text { font-size: 14px; font-weight: 500; flex: 1; }

.poll-result-bar {
  height: 8px;
  background: var(--c-bg);
  border-radius: 99px;
  overflow: hidden;
  width: 120px;
}

.poll-result-fill {
  height: 100%;
  background: var(--c-accent);
  border-radius: 99px;
  transition: width .5s ease;
}

.poll-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent);
  min-width: 36px;
  text-align: right;
}

.poll-submit {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.poll-votes-count {
  font-size: 12px;
  color: var(--c-text-2);
}

.poll-thankyou {
  background: var(--c-success-bg);
  border-radius: var(--r);
  padding: 14px 18px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-success);
}

.poll-thankyou .material-icons-round { font-size: 20px; }

/* ─── Modal ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--c-surface);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(.98);
  transition: transform .2s;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 { font-size: 17px; font-weight: 700; }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  border: none;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-2);
  transition: all .15s;
}
.modal-close:hover { background: var(--c-border); }
.modal-close .material-icons-round { font-size: 18px; }

.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--c-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ─── Form ──────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--c-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r);
  font-size: 14px;
  font-family: inherit;
  color: var(--c-text);
  background: var(--c-surface);
  outline: none;
  transition: border-color .15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--c-accent); }

.form-group textarea { resize: vertical; min-height: 90px; }

.priority-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.priority-option { position: relative; }
.priority-option input[type="radio"] { position: absolute; opacity: 0; }

.priority-option label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r);
  border: 1.5px solid var(--c-border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  transition: all .15s;
}

.priority-option input:checked + label {
  border-color: currentColor;
}

.priority-option.ntk label { color: var(--c-ntk); }
.priority-option.ntk input:checked + label { background: var(--c-ntk-bg); border-color: var(--c-ntk); }
.priority-option.ntn label { color: var(--c-ntn); }
.priority-option.ntn input:checked + label { background: var(--c-ntn-bg); border-color: var(--c-ntn); }

.priority-option label .material-icons-round { font-size: 16px; }

/* ─── Toast ─────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--c-primary);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: 360px;
  animation: slideIn .25s ease forwards;
}

.toast.success { background: var(--c-success); }
.toast.error   { background: var(--c-ntk); }
.toast .material-icons-round { font-size: 18px; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ─── iOS Install banner ─────────────────────────────── */
.ios-install-banner {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + 12px);
  left: 12px;
  right: 12px;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: none;
  flex-direction: column;
  padding: 18px 18px 22px;
}

.ios-install-banner.show { display: flex; }

.ios-install-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.ios-install-close .material-icons-round { font-size: 16px; }

.ios-install-body { display: flex; flex-direction: column; }
.ios-install-body img { filter: brightness(0) invert(1); }
.ios-install-body p { font-size: 14px; }

.ios-install-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.ios-install-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  background: rgba(255,255,255,.1);
  border-radius: var(--r-sm);
  padding: 8px 12px;
}
.ios-install-step .material-icons-round { font-size: 20px; color: var(--c-accent); flex-shrink: 0; }

/* Pijltje omlaag naar de tabbalk */
.ios-install-arrow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: var(--c-primary);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* ─── Install banner ─────────────────────────────────── */
.install-banner {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-primary);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 50;
  max-width: calc(100vw - 32px);
  display: none;
}

.install-banner.show { display: flex; }
.install-banner p { font-size: 13px; font-weight: 500; flex: 1; }
.install-banner .btn { font-size: 12px; padding: 7px 14px; white-space: nowrap; }

/* ─── Bottom nav (mobile) ────────────────────────────── */
.bottom-nav {
  display: none;
  background: var(--c-primary);
  padding: 0 4px;
  height: var(--bottomnav-h);
  flex-shrink: 0;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid rgba(255,255,255,.1);
}

.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: none;
  background: none;
  color: rgba(255,255,255,.5);
  font-size: 10px;
  font-weight: 500;
  transition: all .15s;
  flex: 1;
  min-width: 0;
}

.bn-item .material-icons-round { font-size: 22px; }
.bn-item.active { color: #fff; }
.bn-item.active .material-icons-round {
  background: var(--c-accent);
  border-radius: 8px;
  padding: 2px 10px;
}
.bn-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; text-align: center; }

/* ─── More drawer (mobile) ──────────────────────────── */
.more-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.more-drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.more-drawer {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--c-surface);
  border-radius: 20px 20px 0 0;
  z-index: 46;
  padding: 0 16px 16px;
  transform: translateY(100%);
  pointer-events: none;
  transition: transform .3s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 -4px 32px rgba(0,0,0,.15);
}
.more-drawer.open { transform: translateY(0); pointer-events: auto; }

.more-drawer-handle {
  width: 36px;
  height: 4px;
  background: var(--c-border);
  border-radius: 2px;
  margin: 12px auto 16px;
}

.more-drawer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.more-drawer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  color: var(--c-text);
  font-size: 11px;
  font-weight: 500;
  transition: all .15s;
}
.more-drawer-item:hover { background: var(--c-bg); }
.more-drawer-item.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
.more-drawer-item.active .more-drawer-icon {
  background: rgba(255,255,255,.15) !important;
  color: #fff !important;
}

.more-drawer-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  background: rgba(50,55,60,.08);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.more-drawer-icon .material-icons-round { font-size: 22px; }

/* ─── FAB ───────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 88px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-lg);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  transition: all .15s;
}
.fab:hover { background: var(--c-accent-dark); transform: scale(1.05); }
.fab .material-icons-round { font-size: 24px; }

/* ─── Empty state ────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--c-text-2);
}
.empty-state .material-icons-round { font-size: 48px; opacity: .3; display: block; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ─── Stats row ─────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon .material-icons-round { font-size: 20px; }
.stat-info strong { font-size: 20px; font-weight: 700; display: block; }
.stat-info span   { font-size: 12px; color: var(--c-text-2); }

/* ─── Notification permission bar ───────────────────── */
.notif-bar {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2));
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  flex-shrink: 0;
}

.notif-bar .material-icons-round { font-size: 20px; color: var(--c-accent); flex-shrink: 0; }
.notif-bar p { flex: 1; }
.notif-bar .btn { font-size: 12px; padding: 6px 14px; flex-shrink: 0; }
.notif-bar-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  padding: 4px;
  display: flex;
  border-radius: 4px;
}
.notif-bar-close:hover { color: #fff; background: rgba(255,255,255,.1); }
.notif-bar-close .material-icons-round { font-size: 18px; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .calendar-layout { grid-template-columns: 1fr; }
  .events-panel { margin-top: 4px; }
}

@media (max-width: 768px) {
  .sidebar { display: none; }

  /* Duw de hele main area onder de iOS notch/statusbalk */
  .main-area {
    padding-top: env(safe-area-inset-top);
    /* Zelfde kleur als de topbar zodat de safe area naadloos aansluit */
    background: var(--c-surface);
  }

  .topbar { padding: 0 16px; }
  .topbar-mobile-logo { display: flex; }
  .topbar-search { display: none; }
  .topbar-title { display: none; }

  .content-area {
    padding: 16px;
    /* ruimte voor vaste bottom nav */
    padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 16px);
  }

  /* Vaste bottom nav onderaan het scherm */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    /* safe area voor iPhone met thuisbalk */
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  }

  .more-drawer-backdrop { display: block; }
  .more-drawer {
    display: block;
    /* ruimte voor bottom nav + safe area */
    padding-bottom: calc(env(safe-area-inset-bottom) + var(--bottomnav-h) + 8px);
  }

  .fab { display: flex; bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 12px); }

  .install-banner { bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 8px); }
  .ios-install-banner { bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 8px); }

  .toast-container { bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 8px); right: 10px; left: 10px; }
  .toast { min-width: unset; }

  /* Kalender: kleinere dagen, geen event-labels — alleen kleurstipjes */
  .cal-day { min-height: 44px; padding: 4px; }
  .cal-day-num { font-size: 12px; margin-bottom: 2px; }
  .cal-event-dot {
    font-size: 0;          /* tekst verbergen */
    padding: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    margin: 1px 1px 0 0;
  }
}

@media (max-width: 480px) {
  .people-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .links-grid  { grid-template-columns: 1fr; }
  .spoed-grid  { grid-template-columns: 1fr; }
  .stats-row   { grid-template-columns: 1fr 1fr; }
}
