:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #172033;
  --muted: #64748b;
  --border: #d8e0ea;
  --border-strong: #c4cedb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #e8f0ff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 260px),
    var(--bg);
  color: var(--text);
}

.app {
  width: min(1180px, calc(100% - 48px));
  margin: 36px auto 56px;
}

.app-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.app-header h1 {
  margin: 0 0 6px;
  font-size: 38px;
  line-height: 1.05;
  color: #0f172a;
}

.app-header p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 22px;
}

.panel h2 {
  margin: 0 0 20px;
  font-size: 24px;
  line-height: 1.2;
  color: #0f172a;
}

.form {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 1fr 0.9fr;
  gap: 12px;
  align-items: center;
}

input,
button {
  height: 44px;
  border-radius: 7px;
  font-size: 14px;
}

input {
  width: 100%;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text);
  padding: 0 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder {
  color: #7c8796;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, transform 120ms ease;
}

button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

button:active {
  transform: translateY(1px);
}

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

.table-header h2 {
  margin: 0;
}

.table-header button {
  min-width: 108px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

thead th {
  background: var(--surface-soft);
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

th,
td {
  padding: 15px 16px;
  text-align: left;
  border-bottom: 1px solid #e6edf5;
}

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

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: #f8fbff;
}

td {
  color: #1e293b;
  font-size: 15px;
}

td:first-child,
th:first-child {
  width: 72px;
}

td:nth-child(4),
th:nth-child(4) {
  width: 130px;
}

td:nth-child(6),
th:nth-child(6) {
  width: 150px;
}

@media (max-width: 900px) {
  .app {
    width: min(100% - 28px, 1180px);
    margin-top: 24px;
  }

  .app-header {
    display: block;
  }

  .app-header h1 {
    font-size: 32px;
  }

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

  .form button {
    grid-column: 1 / -1;
  }

  .panel {
    padding: 18px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .form {
    grid-template-columns: 1fr;
  }

  .app-header h1 {
    font-size: 28px;
  }

  .panel h2 {
    font-size: 21px;
  }

  th,
  td {
    padding: 12px;
  }
}
