/* Snel loggen — ontwerp "Bericht loggen" (pagina-scoped, header/footer zoals index2) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

body:has(.quicklog-page) {
  padding: 0;
  background: #ECEAE4;
  color: #0F172A;
  font-family: system-ui, -apple-system, 'SF Pro Display', 'Inter', sans-serif;
}

body:has(.quicklog-page) #container {
  max-width: 448px;
  margin: 0 auto;
  background: #FAF9F6;
  border-left: 1px solid rgba(226, 232, 240, 0.8);
  border-right: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 18px 45px -30px rgba(18, 19, 22, 0.45);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body:has(.quicklog-page) #footer {
  display: none;
}

/* Index2-stijl siteheader */
body:has(.quicklog-page) #menu {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid #E5E0D5;
  background: #FAF9F6;
  box-sizing: border-box;
  overflow: visible;
}

body:has(.quicklog-page) #menu .w50 {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  float: none;
  width: auto;
  margin: 0;
}

body:has(.quicklog-page) #menu > .w50:first-child {
  min-width: 0;
}

body:has(.quicklog-page) #menu > .w50.menu-items {
  flex: 0 0 auto;
  justify-content: flex-end;
}

body:has(.quicklog-page) #menu h1 {
  margin: 0;
  font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 32px;
  overflow: hidden;
}

body:has(.quicklog-page) #menu h1 a {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  height: 32px;
  border: 0;
  color: #0F172A;
  text-decoration: none;
  white-space: nowrap;
}

body:has(.quicklog-page) #menu h1 i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-right: 10px;
  border: 1px solid #BAE6FD;
  background: #F0F9FF;
  color: #0284C7 !important;
  font-size: 14px;
}

body:has(.quicklog-page) #menu h1 a::after {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  background: #0EA5E9;
}

body:has(.quicklog-page) #menu h1 .textblue {
  color: #0284C7 !important;
}

body:has(.quicklog-page) #menu .menu-items {
  padding: 0;
  float: none;
  color: #0F172A;
}

body:has(.quicklog-page) #menu #hamburger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  float: none;
  border: 1px solid #E5E0D5;
  background: #FFFFFF;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(18, 19, 22, 0.04);
}

body:has(.quicklog-page) #menu #hamburger:hover {
  background: #F1F5F9;
  color: #0284C7;
}

body:has(.quicklog-page) #nav {
  z-index: 50;
}

#nav.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 0;
  height: 100dvh;
  overflow: hidden;
  background: rgba(18, 19, 22, 0.72);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: width 0.26s ease;
}

#nav .overlay-content {
  position: relative;
  top: 0;
  width: min(420px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: 16px auto;
  padding: 24px 18px 18px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  background: #FAF9F6;
  box-shadow: 0 28px 70px -24px rgba(0, 0, 0, 0.65);
  font-size: 0;
  text-align: left;
  opacity: 0;
  transform: translateY(10px);
  transition: transform 0.26s ease, opacity 0.26s ease;
}

#nav[style*="width: 100%"] .overlay-content {
  opacity: 1;
  transform: translateY(0);
}

#nav .overlay-content::before {
  content: 'Menu';
  display: block;
  margin-bottom: 14px;
  color: #0F172A;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

#nav .menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  padding: 13px 14px;
  border: 1px solid #E7E3D8;
  border-radius: 14px;
  background: #FFFFFF;
  color: #0F172A;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

#nav .menu-item:last-child {
  margin-bottom: 0;
}

#nav .menu-item:hover,
#nav .menu-item:focus {
  border-color: #BAE6FD;
  background: #F0F9FF;
  color: #0284C7;
  text-decoration: none;
}

#nav .menu-item .textgreyish {
  color: #64748B;
  font-family: 'Space Grotesk', monospace;
  font-size: 10px;
  font-weight: 500;
}

#nav .closebtn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #E2E8F0;
  border-radius: 50%;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.35);
}

#nav .closebtn:hover {
  color: #0284C7;
  text-decoration: none;
}

/* Hoofdgebied */
.quicklog-page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 448px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  color: #0F172A;
  background: transparent;
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13px;
  box-sizing: border-box;
}

.quicklog-page *,
.quicklog-page *::before,
.quicklog-page *::after,
.quicklog-modal *,
.quicklog-modal *::before,
.quicklog-modal *::after {
  box-sizing: border-box;
}

.quicklog-page h1,
.quicklog-page h2,
.quicklog-page p {
  margin: 0;
}

.quicklog-page a {
  border-bottom: 0;
  color: inherit;
  text-decoration: none;
}

.quicklog-page button,
.quicklog-modal button {
  margin: 0;
  font-family: inherit;
}

/* Kaart */
.quicklog-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
}

/* Kaartkop */
.quicklog-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.quicklog-card-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-top: 2px;
  border: 1px solid #e0effe;
  border-radius: 12px;
  background: #f0f7ff;
  color: #0369a1;
}

.quicklog-card-icon svg {
  width: 20px;
  height: 20px;
}

.quicklog-card-title {
  color: #0f172a;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.375;
  letter-spacing: -0.025em;
}

/* Formulier */
.quicklog-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0;
}

.quicklog-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 640px) {
  .quicklog-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .quicklog-field:first-child {
    grid-column: span 2;
  }
}

.quicklog-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.quicklog-label {
  position: static;
  top: auto;
  display: block;
  margin: 0 0 6px;
  margin-left: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-transform: uppercase;
}

.quicklog-page .quicklog-textarea,
.quicklog-page .quicklog-input,
.quicklog-modal input,
.quicklog-modal select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.5);
  color: #1e293b;
  font-family: inherit;
  font-size: 14px;
  box-shadow: none;
}

.quicklog-page .quicklog-textarea {
  min-height: 117px;
  margin-bottom: 7px;
  padding: 12px;
  line-height: 1.625;
  resize: none;
}

.quicklog-page .quicklog-input,
.quicklog-modal input,
.quicklog-modal select {
  padding: 10px 12px;
  font-size: 13px;
}

.quicklog-page .quicklog-input {
  padding-right: 22px;
}

.quicklog-page .quicklog-mono {
  font-family: "SF Mono", Menlo, Monaco, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 16px;
  color: #334155;
}

@media (min-width: 640px) {
  .quicklog-page .quicklog-input.quicklog-mono {
    font-size: 11px;
  }
}

.quicklog-page .quicklog-textarea::placeholder,
.quicklog-page .quicklog-input::placeholder,
.quicklog-modal input::placeholder {
  color: #94a3b8;
}

.quicklog-page .quicklog-textarea:focus,
.quicklog-page .quicklog-input:focus,
.quicklog-modal input:focus,
.quicklog-modal select:focus {
  outline: none;
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 1px #0284c7;
}

.quicklog-input-wrap {
  position: relative;
}

.quicklog-clock {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 14px;
  height: 14px;
  color: #94a3b8;
  pointer-events: none;
  transform: translateY(-50%);
}

.quicklog-suggest-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Meldingen */
.quicklog-alert {
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
}

.quicklog-alert-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.quicklog-alert-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.quicklog-alert-success {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

/* Gevonden entiteiten */
.quicklog-entities {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.quicklog-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quicklog-suggestions:empty {
  display: none;
}

.quicklog-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border: 1px solid #64748b;
  border-radius: 12px;
  background: #f1f5f9;
  color: #1e293b;
  font: inherit;
  font-size: 10px;
  line-height: 16px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.quicklog-pill:hover {
  border-color: #475569;
  background: #e2e8f0;
}

.quicklog-pill.is-on {
  border-color: #0284c7;
  background: #e0effe;
  box-shadow: 0 0 0 1px #0284c7;
}

.quicklog-pill::before {
  content: "";
  display: none;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.quicklog-pill.is-on::before {
  display: block;
  background: #0284c7;
}

.quicklog-pill-title {
  color: #0f172a;
  font-size: 10px;
  font-weight: 400;
  line-height: 16px;
}

.quicklog-chip-tag {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(224, 239, 254, 0.8);
  color: #075985;
  font-size: 9px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

.quicklog-pill-remove {
  margin-left: 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
}

.quicklog-pill-remove:hover {
  color: #475569;
}

.quicklog-newitem-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-top: 4px;
}

@media (min-width: 640px) {
  .quicklog-newitem-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.quicklog-btn-newitem {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(186, 224, 253, 0.6);
  border-radius: 8px;
  background: rgba(240, 247, 255, 0.6);
  color: #0369a1;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.quicklog-btn-newitem:hover {
  background: #e0effe;
  color: #075985;
}

.quicklog-btn-newitem[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.quicklog-btn-newitem svg {
  width: 14px;
  height: 14px;
}

.quicklog-hint {
  color: #94a3b8;
  font-size: 12px;
  font-style: italic;
}

/* Stemming (multi-select toggle) */
.quicklog-mood {
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.quicklog-mood .quicklog-label {
  margin-bottom: 10px;
}

.quicklog-mood-selector {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  max-width: 24rem;
}

.quicklog-mood-option {
  position: static;
  top: auto;
  display: block;
  margin: 0;
  cursor: pointer;
}

.quicklog-mood-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.quicklog-mood-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #64748b;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.quicklog-mood-icon svg {
  width: 24px;
  height: 24px;
}

.quicklog-mood-option:hover .quicklog-mood-icon {
  border-color: #cbd5e1;
  background: rgba(248, 250, 252, 0.7);
}

.quicklog-mood-option input:checked + .quicklog-mood-icon {
  border-color: #0284c7;
  background: #f0f7ff;
  color: #0369a1;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.12);
}

.quicklog-mood-option input:focus-visible + .quicklog-mood-icon {
  outline: 2px solid #0284c7;
  outline-offset: 2px;
}

/* Acties */
.quicklog-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

@media (min-width: 640px) {
  .quicklog-actions {
    align-items: flex-start;
  }

  .quicklog-actions > .quicklog-btn-primary {
    width: auto;
  }

  .quicklog-secondary-actions {
    justify-content: flex-start;
  }
}

.quicklog-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 20px;
  border: 0;
  border-radius: 12px;
  background: #0f172a;
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.025em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.quicklog-btn-primary:hover {
  background: #1e293b;
}

.quicklog-btn-primary:active {
  transform: scale(0.98);
}

.quicklog-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
}

.quicklog-linkbtn {
  padding: 0;
  border: 0;
  background: none;
  color: #64748b;
  font: inherit;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}

.quicklog-linkbtn:hover {
  color: #334155;
  text-decoration: underline;
}

/* Opgeslagen resultaat */
.quicklog-text {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid #0284c7;
  border-radius: 12px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.quicklog-result-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quicklog-result-item {
  padding: 10px 12px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 12.5px;
  line-height: 1.45;
}

.quicklog-result-item strong {
  color: #0f172a;
}

.quicklog-company {
  color: #475569;
  font-size: 12px;
}

/* Voettekst */
.quicklog-footer {
  width: 100%;
  margin-top: 24px;
  padding: 12px 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
}

.quicklog-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.5;
}

.quicklog-footer-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quicklog-footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.quicklog-footer-time {
  color: #94a3b8;
  font-family: "SF Mono", Menlo, Monaco, "Cascadia Code", Consolas, monospace;
}

/* Modal nieuw item */
.quicklog-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.55);
}

.quicklog-modal[hidden] {
  display: none;
}

.quicklog-modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  padding: 22px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
}

.quicklog-modal-card h2 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 600;
}

.quicklog-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.quicklog-modal-card .quicklog-label {
  margin-top: 10px;
}

.quicklog-modal-card .quicklog-muted {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.quicklog-modal-error {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 12px;
}

.quicklog-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.quicklog-modal-actions .quicklog-btn-primary {
  flex: 1;
  width: auto;
}

.quicklog-modal-actions .quicklog-btn-muted {
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.quicklog-modal-actions .quicklog-btn-muted:hover {
  background: #e2e8f0;
}
