/* ═══════════════════════════════════════
   ICT aan de Lek Helpdesk – Klantportaal
   v1.3.0 – Mobile-first
   ═══════════════════════════════════════ */

.ict-hd-portaal {
  --blue:    #1a3a6b;
  --bluedark:#0f2347;
  --orange:  #e85d04;
  --olight:  #ff7b2b;
  --bg:      #f3f5f9;
  --surface: #ffffff;
  --surf2:   #f7f8fb;
  --border:  rgba(0,0,0,0.09);
  --border2: rgba(0,0,0,0.16);
  --text:    #1a1a2e;
  --text2:   #5a6070;
  --text3:   #9aa0ac;
  --r:       10px;
  --rl:      14px;
  --shadow:  0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.04);

  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 19px;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  padding: 16px;
}

.ict-hd-portaal *, .ict-hd-portaal *::before, .ict-hd-portaal *::after {
  box-sizing: border-box;
}

/* ── Stats ── */
.hd-portal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media(max-width:480px){
  .hd-portal-stats { grid-template-columns: 1fr 1fr; }
}
.hd-portal-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hd-portal-stat::before { content:''; position:absolute; top:0;left:0;right:0;height:3px; }
.hd-portal-stat.orange::before { background: var(--orange); }
.hd-portal-stat.blue::before   { background: var(--blue); }
.hd-portal-stat.amber::before  { background: #d97706; }
.hd-portal-stat .lbl { font-size: 14px; color: var(--text2); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 5px; }
.hd-portal-stat .val { font-size: 24px; font-weight: 700; line-height: 1; }
.hd-portal-stat .sub { font-size: 14px; color: var(--text3); margin-top: 4px; }

/* ── Header ── */
.hd-portal-header {
  background: linear-gradient(135deg,var(--blue),var(--bluedark));
  border-radius: var(--rl);
  padding: 18px 20px;
  color: #fff;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: 0 4px 20px rgba(26,58,107,.3);
}
.hd-portal-ava {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700;
  flex-shrink: 0;
}
.hd-portal-name { font-size: 19px; font-weight: 700; margin-bottom: 2px; }
.hd-portal-sub  { font-size: 16px; opacity: .6; }
.hd-portal-header .actions { margin-left: auto; }
@media(max-width:400px){
  .hd-portal-header .actions { margin-left: 0; width: 100%; }
  .hd-portal-header .actions .hd-portal-btn { width:100%; justify-content:center; }
}

/* ── Panel ── */
.hd-portal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.hd-portal-panel-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.hd-portal-panel-head h3 { font-size: 19px; font-weight: 600; margin: 0; }

/* ── Ticket rijen ── */
.hd-portal-ticket {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
  -webkit-tap-highlight-color: transparent;
}
.hd-portal-ticket:last-child { border-bottom: none; }
.hd-portal-ticket:hover, .hd-portal-ticket:active { background: var(--surf2); }
.hd-portal-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-open    { background: var(--orange); }
.dot-progress{ background: #2563eb; }
.dot-done    { background: #16a34a; }
.dot-waiting { background: #d97706; }
.dot-archived{ background: #94a3b8; }
.hd-portal-ticket-info { flex: 1; min-width: 0; }
.hd-portal-ticket-subject {
  font-size: 19px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hd-portal-ticket-meta { font-size: 15px; color: var(--text3); margin-top: 2px; }

/* ── Badges ── */
.hd-portal-badge {
  display: inline-block; font-size: 14px; padding: 3px 9px;
  border-radius: 20px; font-weight: 500; white-space: nowrap; flex-shrink: 0;
}
.hd-portal-badge.open     { background:#fff3ee;color:#b94a13;border:1px solid #f4c7b0; }
.hd-portal-badge.progress { background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe; }
.hd-portal-badge.done     { background:#f0fdf4;color:#15803d;border:1px solid #bbf7d0; }
.hd-portal-badge.waiting  { background:#fffbeb;color:#b45309;border:1px solid #fde68a; }
.hd-portal-badge.archived { background:#f1f5f9;color:#64748b;border:1px solid #cbd5e1; }

/* ── Buttons ── */
.hd-portal-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r);
  border: 1px solid var(--border2);
  background: var(--surface);
  cursor: pointer; font-size: 19px; color: var(--text);
  text-decoration: none; font-weight: 400;
  transition: background .15s;
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.hd-portal-btn:hover   { background: var(--surf2); color: var(--text); text-decoration: none; }
.hd-portal-btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 600; }
.hd-portal-btn.primary:hover { background: var(--olight); color: #fff; }
.hd-portal-btn.sm { padding: 6px 14px; font-size: 16px; }

/* ── Login ── */
.hd-login-wrap {
  max-width: 440px;
  margin: 24px auto;
}
.hd-login-logo { text-align: center; margin-bottom: 24px; }
.hd-login-logo .brand { font-size: 24px; font-weight: 700; color: var(--blue); }
.hd-login-logo .brand span { color: var(--orange); }
.hd-login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 24px;
  box-shadow: var(--shadow);
}
.hd-login-card h2 { font-size: 19px; font-weight: 700; margin: 0 0 18px; color: var(--blue); }

/* ── Formulier ── */
.hd-portal-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 20px;
  box-shadow: var(--shadow);
}
.hd-portal-form-card h2 {
  font-size: 19px; font-weight: 700;
  margin: 0 0 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--blue);
}
.hd-portal-form-row { margin-bottom: 15px; }
.hd-portal-form-row label {
  display: block; font-size: 15px; font-weight: 600;
  color: var(--text2); text-transform: uppercase;
  letter-spacing: .4px; margin-bottom: 5px;
}
.hd-portal-form-row input,
.hd-portal-form-row select,
.hd-portal-form-row textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--border2);
  border-radius: var(--r);
  font-size: 16px; /* 16px prevents iOS zoom */
  font-family: inherit; color: var(--text);
  background: #fff; outline: none;
  -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.hd-portal-form-row input:focus,
.hd-portal-form-row select:focus,
.hd-portal-form-row textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,93,4,.1);
}
.hd-portal-form-row textarea { resize: vertical; min-height: 100px; }
.hd-portal-form-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media(max-width:480px){
  .hd-portal-form-grid2 { grid-template-columns: 1fr; }
}
.hd-portal-form-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--border); margin-top: 4px;
}
.hd-portal-form-actions .hd-portal-btn { flex: 1; justify-content: center; }
@media(max-width:400px){
  .hd-portal-form-actions { flex-direction: column; }
}

/* ── Ticket detail ── */
.hd-portal-ticket-header {
  background: linear-gradient(135deg,var(--blue),var(--bluedark));
  border-radius: var(--rl); padding: 18px 20px; color: #fff; margin-bottom: 16px;
}
.hd-portal-ticket-header .tnr { font-size: 15px; opacity:.6; font-family:monospace; margin-bottom:3px; }
.hd-portal-ticket-header h2   { font-size:17px; font-weight:700; margin:0 0 8px; line-height:1.3; }
.hd-portal-ticket-header .meta-row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

/* ── Berichten ── */
.hd-portal-messages { display:flex; flex-direction:column; gap:14px; padding:16px; }
.hd-portal-msg-head { display:flex; align-items:center; gap:8px; margin-bottom:5px; flex-wrap:wrap; }
.hd-portal-msg-ava  { width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;color:#fff;flex-shrink:0; }
.hd-portal-msg-name { font-size:13px; font-weight:600; }
.hd-portal-msg-time { font-size:11px; color:var(--text3); }
.hd-portal-msg-body { background:var(--surf2);border:1px solid var(--border);border-radius:0 10px 10px 10px;padding:11px 14px;font-size:14px;line-height:1.65;margin-left:36px; }
.hd-portal-msg.staff .hd-portal-msg-body { background:#fff8f5;border-color:#fdd0b8;border-radius:10px 0 10px 10px; }

/* ── Flash berichten ── */
.hd-portal-flash {
  padding:12px 16px; border-radius:var(--r);
  font-size:14px; margin-bottom:16px; border-left:4px solid;
}
.hd-portal-flash.success { background:#f0fdf4;color:#15803d;border-color:#16a34a; }
.hd-portal-flash.error   { background:#fef2f2;color:#dc2626;border-color:#dc2626; }
.hd-portal-flash.info    { background:#eff6ff;color:#1d4ed8;border-color:#3b82f6; }

/* ── Breadcrumb ── */
.hd-portal-breadcrumb { font-size:13px;color:var(--text2);margin-bottom:14px; }
.hd-portal-breadcrumb a { color:var(--orange);text-decoration:none; }
.hd-portal-breadcrumb a:hover { text-decoration:underline; }
