/* static/css/ui.css — universal components + light utilities */
:root {
  --c-bg: #fff;
  --c-text: #1f2937;
  --c-muted: #6b7280;
  --c-border: #e5e7eb;
  --c-primary: #2563eb;
  --c-primary-600: #1d4ed8;
  --c-danger: #dc2626;
  --c-warning: #f59e0b;
  --radius: 14px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* Cards */
.card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card h2 {
  font-size: 1.2rem;
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
}
.card-body {
  padding: 16px;
}
.card-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  background: #f8fafc;
  color: var(--c-text);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.btn:hover {
  background: #eef2f7;
}
.btn-primary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.btn-primary:hover {
  background: var(--c-primary-600);
}
.btn-secondary {
  background: #f3f4f6;
}
.btn-outline-danger {
  background: transparent;
  color: var(--c-danger);
  border-color: var(--c-danger);
}
.btn-danger {
  background: var(--c-danger);
  color: #fff;
  border-color: var(--c-danger);
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: #fff;
}
.form-control:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.form-check {
  display: flex;
  gap: 8px;
  align-items: center;
}
.form-check-input {
  width: 18px;
  height: 18px;
}
.form-text {
  color: var(--c-muted);
  font-size: 0.9rem;
}

/* Lists */
.list-group {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  overflow: hidden;
}
.list-group-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--c-border);
  background: #fff;
}
.list-group-item:last-child {
  border-bottom: none;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #eef2ff;
  color: #4338ca;
}
.badge--warn {
  background: #fef3c7;
  color: #92400e;
}

/* Utilities */
.d-flex {
  display: flex;
}
.justify-content-between {
  justify-content: space-between;
}
.align-items-start {
  align-items: flex-start;
}
.align-items-center {
  align-items: center;
}
.me-2 {
  margin-right: 8px;
}
.ms-2 {
  margin-left: 8px;
}
.mt-1 {
  margin-top: 4px;
}
.mt-2 {
  margin-top: 8px;
}
.mt-4 {
  margin-top: 16px;
}
.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: 4px;
}
.mb-2 {
  margin-bottom: 8px;
}
.mb-3 {
  margin-bottom: 12px;
}
.mb-4 {
  margin-bottom: 16px;
}
.gap-2 {
  gap: 10px;
}
.text-secondary {
  color: var(--c-muted);
}
.text-nowrap {
  white-space: nowrap;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
/* Subnav (inline text links) */
.subnav {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0 12px;
}
.subnav-sep {
  color: var(--c-muted);
}
.subnav-link {
  color: var(--c-text);
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 6px;
}
.subnav-link:hover {
  text-decoration: underline;
}
.subnav-link.active {
  font-weight: 600;
}
/* Ensure password inputs match width/feel of text inputs */
input[type="password"] {
  width: 100%;
}
/* Give action buttons breathing room inside cards */
.card .card-body .card-actions {
  display: flex;
  gap: 12px;
  padding-top: 12px; /* space above buttons */
  padding-bottom: 12px; /* space from bottom edge */
}
