:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --border: #dbe5f0;
  --border-strong: #b8c8d9;
  --text: #0f172a;
  --text-soft: #5f6f82;
  --text-faint: #90a0b2;
  --brand: #0f9f74;
  --brand-strong: #0a7e5b;
  --brand-soft: #ddfff2;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --info: #2563eb;
  --info-soft: #dbeafe;
  --success: #047857;
  --success-soft: #d1fae5;
  --neutral-soft: #e2e8f0;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
  --font: Inter, "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 159, 116, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.08), transparent 22%),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

input:focus,
select:focus,
button:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 159, 116, 0.16);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.is-hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.mono {
  font-family: var(--mono);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.72rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-strong);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--panel-soft);
}

.btn-sm {
  min-height: 36px;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-soft);
  cursor: pointer;
}

.icon-button:hover:not(:disabled) {
  background: var(--panel-soft);
  color: var(--text);
}

.icon-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-info {
  background: var(--info-soft);
  color: var(--info);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-neutral {
  background: var(--neutral-soft);
  color: #475569;
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(184, 200, 217, 0.65);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.shell-header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-strong);
  background: linear-gradient(135deg, var(--brand-soft), #f0fdf4);
  box-shadow: inset 0 0 0 1px rgba(15, 159, 116, 0.12);
}

.brand-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.1;
}

.shell-nav {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
}

.nav-link {
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  color: var(--text-soft);
  font-weight: 600;
}

.nav-link:hover,
.nav-link.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.shell-userbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.project-chip {
  padding: 0.48rem 0.75rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.38rem 0.7rem 0.38rem 0.42rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
}

.user-avatar,
.table-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  color: #0f172a;
  font-weight: 800;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.user-name {
  font-size: 0.92rem;
  font-weight: 700;
}

.user-role {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.page-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.5rem;
}

.hero-card,
.card,
.auth-card,
.auth-hero,
.modal-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(184, 200, 217, 0.65);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero-card {
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.hero-card-split {
  align-items: center;
}

.hero-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.08;
}

.hero-copy {
  max-width: 680px;
  margin: 0;
  color: var(--text-soft);
}

.hero-side {
  min-width: 280px;
}

.field-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-soft);
}

.select-wrap {
  min-width: 0;
}

.select-control.small-select {
  min-width: 150px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 1.25rem;
}

.card {
  padding: 1.25rem;
}

.card-stretch {
  min-height: 520px;
}

.summary-card {
  margin-bottom: 1.1rem;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fffc, #f3f7fb);
  border: 1px solid rgba(184, 200, 217, 0.8);
}

.summary-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-label {
  margin: 0 0 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.summary-value {
  margin: 0;
  color: var(--text);
  word-break: break-all;
}

.summary-stats {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.summary-stat-number {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
}

.summary-stat-label {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head.compact-head {
  margin-bottom: 0.8rem;
}

.section-head-split {
  align-items: center;
}

.section-title {
  margin: 0;
  font-size: 1.15rem;
}

.drop-zone {
  padding: 1.8rem 1.25rem;
  border: 2px dashed var(--border-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f9fcff);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.drop-zone:hover,
.drop-zone.is-dragover {
  border-color: var(--brand);
  transform: translateY(-1px);
  background: #fbfffd;
}

.drop-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 0.85rem;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.drop-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.drop-subtitle,
.drop-meta,
.empty-copy,
.table-subtle,
.queue-meta,
.doc-meta {
  color: var(--text-soft);
}

.drop-link {
  color: var(--brand-strong);
  font-weight: 700;
}

.drop-zone input {
  display: none;
}

.ingest-stack {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.ingest-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 0.75rem;
}

.ingest-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: center;
}

.text-area {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  resize: vertical;
  min-height: 92px;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.text-area:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 159, 116, 0.16);
}

.queue-list,
.doc-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.doc-list {
  position: relative;
}

.queue-item,
.doc-row {
  padding: 0.95rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
}

.queue-top,
.doc-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
}

.doc-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  padding: 0.78rem 0.88rem;
  border-radius: 14px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.doc-row:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.doc-row.is-selected {
  border-color: rgba(15, 159, 116, 0.32);
  background: linear-gradient(180deg, #ffffff, #f6fffb);
}

.doc-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.doc-center {
  min-width: 0;
}

.doc-right {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.queue-main,
.doc-main {
  min-width: 0;
}

.doc-name {
  font-size: 0.95rem;
}

.doc-meta-line {
  margin: 0.28rem 0 0;
  color: var(--text-soft);
  font-size: 0.79rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-name,
.doc-name {
  margin: 0;
  font-weight: 700;
  word-break: break-word;
}

.queue-meta-row,
.doc-meta-row,
.button-row,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.file-token,
.doc-token {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.doc-token {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #334155;
  background: linear-gradient(180deg, #f8fbff, #edf4fb);
}

.doc-status-stack {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.26rem 0.54rem;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
}

.status-assigned {
  background: var(--success-soft);
  color: var(--success);
}

.status-neutral {
  background: #f3f6fa;
  color: #4b5e72;
}

.status-folder {
  background: #e8f2ff;
  color: #295ea8;
}

.status-outside {
  background: var(--warning-soft);
  color: var(--warning);
}

.doc-menu-wrap {
  position: relative;
}

.doc-menu-button {
  width: 34px;
  height: 34px;
}

.doc-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 25;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 0.3rem;
  display: none;
  gap: 0.2rem;
}

.doc-menu-wrap.is-open .doc-menu {
  display: grid;
}

.doc-menu[hidden] {
  display: none !important;
}

.doc-menu-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 9px;
  padding: 0.34rem 0.5rem;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.2;
}

.doc-menu-item svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.doc-menu-item:hover:not(:disabled) {
  background: var(--panel-soft);
}

.doc-menu-item-danger {
  color: var(--danger);
}

.doc-menu-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.queue-uploading {
  border-color: #93c5fd;
}

.queue-done {
  border-color: #86efac;
}

.queue-error {
  border-color: #fca5a5;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e7eef5;
  margin-top: 0.85rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #38bdf8);
}

.toolbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.toolbar-grid-users {
  align-items: center;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.search-field input {
  border: 0;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}

.filter-chip {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-soft);
  font-weight: 700;
  cursor: pointer;
}

.filter-chip.is-active {
  border-color: rgba(15, 159, 116, 0.22);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.bulk-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #effcf5, #f9fffc);
  border: 1px solid rgba(15, 159, 116, 0.2);
  position: sticky;
  top: 72px;
  z-index: 8;
}

.bulk-bar .button-row {
  gap: 0.38rem;
}

.bulk-bar .btn {
  min-height: 32px;
  padding: 0.42rem 0.68rem;
  font-size: 0.82rem;
}

.bulk-count {
  font-weight: 700;
  color: var(--brand-strong);
}

.doc-row-assigned {
  border-color: rgba(15, 159, 116, 0.2);
  background: linear-gradient(180deg, #ffffff, #f8fffc);
}

.doc-checkbox-wrap {
  display: inline-flex;
}

.doc-checkbox-wrap input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}

.doc-row-skeleton {
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  pointer-events: none;
}

.skeleton-box {
  background: linear-gradient(100deg, #edf3f9 30%, #f8fbff 45%, #edf3f9 60%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: skeletonPulse 1.1s linear infinite;
}

.skeleton-check {
  width: 20px;
  height: 20px;
}

.skeleton-icon {
  width: 36px;
  height: 36px;
}

.skeleton-main {
  display: grid;
  gap: 0.4rem;
}

.skeleton-line-lg {
  width: min(360px, 62vw);
  height: 14px;
}

.skeleton-line-sm {
  width: min(220px, 46vw);
  height: 10px;
}

.skeleton-chip {
  width: 90px;
  height: 24px;
}

.skeleton-action {
  width: 34px;
  height: 34px;
}

.loading-state,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 220px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.8);
  text-align: center;
  padding: 1.5rem;
}

.loading-state {
  flex-direction: row;
  gap: 0.65rem;
  color: var(--text-soft);
}

.empty-icon {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: var(--text-soft);
  background: #fff;
  border: 1px solid var(--border);
}

.empty-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  animation: spin 0.7s linear infinite;
}

.table-wrap {
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 1rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}

.data-table th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.table-user-cell {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.table-strong {
  font-weight: 700;
}

.table-project-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.auth-page {
  display: grid;
  min-height: 100vh;
}

.auth-layout {
  max-width: 1180px;
  margin: auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 460px);
  gap: 1.25rem;
}

.auth-hero,
.auth-card {
  padding: 2rem;
}

.auth-title {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.auth-copy,
.auth-card-copy,
.auth-help {
  color: var(--text-soft);
}

.auth-feature-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 2rem;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(184, 200, 217, 0.65);
}

.auth-feature-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--brand);
}

.auth-card {
  display: grid;
  gap: 1rem;
}

.auth-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.7rem;
}

.field-block {
  display: grid;
  gap: 0.45rem;
}

.form-error {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.15);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.25rem;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-title {
  margin: 0;
  font-size: 1.5rem;
}

.modal-form {
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-block-full {
  grid-column: 1 / -1;
}

.project-picker {
  padding: 1rem;
  border-radius: 16px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
}

.project-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.checkbox-card {
  display: flex;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  cursor: pointer;
}

.checkbox-card input {
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
  accent-color: var(--brand);
}

.checkbox-card-title {
  display: block;
  font-weight: 700;
}

.checkbox-card-subtitle {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: grid;
  gap: 0.6rem;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: #fff;
  color: var(--text);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.toast-out {
  opacity: 0;
  transform: translateY(8px);
}

.toast-info {
  border-color: rgba(37, 99, 235, 0.14);
  background: #eff6ff;
}

.toast-success {
  border-color: rgba(4, 120, 87, 0.14);
  background: #ecfdf5;
}

.toast-warning {
  border-color: rgba(180, 83, 9, 0.14);
  background: #fffbeb;
}

.toast-error {
  border-color: rgba(220, 38, 38, 0.14);
  background: #fef2f2;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes skeletonPulse {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1120px) {
  .shell-header-inner,
  .hero-card,
  .dashboard-grid,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .shell-header-inner {
    justify-items: start;
  }

  .shell-nav,
  .shell-userbar {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .page-shell,
  .shell-header-inner,
  .auth-layout {
    padding: 1rem;
  }

  .summary-grid,
  .summary-stats,
  .form-grid,
  .toolbar-grid {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .card,
  .auth-card,
  .auth-hero,
  .modal-panel {
    padding: 1rem;
  }

  .button-row,
  .shell-userbar,
  .filter-row {
    width: 100%;
  }

  .bulk-bar {
    top: 62px;
    align-items: stretch;
  }

  .bulk-bar .button-row {
    width: 100%;
  }

  .doc-row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "left center actions"
      "left status status";
    align-items: start;
  }

  .doc-left {
    grid-area: left;
  }

  .doc-center {
    grid-area: center;
  }

  .doc-right {
    grid-area: actions;
    justify-content: flex-end;
    align-self: start;
    display: flex;
    flex-direction: column;
    align-items: end;
  }

  .doc-status-stack {
    width: 100%;
    justify-content: flex-start;
    margin-top: 0.4rem;
  }

  .doc-menu {
    right: 0;
    left: auto;
    min-width: 170px;
  }

  .button-row > * {
    flex: 1 1 auto;
  }

  .data-table thead {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
  }

  .data-table td {
    padding: 0.35rem 0;
    border: 0;
  }
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.lang-btn {
  min-height: 32px;
  min-width: 44px;
  padding: 0.3rem 0.65rem;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.lang-btn:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.lang-btn.is-active,
.lang-btn[aria-pressed="true"] {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-color: rgba(15, 159, 116, 0.35);
  box-shadow: inset 0 0 0 1px rgba(15, 159, 116, 0.16);
}

.login-lang-bar {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  z-index: 50;
}
