* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #172033;
  background: #f4f7fb;
}

button,
input,
textarea {
}

button {
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  color: #fff;
  background: #2563eb;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

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

input,
textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

textarea {
  min-width: min(680px, 100%);
  resize: vertical;
}


.status,
.message,
.hint {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 20px 28px;
  color: #fff;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
}

.topbar p {
  margin: 6px 0 0;
  color: #dbeafe;
}

.actions,
.controls,
.commission-form,
.login-form,
.cookie-login-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.container {
  display: grid;
  gap: 16px;
  padding: 20px 28px 40px;
}

.card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.login-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
}

.cookie-login-form {
  width: 100%;
  align-items: end;
}

.cookie-login-form label {
  flex: 1 1 520px;
}

.login-hint {
  width: 100%;
}


.card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.login-card h2 {
  margin-bottom: 8px;
}

.section-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.section-title-row h2 {
  margin: 0;
}

.daily-stat-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.daily-stat-controls button {
  padding: 8px 12px;
}

label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 13px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid #e2e8f0;
  padding: 9px 10px;
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

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

.log {
  min-height: 120px;
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  color: #cbd5e1;
  background: #0f172a;
  font-size: 12px;
}

.count {
  display: inline-block;
  min-width: 24px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 13px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 12px;
  color: #64748b;
  font-size: 13px;
}

.pager button {
  padding: 6px 10px;
  font-size: 13px;
}

.status.ok {
  color: #15803d;
}

.status.bad {
  color: #b91c1c;
}

@media (max-width: 900px) {
  .topbar {
    display: block;
  }

  .actions {
    margin-top: 14px;
  }

  .container {
    padding: 14px;
  }
}
