:root {
  --textractor-ink: #0f1419;
  --textractor-muted: #6b7280;
  --textractor-line: rgba(0, 0, 0, 0.08);
  --textractor-panel: #ffffff;
  --textractor-accent: #f59e0b;
  --textractor-accent-2: #0891b2;
  --textractor-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --textractor-soft-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --textractor-work-bg: #f6f8fb;
}

body.textractor-shell {
  background: var(--textractor-work-bg);
  color: var(--textractor-ink);
  min-height: 100vh;
}

.textractor-skip-link {
  background: var(--textractor-panel);
  border-radius: 0 0 12px 12px;
  box-shadow: var(--textractor-shadow);
  color: var(--textractor-ink);
  font-weight: 800;
  left: 1rem;
  padding: 0.7rem 1rem;
  position: absolute;
  top: -4rem;
  z-index: 2000;
}

.textractor-skip-link:focus {
  top: 0;
}

.textractor-shell-header {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--textractor-line);
  border-radius: 16px;
  box-shadow: var(--textractor-shadow);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: clamp(0.7rem, 1.4vw, 1.25rem) auto 0;
  max-width: min(1880px, calc(100vw - 1.5rem));
  padding: 0.7rem;
}

.textractor-shell-brand {
  align-items: center;
  color: var(--textractor-ink);
  display: inline-flex;
  gap: 0.75rem;
  min-width: 0;
  text-decoration: none;
}

.textractor-shell-brand:hover {
  color: var(--textractor-ink);
}

.textractor-shell-brand img {
  background: var(--textractor-panel);
  border: 1px solid var(--textractor-line);
  border-radius: 12px;
  height: 52px;
  object-fit: contain;
  padding: 0.45rem;
  width: 52px;
}

.textractor-shell-brand span {
  display: grid;
  line-height: 1.05;
  min-width: 0;
}

.textractor-shell-brand strong {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.textractor-shell-brand small {
  color: var(--textractor-muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.22rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.textractor-shell-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.textractor-shell-nav a {
  align-items: center;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(25, 43, 35, 0.1);
  border-radius: 999px;
  color: var(--textractor-ink);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.textractor-shell-nav a:hover {
  background: #ffffff;
  border-color: rgba(15, 107, 79, 0.24);
  color: var(--textractor-accent-2);
  transform: translateY(-1px);
}

.textractor-shell-user {
  align-items: center;
  display: inline-flex;
}

.textractor-shell-user-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(8, 145, 178, 0.22);
  border-radius: 999px;
  color: var(--textractor-ink);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 0.45rem;
  max-width: 16rem;
  min-height: 2.7rem;
  padding: 0.65rem 0.85rem;
}

.textractor-shell-user-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.textractor-shell-login {
  background: var(--textractor-ink) !important;
  border-color: var(--textractor-ink) !important;
  color: #ffffff !important;
}

.textractor-shell-login:hover {
  background: #1f2937 !important;
  border-color: #1f2937 !important;
  color: #ffffff !important;
}

.textractor-shell-main {
  margin: 0 auto;
  max-width: min(1900px, 100%);
  padding: clamp(0.75rem, 1.4vw, 1.25rem) clamp(0.75rem, 1.8vw, 1.5rem) 2rem;
  width: 100%;
}

.textractor-shell .textractor-index-container,
.textractor-shell .textractor-prepare-container,
.textractor-shell .textractor-fix-container {
  margin-left: auto;
  margin-right: auto;
}

.textractor-shell .textractor-index-container {
  max-width: min(1760px, calc(100vw - 1.5rem));
}

.textractor-shell .textractor-index-container {
  --textractor-home-panel: #ffffff;
  --textractor-home-soft: #f6f7f4;
  --textractor-home-line: #d9ded6;
  --textractor-home-ink: #202820;
  --textractor-home-muted: #5f6a61;
}

.textractor-shell .textractor-header,
.textractor-shell .textractor-controls,
.textractor-shell .upload-card,
.textractor-shell .document-panel,
.textractor-shell .document-card {
  border-color: var(--textractor-line);
  box-shadow: var(--textractor-shadow);
}

.textractor-shell .textractor-header,
.textractor-shell .textractor-index-header,
.textractor-shell .prepare-header {
  background: var(--textractor-home-panel, #ffffff);
  border: 1px solid var(--textractor-line);
}

.textractor-shell .textractor-index-header,
.textractor-shell .prepare-header {
  border-radius: 12px;
  box-shadow: var(--textractor-soft-shadow);
}

.textractor-shell .upload-card,
.textractor-shell .documents-section,
.textractor-shell .document-panel,
.textractor-shell .page-selector-container,
.textractor-shell .textractor-controls {
  border-radius: 10px;
}

.textractor-home-grid {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.textractor-workspace-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

.textractor-kpi {
  align-items: center;
  background: var(--textractor-home-soft);
  border: 1px solid var(--textractor-home-line);
  border-radius: 999px;
  color: var(--textractor-home-muted);
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 800;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
}

.textractor-upload-toolbar {
  align-items: center;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 0.35fr);
}

.textractor-file-drop {
  background: var(--textractor-home-soft);
  border: 1px dashed #aeb7aa;
  border-radius: 10px;
  padding: 0.85rem;
}

.textractor-file-meta {
  color: var(--textractor-muted);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.5rem;
  min-height: 1.2rem;
}

.textractor-shell .upload-form .btn-outline-primary {
  background: #ffffff;
  border-color: #cfd6ce;
  color: #435344;
  font-weight: 800;
}

.textractor-shell .upload-form .btn-check:checked + .btn-outline-primary {
  background: #edf4ed;
  border-color: #aebfaa;
  box-shadow: inset 0 0 0 1px rgba(71, 97, 75, 0.08);
  color: #335a3b;
}

.textractor-shell .upload-form .btn-outline-primary:hover {
  background: #f4f7f2;
  border-color: #aebfaa;
  color: #335a3b;
}

.textractor-shell .upload-form .modern-file-input {
  background: #ffffff;
  border-color: #cfd6ce;
}

.textractor-shell .upload-form .modern-file-input:hover,
.textractor-shell .upload-form .modern-file-input:focus,
.textractor-shell .upload-form .modern-select:focus {
  border-color: #9faa9e;
  box-shadow: 0 0 0 3px rgba(36, 49, 38, 0.08);
}

.textractor-shell .upload-form .accordion-button {
  background: #f7f8f5;
  border-color: #d9ded6;
  color: #435344;
  font-size: 0.92rem;
  padding: 0.72rem 0.9rem;
}

.textractor-shell .upload-form .accordion-button:not(.collapsed) {
  background: #edf4ed;
  border-color: #b8c8b3;
  box-shadow: none;
  color: #335a3b;
}

.textractor-shell .upload-form .accordion-body {
  background: #fbfcfa;
  border-color: #d9ded6;
}

.textractor-shell .upload-form .form-group.mt-4 {
  display: flex;
  justify-content: flex-end;
}

.textractor-shell .upload-form .upload-button {
  background: #5c8065;
  border-color: #5c8065;
  border-radius: 8px;
  box-shadow: none;
  color: #ffffff;
  font-size: 0.98rem;
  min-height: 2.55rem;
  padding: 0.55rem 1rem;
  width: auto;
}

.textractor-shell .upload-form .upload-button:hover {
  background: #4e7057;
  border-color: #4e7057;
  box-shadow: none;
  transform: none;
}

.textractor-shell .documents-section {
  padding: 1.25rem;
}

.textractor-shell .upload-card {
  padding: 1.25rem;
}

.textractor-panel-heading {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
}

.textractor-shell .upload-card-title,
.textractor-shell .documents-section-title {
  align-items: center;
  border-bottom: 0;
  display: flex;
  font-size: 1.05rem;
  gap: 0.55rem;
  margin-bottom: 0;
  padding-bottom: 0;
}

.textractor-section-count {
  align-items: center;
  background: var(--textractor-home-soft);
  border: 1px solid var(--textractor-home-line);
  border-radius: 999px;
  color: var(--textractor-home-muted);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 850;
  justify-content: center;
  line-height: 1;
  min-width: 2rem;
  padding: 0.38rem 0.58rem;
}

.textractor-documents-shell {
  min-width: 0;
}

.textractor-documents-toolbar {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.textractor-document-search {
  align-items: center;
  background: var(--textractor-home-soft);
  border: 1px solid var(--textractor-home-line);
  border-radius: 8px;
  color: var(--textractor-home-muted);
  display: flex;
  flex: 1 1 22rem;
  gap: 0.5rem;
  margin: 0;
  max-width: 42rem;
  min-height: 2.45rem;
  padding: 0 0.75rem;
}

.textractor-document-search input {
  background: transparent;
  border: 0;
  color: var(--textractor-home-ink);
  flex: 1 1 auto;
  min-width: 0;
  outline: 0;
}

.textractor-document-list-controls {
  align-items: center;
  color: var(--textractor-home-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.85rem;
  font-weight: 800;
  gap: 0.55rem;
  justify-content: flex-end;
}

.textractor-document-list-controls label {
  align-items: center;
  display: inline-flex;
  gap: 0.4rem;
  margin: 0;
}

.textractor-document-list-controls select {
  background: #ffffff;
  border: 1px solid var(--textractor-home-line);
  border-radius: 7px;
  color: var(--textractor-home-ink);
  font-weight: 800;
  min-height: 2rem;
  padding: 0.2rem 0.45rem;
}

.textractor-document-list {
  border: 1px solid var(--textractor-home-line);
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

.textractor-document-item {
  align-items: center;
  background: #ffffff;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 4.7rem;
  padding: 0.75rem 0.9rem;
  width: 100%;
}

.textractor-document-item + .textractor-document-item {
  border-top: 1px solid var(--textractor-home-line);
}

.textractor-document-item:hover {
  background: #fbfcfa;
}

.textractor-document-cell {
  min-width: 0;
}

.textractor-document-row-title {
  align-items: center;
  color: var(--textractor-home-ink);
  display: flex;
  gap: 0.45rem;
  line-height: 1.25;
  min-width: 0;
}

.textractor-document-row-title .fa-check-circle {
  color: #3d6f54;
}

.textractor-document-row-title .fa-circle {
  color: #9aa39a;
  font-size: 0.48rem;
}

.textractor-document-row-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.textractor-document-meta-line {
  color: var(--textractor-home-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.45rem 0.75rem;
  margin-top: 0.3rem;
}

.textractor-document-meta-line span {
  align-items: center;
  display: inline-flex;
  gap: 0.3rem;
  min-width: 0;
}

.textractor-document-meta-line i {
  color: #8b958b;
}

.textractor-document-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.textractor-state-pill {
  align-items: center;
  background: var(--textractor-home-soft);
  border: 1px solid var(--textractor-home-line);
  border-radius: 999px;
  color: var(--textractor-home-muted);
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.24rem 0.45rem;
  text-transform: uppercase;
}

.textractor-state-pill.is-done {
  background: #edf5ef;
  border-color: #c8d8ca;
  color: #3d6f54;
}

.textractor-state-pill.is-shared {
  background: #f1f2ef;
  border-color: #d7dbd2;
  color: #5c665d;
}

.textractor-document-actions {
  display: inline-flex;
  gap: 0.35rem;
  justify-content: flex-end;
  white-space: nowrap;
}

.textractor-action-btn {
  align-items: center;
  appearance: none;
  background: #ffffff;
  border: 1px solid #cfd6ce;
  border-radius: 6px;
  color: var(--textractor-home-ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 0.35rem;
  height: 2rem;
  justify-content: center;
  line-height: 1;
  min-width: 2rem;
  padding: 0 0.55rem;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.textractor-action-btn:hover {
  background: var(--textractor-home-soft);
  border-color: #9faa9e;
  color: var(--textractor-home-ink);
  text-decoration: none;
}

.textractor-action-btn.is-primary {
  background: #243126;
  border-color: #243126;
  color: #ffffff;
}

.textractor-action-btn.is-primary:hover {
  background: #354237;
  border-color: #354237;
  color: #ffffff;
}

.textractor-action-btn.is-danger {
  color: #9f3a32;
}

.textractor-action-btn.is-danger:hover {
  background: #f8eeee;
  border-color: #e6c7c4;
  color: #84251f;
}

.textractor-empty-state {
  align-items: center;
  background: var(--textractor-home-soft);
  border: 1px dashed #cfd6ce;
  border-radius: 8px;
  color: var(--textractor-home-muted);
  display: flex;
  font-weight: 800;
  gap: 0.5rem;
  justify-content: center;
  min-height: 8rem;
}

.textractor-list-empty {
  align-items: center;
  background: var(--textractor-home-soft);
  border: 1px dashed #cfd6ce;
  border-radius: 8px;
  color: var(--textractor-home-muted);
  display: flex;
  gap: 0.5rem;
  font-weight: 800;
  justify-content: center;
  margin-top: 0.75rem;
  min-height: 5rem;
}

.textractor-list-pagination {
  align-items: center;
  color: var(--textractor-home-muted);
  display: flex;
  font-size: 0.85rem;
  font-weight: 800;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.textractor-list-page-btn {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--textractor-home-line);
  border-radius: 7px;
  color: var(--textractor-home-ink);
  display: inline-flex;
  font-weight: 800;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.3rem 0.65rem;
}

.textractor-list-page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.textractor-list-page-btn:not(:disabled):hover {
  background: var(--textractor-home-soft);
  border-color: #9faa9e;
}

.textractor-document-status {
  white-space: nowrap;
}

.prepare-workbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--textractor-line);
  border-radius: 10px;
  box-shadow: var(--textractor-soft-shadow);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
}

.prepare-workbar-status {
  color: #475569;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 800;
}

.prepare-count {
  align-items: center;
  background: #f1f5f9;
  border-radius: 999px;
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
}

.textractor-shell .document-panel {
  height: calc(100vh - 220px);
}

.textractor-shell .document-panel-header {
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
}

.document-panel-meta {
  color: var(--textractor-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 0.5rem;
}

.document-panel-meta span {
  background: #f8fafc;
  border: 1px solid var(--textractor-line);
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
}

.textractor-shell .modern-prepare-table {
  font-size: 0.82rem;
}

.textractor-shell .modern-prepare-table tbody td {
  padding: 0.45rem 0.55rem;
  vertical-align: top;
}

.textractor-shell .cell-content {
  max-width: 44rem;
  white-space: normal;
}

.textractor-shell .language-columns {
  align-items: flex-start;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-left: 0;
  margin-right: 0;
}

.textractor-shell .language-column {
  border: 1px solid var(--textractor-line);
  border-radius: 10px;
  box-shadow: var(--textractor-soft-shadow);
  min-width: 0;
  padding: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.textractor-shell .language-column.col-deu {
  background: linear-gradient(180deg, #ffe2e2 0%, #fff7f7 100%);
}

.textractor-shell .language-column.col-ita {
  background: linear-gradient(180deg, #fff6a8 0%, #fffdf0 100%);
}

.textractor-shell .language-column.col-eng {
  background: linear-gradient(180deg, #b8ddff 0%, #f3f9ff 100%);
}

.textractor-shell .language-column.col-lavb {
  background: linear-gradient(180deg, #b9dfbd 0%, #f4fbf5 100%);
}

.textractor-shell .language-column.col-lagh {
  background: linear-gradient(180deg, #c9f7bd 0%, #f6fff4 100%);
}

.textractor-shell .language-column.col-trash {
  background: linear-gradient(180deg, #e5e7eb 0%, #f8fafc 100%);
}

.textractor-shell .language-column-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(6px);
  border: 0;
  border-bottom: 1px solid var(--textractor-line);
  border-radius: 10px 10px 0 0;
  box-shadow: none;
  cursor: default;
  display: grid;
  gap: 0.4rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin: 0;
  min-height: 2.55rem;
  padding: 0.45rem 0.55rem;
  position: relative;
  user-select: none;
}

.textractor-shell .language-column-header:hover {
  border-bottom-color: var(--textractor-line);
  box-shadow: none;
  filter: none;
  transform: none;
}

.textractor-shell .lang-badge {
  align-items: center;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 999px;
  color: #1f2937;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0.08em;
  line-height: 1;
  min-width: 3.2rem;
  padding: 0.28rem 0.52rem;
  text-transform: uppercase;
  width: fit-content;
}

.textractor-shell .lang-controls {
  align-items: center;
  display: inline-flex;
  gap: 0.25rem;
}

.textractor-shell .lang-state-btn,
.textractor-shell .collapse-toggle-btn {
  align-items: center;
  appearance: none;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 6px;
  color: #475569;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.72rem;
  height: 1.65rem;
  justify-content: center;
  line-height: 1;
  margin: 0;
  padding: 0;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  width: 1.65rem;
}

.textractor-shell .lang-state-btn:hover,
.textractor-shell .collapse-toggle-btn:hover {
  background: #ffffff;
  border-color: #94a3b8;
  color: #0f172a;
}

.textractor-shell .lang-state-btn:focus-visible,
.textractor-shell .collapse-toggle-btn:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.textractor-shell .lang-state-btn.is-checked {
  background: #dcfce7;
  border-color: #86efac;
  color: #047857;
}

.textractor-shell .lang-state-btn.is-locked {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.textractor-shell .collapse-toggle-btn {
  z-index: 1;
}

.textractor-shell .collapse-icon {
  color: currentColor;
  font-size: 0.7rem;
}

.textractor-shell .language-column.column-collapsed .language-column-header {
  display: flex;
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.textractor-shell .portlet-column {
  padding: 0.65rem;
}

.textractor-shell .portlet {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: none;
  margin-bottom: 0.6rem;
  overflow: hidden;
  scroll-margin-top: 9rem;
}

.textractor-shell .portlet.is-row-peer {
  border-color: rgba(8, 145, 178, 0.65);
  box-shadow: 0 0 0 2px rgba(8, 145, 178, 0.12);
}

.textractor-shell .portlet-pad {
  color: #0e7490;
}

.textractor-shell .portlet-pad:hover {
  background: #ecfeff;
  color: #155e75;
}

.textractor-shell .portlet span {
  cursor: inherit;
  font-weight: inherit;
  margin-right: 0;
  padding: 0;
}

.textractor-shell .portlet-header {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 8px 8px 0 0;
  gap: 0.25rem;
  min-height: 1.65rem;
  padding: 0.18rem 0.35rem;
}

.textractor-shell .portlet .position-label {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  margin-right: 0.25rem;
  padding: 0;
  cursor: default;
}

.textractor-shell .portlet .portlet-toggle {
  cursor: pointer;
  flex: 0 0 auto;
  margin-right: auto;
  padding: 0;
}

.textractor-shell .portlet .portlet-action {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  height: 1.35rem;
  justify-content: center;
  line-height: 1;
  margin-right: 0;
  min-width: 1.35rem;
  padding: 0;
  width: 1.35rem;
}

.textractor-shell .portlet-content {
  color: #1f2937;
  font-size: 0.9rem;
  line-height: 1.45;
  min-height: 4.25rem;
  overflow-wrap: anywhere;
}

.textractor-shell .page-selector-container {
  padding: 0.75rem;
}

.textractor-shell .page-selector-scroll {
  margin: 0;
  padding: 0.1rem 0 0.35rem;
}

.textractor-shell .page-selector-buttons {
  display: flex;
  gap: 0.35rem;
}

.textractor-shell .group-button {
  align-items: center;
  aspect-ratio: auto;
  border-radius: 7px;
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 800;
  height: 2rem;
  justify-content: center;
  line-height: 1;
  min-width: 2.35rem;
  padding: 0 0.6rem;
  transform: none !important;
}

.textractor-shell .group-button.active {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}

.textractor-shell .btn-primary {
  background: linear-gradient(135deg, var(--textractor-accent-2), #164d3e);
  border-color: transparent;
}

.textractor-shell .btn-success {
  background: linear-gradient(135deg, #157255, #104b3b);
  border-color: transparent;
}

.textractor-shell-footer {
  align-items: center;
  border-top: 1px solid var(--textractor-line);
  color: var(--textractor-muted);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: min(1880px, calc(100vw - 1.5rem));
  padding: 1.25rem 0 1.5rem;
}

.textractor-shell-footer a {
  color: var(--textractor-accent-2);
  font-weight: 800;
  text-decoration: none;
}

.textractor-shell-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 780px) {
  .textractor-shell-header {
    align-items: stretch;
    border-radius: 20px;
    flex-direction: column;
    position: static;
  }

  .textractor-shell-nav {
    justify-content: stretch;
  }

  .textractor-shell-nav a {
    flex: 1 1 auto;
    justify-content: center;
  }

  .textractor-shell-user,
  .textractor-shell-user-button {
    flex: 1 1 auto;
    justify-content: center;
    max-width: none;
  }

  .textractor-shell-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .textractor-home-grid,
  .textractor-upload-toolbar {
    grid-template-columns: 1fr;
  }

  .textractor-documents-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .textractor-document-search {
    max-width: none;
    width: 100%;
  }

  .textractor-document-list-controls {
    justify-content: space-between;
  }

  .textractor-document-item {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .textractor-document-actions {
    justify-content: flex-start;
  }

  .textractor-action-btn span {
    display: none;
  }

  .prepare-workbar {
    align-items: stretch;
    flex-direction: column;
    position: static;
  }

  .textractor-shell .document-panel {
    height: 70vh;
  }
}
