:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --border: #e2e8f0;
  --card: #ffffff;
  --success: #16a34a;
  --warning: #f59e0b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.topbar {
  background: #ffffff;
  color: var(--text);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar .inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.3px;
}

.brand img.logo { height: 28px; vertical-align: middle; margin-right: 10px; }

.brand small {
  opacity: 0.7;
  font-weight: 600;
}

.topbar .actions { display:flex; gap:8px; flex-wrap:wrap; }

/* Flag-styled language buttons */
.btn.flag { color: #0f172a; border-color: var(--border); background-size: 100% 100%; }
.btn.flag:hover { filter: brightness(0.97); }
.btn.flag.nl {
  background-image: linear-gradient(to bottom, #ae1c28 0%, #ae1c28 33.33%, #ffffff 33.33%, #ffffff 66.66%, #21468b 66.66%, #21468b 100%);
}
.btn.flag.uk {
  background-image: linear-gradient(to bottom, #005bbb 0%, #005bbb 50%, #ffd500 50%, #ffd500 100%);
}

@media (max-width: 768px) {
  .topbar .inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .topbar .actions .btn { padding: 8px 12px; font-size: 14px; }
  .card { padding: 16px; }
  .container { padding: 0 12px; }
}

/* Desktop/tablet: place fields side-by-side with equal width */
@media (min-width: 768px) {
  .row {
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: wrap;
  }
  .row .form-group {
    flex: 1 1 0;
    min-width: 220px;
  }
}
.container {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(2, 8, 23, 0.04);
}

h1, h2, h3 {
  margin: 0 0 12px;
}

.muted { color: var(--muted); }

/* Intro block */
.intro {
  margin-bottom: 16px;
}
.intro .title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
}
.intro .subtitle {
  color: var(--muted);
  margin: 0 0 12px;
}
.intro .cta {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
}
.intro .cta:hover { background: var(--primary-dark); }

/* Section headings inside form */
.section-title {
  font-weight: 800;
  font-size: 16px;
  margin: 16px 0 8px;
}

/* Small helper text under inputs */
.helper-text {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

input[type="text"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  font: inherit;
  background: #fff;
}

/* Uniform height for inputs and selects */
input[type="text"], input[type="email"] {
  height: 44px;
  line-height: 44px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 0 12px;
  text-align: left;
  margin: 0;
}
select {
  height: 44px;
  line-height: 44px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 0 12px;
  text-align: left;
  text-align-last: left;
  -ms-text-align-last: left;
  margin: 0;
}

input[type="text"]:focus, textarea:focus, select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

textarea {
  min-height: 120px;
  resize: vertical;
  /* Keep textarea left-aligned for readability */
  text-align: left;
}

/* Center the visible value in selects where supported */
select option { text-align: left; }

/* Placeholders left aligned for readability */
input::placeholder, textarea::placeholder { text-align: left; }
::-webkit-input-placeholder { text-align: left; }
::-moz-placeholder { text-align: left; }
:-ms-input-placeholder { text-align: left; }
:-moz-placeholder { text-align: left; }
.row {
  display: flex;
  flex-direction: column; /* mobile-first: stack fields */
  gap: 16px;
  align-items: stretch;
  flex-wrap: nowrap;
}

.row .form-group {
  width: 100%;
  flex: 0 0 auto;
}

.row + .row, .row + .form-group, .form-group + .form-group {
  margin-top: 14px;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--primary);
  color: white;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--primary-dark);
}

.btn.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn.secondary:hover {
  background: #f8fafc;
}

.btn.small { padding: 8px 10px; font-size: 14px; border-radius: 8px; }

.status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.status.open { border-color: #e11d48; color: #be123c; }
.status.in_progress { border-color: var(--warning); color: #a16207; }
.status.resolved { border-color: var(--success); color: #166534; }

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.table th, .table td {
  border-bottom: 1px solid var(--border);
  padding: 12px 8px;
  text-align: left;
  vertical-align: top;
}

.table th {
  background: #f8fafc;
  font-weight: 700;
}

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

.copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notice {
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 8px;
}

.steps { display:flex; gap:12px; margin: 8px 0 12px; padding:0; list-style:none; }
.steps li { display:flex; align-items:center; gap:8px; color: var(--muted); }
.steps li .dot { width:10px; height:10px; border-radius:50%; background:#cbd5e1; display:inline-block; }
.steps li.done .dot { background:#16a34a; }
.steps li.current .dot { background:#0ea5e9; }
.steps li.done, .steps li.current { color: var(--text); font-weight:600; }
.steps li .label { font-size: 13px; }

.footer {
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
}

/* Utilities for admin tables (Tailwind-like) */
.table-fixed { table-layout: fixed; }
.w-full { width: 100%; }
.whitespace-nowrap { white-space: nowrap; }
.overflow-hidden { overflow: hidden; }
.text-ellipsis { text-overflow: ellipsis; }
.overflow-x-auto { overflow-x: auto; }

/* Category icon buttons */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.category-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: box-shadow .15s ease, transform .05s ease, border-color .15s ease, background .15s ease;
  user-select: none;
}
.category-btn:hover { box-shadow: 0 2px 10px rgba(2,8,23,.06); }
.category-btn:active { transform: translateY(0.5px); }
.category-btn.selected {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  position: relative;
}
.category-btn.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.category-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef2f7;
  font-size: 16px;
}
.category-label {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Upload dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  position: relative;
}
.dropzone .dz-label { display:flex; align-items:center; gap:12px; cursor: pointer; width:100%; }
.dropzone input[type="file"] {
  position: absolute;
  right: 12px;
  top: 12px;
  opacity: 0.001; /* small but clickable in Safari/iOS */
  width: 1px;
  height: 1px;
  pointer-events: auto;
  z-index: 1;
}
.dropzone .dz-actions {
  margin-left: auto;
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2; /* ensure above any stray overlay */
}
.dropzone .dz-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef2f7;
  font-size: 18px;
}
.dropzone .dz-text {
  font-weight: 600;
}
.dropzone .dz-hint {
  color: var(--muted);
  font-size: 13px;
}
.dropzone.dragover {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}
.file-name {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

/* Inline submit remains visible on all viewports */


