* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f5f6f8;
  color: #1f2933;
}

.guest-body {
  background: #f5f6f8;
}

.guest-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.guest-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 32px 36px;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
  max-width: 420px;
  text-align: left;
}

.guest-card h1 {
  margin: 0 0 12px;
  font-size: 28px;
}

.guest-translate {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.15);
  z-index: 10;
}

.guest-translate--hidden {
  display: none;
}

.guest-translate__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.guest-translate__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.guest-translate__close {
  border: none;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.guest-translate__toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: none;
  border: none;
  background: #111827;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.15);
  z-index: 10;
}

.guest-translate__toggle--visible {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #111827;
  color: #f9fafb;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  gap: 24px;
}

.sidebar__brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar__link {
  text-decoration: none;
  color: #cbd5f5;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar__link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar__link--active {
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
}

.sidebar__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.sidebar__logout {
  text-decoration: none;
  color: #93c5fd;
}

.content {
  padding: 32px 40px 48px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #6b7280;
  margin: 0 0 8px;
}

.subtitle {
  color: #6b7280;
  margin: 8px 0 0;
  max-width: 480px;
}

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

.grid + .grid {
  margin-top: 20px;
}

.page-section {
  margin-top: 32px;
}

.page-section__header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.table-wrapper {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

.data-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.table-input,
.table-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.table-status {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
}

.dropzone {
  border: 2px dashed #cbd5f5;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  background: #f8fafc;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone--active {
  border-color: #2563eb;
  background: #eef2ff;
}

.dropzone__input {
  display: none;
}

.dropzone__label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  font-size: 14px;
  color: #1f2933;
}

.dropzone__title {
  font-weight: 600;
}

.dropzone__subtitle {
  color: #6b7280;
  font-size: 13px;
}

.dropzone__filename {
  margin: 8px 0 0;
  font-size: 13px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.card--stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.definition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px 24px;
}

.definition-grid__value {
  margin: 6px 0 0;
  font-weight: 600;
  color: #111827;
}

.email-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.email-thread__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.email-thread__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.email-thread__form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.email-thread__item {
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.email-thread__item--inbound {
  border-left: 4px solid #2563eb;
}

.email-thread__item--outbound {
  border-left: 4px solid #10b981;
}

.email-thread__item--internal {
  border-left: 4px solid #f59e0b;
}

.email-thread__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 8px;
}

.email-thread__direction {
  font-weight: 600;
}

.email-thread__author {
  text-transform: none;
  letter-spacing: normal;
}

.email-thread__subject {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.email-thread__body {
  margin: 0;
  color: #1f2933;
  white-space: pre-wrap;
}

.text-link {
  padding: 0;
  border: none;
  background: none;
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
}

.card--highlight {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  min-width: 220px;
}

.card__label {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
  opacity: 0.8;
}

.card__value {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

.card__value--small {
  font-size: 18px;
  font-weight: 600;
  margin: 8px 0 0;
}

.card__meta {
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.8;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.bullet-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #6b7280;
  line-height: 1.6;
}

.form {
  margin-top: 24px;
}

.candidate-form {
  display: none;
}

.candidate-form.is-visible {
  display: block;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #4b5563;
}

.primary-button,
.secondary-button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

.primary-button {
  background: #2563eb;
  color: #ffffff;
}

.secondary-button {
  background: #e2e8f0;
  color: #1f2933;
}

.external-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  font-size: 12px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 6px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  color: #1f2933;
  text-decoration: none;
  font-size: 14px;
  background: #ffffff;
}

.icon-link:hover {
  background: #f3f4f6;
}

.icon-link-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-right: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #1f2933;
  font-size: 12px;
  font-weight: 600;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.list-item {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.list-item--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.list-item__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.muted {
  color: #6b7280;
  margin: 6px 0 0;
}

.status {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 999px;
}

.status--in-progress {
  background: #ede9fe;
  color: #6d28d9;
}

.status--pending {
  background: #fef9c3;
  color: #a16207;
}

.status--success {
  background: #dcfce7;
  color: #15803d;
}

.status--neutral {
  background: #e2e8f0;
  color: #475569;
}

.status--danger {
  background: #fee2e2;
  color: #b91c1c;
}

.public-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.public-hero {
  margin-bottom: 32px;
}

.public-title {
  margin: 0;
  font-size: 20px;
}

.public-meta {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

.public-actions {
  width: 100%;
  justify-content: flex-end;
}

.public-empty {
  text-align: center;
}
