/* ══════════════════════════════════════════════
   portaal.hulpbijdewkb.nl – Stylesheet
   ══════════════════════════════════════════════ */

:root {
  --blue: #1B4F8A;
  --blue-dark: #0e3360;
  --teal: #4BBFB4;
  --teal-dark: #35a097;
  --teal-light: #7dd4cc;
  --teal-xlight: #e8f8f7;
  --white: #ffffff;
  --off-white: #f7fafa;
  --gray-50: #f4f6f8;
  --gray-100: #eaecef;
  --gray-200: #d4d8de;
  --gray-300: #b0b7c3;
  --gray-500: #6b7585;
  --gray-700: #3d4555;
  --text: #1a2234;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--off-white);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ── LAYOUT ── */
.app { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: 260px;
  background: var(--blue-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }

.logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: white;
  line-height: 1.2;
}

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

.project-badge {
  margin: 16px;
  background: rgba(75,191,180,0.15);
  border: 1px solid rgba(75,191,180,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.project-badge .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal-light); font-weight: 600; }
.project-badge .name  { color: white; font-weight: 600; font-size: 13px; margin-top: 2px; }
.project-badge .sub   { color: rgba(255,255,255,0.45); font-size: 11.5px; }

.sidebar-nav { padding: 12px 12px; flex: 1; }

.nav-section { margin-bottom: 8px; }

.nav-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  padding: 8px 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s;
  margin-bottom: 1px;
  text-decoration: none;
}

.nav-item:hover { background: rgba(255,255,255,0.07); color: white; }
.nav-item.active { background: var(--teal); color: white; }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; color: rgba(255,255,255,0.45); }
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { color: white; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.contact-card {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
}

.contact-title { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.contact-name  { color: white; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.contact-card a { display: block; color: var(--teal-light); font-size: 12.5px; text-decoration: none; }

.btn-logout {
  display: block;
  text-align: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.5);
  font-size: 12.5px;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-logout:hover { background: rgba(239,68,68,0.2); color: #fca5a5; }

/* ── MAIN ── */
.main { margin-left: 260px; flex: 1; min-height: 100vh; }

/* ── TOPBAR ── */
.topbar {
  background: white;
  border-bottom: 1px solid var(--gray-100);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
}

.breadcrumb span { color: var(--text); font-weight: 600; }

.topbar-right { display: flex; align-items: center; gap: 14px; }

.user-info { display: flex; align-items: center; gap: 10px; }
.user-name  { font-size: 13px; color: var(--gray-500); }

.avatar {
  width: 36px; height: 36px;
  background: var(--teal);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: 13px;
  font-family: 'Syne', sans-serif;
}

/* ── FLASH ── */
.flash {
  padding: 12px 32px;
  font-size: 13.5px;
  font-weight: 500;
}

.flash-succes  { background: #f0fdf4; color: #15803d; border-bottom: 1px solid #bbf7d0; }
.flash-fout    { background: #fef2f2; color: #991b1b; border-bottom: 1px solid #fecaca; }
.flash-info    { background: #eff6ff; color: #1e40af; border-bottom: 1px solid #bfdbfe; }

/* ── PAGE CONTENT ── */
.page-content { padding: 32px; }

/* ── PAGE HEADER ── */
.page-header { margin-bottom: 28px; }

.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--blue-dark);
  line-height: 1.2;
}

.page-header p { color: var(--gray-500); margin-top: 4px; font-size: 14px; }

/* ── CARDS ── */
.card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title { font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 700; color: var(--blue-dark); }
.card-body  { padding: 20px 22px; }

/* ── GRIDS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* ── STAT CARDS ── */
.stat-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label { font-size: 11.5px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.06em; font-family: 'DM Sans', sans-serif; }
.stat-value { font-family: 'DM Sans', sans-serif; font-size: 28px; font-weight: 600; color: var(--blue-dark); line-height: 1; }
.stat-sub   { font-size: 12px; color: var(--gray-500); }

.stat-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}

.stat-icon.teal   { background: var(--teal-xlight); color: var(--teal-dark); }
.stat-icon.blue   { background: #e8f0fa; color: var(--blue); }
.stat-icon.orange { background: #fff7ed; color: #f97316; }
.stat-icon.green  { background: #f0fdf4; color: var(--success); }

/* ── PHASE BANNER ── */
.phase-banner {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #1a5fa8 100%);
  border-radius: var(--radius);
  padding: 22px 26px;
  color: white;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.phase-tag {
  background: rgba(75,191,180,0.2);
  color: var(--teal-light);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 6px;
}

.phase-banner h2 { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; }
.phase-banner p  { font-size: 13.5px; opacity: 0.75; margin-top: 4px; max-width: 500px; }

.timer { background: rgba(255,255,255,0.1); border-radius: var(--radius-sm); padding: 12px 20px; text-align: center; flex-shrink: 0; }
.timer .days { font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800; color: var(--teal-light); line-height: 1; }
.timer .days-label { font-size: 11px; opacity: 0.65; margin-top: 3px; }

/* ── PROGRESS BAR ── */
.progress-bar-outer { height: 6px; background: var(--gray-100); border-radius: 3px; overflow: hidden; }
.progress-bar-inner { height: 100%; background: linear-gradient(90deg, var(--teal) 0%, var(--teal-light) 100%); border-radius: 3px; }

/* ── FILE ITEMS ── */
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
  margin-bottom: 8px;
  background: white;
}

.file-item:hover { border-color: var(--teal-light); background: var(--teal-xlight); }
.file-icon  { width: 36px; height: 36px; background: var(--gray-50); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 16px; }
.file-name  { font-weight: 500; font-size: 13.5px; color: var(--text); }
.file-meta  { font-size: 11.5px; color: var(--gray-500); margin-top: 1px; }
.file-status { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; flex-shrink: 0; }

.status-ok     { background: #dcfce7; color: #15803d; }
.status-wait   { background: #fef9c3; color: #854d0e; }
.status-needed { background: #fee2e2; color: #991b1b; }
.status-review { background: #eff6ff; color: #1d4ed8; }

/* ── BADGES ── */
.badge        { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.badge-groen  { background: #dcfce7; color: #15803d; }
.badge-rood   { background: #fee2e2; color: #991b1b; }
.badge-blauw  { background: #eff6ff; color: #1d4ed8; }
.badge-oranje { background: #fff7ed; color: #c2410c; }

/* ── TAGS ── */
.tag        { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.tag-teal   { background: var(--teal-xlight); color: var(--teal-dark); }
.tag-blue   { background: #e8f0fa; color: var(--blue); }
.tag-orange { background: #fff7ed; color: #c2410c; }
.tag-green  { background: #dcfce7; color: #15803d; }

/* ── ALERTS ── */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; font-size: 13.5px; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--gray-200); }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot { position: absolute; left: -24px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--gray-300); border: 2px solid white; box-shadow: 0 0 0 2px var(--gray-200); }
.timeline-dot.teal { background: var(--teal); box-shadow: 0 0 0 2px var(--teal-light); }
.timeline-dot.blue { background: var(--blue); box-shadow: 0 0 0 2px #93b8e0; }
.timeline-date    { font-size: 11px; font-weight: 600; color: var(--gray-500); margin-bottom: 2px; }
.timeline-content { font-size: 13.5px; color: var(--text); font-weight: 500; }
.timeline-sub     { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
}

.btn-primary  { background: var(--teal); color: white; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-outline  { background: white; color: var(--blue); border: 1.5px solid var(--gray-200); }
.btn-outline:hover { border-color: var(--blue); background: #f0f6ff; }
.btn-sm { padding: 6px 13px; font-size: 12.5px; }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; font-family: 'Syne', sans-serif; }
.form-input { width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--text); outline: none; transition: border-color 0.15s; background: var(--gray-50); }
.form-input:focus { border-color: var(--teal); background: white; }

/* ── UPLOAD ZONE ── */
.upload-zone { border: 2px dashed var(--gray-200); border-radius: var(--radius); padding: 28px; text-align: center; cursor: pointer; transition: all 0.2s; background: var(--gray-50); }
.upload-zone:hover { border-color: var(--teal); background: var(--teal-xlight); }
.upload-zone-icon { width: 44px; height: 44px; background: var(--teal-xlight); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; color: var(--teal-dark); }
.upload-zone h4 { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.upload-zone p { font-size: 12.5px; color: var(--gray-500); }

/* ── MESSAGES ── */
.message-thread { display: flex; flex-direction: column; gap: 14px; max-height: 340px; overflow-y: auto; padding: 4px 2px; }
.message { display: flex; gap: 10px; }
.message.outgoing { flex-direction: row-reverse; }
.msg-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; font-family: 'Syne', sans-serif; flex-shrink: 0; }
.msg-avatar.org    { background: var(--teal); color: white; }
.msg-avatar.client { background: #e8f0fa; color: var(--blue); }
.msg-bubble { max-width: 75%; background: white; border: 1px solid var(--gray-100); border-radius: 0 12px 12px 12px; padding: 10px 14px; box-shadow: var(--shadow-sm); }
.message.outgoing .msg-bubble { background: var(--teal); color: white; border-color: var(--teal); border-radius: 12px 0 12px 12px; }
.msg-meta { font-size: 10.5px; color: var(--gray-400); margin-bottom: 4px; font-weight: 600; }
.message.outgoing .msg-meta { color: rgba(255,255,255,0.7); text-align: right; }
.msg-text { font-size: 13.5px; line-height: 1.5; }
.message.outgoing .msg-text { color: white; }
.msg-input-row { display: flex; gap: 10px; align-items: flex-end; }
.msg-input { display:block; width:100%; min-width:0; flex-shrink:1; flex-grow:1; flex-basis:0; padding: 10px 14px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 13.5px; outline: none; transition: border-color 0.15s; color: var(--text); box-sizing: border-box; }
.msg-input:focus { border-color: var(--teal); }

/* ── TABLE ── */
table { width: 100%; border-collapse: collapse; }
th { font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-500); padding: 10px 14px; text-align: left; background: var(--gray-50); border-bottom: 1px solid var(--gray-100); }
td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); font-size: 13.5px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--gray-100); margin: 20px 0; }

/* ── MISC ── */
.text-sm   { font-size: 12.5px; color: var(--gray-500); }
.text-bold { font-weight: 700; }
.spacer    { height: 20px; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 3px; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 900px) {
  .sidebar { width: 220px; }
  .main    { margin-left: 220px; }
  .grid-2  { grid-template-columns: 1fr; }
}

/* ── MOBIEL (< 768px) ── */
@media (max-width: 768px) {

  /* Sidebar verborgen – !important om 900px regel te overschrijven */
  .sidebar {
    width: 280px !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s ease !important;
    z-index: 200 !important;
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  /* Overlay */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
  }
  .sidebar-overlay.open { display: block; }

  /* Main – !important om 900px margin-left te overschrijven */
  .main { margin-left: 0 !important; }

  /* Hamburger */
  .hamburger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: none;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    color: var(--gray-500);
    flex-shrink: 0;
  }

  .page-content { padding: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 16px; height: 56px; }
  .breadcrumb { font-size: 12px; }
  .user-info .user-name { display: none; }
  .card { overflow-x: auto; }
  .chat-wrap { flex-direction: column; }
  .chat-sidebar { width: 100%; }
  .chat-card { height: 420px; }
  .berichten-wrap { flex-direction: column; }
  .project-lijst { width: 100%; }
  .phase-banner { flex-direction: column; gap: 14px; }
  .page-header h1 { font-size: 20px; }
  .stat-value { font-size: 22px; }
}

/* ── EXTRA KLEIN (< 480px) ── */
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .page-content { padding: 12px; }
  .topbar { padding: 0 12px; }
}
