* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f3f6f4;
  color: #1f2937;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: #fff;
  border: 1px solid #d9e2dd;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.login-page .card {
  width: 100%;
  max-width: 420px;
}

h1, h2 {
  margin-top: 0;
}

.subtitle,
.muted {
  color: #6b7280;
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

button,
.btn-secondary {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font: inherit;
  cursor: pointer;
}

button {
  background: #166534;
  color: #fff;
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.alert {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: #14532d;
  color: #fff;
}

.topbar .muted {
  color: #d1fae5;
  margin-left: 8px;
}

.grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}

input[type='file'],
input[type='number'] {
  width: auto;
}

label.small {
  font-weight: 500;
}

.small {
  font-size: 0.875rem;
}

.subtle {
  background: #f8fafc;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.alert-critical {
  border-left: 4px solid #b91c1c;
}

.mono,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.mono.small,
code.small {
  font-size: 0.8rem;
}

.stat-list li {
  margin-bottom: 6px;
}

.fuse-form {
  gap: 12px;
}

.inline-danger {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.inline-danger select {
  min-width: 200px;
  flex: 1 1 220px;
}

.btn-danger {
  background: #b45309;
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(1.06);
}

.muted-card {
  opacity: 0.92;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.data-table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.wrap {
  word-break: break-word;
}

hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 20px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin-bottom: 0;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tab {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #111827;
  text-decoration: none;
  font-size: 0.875rem;
}

.filter-tab.active {
  background: #166534;
  color: #fff;
}

.profile-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-search {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.profile-search label {
  flex: 1 1 220px;
}

.profile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.profile-item {
  margin: 0;
}

.profile-item-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.profile-body {
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.45;
  max-height: 420px;
  overflow: auto;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
}

.combo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.combo-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d9e2dd;
  border-radius: 10px;
  background: #fff;
}

.combo-item.is-used {
  background: #f3f4f6;
  opacity: 0.88;
}

.combo-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 200px;
}

.combo-text {
  font-size: 1rem;
  word-break: break-all;
}

.combo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
}

.btn-copy-bulk {
  background: #0f766e;
  color: #fff;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-copy-bulk:disabled {
  opacity: 0.7;
  cursor: wait;
}

.btn-copy {
  background: #14532d;
  color: #fff;
  padding: 8px 14px;
  font-size: 0.875rem;
}

.btn-copy:disabled {
  opacity: 0.65;
  cursor: wait;
}

.badge-used {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.used-at {
  font-size: 0.75rem;
}

