body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #0f172a;
  color: #e2e8f0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.narrow {
  max-width: 500px;
  padding-top: 80px;
}

.header, .actions, .grid.two {
  display: flex;
  gap: 16px;
}

.actions.wrap {
  flex-wrap: wrap;
}

.header, .grid.two {
  justify-content: space-between;
  align-items: flex-start;
}

.grid.two {
  margin: 24px 0;
}

.grid.two > * {
  flex: 1;
}

.card {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.warning {
  border-color: #f59e0b;
}

.status-banner {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  line-height: 1.45;
}

.status-banner-on {
  background: #14532d;
  border: 1px solid #22c55e;
  color: #ecfdf5;
}

.status-banner-off {
  background: #451a1a;
  border: 1px solid #f87171;
  color: #fef2f2;
}

.status-hint {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0 0 14px;
  line-height: 1.4;
}

.action-feedback:empty {
  display: none;
}

.action-feedback {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  border: 1px solid #475569;
  background: #1e293b;
}

.action-feedback.is-pending {
  border-color: #64748b;
  color: #cbd5e1;
}

.action-feedback.is-success {
  border-color: #22c55e;
  background: #14532d;
  color: #ecfdf5;
}

.action-feedback.is-error {
  border-color: #f87171;
  background: #450a0a;
  color: #fef2f2;
}

.bot-control-actions .button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  background: #334155;
  color: #fff;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.button.primary {
  background: #2563eb;
}

.button.danger {
  background: #dc2626;
}

.sort-link {
  color: #fff;
  text-decoration: none;
}

.sort-link:hover {
  text-decoration: underline;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
}

.input.compact {
  margin-bottom: 0;
}

.error {
  color: #fca5a5;
  margin-bottom: 16px;
}

.login-error-banner {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid #dc2626;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
  color: #fecaca;
}

.login-error-banner strong {
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
  color: #fff;
}

.login-error-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

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

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

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

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

th, td {
  padding: 10px;
  border-bottom: 1px solid #334155;
  text-align: left;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 14px 24px;
  background: #111827;
  border-bottom: 1px solid #334155;
  margin-bottom: 0;
}

.top-nav.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.nav-brand a {
  font-weight: 700;
  color: #f8fafc;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  color: #94a3b8;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
}

.nav-links a:hover {
  color: #e2e8f0;
  background: #1e293b;
}

.nav-links a.active {
  color: #38bdf8;
  background: #0c4a6e;
}

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

.nav-user-name {
  font-size: 0.9rem;
  color: #94a3b8;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logout-form {
  display: inline;
  margin: 0;
}

.button.compact {
  padding: 6px 12px;
  font-size: 0.85rem;
}
