body {
  font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  background: #f4f7fb;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(15, 118, 110, 0.16);
  color: #0f172a;
}

.panel {
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 1.5rem;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.panel-muted {
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.88));
  border-radius: 1.25rem;
}

.hero-shell {
  display: grid;
  gap: 1.5rem;
}

.compact-shell {
  gap: 0.9rem;
}

.app-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #475569;
}

.page-title {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.35rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 800;
  color: #0f172a;
}

.compact-shell .page-title {
  font-size: clamp(2rem, 4.6vw, 3.35rem);
}

.page-subtitle {
  max-width: 50rem;
  font-size: 1rem;
  line-height: 1.8;
  color: #475569;
}

.compact-shell .page-subtitle {
  font-size: 0.9rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.hero-actions-copy {
  max-width: 28rem;
}

.hero-tool-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.compact-tools {
  border-radius: 1.25rem;
}

.compact-tools .action-primary,
.compact-tools .action-secondary {
  padding: 0.76rem 1rem;
  font-size: 0.84rem;
}

.compact-tools .tool-file::file-selector-button {
  padding: 0.62rem 0.9rem;
}

.tool-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.tool-file {
  min-width: min(22rem, 100%);
  font-size: 0.92rem;
  color: #475569;
}

.tool-file::file-selector-button {
  margin-right: 0.85rem;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  padding: 0.7rem 1rem;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.tool-file::file-selector-button:hover {
  background: #020617;
}

.notice {
  border-radius: 1.1rem;
  border: 1px solid transparent;
  padding: 1rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.notice-success {
  border-color: rgba(16, 185, 129, 0.22);
  background: rgba(236, 253, 245, 0.92);
  color: #047857;
}

.notice-error {
  border-color: rgba(244, 63, 94, 0.24);
  background: rgba(255, 241, 242, 0.96);
  color: #be123c;
}

.field-label,
.filter-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #64748b;
}

.field-input {
  width: 100%;
  border: 1px solid #dbe4ee;
  background: #ffffff;
  border-radius: 1rem;
  padding: 0.88rem 1rem;
  font-size: 0.95rem;
  color: #1e293b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 22px rgba(148, 163, 184, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field-input:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.field-input-error {
  border-color: #fb7185;
}

.field-input-auto {
  border-color: rgba(16, 185, 129, 0.28);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.92), rgba(255, 255, 255, 0.96));
  color: #065f46;
}

.field-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-meta-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  background: rgba(236, 253, 245, 0.96);
  padding: 0.28rem 0.62rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #047857;
}

.field-helper-note {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #64748b;
}

.entry-form {
  border-radius: 1.25rem;
}

.entry-form form {
  width: 100%;
}

.entry-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.entry-form-kicker {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(248, 250, 252, 0.9);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #475569;
}

.entry-form-copy {
  margin-top: 0.45rem;
  max-width: 22rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #64748b;
}

.entry-form-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(248, 250, 252, 0.95);
  padding: 0.4rem 0.75rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748b;
}

.entry-section {
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
  border-radius: 1.2rem;
  padding: 1rem;
  box-shadow: 0 10px 26px rgba(148, 163, 184, 0.08);
}

.entry-section-primary {
  border-color: rgba(15, 118, 110, 0.2);
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 0.98) 54%);
}

.entry-section-timing {
  border-color: rgba(59, 130, 246, 0.16);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98) 52%);
}

.entry-section-summary {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.entry-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.entry-section-head-compact {
  margin-bottom: 0.75rem;
}

.entry-section-kicker {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0f766e;
}

.entry-section-title {
  margin: 0.18rem 0 0;
  font-size: 0.98rem;
  line-height: 1.3;
  font-weight: 800;
  color: #0f172a;
}

.entry-section-copy {
  max-width: 14rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: #64748b;
}

.entry-form .field-label {
  margin-bottom: 0.3rem;
  font-size: 0.64rem;
  letter-spacing: 0.15em;
}

.entry-form .field-input {
  border-radius: 0.85rem;
  padding: 0.72rem 0.82rem;
  font-size: 0.86rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 14px rgba(148, 163, 184, 0.06);
}

.entry-form .field-input::-webkit-outer-spin-button,
.entry-form .field-input::-webkit-inner-spin-button {
  margin: 0;
}

.entry-form .summary-card {
  padding: 0.75rem 0.85rem;
}

.entry-form .summary-card-total-value {
  font-size: 1rem;
}

.entry-form .field-meta {
  gap: 0.2rem;
}

.entry-form .field-helper-note {
  font-size: 0.72rem;
  line-height: 1.4;
}

.entry-form .field-meta-badge {
  padding: 0.22rem 0.52rem;
  font-size: 0.62rem;
}

.entry-form .action-primary,
.entry-form .action-secondary {
  padding: 0.72rem 0.9rem;
  font-size: 0.82rem;
  min-height: 2.6rem;
}

.entry-form .panel-muted {
  border-radius: 1rem;
}

.entry-form .panel-muted {
  min-height: 100%;
}

.entry-form-actions {
  margin-top: 0.25rem;
}

.summary-card {
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
  border-radius: 1.25rem;
  padding: 1rem;
  box-shadow: 0 12px 30px rgba(148, 163, 184, 0.08);
}

.summary-card-contrast {
  border-color: rgba(15, 23, 42, 0.92);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.summary-card-total {
  position: relative;
  overflow: hidden;
  border-color: rgba(15, 23, 42, 0.92);
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.2), transparent 38%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.99), rgba(30, 41, 59, 0.98) 58%, rgba(15, 118, 110, 0.94));
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2);
  color: #ffffff;
}

.summary-card-total::after {
  content: '';
  position: absolute;
  inset: auto -12% -55% auto;
  width: 8rem;
  height: 8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.summary-card-total-label {
  color: rgba(255, 255, 255, 0.82);
}

.summary-card-total-value {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(15, 23, 42, 0.45);
  letter-spacing: -0.02em;
}

.summary-card-total-copy {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.82);
}

.action-primary,
.action-secondary,
.action-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.88rem 1.2rem;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.action-primary:hover,
.action-secondary:hover,
.action-accent:hover {
  transform: translateY(-1px);
}

.action-primary {
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.action-primary:hover {
  background: #020617;
}

.action-secondary {
  border: 1px solid #dbe4ee;
  background: #ffffff;
  color: #334155;
}

.action-secondary:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.action-accent {
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.16);
}

.action-accent:hover {
  background: #115e59;
}

.table-shell {
  border-color: rgba(203, 213, 225, 0.92);
}

.compact-kpi {
  border-radius: 1.2rem;
}

.table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.table-shell .table-head {
  padding: 1rem 1.1rem 0.9rem;
  gap: 0.75rem;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: #f8fafc;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
}

.table-shell .status-pill {
  padding: 0.32rem 0.62rem;
  font-size: 0.68rem;
}

.status-pill-active {
  border-color: rgba(15, 118, 110, 0.18);
  background: rgba(240, 253, 250, 0.95);
  color: #0f766e;
}

.filter-toolbar {
  padding: 1.35rem 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.82), rgba(255, 255, 255, 0.9));
}

.table-shell .filter-toolbar {
  padding: 0.95rem 1.1rem 1rem;
}

.filter-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.compact-grid {
  gap: 0.7rem;
}

.table-shell .filter-label {
  margin-bottom: 0.28rem;
  font-size: 0.62rem;
  letter-spacing: 0.13em;
}

.table-shell .field-input {
  border-radius: 0.85rem;
  padding: 0.72rem 0.8rem;
  font-size: 0.84rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 14px rgba(148, 163, 184, 0.06);
}

.filter-field {
  display: flex;
  flex-direction: column;
}

.filter-field-wide {
  grid-column: span 2;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.table-shell .filter-actions {
  margin-top: 0.75rem;
}

.table-shell .filter-actions .action-primary,
.table-shell .filter-actions .action-secondary {
  padding: 0.72rem 0.92rem;
  font-size: 0.82rem;
}

.table-note {
  margin-top: 0.95rem;
  font-size: 0.88rem;
  color: #64748b;
}

.table-shell .table-note {
  margin-top: 0.6rem;
  font-size: 0.78rem;
}

.table-scroll {
  max-width: 100%;
}

.data-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  position: sticky;
  top: 0;
  text-align: left;
  background: rgba(248, 250, 252, 0.96);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #64748b;
}

.table-shell .data-table thead th {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
}

.table-shell .data-table thead th.text-right {
  text-align: right;
}

.data-table tbody td {
  border-bottom: 1px solid rgba(238, 242, 247, 0.95);
}

.table-shell .data-table tbody td {
  font-size: 0.82rem;
}

.data-table tbody tr {
  transition: background 0.18s ease;
}

.data-table tbody tr:hover {
  background: rgba(248, 250, 252, 0.82);
}

.table-cell-stack {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.muted-code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.73rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.table-shell .muted-code {
  font-size: 0.64rem;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.table-action-btn {
  min-height: 2.2rem;
  padding: 0.56rem 0.78rem;
}

@media (min-width: 1024px) {
  .table-scroll {
    overflow-x: visible;
  }

  .data-table {
    table-layout: fixed;
  }

  .table-shell .data-table thead th,
  .table-shell .data-table tbody td {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    white-space: normal;
    word-break: break-word;
    vertical-align: top;
  }

  .table-shell .data-table thead th {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    line-height: 1.25;
  }

  .table-shell .data-table tbody td {
    padding-top: 0.62rem;
    padding-bottom: 0.62rem;
    line-height: 1.35;
  }
}

.empty-state {
  padding: 4rem 1.5rem;
  text-align: center;
}

.table-shell .empty-state {
  padding: 2.8rem 1rem;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.92);
  padding: 1.15rem 1.5rem 1.5rem;
}

.table-shell .pagination-bar {
  padding: 0.85rem 1.1rem 1rem;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  border: 1px solid #dbe4ee;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.7rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: #334155;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.table-shell .pagination-link {
  min-width: 2.2rem;
  padding: 0.58rem 0.78rem;
  font-size: 0.8rem;
}

.pagination-link:hover {
  background: #f8fafc;
}

.pagination-link.is-active {
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
}

@media (max-width: 1280px) {
  .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-field-wide {
    grid-column: span 3;
  }
}

@media (max-width: 768px) {
  .entry-form-header,
  .entry-section-head {
    flex-direction: column;
  }

  .entry-form-status {
    align-self: flex-start;
  }

  .entry-section-copy {
    max-width: none;
  }

  .hero-shell {
    gap: 1rem;
  }

  .hero-actions,
  .table-head,
  .pagination-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-tool-stack {
    justify-content: stretch;
  }

  .filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .filter-field-wide {
    grid-column: span 1;
  }

  .filter-actions,
  .table-actions,
  .pagination-links {
    justify-content: stretch;
  }

  .pagination-link,
  .action-primary,
  .action-secondary,
  .action-accent {
    width: 100%;
  }

  .tool-file {
    min-width: 100%;
  }
}