:root {
  --app-bg: #efe7da;
  --app-surface: #fffdf9;
  --app-ink: #24303a;
  --app-muted: #6f7b85;
  --app-accent: #305f72;
  --app-accent-strong: #21424f;
  --app-border: #d9d2c5;
}

body {
  background: linear-gradient(180deg, #f7f2e8 0%, var(--app-bg) 100%);
  color: var(--app-ink);
}

.sidebar {
  width: 280px;
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: blur(10px);
}

.brand {
  color: var(--app-ink);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.menu-label {
  color: var(--app-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.menu-link {
  display: block;
  padding: 0.8rem 1rem;
  margin-bottom: 0.35rem;
  border-radius: 0.85rem;
  color: var(--app-ink);
  text-decoration: none;
}

.menu-link:hover,
.menu-link.active {
  background: var(--app-accent);
  color: #fff;
}

.menu-foldout {
  border-radius: 0.85rem;
  margin-bottom: 0.5rem;
  padding: 0.15rem 0.35rem;
}

.menu-foldout summary {
  list-style: none;
  cursor: pointer;
}

.menu-foldout summary::-webkit-details-marker {
  display: none;
}

.menu-submenu {
  margin-top: 0.35rem;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(36, 48, 58, 0.08);
}

.menu-link.menu-sublink {
  padding-left: 1.5rem;
  font-size: 0.95rem;
}

.page-header {
  background: rgba(255, 253, 249, 0.7);
}

.card,
.table {
  background: var(--app-surface);
}

.table thead th {
  color: var(--app-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-outline-secondary {
  border-color: var(--app-border);
}

.document-dropzone {
  border: 2px dashed var(--app-border);
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.95), rgba(245, 239, 228, 0.95));
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.document-dropzone:hover,
.document-dropzone.is-dragover {
  border-color: var(--app-accent);
  background: linear-gradient(180deg, rgba(233, 243, 247, 0.95), rgba(242, 248, 250, 0.95));
  transform: translateY(-1px);
}

.record-picker {
  border: 1px solid var(--app-border);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(255, 253, 249, 0.75);
}

.record-picker__option {
  cursor: pointer;
  background: rgba(255, 253, 249, 0.8);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.record-picker__option:hover {
  border-color: var(--app-accent);
  transform: translateY(-1px);
}

.record-picker__option.is-selected {
  border-color: var(--app-accent);
  background: rgba(233, 243, 247, 0.8);
}

.record-picker__options {
  max-height: 18rem;
  overflow-y: auto;
}

.required-indicator {
  font-weight: 600;
  cursor: help;
}

.status-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  display: inline-block;
  background: var(--app-border);
}

.status-dot[data-status="active"] {
  background: #198754;
}

.status-dot[data-status="draft"] {
  background: #ffc107;
}

.status-dot[data-status="closed"] {
  background: #6c757d;
}

.status-dot[data-status="all"],
.status-dot[data-status=""] {
  background: #b5b5b5;
}

@media (max-width: 991.98px) {
  .sidebar {
    width: 100%;
  }
}
