/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.12s ease;
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-danger {
  background: var(--red);
  color: #ffffff;
}

/* Inputs */
.input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
}

.input:focus {
  outline: 2px solid rgba(26, 25, 23, 0.2);
  outline-offset: 1px;
}

/* Alerts */
.alert {
  border-radius: var(--radius);
  padding: 10px 12px;
}

.alert-error {
  color: #7f1d1d;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.alert-success {
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid #cfe7d9;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Page Header */
.page-header {
  margin-bottom: 24px;
}

.page-header-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.page-header-sub {
  font-size: 13px;
  color: var(--text2);
  margin: 0;
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.card-body {
  padding: 22px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.card-body p {
  margin: 0 0 14px;
}

.card-body p:last-child {
  margin-bottom: 0;
}

/* Stat Card */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text3);
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 8px 0 4px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text3);
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
}

.stat-icon.green { background: var(--green-bg); color: var(--green); }
.stat-icon.blue  { background: var(--blue-bg);  color: var(--blue); }
.stat-icon.yellow{ background: var(--yellow-bg);color: var(--yellow); }
.stat-icon.red   { background: var(--red-bg);   color: var(--red); }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.badge-green  { background: var(--green-bg);  color: var(--green); }
.badge-red    { background: var(--red-bg);    color: var(--red); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); }
.badge-blue   { background: var(--blue-bg);   color: var(--blue); }
.badge-gray   { background: var(--surface2);  color: var(--text2); }

/* Table */
table thead th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text3);
  padding: 11px 20px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

table tbody td {
  padding: 13px 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

table tbody tr:last-child td {
  border-bottom: none;
}

table tbody tr:hover td {
  background: var(--surface2);
}
