* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #f5f7f6;
  color: #1a2b22;
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #d4ddd9;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  color: #3d6b5a;
  text-decoration: none;
  font-weight: 600;
  padding: 0 20px 20px;
  border-bottom: 1px solid #e8edeb;
  margin-bottom: 12px;
}

.admin-logo-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.admin-logo-text span,
.admin-logo span { color: #6b8078; font-weight: 400; font-size: 13px; }

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  flex: 1;
}

.admin-nav a {
  color: #6b8078;
  text-decoration: none;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.admin-nav a:hover {
  color: #3d6b5a;
  background: #eaf2ee;
}

.admin-nav a.active {
  color: #1a2b22;
  background: #eaf2ee;
  font-weight: 600;
}

.admin-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 12px 0;
  border-top: 1px solid #e8edeb;
  margin-top: 12px;
}

.admin-sidebar-footer a {
  color: #6b8078;
  text-decoration: none;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
}

.admin-sidebar-footer a:hover {
  color: #3d6b5a;
  background: #eaf2ee;
}

.admin-main {
  flex: 1;
  min-width: 0;
  max-width: 1100px;
  padding: 32px 28px;
}

@media (max-width: 768px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid #d4ddd9;
  }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-sidebar-footer { flex-direction: row; }
}

.admin-card {
  background: #fff;
  border: 1px solid #d4ddd9;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.admin-card h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.admin-card p { color: #6b8078; font-size: 14px; margin-bottom: 16px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6b8078;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d4ddd9;
  border-radius: 8px;
  font-size: 14px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary { background: #3d6b5a; color: #fff; }
.btn-primary:hover { background: #1a2b22; }
.btn-secondary { background: #fff; color: #6b8078; border: 1px solid #d4ddd9; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.alert-error {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}

.alert-success {
  background: #eaf2ee;
  border: 1px solid #c2d9cf;
  color: #3d6b5a;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e8edeb;
}

.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b8078;
}

.actions { display: flex; gap: 8px; }

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  font-size: 14px;
  color: #6b8078;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf2ee;
}

.login-card {
  background: #fff;
  border-radius: 14px;
  padding: 36px;
  width: 100%;
  max-width: 400px;
  border: 1px solid #d4ddd9;
}

.login-card h1 {
  font-size: 26px;
  margin-bottom: 6px;
  color: #3d6b5a;
}

.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-login-brand .admin-logo-mark {
  width: 28px;
  height: 28px;
}

.login-card p { margin-bottom: 20px; color: #6b8078; }

.hint { font-size: 12px; color: #6b8078; margin-top: 12px; }

.import-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #6b8078;
  margin-bottom: 8px;
}

.import-progress-track {
  height: 10px;
  background: #eaf2ee;
  border-radius: 999px;
  overflow: hidden;
}

.import-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #3d6b5a, #5a9e87);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.doctor-thumb-cell { width: 48px; height: 48px; }
.doctor-thumb-img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.doctor-thumb-fallback {
  width: 48px; height: 48px; align-items: center; justify-content: center;
  background: #eaf2ee; border-radius: 8px; color: #6b8078; font-size: 12px;
}

.integration-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.badge-integrated {
  display: inline-block;
  background: #059669;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}

.provider-id-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.provider-id-row .form-control {
  flex: 1;
}

.provider-id-row .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── CMS admin styles ── */
.cms-index-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cms-filter-bar {
  margin-bottom: 16px;
}

.cms-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cms-badge-blog    { background: #dbeafe; color: #1d4ed8; }
.cms-badge-service { background: #d1fae5; color: #065f46; }

.cms-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.cms-status-live  { background: #d1fae5; color: #065f46; }
.cms-status-draft { background: #f3f4f6; color: #6b7280; }

.cms-slug-link   { color: #1d4ed8; font-size: 13px; text-decoration: none; }
.cms-slug-link:hover { text-decoration: underline; }
.cms-slug-draft  { color: #9ca3af; font-size: 13px; }

.cms-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1a2b22;
}

.cms-required { color: #b91c1c; }
.cms-hint-inline { font-size: 12px; color: #6b8078; font-weight: 400; }

.cms-slug-preview-row {
  display: flex;
  align-items: center;
  gap: 0;
}
.cms-slug-base {
  background: #f1f5f2;
  border: 1px solid #d4ddd9;
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 10px 10px;
  font-size: 13px;
  color: #6b8078;
  white-space: nowrap;
}
.cms-slug-preview-row .form-control {
  border-radius: 0 8px 8px 0;
}

.cms-body-editor {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.cms-current-image {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}
.cms-img-preview {
  width: 140px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d4ddd9;
}
.cms-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #b91c1c;
  cursor: pointer;
}

.cms-form-footer {
  display: flex;
  gap: 12px;
  align-items: center;
}
