:root {
  color-scheme: light;
  --bg: #eef2f5;
  --panel: #ffffff;
  --ink: #18212f;
  --muted: #667085;
  --line: #d8dee8;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1040px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0;
}

.login-panel,
.portal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.login-panel {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: center;
  min-height: 360px;
  padding: 36px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0;
}

.login-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

button {
  height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 650;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  background: #d0d5dd;
  cursor: not-allowed;
}

.secondary {
  width: 86px;
  background: #eef4f4;
  color: var(--accent-dark);
}

.secondary:hover {
  background: #d9e8e7;
}

.error {
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

.portal {
  padding: 24px;
}

.topbar,
.toolbar,
.pager {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.toolbar {
  margin: 24px 0 16px;
  align-items: end;
}

.search {
  flex: 1;
}

.page-size {
  width: 120px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 14px;
}

th {
  background: #f4f7fa;
  color: #344054;
  font-weight: 700;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.site-code {
  font-weight: 700;
}

.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 34px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 650;
}

.empty {
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.pager {
  margin-top: 16px;
  align-items: center;
}

.pager button {
  width: 92px;
}

#pageInfo {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 18px, 1040px);
    padding: 12px 0;
  }

  .login-panel {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 24px;
  }

  .portal {
    padding: 16px;
  }

  .topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .secondary,
  .page-size {
    width: 100%;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  td {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #edf1f5;
    padding: 12px;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
  }

  td:last-child {
    border-bottom: 0;
  }

  .open-link {
    width: 100%;
  }

  h1 {
    font-size: 28px;
  }
}
