:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #697586;
  --line: #d9e1ea;
  --green: #18794e;
  --blue: #1769aa;
  --yellow: #ffd633;
  --yellow-dark: #dfb800;
  --danger: #b42318;
  --shadow: 0 14px 40px rgba(31, 41, 51, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

.app {
  min-height: 100vh;
  padding: 32px;
}

.workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topActions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 36px;
  line-height: 1.1;
}

h2 {
  font-size: 20px;
}

.status {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  white-space: nowrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--yellow-dark);
}

.dot.ready {
  background: var(--green);
}

.dot.warn {
  background: var(--danger);
}

.panel,
.resultPanel,
.history {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 24px;
}

.serviceSwitch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf2f7;
}

.serviceSwitch label {
  cursor: pointer;
}

.serviceSwitch input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.serviceSwitch span {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 700;
}

.serviceSwitch input:checked + span {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 2px 10px rgba(31, 41, 51, 0.08);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
}

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(23, 105, 170, 0.14);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 24px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 800;
}

button[type="submit"] {
  min-width: 190px;
  background: var(--yellow);
  color: #2a2500;
}

button[type="submit"]:hover {
  background: #ffce00;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.ghost {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--blue);
}

.logoutButton {
  min-width: 86px;
}

.loginBody {
  background:
    linear-gradient(135deg, rgba(255, 214, 51, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(23, 105, 170, 0.16), transparent 38%),
    var(--bg);
}

.loginPage {
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 24px;
}

.loginCard {
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.loginHead {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.loginMark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--yellow);
  color: #1f2933;
  font-weight: 900;
}

.loginForm {
  display: grid;
  gap: 16px;
}

.loginForm button {
  width: 100%;
  margin-top: 4px;
  background: var(--yellow);
  color: #2a2500;
}

.errorText {
  margin: 0;
  color: var(--danger);
  font-weight: 700;
}

.resultPanel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 20px 24px;
}

.resultPanel a {
  display: block;
  max-width: 780px;
  overflow-wrap: anywhere;
  color: var(--blue);
  font-size: 18px;
  font-weight: 800;
}

.resultPanel button {
  background: var(--blue);
  color: #ffffff;
}

.muted {
  margin: 8px 0 0;
  color: var(--muted);
}

.history {
  margin-top: 18px;
  padding: 20px 24px 24px;
}

.sectionHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
  font-weight: 700;
}

.pagination button {
  min-width: 96px;
}

.tableWrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

td a {
  color: var(--blue);
  font-weight: 700;
}

.iconButton {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.dangerButton:hover {
  border-color: rgba(180, 35, 24, 0.36);
  background: #fff1f0;
  color: var(--danger);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f2ff;
  color: #155a92;
  font-size: 13px;
  font-weight: 800;
}

.tag.tbank {
  background: #fff3b8;
  color: #675400;
}

@media (max-width: 820px) {
  .app {
    padding: 18px;
  }

  .topbar,
  .topActions,
  .actions,
  .resultPanel,
  .pagination {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 30px;
  }

  .status,
  button[type="submit"] {
    width: 100%;
  }

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

  .serviceSwitch {
    width: 100%;
  }
}
