/* ==========================================================
   VakmanPro Planner – planner.css
   Dark theme. ~400 lines.
   ========================================================== */

/* ── Reset + base ── */
.vp-planner-standalone body,
.vp-login-standalone body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: #0f172a;
  color: #f8fafc;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }
* { box-sizing: border-box; }

/* ══════════════════════════════════════════════════════════
   PLANNING BOARD
══════════════════════════════════════════════════════════ */

/* Board wrapper */
.vp-board {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #0f172a;
  color: #f8fafc;
}

/* ── Topbar ── */
.vp-topbar {
  height: 60px;
  background: #1e293b;
  border-bottom: 1px solid #2d3f5a;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.vp-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: #f8fafc;
  white-space: nowrap;
}

.vp-week-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
}

.vp-week-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0f172a;
  border: 1px solid #2d3f5a;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  padding: 0;
}

.vp-week-btn:hover {
  background: #2872fa;
  color: #fff;
  border-color: #2872fa;
}

.vp-week-label {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  min-width: 260px;
  text-align: center;
}

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

.vp-btn-add-klus {
  border: 1px solid #2872fa;
  color: #60a5fa;
  background: transparent;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.vp-btn-add-klus:hover {
  background: rgba(40, 114, 250, 0.1);
}

.vp-logout-link {
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
}

.vp-logout-link:hover {
  color: #f8fafc;
}

/* ── Board scroll + grid ── */
.vp-board-scroll {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.vp-grid {
  display: grid;
  grid-template-columns: 160px repeat(5, 1fr);
  min-width: 700px;
  border-radius: 12px;
  overflow: hidden;
}

/* Header cells */
.vp-grid-header-cell {
  background: #1e293b;
  border: 1px solid #2d3f5a;
  padding: 12px;
  text-align: center;
  position: sticky;
  top: 60px;
  z-index: 10;
}

.vp-grid-corner {
  z-index: 15;
  left: 0;
}

.vp-grid-header-cell .day-name {
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 1px;
  font-size: 11px;
  font-weight: 700;
}

.vp-grid-header-cell .day-date {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
  margin-top: 2px;
}

/* Name cell */
.vp-name-cell {
  background: #1e293b;
  border: 1px solid #2d3f5a;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  left: 0;
  z-index: 5;
}

.vp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vp-med-naam {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Planning cells */
.vp-cell {
  background: #0f172a;
  border: 1px solid #1e293b;
  padding: 8px;
  min-height: 72px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.15s;
  position: relative;
}

.vp-cell:hover {
  background: #1a2540;
}

/* Add indicator */
.vp-cell-add {
  width: 24px;
  height: 24px;
  border: 1.5px dashed #2d3f5a;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2d3f5a;
  font-size: 16px;
  margin: auto;
  transition: border-color 0.15s, color 0.15s;
  cursor: pointer;
  flex-shrink: 0;
}

.vp-cell:hover .vp-cell-add {
  border-color: #2872fa;
  color: #60a5fa;
}

/* Pills */
.vp-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #f8fafc;
  max-width: 100%;
  cursor: default;
  border: 1px solid transparent;
  position: relative;
}

.vp-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot-color, #2872fa);
  flex-shrink: 0;
}

.vp-pill-naam {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

.vp-pill-del {
  margin-left: auto;
  font-size: 14px;
  color: #64748b;
  cursor: pointer;
  display: none;
  transition: color 0.15s;
  padding-left: 4px;
  flex-shrink: 0;
  line-height: 1;
}

.vp-pill-del:hover {
  color: #ef4444;
}

/* Show delete button on pill hover (always visible in admin context) */
.vp-pill:hover .vp-pill-del,
.vp-is-admin .vp-pill-del {
  display: block;
}

/* Empty state */
.vp-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #2d3f5a;
  font-size: 14px;
}

/* ══════════════════════════════════════════════════════════
   ASSIGN MODAL
══════════════════════════════════════════════════════════ */

.vp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.15s ease;
}

.vp-modal-box {
  background: #1e293b;
  border: 1px solid #2d3f5a;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.2s ease;
}

.vp-modal-header {
  padding: 20px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.vp-modal-header strong {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
}

.vp-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  padding: 0;
}

.vp-modal-close:hover {
  color: #f8fafc;
}

.vp-modal-sub {
  padding: 4px 20px 16px;
  font-size: 13px;
  color: #64748b;
  flex-shrink: 0;
}

.vp-klus-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 80px;
}

/* Scrollbar styling for klus list */
.vp-klus-list::-webkit-scrollbar {
  width: 4px;
}
.vp-klus-list::-webkit-scrollbar-track {
  background: transparent;
}
.vp-klus-list::-webkit-scrollbar-thumb {
  background: #2d3f5a;
  border-radius: 2px;
}

.vp-klus-row {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #2d3f5a;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.15s, border-color 0.15s;
}

.vp-klus-row:hover {
  background: rgba(40, 114, 250, 0.08);
  border-color: rgba(40, 114, 250, 0.3);
}

.vp-klus-row.selected {
  background: rgba(40, 114, 250, 0.12);
  border-color: #2872fa;
}

.vp-klus-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vp-klus-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.vp-klus-naam {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vp-klus-adres {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vp-modal-notitie {
  padding: 0 20px 12px;
  flex-shrink: 0;
}

.vp-modal-notitie label {
  font-size: 12px;
  color: #64748b;
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vp-modal-notitie input {
  width: 100%;
  background: #0f172a;
  border: 1px solid #2d3f5a;
  border-radius: 8px;
  padding: 10px 12px;
  color: #f8fafc;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.vp-modal-notitie input:focus {
  border-color: #2872fa;
  box-shadow: 0 0 0 3px rgba(40, 114, 250, 0.1);
}

.vp-modal-notitie input::placeholder {
  color: #334155;
}

.vp-modal-footer {
  padding: 12px 20px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #2d3f5a;
  flex-shrink: 0;
}

.vp-btn-cancel {
  padding: 10px 20px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid #2d3f5a;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.vp-btn-cancel:hover {
  border-color: #4b6080;
  color: #f8fafc;
}

.vp-btn-save {
  padding: 10px 24px;
  border-radius: 8px;
  background: #2872fa;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.vp-btn-save:hover {
  background: #1a5ce8;
}

.vp-btn-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ══════════════════════════════════════════════════════════
   ROOSTER VIEW (employee schedule)
══════════════════════════════════════════════════════════ */

.vp-rooster {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 16px;
}

.vp-rooster-header {
  margin-bottom: 20px;
}

.vp-rooster-greeting {
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.3;
}

.vp-rooster-week-info {
  font-size: 14px;
  color: #64748b;
  margin-top: 4px;
}

.vp-rooster-week-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.vp-rooster-week-nav button {
  background: transparent;
  border: 1px solid #2d3f5a;
  color: #94a3b8;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.vp-rooster-week-nav button:hover {
  border-color: #2872fa;
  color: #60a5fa;
}

.vp-rooster-day {
  background: #1e293b;
  border: 1px solid #2d3f5a;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  display: flex;
  gap: 16px;
  transition: border-color 0.15s;
}

.vp-rooster-day:hover {
  border-color: #3d5275;
}

.vp-rooster-day-label {
  min-width: 70px;
  flex-shrink: 0;
  padding-top: 2px;
}

.vp-rooster-day-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vp-rooster-job {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.vp-rooster-job-bar {
  width: 3px;
  border-radius: 2px;
  min-height: 36px;
  flex-shrink: 0;
  margin-top: 2px;
}

.vp-rooster-job-naam {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.4;
}

.vp-rooster-job-adres {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.4;
}

.vp-rooster-leeg {
  font-size: 13px;
  color: #2d3f5a;
  font-style: italic;
  padding: 6px 0;
}

/* ══════════════════════════════════════════════════════════
   LOGIN
══════════════════════════════════════════════════════════ */

.vp-login-wrap {
  min-height: 100vh;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.vp-login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.vp-login-orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(40, 114, 250, 0.15);
  top: -100px;
  right: -100px;
  animation: float1 8s ease-in-out infinite alternate;
}

.vp-login-orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(124, 58, 237, 0.1);
  bottom: -80px;
  left: -80px;
  animation: float2 10s ease-in-out infinite alternate;
}

.vp-login-card {
  background: #1e293b;
  border: 1px solid #2d3f5a;
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.vp-login-brand {
  text-align: center;
  margin-bottom: 32px;
}

.vp-login-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vp-login-logo {
  max-width: 80px;
  max-height: 80px;
  border-radius: 12px;
  margin: 0 auto 16px;
  display: block;
}

.vp-login-title {
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.3;
}

.vp-login-sub {
  font-size: 14px;
  color: #64748b;
  margin-top: 4px;
}

.vp-login-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #fca5a5;
  margin-bottom: 20px;
}

.vp-field {
  margin-bottom: 20px;
}

.vp-label {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  display: block;
  margin-bottom: 8px;
}

.vp-input {
  width: 100%;
  background: #0f172a;
  border: 1px solid #2d3f5a;
  border-radius: 10px;
  padding: 14px 16px;
  color: #f8fafc;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.vp-input:focus {
  border-color: #2872fa;
  box-shadow: 0 0 0 3px rgba(40, 114, 250, 0.1);
}

.vp-input::placeholder {
  color: #334155;
}

.vp-login-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  transition: filter 0.15s;
  background: linear-gradient(135deg, #2872fa, #1a5ce8);
}

.vp-login-btn:hover {
  filter: brightness(1.1);
}

.vp-login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: none;
}

.vp-login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: #2d3f5a;
}

/* ══════════════════════════════════════════════════════════
   LOADING SKELETON
══════════════════════════════════════════════════════════ */

.vp-skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #2d3f5a 50%, #1e293b 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════ */

@keyframes float1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.1); }
}

@keyframes float2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-20px, 30px) scale(1.05); }
}

@keyframes skeleton-shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* ══════════════════════════════════════════════════════════
   MOBILE
══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .vp-board-scroll {
    padding: 0;
  }

  .vp-name-cell {
    min-width: 100px;
    padding: 8px;
  }

  .vp-name-cell .vp-med-naam {
    font-size: 11px;
  }

  .vp-week-label {
    min-width: 180px;
    font-size: 13px;
  }

  .vp-topbar-brand {
    display: none;
  }

  .vp-btn-add-klus {
    padding: 6px 10px;
    font-size: 12px;
  }

  .vp-login-card {
    padding: 32px 24px;
  }

  .vp-grid {
    grid-template-columns: 100px repeat(5, 1fr);
  }

  .vp-pill-naam {
    max-width: 80px;
  }

  .vp-rooster {
    padding: 16px 12px;
  }
}

@media (max-width: 480px) {
  .vp-topbar {
    padding: 0 12px;
    gap: 10px;
  }

  .vp-week-label {
    min-width: 140px;
    font-size: 12px;
  }

  .vp-modal-box {
    max-height: 90vh;
  }

  .vp-login-card {
    padding: 28px 20px;
  }
}
