﻿:root {
  --bg: #f4efe8;
  --panel: #fffdf9;
  --ink: #1b2430;
  --muted: #6e7682;
  --line: #d9d0c2;
  --accent: #b24c2a;
  --accent-dark: #7d321b;
  --success: #1f7a4f;
  --danger: #8d2d2d;
  --warning: #9c6a17;
  --info: #355c7d;
  --shadow: 0 18px 40px rgba(84, 55, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(178, 76, 42, 0.18), transparent 28%),
    linear-gradient(180deg, #f7f1e8 0%, #f2ebe2 100%);
}

.login-body {
  min-height: 100vh;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 28px 40px;
}

.brand h1 {
  margin: 0;
  font-size: 32px;
}

.brand p {
  margin: 6px 0 0;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 10px 14px;
  border: 1px solid rgba(27, 36, 48, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  transition: 0.18s ease;
}

.nav a.is-active {
  background: linear-gradient(135deg, rgba(178, 76, 42, 0.2), rgba(255, 255, 255, 0.95));
  border-color: rgba(178, 76, 42, 0.35);
  box-shadow: 0 10px 20px rgba(178, 76, 42, 0.12);
  transform: translateY(-1px);
}

.page {
  padding: 0 40px 40px;
}

.flash {
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.flash-info {
  background: rgba(53, 92, 125, 0.1);
  border-color: rgba(53, 92, 125, 0.2);
}

.flash-success {
  background: rgba(31, 122, 79, 0.1);
  border-color: rgba(31, 122, 79, 0.2);
}

.flash-error {
  background: rgba(141, 45, 45, 0.1);
  border-color: rgba(141, 45, 45, 0.2);
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(27, 36, 48, 0.08);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
}

.panel-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.panel-head--stack-mobile {
  align-items: flex-start;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  min-height: 120px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(178, 76, 42, 0.14), rgba(255, 255, 255, 0.9));
}

.stat-card .stat-value {
  display: block;
  font-size: 28px;
  line-height: 1.2;
}

.stat-value--date {
  font-size: 20px !important;
}

.stat-label {
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.filter-grid {
  align-items: end;
}

.schedule-grid {
  margin-top: 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.has-custom-selects select.native-select--hidden {
  position: absolute;
  inset: auto;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select__trigger {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 246, 241, 0.98));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.custom-select__trigger:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(247, 241, 234, 1));
}

.custom-select__trigger:focus-visible {
  outline: none;
  border-color: rgba(178, 76, 42, 0.48);
  box-shadow:
    0 0 0 4px rgba(178, 76, 42, 0.12),
    0 10px 24px rgba(125, 50, 27, 0.08);
}

.custom-select.is-open .custom-select__trigger {
  border-color: rgba(178, 76, 42, 0.42);
  box-shadow:
    0 0 0 4px rgba(178, 76, 42, 0.1),
    0 14px 30px rgba(125, 50, 27, 0.12);
  transform: translateY(-1px);
}

.custom-select.is-disabled .custom-select__trigger {
  opacity: 0.65;
  cursor: not-allowed;
}

.custom-select__label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select__chevron {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(27, 36, 48, 0.72);
  border-bottom: 2px solid rgba(27, 36, 48, 0.72);
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.custom-select.is-open .custom-select__chevron {
  transform: rotate(-135deg) translateY(-1px);
  border-color: var(--accent-dark);
}

.custom-select__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  display: none;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(178, 76, 42, 0.18);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 22px 44px rgba(84, 55, 31, 0.18);
  backdrop-filter: blur(14px);
}

.custom-select.is-open .custom-select__menu {
  display: grid;
  gap: 6px;
}

.custom-select__option {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.custom-select__option:hover,
.custom-select__option:focus-visible {
  outline: none;
  background: rgba(178, 76, 42, 0.12);
  color: var(--accent-dark);
  transform: translateX(2px);
}

.custom-select__option.is-selected {
  background: linear-gradient(135deg, rgba(178, 76, 42, 0.18), rgba(255, 255, 255, 0.94));
  color: var(--accent-dark);
  font-weight: 700;
}

.custom-select__option[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

input[readonly] {
  background: rgba(27, 36, 48, 0.05);
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled,
button:disabled:hover {
  background: rgba(27, 36, 48, 0.08);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  border: 1px solid rgba(27, 36, 48, 0.08);
}

.ghost-button:hover {
  background: #fff;
}

.export-menu {
  position: relative;
}

.export-menu summary {
  min-height: 44px;
  padding: 10px 14px;
  list-style: none;
  cursor: pointer;
}

.export-menu summary::-webkit-details-marker {
  display: none;
}

.export-menu__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(27, 36, 48, 0.08);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 18px 40px rgba(84, 55, 31, 0.16);
  z-index: 12;
}

.export-menu__list a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}

.export-menu__list a:hover {
  background: rgba(178, 76, 42, 0.1);
  color: var(--accent-dark);
}

.form-actions {
  display: flex;
  align-items: end;
}

.filter-actions {
  min-height: 100%;
  align-self: end;
}

.filter-actions button {
  min-height: 48px;
}

.compact {
  margin-top: 8px;
}

.hint {
  color: var(--muted);
  margin-bottom: 0;
}

.note-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(178, 76, 42, 0.08);
  border-radius: 14px;
}

.note-box p {
  margin: 8px 0 0;
}

.error-box {
  background: rgba(141, 45, 45, 0.1);
  border: 1px solid rgba(141, 45, 45, 0.2);
  color: var(--danger);
  padding: 12px 14px;
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-shell {
  border: 1px solid rgba(27, 36, 48, 0.08);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
}

.table-scroll {
  max-height: 560px;
  overflow: auto;
}

.table-scroll--events {
  max-height: 640px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: inset 0 -1px 0 rgba(27, 36, 48, 0.08);
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(27, 36, 48, 0.08);
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.cell-center {
  text-align: center !important;
}

.cell-right {
  text-align: right !important;
}

.zebra-table tbody tr:nth-child(even) {
  background: rgba(27, 36, 48, 0.035);
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
}

.badge-success {
  background: var(--success);
}

.badge-failed {
  background: var(--danger);
}

.badge-running {
  background: var(--info);
}

.badge-queued {
  background: #8f5b1e;
}

.badge-partial {
  background: var(--warning);
}

.badge-paused,
.badge-skipped,
.badge-dry_run {
  background: #54606f;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-actions form {
  margin: 0;
}

.subnav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.subnav-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(27, 36, 48, 0.08);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-decoration: none;
}

.subnav-tabs a span {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(27, 36, 48, 0.06);
  color: var(--muted);
  font-size: 13px;
}

.subnav-tabs a.is-active {
  background: linear-gradient(135deg, rgba(178, 76, 42, 0.18), rgba(255, 255, 255, 0.95));
  border-color: rgba(178, 76, 42, 0.3);
  box-shadow: 0 10px 18px rgba(178, 76, 42, 0.1);
}

.subnav-tabs a.is-active span {
  background: rgba(178, 76, 42, 0.14);
  color: var(--accent-dark);
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.top-gap {
  margin-top: 14px;
}

.event-feed {
  display: grid;
  gap: 14px;
}

.event-card,
.connection-card,
.job-card,
.help-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(27, 36, 48, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.event-head,
.card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.event-card p,
.connection-card p,
.job-card p,
.help-card p {
  color: var(--muted);
}

.event-time {
  color: var(--muted);
  font-size: 13px;
}

.card-list {
  display: grid;
  gap: 16px;
}

.route-box,
.settings-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 14px 0;
}

.route-box code {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(27, 36, 48, 0.05);
}

.checkbox-row {
  flex-direction: row;
  align-items: center;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.simple-steps {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.hidden {
  display: none !important;
}

.danger-ghost-button {
  background: rgba(141, 45, 45, 0.08);
  color: var(--danger);
  border: 1px solid rgba(141, 45, 45, 0.18);
}

.danger-ghost-button:hover {
  background: rgba(141, 45, 45, 0.14);
}

.connection-create-form,
.connection-edit-form,
.job-create-grid,
.job-schedule-grid,
.job-settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.storage-panel__head {
  margin-bottom: 16px;
}

.storage-panel__head .badge {
  align-self: flex-start;
}

.storage-card {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(31, 122, 79, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 20%, rgba(31, 122, 79, 0.1), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(242, 247, 243, 0.88));
}

.storage-card__identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.storage-card__identity p {
  margin: 5px 0 0;
}

.storage-card__icon {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--success);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(31, 122, 79, 0.2);
}

.storage-card__path {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid rgba(27, 36, 48, 0.08);
}

.storage-card__path span,
.storage-card__note {
  color: var(--muted);
}

.storage-card__path strong {
  overflow-wrap: anywhere;
}

.storage-card__action button {
  white-space: nowrap;
}

.storage-card__note {
  margin: 12px 2px 0;
  font-size: 14px;
}

.job-summary-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.job-summary-field__label {
  font-weight: 700;
}

.job-summary-field__body {
  min-height: 48px;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 246, 241, 0.98));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.job-summary-field__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.source-roots-builder {
  display: grid;
  gap: 12px;
}

.source-roots-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.source-roots-header strong {
  display: block;
  font-size: 16px;
}

.source-roots-header .panel-subtitle {
  margin: 6px 0 0;
}

.source-roots-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(27, 36, 48, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 239, 232, 0.78));
}

.source-roots-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.source-roots-tags,
.folder-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.folder-chip-list--card {
  margin-top: 10px;
}

.folder-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(178, 76, 42, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(84, 55, 31, 0.06);
}

.folder-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-chip--filled {
  background: rgba(178, 76, 42, 0.1);
  border-color: rgba(178, 76, 42, 0.14);
}

.folder-chip__remove {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border-radius: 999px;
  background: rgba(27, 36, 48, 0.08);
  color: var(--ink);
  line-height: 1;
}

.folder-chip__remove:hover {
  background: rgba(141, 45, 45, 0.14);
  color: var(--danger);
}

.source-roots-empty {
  margin: 0;
  color: var(--muted);
}

.source-roots-add[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.connection-submit,
.job-submit {
  align-self: end;
}

.connection-card,
.job-card {
  overflow: hidden;
}

.connection-actions {
  margin-top: 14px;
  justify-content: flex-start;
  align-items: center;
}

.help-card .simple-steps li,
.help-card .simple-steps li *,
.help-card p,
.help-card code {
  font-size: 16px;
}

.job-route-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 16px 0 10px;
}

.job-route-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(27, 36, 48, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.job-route-card p {
  margin: 8px 0;
}

.job-route-card code {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(27, 36, 48, 0.05);
  white-space: normal;
  overflow-wrap: anywhere;
}

.card-head--centered {
  align-items: center;
}

.job-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.job-card-heading h3 {
  margin: 0;
}

.job-schedule-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(178, 76, 42, 0.12);
  color: var(--accent-dark);
  font-weight: 700;
}

.job-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.job-secondary-actions .ghost-button {
  opacity: 0.9;
}

.secondary-quiet-button {
  background: rgba(27, 36, 48, 0.04);
  color: var(--muted);
  border: 1px solid rgba(27, 36, 48, 0.08);
}

.secondary-quiet-button:hover {
  background: rgba(27, 36, 48, 0.08);
  color: var(--ink);
}

.event-feed--timeline {
  gap: 12px;
}

.job-progress-card {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(27, 36, 48, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(249, 246, 241, 0.76), rgba(255, 255, 255, 0.94));
}

.job-sync-card {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(178, 76, 42, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(251, 242, 235, 0.88), rgba(255, 255, 255, 0.96) 62%);
}

.job-sync-card__head,
.job-sync-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.job-sync-card__head p,
.job-sync-total {
  margin: 5px 0 0;
  color: var(--muted);
}

.job-sync-meta {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 13px;
}

.job-sync-meta strong,
.job-sync-total strong {
  color: var(--ink);
}

.job-sync-total {
  padding-top: 10px;
  border-top: 1px solid rgba(27, 36, 48, 0.08);
  font-size: 14px;
}

.job-sync-state {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(27, 36, 48, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.job-sync-state--running,
.job-sync-state--queued {
  background: rgba(178, 111, 31, 0.13);
  color: #92601f;
}

.job-sync-state--failed {
  background: rgba(141, 45, 45, 0.1);
  color: var(--danger);
}

.job-progress-card__head,
.job-progress-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.job-progress-card__head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.inventory-status {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(27, 36, 48, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.inventory-status--completed {
  background: rgba(31, 122, 79, 0.12);
  color: var(--success);
}

.inventory-status--queued,
.inventory-status--running {
  background: rgba(178, 111, 31, 0.13);
  color: #92601f;
}

.inventory-status--failed {
  background: rgba(141, 45, 45, 0.1);
  color: var(--danger);
}

.transfer-status {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(27, 36, 48, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.transfer-status--queued,
.transfer-status--running {
  background: rgba(178, 111, 31, 0.13);
  color: #92601f;
}

.transfer-status--completed {
  background: rgba(31, 122, 79, 0.12);
  color: var(--success);
}

.transfer-status--failed {
  background: rgba(141, 45, 45, 0.1);
  color: var(--danger);
}

.job-progress-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.job-progress-metrics > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(27, 36, 48, 0.06);
}

.job-progress-metrics span,
.job-progress-foot {
  color: var(--muted);
  font-size: 13px;
}

.job-progress-metrics strong {
  overflow-wrap: anywhere;
}

.job-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(27, 36, 48, 0.08);
}

.job-progress-track span {
  display: block;
  min-width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #d88c52);
  transition: width 0.3s ease;
}

.job-progress-foot {
  flex-wrap: wrap;
}

.event-card--timeline {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.event-time-col {
  padding-right: 12px;
  border-right: 1px solid rgba(27, 36, 48, 0.08);
}

.event-time-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.event-time-value {
  display: block;
  font-size: 16px;
  line-height: 1.35;
}

.event-body-col {
  min-width: 0;
}

.event-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.event-title-main {
  font-size: 16px;
  line-height: 1.35;
}

.event-description-details {
  margin-top: 0;
}

.event-description-empty {
  margin: 0;
  color: var(--muted);
}

.event-card--empty p {
  margin: 0;
}

.runs-table,
.failed-table,
.copied-table {
  min-width: 1120px;
  table-layout: fixed;
}

.runs-table .col-job,
.failed-table .col-job,
.copied-table .col-job {
  width: 140px;
}

.runs-table .col-status,
.copied-table .col-status {
  width: 120px;
}

.runs-table .col-datetime,
.failed-table .col-datetime,
.copied-table .col-datetime {
  width: 150px;
}

.runs-table .col-number,
.failed-table .col-number {
  width: 82px;
}

.runs-table .col-size,
.copied-table .col-size {
  width: 92px;
}

.failed-table .col-action {
  width: 110px;
}

.failed-table .col-path,
.copied-table .col-path {
  width: 260px;
}

.runs-table .col-message,
.failed-table .col-message {
  width: 380px;
}

.copied-table {
  min-width: 1340px;
}

.copied-table .col-path {
  width: 420px;
}

.copied-table .col-datetime {
  width: 170px;
}

.runs-table th,
.runs-table td,
.failed-table th,
.failed-table td,
.copied-table th,
.copied-table td {
  white-space: nowrap;
  word-break: normal;
}

.message-cell {
  white-space: normal !important;
}

.path-cell {
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.message-details {
  display: block;
}

.message-details summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
}

.message-details summary::marker {
  color: var(--accent);
}

.message-details div {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(27, 36, 48, 0.04);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action input[type="text"] {
  width: 100%;
  padding-right: 54px;
}

.picker-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  background: rgba(27, 36, 48, 0.06);
  color: var(--ink);
  border: 1px solid rgba(27, 36, 48, 0.08);
}

.picker-button:hover {
  background: rgba(27, 36, 48, 0.1);
}

.picker-button svg {
  width: 18px;
  height: 18px;
}

.picker-button--time {
  background: rgba(178, 76, 42, 0.1);
  color: var(--accent-dark);
  border-color: rgba(178, 76, 42, 0.18);
}

.picker-button--time:hover {
  background: rgba(178, 76, 42, 0.16);
}

.native-picker-input {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

.custom-calendar {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 24;
  width: 296px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(178, 76, 42, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(247, 241, 234, 0.98));
  box-shadow: 0 22px 44px rgba(84, 55, 31, 0.18);
  backdrop-filter: blur(14px);
}

.custom-calendar[hidden] {
  display: none !important;
}

.custom-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.custom-calendar__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.custom-calendar__nav {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 999px;
  background: rgba(178, 76, 42, 0.08);
  color: var(--accent-dark);
  border: 1px solid rgba(178, 76, 42, 0.16);
  font-size: 22px;
  line-height: 1;
}

.custom-calendar__nav:hover {
  background: rgba(178, 76, 42, 0.16);
}

.custom-calendar__body {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekday {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calendar-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  border: 1px solid rgba(27, 36, 48, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.calendar-day:hover {
  background: rgba(178, 76, 42, 0.12);
  color: var(--accent-dark);
}

.calendar-day.is-selected {
  background: linear-gradient(135deg, rgba(178, 76, 42, 0.92), rgba(125, 50, 27, 0.96));
  color: #fff;
  border-color: rgba(125, 50, 27, 0.4);
  box-shadow: 0 10px 18px rgba(125, 50, 27, 0.18);
}

.calendar-day.is-today:not(.is-selected) {
  border-color: rgba(178, 76, 42, 0.28);
  color: var(--accent-dark);
  background: rgba(178, 76, 42, 0.06);
}

.calendar-day--spacer {
  min-height: 36px;
}

.custom-calendar__footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.custom-calendar__action {
  flex: 1;
  min-height: 40px;
}

.preset-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 8px;
  width: 196px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(178, 76, 42, 0.18);
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 18px 40px rgba(84, 55, 31, 0.16);
}

.preset-menu[hidden] {
  display: none !important;
}

.preset-menu button {
  min-height: 38px;
  padding: 8px 10px;
  background: rgba(27, 36, 48, 0.05);
  color: var(--ink);
}

.preset-menu button:hover {
  background: rgba(178, 76, 42, 0.14);
  color: var(--accent-dark);
}

.connection-create-form,
.connection-edit-form {
  align-items: end;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(460px, 100%);
}

.login-form {
  display: grid;
  gap: 16px;
}

@media (max-width: 900px) {
  .site-header,
  .page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-header {
    flex-direction: column;
    align-items: start;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
    align-items: start;
  }

  .job-action-row,
  .job-progress-card__head,
  .job-sync-card__head,
  .panel-head,
  .pagination-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .job-progress-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-roots-input-row {
    grid-template-columns: 1fr;
  }

  .storage-card {
    grid-template-columns: 1fr;
  }

  .storage-card__path {
    padding: 14px 0 0;
    border-top: 1px solid rgba(27, 36, 48, 0.08);
    border-left: 0;
  }

  .storage-card__action button {
    width: 100%;
  }

  .job-card-heading,
  .inline-filter-form {
    align-items: stretch;
  }

  .event-head,
  .card-head,
  .inline-actions,
  .panel-head,
  .pagination-bar {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .job-progress-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}
