:root {
  color-scheme: light;
  --bg: #f7f7fb;
  --card: #ffffff;
  --ink: #202124;
  --sub: #5f6368;
  --line: #e3e6ef;
  --accent: #2a62ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.app {
  max-width: 960px;
  margin: 32px auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

h1 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.6rem;
}

.credit {
  margin: 0 0 8px;
  color: var(--sub);
  font-size: 0.95rem;
}

.credit a {
  color: var(--accent);
}

.lead {
  margin-top: 0;
  color: var(--sub);
  line-height: 1.5;
}

.file-loader {
  margin: 12px 0 4px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fafbff;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin: 20px 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span {
  font-size: 0.9rem;
  color: var(--sub);
}

input,
select,
button {
  width: 100%;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 11px 12px;
  min-height: 44px;
}

input:focus,
select:focus {
  outline: 2px solid rgba(42, 98, 255, 0.25);
  border-color: var(--accent);
}

button {
  width: auto;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: pointer;
}

button:hover {
  filter: brightness(0.96);
}

.result-count {
  margin: 0 0 10px;
  color: var(--sub);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  font-weight: 600;
  font-size: 0.95rem;
}

.empty {
  text-align: center;
  color: var(--sub);
}

@media (max-width: 720px) {
  .app {
    margin: 10px;
    padding: 14px;
    border-radius: 10px;
  }

  h1 {
    font-size: 1.25rem;
  }

  .lead {
    font-size: 0.94rem;
  }

  .filters {
    grid-template-columns: 1fr;
    margin: 14px 0;
    gap: 10px;
  }

  button {
    width: 100%;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 10px;
    background: #fff;
  }

  td {
    border: none;
    border-bottom: 1px dashed #e8ebf3;
    padding: 8px 4px;
  }

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

  td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--sub);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .empty {
    text-align: left;
  }

  .empty::before {
    content: '';
    display: none;
  }
}

.footer-note {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--sub);
  line-height: 1.5;
  text-align: center;
}

.footer-note p {
  margin: 4px 0;
}
