:root {
  --brand: #da291c;
  --darker: #ad2016;
  --lighter: #ff3526;
  --background: #f2f6f7;
  --white: #ffffff;
  --black: #000000;
  --grey: #c4c4c4;
  --font-family: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--black);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container.container-wide {
  max-width: 100%;
}

nav,
.navbar-fairlab {
  background-color: var(--white);
  padding: 16px 24px;
  margin: 24px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

nav .logo,
.navbar-fairlab .logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
}

.navbar-fairlab .logo img {
  height: 40px;
  width: auto;
}

nav .nav-links {
  display: flex;
  gap: 24px;
}

nav .nav-links a {
  color: var(--black);
  text-decoration: none;
  font-weight: 500;
}

nav .nav-links a:hover {
  color: var(--brand);
}

h1 {
  font-size: 36px;
  font-weight: 500;
  margin-bottom: 24px;
}

h2 {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 20px;
}

h3 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: var(--brand);
  color: var(--white);
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: var(--darker);
  color: var(--white);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--grey);
  color: var(--black);
}

.btn-secondary:hover {
  background-color: #a8a8a8;
}

.btn-danger {
  background-color: #dc3545;
}

.btn-danger:hover {
  background-color: #c82333;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

.card {
  background-color: var(--white);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--black);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--grey);
  border-radius: 5px;
  font-size: 16px;
  font-family: var(--font-family);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.form-check input {
  width: auto;
}

.form-check label {
  margin-bottom: 0;
  font-weight: 400;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.alert {
  padding: 16px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.alert-success {
  background-color: #28a745;
  color: var(--white);
}

.alert-error {
  background-color: #dc3545;
  color: var(--white);
}

.alert-info {
  background-color: var(--brand);
  color: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--grey);
}

th {
  background-color: var(--brand);
  color: var(--white);
  font-weight: 500;
}

tr:hover {
  background-color: var(--background);
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.badge-primary {
  background-color: var(--brand);
  color: var(--white);
}

.badge-secondary {
  background-color: var(--grey);
  color: var(--black);
}

.actions {
  display: flex;
  gap: 8px;
}

.actions a,
.actions button {
  font-size: 14px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 28px;
  }
  
  h2 {
    font-size: 22px;
  }
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--grey);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--brand);
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radio-option input,
.checkbox-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}

.required::after {
  content: ' *';
  color: var(--brand);
}

.info-text {
  background-color: var(--background);
  padding: 16px;
  border-radius: 5px;
  border-left: 4px solid var(--brand);
  margin-bottom: 20px;
}

.info-text p {
  margin: 0;
}

.form-header {
  text-align: center;
  margin-bottom: 32px;
}

.form-header h1 {
  font-size: 42px;
  margin-bottom: 16px;
}

.form-header p {
  font-size: 18px;
  color: #666;
}

.form-header .logo {
  display: block;
  margin-bottom: 24px;
}

.form-header .logo img {
  height: 60px;
}

.checkbox-required-notice {
  font-size: 12px;
  color: var(--brand);
  margin-top: 4px;
}

.ql-toolbar {
  border-color: var(--grey) !important;
}

.ql-container {
  border-color: var(--grey) !important;
  font-family: var(--font-family) !important;
}

.ql-editor {
  min-height: 150px;
}

.ql-snow .ql-stroke {
  stroke: var(--brand);
}

.ql-snow .ql-fill {
  fill: var(--brand);
}

.ql-snow .ql-picker {
  color: var(--black);
}

.question-order-btn {
  padding: 4px 8px;
  margin-right: 4px;
  font-size: 14px;
}
