* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f6fb;
  color: #1f2937;
}

header {
  background: #1f2937;
  color: #ffffff;
  padding: 24px 32px;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

header h1 {
  margin: 0 0 6px;
}

header p {
  margin: 0;
  color: #cbd5e1;
}

button,
input,
select {
  font: inherit;
}

button {
  border: none;
  background: #2563eb;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}

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

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-select {
  width: auto;
  margin-top: 0;
  min-width: 130px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #10b981;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 10px;
}

.primary-button:hover {
  filter: brightness(1.05);
}

main {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px 32px;
}

.panel {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
  padding: 24px;
  margin-bottom: 20px;
}

.panel h2 {
  margin-top: 0;
}

label {
  display: block;
  margin-bottom: 14px;
  color: #334155;
}

input[type='text'],
input[type='password'],
input[type='number'] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  margin-top: 8px;
  background: #f8fafc;
}

select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  margin-top: 8px;
  background: #f8fafc;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

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

thead {
  background: #f8fafc;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

td {
  vertical-align: middle;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions button {
  background: #0f172a;
  padding: 8px 12px;
  font-size: 14px;
}

.actions button.delete {
  background: #dc2626;
}

.actions button.test {
  background: #059669;
}

.actions button.dump {
  background: #d97706;
}

.actions button.upload {
  background: #7c3aed;
}

.header-actions button.delete {
  background: #dc2626;
}

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

.progress-wrapper {
  width: 160px;
  display: inline-block;
  vertical-align: middle;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
}

.progress-text {
  margin-top: 6px;
  font-size: 13px;
  color: #475569;
}

.alert {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.alert.hidden {
  display: none;
}

.alert.success {
  background: #d1fae5;
  color: #065f46;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.schedule-form {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
}

.schedule-form h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #1f2937;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  margin-bottom: 0;
  font-weight: 600;
  color: #1f2937;
}

.form-group small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.actions button.toggle {
  background: #8b5cf6;
}

.actions button.toggle:hover {
  filter: brightness(1.05);
}

.actions button.edit {
  background: #2563eb;
}

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

.pagination-info {
  color: #475569;
  font-size: 14px;
}

.pagination-actions {
  display: flex;
  gap: 8px;
}

.pagination-actions button {
  background: #475569;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.pagination-actions button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

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

@media (max-width: 840px) {
  .actions {
    flex-direction: column;
    align-items: stretch;
  }
}
