:root {
  /* Color Palette - Sophisticated & Modern */
  --primary: hsl(230, 85%, 60%);
  --primary-hover: hsl(230, 85%, 50%);
  --bg: hsl(220, 30%, 5%);
  --surface: hsla(220, 30%, 15%, 0.7);
  --text: hsl(0, 0%, 95%);
  --text-muted: hsl(220, 10%, 70%);
  --accent: hsl(280, 80%, 65%);
  --error: hsl(0, 85%, 65%);
  --success: hsl(150, 80%, 45%);

  /* Spacing & Borders */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --glass: blur(12px);
  --border: 1px solid hsla(0, 0%, 100%, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background: var(--bg);
  background: radial-gradient(circle at top right, hsl(230, 40%, 15%), var(--bg));
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.container {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2rem;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sidebar / Form */
.sidebar {
  background: var(--surface);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: var(--border);
  box-shadow: var(--shadow);
  height: fit-content;
  position: relative;
  z-index: 10;
}

h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  line-height: 1.2;
}

.form-group {
  margin-bottom: 1.2rem;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input,
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: hsla(0, 0%, 100%, 0.05);
  border: 1px solid hsla(0, 0%, 100%, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  background: hsla(0, 0%, 100%, 0.1);
  box-shadow: 0 0 0 4px hsla(230, 85%, 60%, 0.2);
}

button.primary-btn {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 1rem;
}

button.primary-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px hsla(230, 85%, 60%, 0.4);
}


/* Main Content / List */
.main-content {
  background: var(--surface);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: var(--border);
  box-shadow: var(--shadow);
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-style: italic;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-card {
  background: hsla(0, 0%, 100%, 0.03);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  animation: slideIn 0.4s ease-out backwards;
}

.contact-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.wishes-section {
  padding: 0.8rem;
  background: hsla(230, 85%, 60%, 0.05);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
}

.wishes-section strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.advice-section h4 {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.advice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.advice-item {
  background: hsla(150, 80%, 45%, 0.05);
  border: 1px solid hsla(150, 80%, 45%, 0.1);
  padding: 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.advice-item:hover {
  background: hsla(150, 80%, 45%, 0.1);
  transform: translateY(-2px);
}

.advice-type {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--success);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

.advice-item h5 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-2026 {
  font-size: 0.6rem;
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
  margin-left: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.advice-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Scope Badges */
.scope-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}

.scope-landelijk {
  background: hsla(210, 85%, 60%, 0.15);
  color: hsl(210, 85%, 75%);
  border: 1px solid hsla(210, 85%, 60%, 0.3);
}

.scope-gemeentelijk {
  background: hsla(150, 80%, 45%, 0.15);
  color: hsl(150, 80%, 65%);
  border: 1px solid hsla(150, 80%, 45%, 0.3);
}

.scope-provinciaal {
  background: hsla(30, 85%, 60%, 0.15);
  color: hsl(30, 85%, 70%);
  border: 1px solid hsla(30, 85%, 60%, 0.3);
}

.scope-financiering {
  background: hsla(270, 85%, 60%, 0.15);
  color: hsl(270, 85%, 75%);
  border: 1px solid hsla(270, 85%, 60%, 0.3);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.contact-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.contact-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

/* Search Bar */
.search-container {
  margin-bottom: 2rem;
}

#searchInput {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

#searchInput:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.1);
}

/* Copy Button */
.copy-btn {
  background: hsla(230, 85%, 60%, 0.1);
  color: var(--primary);
  border: 1px solid hsla(230, 85%, 60%, 0.2);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.copy-btn:hover {
  background: var(--primary);
  color: white;
}

.measures-box {
  margin-top: 1rem;
  padding: 0.8rem;
  background: hsla(150, 80%, 45%, 0.1);
  border: 1px solid hsla(150, 80%, 45%, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.measures-box strong {
  display: block;
  color: var(--success);
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.measures-box p {
  color: var(--text);
  margin: 0;
}

.contact-actions {
  display: flex;
  gap: 0.5rem;
}

.edit-btn {
  background: hsla(230, 85%, 60%, 0.1);
  color: var(--primary);
  border: 1px solid hsla(230, 85%, 60%, 0.2);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.8rem;
  font-weight: 600;
}

.edit-btn:hover {
  background: var(--primary);
  color: white;
}

.secondary-btn {
  width: 100%;
  padding: 1rem;
  background: hsla(0, 0%, 100%, 0.05);
  color: var(--text);
  border: var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
}

.secondary-btn:hover {
  background: hsla(0, 0%, 100%, 0.1);
}

.delete-btn {
  background: hsla(0, 85%, 65%, 0.1);
  color: var(--error);
  border: 1px solid hsla(0, 85%, 65%, 0.2);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.8rem;
  font-weight: 600;
}

.delete-btn:hover {
  background: var(--error);
  color: white;
}

/* Responsive */
@media (max-width: 800px) {
  .container {
    grid-template-columns: 1fr;
  }

  body {
    padding: 1rem;
  }
}

/* Custom Select Dropdown */
.custom-select-wrapper {
  position: relative;
  user-select: none;
  width: 100%;
}

.select-btn {
  display: flex;
  height: 50px;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: hsla(0, 0%, 100%, 0.05);
  border: 1px solid hsla(0, 0%, 100%, 0.1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.select-btn.open {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px hsla(230, 85%, 60%, 0.2);
  background: hsla(0, 0%, 100%, 0.1);
}

.select-btn .btn-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 15px;
}

.select-btn .arrow-dwn {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.select-btn.open .arrow-dwn {
  transform: rotate(-180deg);
}

.list-items {
  position: absolute;
  top: 60px;
  width: 100%;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid hsla(0, 0%, 100%, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
}

.select-btn.open~.list-items {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

.item {
  display: flex;
  align-items: center;
  height: 40px;
  cursor: pointer;
  padding: 0 10px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.item:hover {
  background: hsla(0, 0%, 100%, 0.05);
}

.item .checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  width: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--text-muted);
  margin-right: 12px;
  transition: all 0.2s ease;
}

.item.checked .checkbox {
  background-color: var(--primary);
  border-color: var(--primary);
}

.item .checkbox svg {
  transform: scale(0);
  transition: transform 0.2s ease;
}

.item.checked .checkbox svg {
  transform: scale(1);
}

.item .item-text {
  font-size: 0.9rem;
  color: var(--text);
}

/* Scrollbar for dropdown */
.list-items::-webkit-scrollbar {
  width: 6px;
}

.list-items::-webkit-scrollbar-thumb {
  background: hsla(0, 0%, 100%, 0.2);
  border-radius: 4px;
}