/* EVO Privacy - Checklist GDPR */
:root {
  --primary: #2563eb;
  --primary-light: #60a5fa;
  --primary-dark: #1d4ed8;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #1e293b;
  --text: #1e293b;
  --text-light: #64748b;
  --text-sidebar: #e2e8f0;
  --border: #e2e8f0;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 6px rgba(0,0,0,.1), 0 2px 4px rgba(0,0,0,.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* Layout */
#app { display: flex; min-height: 100vh; }

.sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform .2s ease;
}
.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-header h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.sidebar-header .subtitle {
  font-size: .75rem;
  color: var(--primary-light);
  margin-top: 2px;
}
.company-selector {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.company-selector select {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: .875rem;
}
.company-selector select option { color: var(--text); background: #fff; }

.nav-sections { flex: 1; padding: 12px 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--text-sidebar);
  text-decoration: none;
  font-size: .875rem;
  cursor: pointer;
  transition: background .15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.08); }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  font-size: .75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.nav-item.active .num { background: rgba(255,255,255,.3); }
.nav-item.completed .num { background: var(--success); }
.nav-item .label { flex: 1; }
.nav-item .status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
}
.nav-item.has-data .status { background: var(--primary-light); }
.nav-item.completed .status { background: var(--success); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 24px;
  max-width: 960px;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .main-content { margin-left: 0; padding: 16px; padding-top: 60px; }
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-body { padding: 20px; }

/* Forms */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.form-group label .required { color: var(--danger); }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}
input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: inherit;
  transition: border-color .15s;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
textarea { min-height: 80px; resize: vertical; }

/* Checkbox & Radio */
.checkbox-group, .radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checkbox-group.horizontal, .radio-group.horizontal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
}
.checkbox-item, .radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .9rem;
}
.checkbox-item input, .radio-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Checkbox Matrix */
.matrix-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
.matrix-table th, .matrix-table td {
  padding: 8px;
  border: 1px solid var(--border);
  text-align: center;
}
.matrix-table th {
  background: var(--bg);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}
.matrix-table th:first-child,
.matrix-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--bg-card);
  z-index: 2;
  min-width: 150px;
}
.matrix-table th:first-child { z-index: 3; background: var(--bg); }
.matrix-table td input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

/* Two-column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
}

/* Accordion */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; }
.accordion-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  background: var(--bg);
  border-radius: var(--radius);
  font-weight: 500;
}
.accordion-header:hover { background: #f1f5f9; }
.accordion-header .arrow { transition: transform .2s; font-size: .7rem; }
.accordion.open .accordion-header .arrow { transform: rotate(90deg); }
.accordion-body { padding: 16px; display: none; }
.accordion.open .accordion-body { display: block; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--bg); }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

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

/* Tags / Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--bg-sidebar);
  color: #fff;
  font-size: .875rem;
  box-shadow: var(--shadow-lg);
  animation: slideIn .2s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } }

/* Section header */
.section-header {
  margin-bottom: 20px;
}
.section-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.section-header p {
  font-size: .875rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
}
.empty-state .icon { font-size: 2rem; margin-bottom: 8px; }

/* Progress indicator */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width .3s ease;
}

/* Catalog item */
.catalog-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  cursor: pointer;
  transition: background .15s;
  font-size: .85rem;
}
.catalog-item:hover { background: #f1f5f9; }
.catalog-item.selected { border-color: var(--primary); background: #eff6ff; }
.catalog-item .code {
  font-weight: 600;
  font-size: .75rem;
  color: var(--primary);
  min-width: 50px;
}

/* Scrollable list */
.scroll-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Utility */
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: .8rem; }
.text-muted { color: var(--text-light); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.hidden { display: none !important; }
