:root {
  color-scheme: light;
  font-family: Inter, Ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, rgba(15, 98, 254, 0.08), transparent 28%), #f4f6fb;
  color: #102a43;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(15, 98, 254, 0.06), transparent 20%), #f4f6fb;
}
.page-shell {
  min-height: 100vh;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 28px 48px;
}
.page-header {
  margin-bottom: 28px;
}
.page-header__intro {
  display: grid;
  gap: 18px;
  padding: 30px 34px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 98, 254, 0.12);
  border-radius: 26px;
  box-shadow: 0 26px 70px rgba(16, 42, 67, 0.08);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 98, 254, 0.1);
  color: #0f62fe;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.page-header h1 {
  margin: 0;
  font-size: clamp(2.25rem, 3vw, 3.2rem);
  line-height: 1.05;
}
.page-header p {
  margin: 0;
  max-width: 760px;
  font-size: 1rem;
  color: #334e68;
  line-height: 1.75;
}
.panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 98, 254, 0.08);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(16, 42, 67, 0.07);
  margin-bottom: 24px;
}
.panel--hero {
  padding: 28px 24px;
}
.panel-hero__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.stat-card {
  padding: 22px 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 98, 254, 0.05), #ffffff);
  border: 1px solid rgba(15, 98, 254, 0.12);
}
.stat-card__label {
  display: block;
  color: #5f7384;
  font-size: 0.92rem;
  margin-bottom: 10px;
}
.stat-card strong {
  display: block;
  font-size: 1.18rem;
  color: #102a43;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.status.success {
  color: #0f62fe;
}
.panel--grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 28px;
}
@media (max-width: 1040px) {
  .panel--grid {
    grid-template-columns: 1fr;
  }
}
.tab-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 98, 254, 0.12);
  border-radius: 22px;
  padding: 8px;
}
@media (max-width: 720px) {
  .tab-bar {
    grid-template-columns: 1fr;
  }
}
.tab-button {
  width: 100%;
  padding: 14px 20px;
  color: #334e68;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.tab-button:hover {
  transform: translateY(-1px);
}
.tab-button.active {
  color: #0f62fe;
  background: #ffffff;
  border-color: rgba(15, 98, 254, 0.2);
  box-shadow: 0 16px 28px rgba(15, 98, 254, 0.08);
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}
.panel-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.tabs-content {
  display: grid;
  gap: 24px;
}

.panel-block__header {
  display: grid;
  gap: 16px;
}
.eyebrow {
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6c7a93;
  font-weight: 700;
}
.panel-block__header h2 {
  margin: 0;
  font-size: clamp(1.65rem, 2vw, 2rem);
  line-height: 1.1;
}
.panel-block__header p {
  margin: 0;
  color: #4a5a72;
  line-height: 1.75;
  max-width: 620px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 20px;
  align-items: start;
}
@media (max-width: 960px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
label {
  display: block;
  font-size: 0.95rem;
  color: #34415a;
}
label span {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}
input,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid #d9e2ec;
  border-radius: 18px;
  background: #fbfdff;
  color: #102a43;
  padding: 14px 16px;
  font-size: 0.97rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
input::placeholder,
select::placeholder {
  color: #748095;
}
input:focus,
select:focus {
  outline: none;
  border-color: #0f62fe;
  box-shadow: 0 0 0 4px rgba(15, 98, 254, 0.12);
}
.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}
.button-group {
  display: flex;
  gap: 12px;
}
button {
  border: none;
  border-radius: 16px;
  padding: 14px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}
button:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}
button.primary {
  background: #0f62fe;
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 98, 254, 0.18);
}
button.large {
  min-width: 260px;
}
button.secondary {
  background: #eef4ff;
  color: #102a43;
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid #d9e2ec;
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}
thead th {
  padding: 18px 20px;
  text-align: left;
  background: #f8faff;
  font-weight: 700;
  color: #334e68;
  letter-spacing: 0.02em;
  font-size: 0.92rem;
  border-bottom: 1px solid #e3eaf3;
}
tbody tr {
  background: #ffffff;
  border-bottom: 1px solid #f2f6fb;
}
tbody tr:last-child {
  border-bottom: none;
}
td {
  padding: 16px 20px;
  vertical-align: middle;
  color: #16325c;
  font-size: 0.95rem;
}
td[data-label] {
  display: table-cell;
}
.actions button {
  margin-right: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #eef4ff;
  color: #0f62fe;
  font-weight: 700;
}
.actions button:last-child {
  margin-right: 0;
}
.selection-summary,
.preview-card {
  padding: 22px 24px;
  border-radius: 20px;
  background: #f8fbff;
  border: 1px solid #e3eaf3;
}
.status-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 20px;
}
@media (max-width: 840px) {
  .status-grid {
    grid-template-columns: 1fr;
  }
}
.summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 1rem;
  color: #102a43;
  min-height: 106px;
}
.preview-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}
.preview-card p {
  margin: 0;
  color: #475569;
  line-height: 1.8;
}
.preview-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: #334e68;
  line-height: 1.7;
}
.action-panel__details {
  margin-bottom: 20px;
}
.action-panel__details h2 {
  margin: 10px 0 6px;
}
.panel--actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 26px;
  align-items: start;
}
@media (max-width: 920px) {
  .panel--actions {
    grid-template-columns: 1fr;
  }
}
.action-panel__controls {
  display: grid;
  gap: 18px;
}
.log-card {
  background: #f7f9ff;
  border: 1px solid #d9e2ec;
  border-radius: 22px;
  padding: 20px;
}
.log-card__title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #102a43;
}
.log-output {
  min-height: 180px;
  margin: 0;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #d9e2ec;
  border-radius: 18px;
  color: #102a43;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
@media (max-width: 900px) {
  .page-header__intro,
  .panel,
  .log-card {
    padding: 22px;
  }
  .stat-card,
  .table-wrapper,
  .preview-card,
  .selection-summary,
  .log-output {
    min-width: 0;
  }
  thead th,
  td {
    padding: 14px 12px;
  }
  button.large {
    width: 100%;
  }
  .actions button {
    margin-bottom: 8px;
  }
}

@media (max-width: 720px) {
  .table-wrapper {
    overflow-x: visible;
  }
  table {
    min-width: 0;
    border: 0;
  }
  thead {
    display: none;
  }
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }
  tbody tr {
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid #e3eaf3;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(16, 42, 67, 0.06);
  }
  tbody tr:last-child {
    margin-bottom: 0;
  }
  td {
    padding: 12px 14px;
    border: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  td[data-label]::before {
    content: attr(data-label) ': ';
    font-weight: 700;
    color: #334e68;
    flex: 1 1 45%;
    white-space: nowrap;
  }
  td[data-label] {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
  }
  td.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 0;
  }
  td.actions button {
    width: auto;
    flex: 1 1 auto;
    margin-bottom: 0;
  }
}
