/* ==========================================================================
   Admin Dashboard & Patient Management Styles
   ========================================================================== */

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  margin-bottom: var(--space-1);
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-text-main);
}

/* Patient Table */
.table-container {
  overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9375rem;
}

.table th {
  background: #f8fafc;
  padding: var(--space-3) var(--space-4);
  font-weight: 600;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border-subtle);
}

.table td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
  vertical-align: middle;
}

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

.table tr:hover td {
  background: var(--color-surface-hover);
}

/* Form Sections */
.form-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border-subtle);
}

.form-section-desc {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
}

.dynamic-item-row {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-3);
  background: #f8fafc;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
}

.visibility-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  background: #ffffff;
  border: 1px solid var(--color-border);
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
}

.visibility-toggle input:checked + span {
  color: var(--color-success);
}

.visibility-toggle input:not(:checked) + span {
  color: var(--color-text-light);
}

.admin-audit-box {
  background: #0f172a;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  max-height: 250px;
  overflow-y: auto;
}

.admin-audit-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-1) 0;
  border-bottom: 1px solid #1e293b;
}

.admin-audit-row:last-child {
  border-bottom: none;
}
