* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #e9f8fb 0%, #ffffff 48%, #dff1f5 100%);
  color: #111f2a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.admin-login {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 480px);
  align-items: center;
  gap: 48px;
}

.admin-login > div p,
.admin-header p {
  margin: 0 0 16px;
  color: #0b617a;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.admin-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.admin-brand-lockup img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.admin-login h1,
.admin-header h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
}

.admin-login span,
.admin-header span {
  display: block;
  margin-top: 18px;
  color: #657781;
  font-size: 18px;
  line-height: 1.55;
}

.admin-login form,
.admin-card,
.admin-stats article {
  border: 1px solid #d8e8ed;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 70px rgba(8, 58, 73, 0.1);
}

.admin-login form {
  display: grid;
  gap: 18px;
  padding: 34px;
}

.admin-login label {
  display: grid;
  gap: 9px;
  font-weight: 900;
}

.admin-login input {
  width: 100%;
  border: 1px solid #d8e5ea;
  border-radius: 18px;
  padding: 16px;
  color: #111f2a;
  outline: none;
}

.admin-login input:focus {
  border-color: #75c5d7;
  box-shadow: 0 0 0 4px rgba(117, 197, 215, 0.22);
}

.admin-login button,
.admin-actions button,
.admin-row-actions button {
  border: 0;
  border-radius: 999px;
  background: #06485a;
  color: #fff;
  padding: 14px 20px;
  font-weight: 950;
  cursor: pointer;
}

[data-admin-error] {
  min-height: 22px;
  margin: 0;
  color: #b3261e;
  font-weight: 800;
}

.is-hidden {
  display: none !important;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.admin-header h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.admin-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid #d8e8ed;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-nav button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #60727c;
  padding: 12px 18px;
  font-weight: 950;
  white-space: nowrap;
  cursor: pointer;
}

.admin-nav button.is-active {
  background: #dff3f8;
  color: #06485a;
  box-shadow: inset 0 0 0 2px rgba(6, 72, 90, 0.08);
}

.admin-actions button:last-child,
.admin-row-actions .danger {
  background: #f3f7f9;
  color: #0f2733;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.admin-stats article {
  padding: 22px;
}

.admin-stats strong {
  display: block;
  font-size: 36px;
  line-height: 1;
}

.admin-stats span {
  display: block;
  margin-top: 8px;
  color: #64747e;
  font-weight: 750;
}

.admin-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid #e2edf0;
  background: rgba(223, 243, 248, 0.28);
}

.admin-mini-stats article {
  border: 1px solid #d8e8ed;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
}

.admin-mini-stats strong {
  display: block;
  color: #0f2733;
  font-size: 28px;
  line-height: 1;
}

.admin-mini-stats span {
  display: block;
  margin-top: 8px;
  color: #64747e;
  font-weight: 800;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-card {
  overflow: hidden;
}

.admin-card > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px;
  border-bottom: 1px solid #e2edf0;
}

.admin-card h2 {
  margin: 0;
  font-size: 21px;
}

.admin-card header p {
  margin: 6px 0 0;
  color: #657781;
  font-weight: 650;
  line-height: 1.45;
}

.admin-card header span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #dff3f8;
  color: #06485a;
  font-weight: 950;
}

.admin-list {
  display: grid;
  max-height: 560px;
  overflow: auto;
}

.admin-section[data-admin-section="feedback"] .admin-card + .admin-card {
  margin-top: 24px;
}

.admin-table-card {
  overflow: hidden;
}

.admin-waitlist-card {
  border-radius: 26px;
}

.admin-waitlist-card .admin-card-count,
.admin-waitlist-card > header > span {
  flex: 0 0 auto;
}

.admin-table-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid #e2edf0;
}

.admin-table-toolbar label {
  display: grid;
  flex: 1;
  gap: 7px;
  color: #627580;
  font-size: 13px;
  font-weight: 900;
}

.admin-table-toolbar input {
  width: 100%;
  border: 1px solid #d8e5ea;
  border-radius: 16px;
  padding: 13px 15px;
  background: #fff;
  color: #111f2a;
  outline: none;
}

.admin-table-toolbar input:focus {
  border-color: #75c5d7;
  box-shadow: 0 0 0 4px rgba(117, 197, 215, 0.18);
}

.admin-table-toolbar button,
.admin-export-button {
  border: 0;
  border-radius: 999px;
  background: #06485a;
  color: #fff;
  padding: 13px 18px;
  font-weight: 950;
  cursor: pointer;
}

.admin-blog-list {
  max-height: 660px;
}

.admin-blog-row {
  display: grid;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid #e2edf0;
}

.admin-blog-row:last-child {
  border-bottom: 0;
}

.admin-blog-row header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-blog-row h3 {
  margin: 0;
  color: #111f2a;
  font-size: 20px;
  line-height: 1.2;
}

.admin-blog-row p {
  margin: 6px 0 0;
  color: #64747e;
  line-height: 1.5;
}

.admin-blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-blog-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: #eef7fa;
  color: #06485a;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 900;
}

.admin-blog-pill.is-pending {
  background: #fff2d8;
  color: #8a5600;
}

.admin-blog-pill.is-published {
  background: #e7f8ee;
  color: #166534;
}

.admin-blog-pill.is-open {
  background: #e6f6ff;
  color: #075985;
}

.admin-blog-pill.is-reviewing {
  background: #fff2d8;
  color: #8a5600;
}

.admin-blog-pill.is-completed {
  background: #e7f8ee;
  color: #166534;
}

.admin-blog-pill.is-rejected {
  background: #fff0ef;
  color: #a33b31;
}

.admin-privacy-list {
  max-height: 660px;
  overflow: auto;
}

.admin-table-toolbar p {
  margin: 0;
  color: #64747e;
  line-height: 1.45;
}

.admin-privacy-row .admin-row-actions {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr) auto;
  align-items: start;
  justify-content: stretch;
}

.admin-privacy-row select,
.admin-privacy-row textarea {
  width: 100%;
  border: 1px solid #d8e5ea;
  border-radius: 16px;
  background: #ffffff;
  color: #111f2a;
  padding: 12px;
  font: inherit;
  font-weight: 800;
}

.admin-privacy-row textarea {
  min-height: 72px;
  resize: vertical;
  font-weight: 700;
}

.admin-blog-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-blog-editor label {
  display: grid;
  gap: 7px;
  color: #627580;
  font-weight: 900;
}

.admin-blog-editor label.full {
  grid-column: 1 / -1;
}

.admin-blog-editor input,
.admin-blog-editor textarea {
  width: 100%;
  border: 1px solid #d8e5ea;
  border-radius: 16px;
  padding: 13px 15px;
  color: #111f2a;
  outline: none;
}

.admin-blog-editor textarea {
  min-height: 110px;
  resize: vertical;
}

.admin-table-wrap {
  max-height: 620px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.78);
}

.admin-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf3f5;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5fbfd;
  color: #0b617a;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-table td {
  color: #233742;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-table tbody tr:hover {
  background: rgba(223, 243, 248, 0.28);
}

.admin-table td[colspan] {
  padding: 28px 24px;
  color: #64747e;
  text-align: center;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid #edf3f5;
}

.admin-row.is-flagged-hot {
  border-left: 5px solid #c84b43;
  background: #fff7f5;
}

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

.admin-row strong {
  display: block;
  font-size: 18px;
}

.admin-row small,
.admin-row p {
  display: block;
  margin: 5px 0 0;
  color: #667781;
  line-height: 1.45;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  border-radius: 999px;
  background: #e9f7ec;
  color: #176b35;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 950;
}

.admin-badge.is-verified {
  background: #e0f7ea;
  color: #126137;
}

.admin-badge.is-suspended {
  background: #fff0ef;
  color: #a33b31;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-row-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: 999px;
  background: #e2f5fa;
  color: #06485a;
  padding: 0 14px;
  font-weight: 950;
  text-decoration: none;
}

.admin-doctor-row {
  align-items: start;
}

.admin-doctor-summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.admin-doctor-avatar {
  flex: 0 0 auto;
  border: 1px solid #d8e8ed;
  border-radius: 24px;
  background: #eef9fc;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 14px 32px rgba(8, 58, 73, 0.1);
}

.admin-doctor-avatar-sm {
  width: 72px;
  height: 72px;
}

.admin-doctor-avatar-lg {
  width: 132px;
  height: 132px;
  border-radius: 32px;
}

.admin-doctor-photo-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.admin-doctor-photo-panel p {
  margin: 6px 0 12px;
}

.admin-upload-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 42px;
  border-radius: 999px;
  background: #06485a;
  color: #fff;
  padding: 0 16px;
  font-weight: 950;
  cursor: pointer;
  overflow: hidden;
}

.admin-upload-pill input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.admin-photo-note {
  display: block;
  max-width: 420px;
  color: #6b7f88;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
}

.admin-doctor-edit-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe9ed;
  border-radius: 18px;
  background: #f8fcfd;
}

.admin-doctor-edit-card form,
.admin-edit-wide {
  display: grid;
  gap: 12px;
}

.admin-edit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-doctor-edit-card label,
.admin-visibility-fieldset {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-doctor-edit-card label span,
.admin-visibility-fieldset legend {
  color: #526871;
  font-size: 12px;
  font-weight: 900;
}

.admin-doctor-edit-card input,
.admin-doctor-edit-card select,
.admin-doctor-edit-card textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d5e7ec;
  border-radius: 12px;
  background: #fff;
  color: #10232c;
  padding: 11px 12px;
  font: inherit;
}

.admin-doctor-edit-card textarea {
  resize: vertical;
}

.admin-doctor-edit-card select[multiple] {
  min-height: 122px;
  padding: 8px;
}

.admin-doctor-edit-card select[multiple] option {
  border-radius: 8px;
  padding: 7px 8px;
}

.admin-visibility-fieldset {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  border: 1px solid #d5e7ec;
  border-radius: 14px;
  padding: 12px;
}

.admin-visibility-fieldset legend {
  padding: 0 6px;
}

.admin-visibility-fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #20343d;
  font-weight: 800;
}

.admin-doctor-edit-card button[type="submit"] {
  min-height: 44px;
  border-radius: 999px;
  background: #06485a;
  color: #fff;
  font-weight: 950;
  cursor: pointer;
}

.admin-save-doctor-footer {
  order: -1;
  background: #06485a !important;
  color: #fff !important;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 24, 32, 0.34);
  backdrop-filter: blur(10px);
}

.admin-modal-card {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  max-height: min(86vh, 900px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid #d8e8ed;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 34px 90px rgba(8, 58, 73, 0.22);
}

.admin-modal-card > header,
.admin-modal-card > footer {
  padding: 20px 24px;
  border-bottom: 1px solid #e2edf0;
}

.admin-modal-card > footer {
  border-top: 1px solid #e2edf0;
  border-bottom: 0;
}

.admin-modal-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-modal-card > header p {
  margin: 0 0 5px;
  color: #0b617a;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-modal-card h2,
.admin-modal-card h3 {
  margin: 0;
}

.admin-modal-card > header button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #eef7fa;
  color: #0f2733;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.admin-modal-body {
  display: grid;
  gap: 18px;
  overflow: auto;
  padding: 22px 24px;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-detail-grid div,
.admin-modal-body section {
  border: 1px solid #e2edf0;
  border-radius: 20px;
  background: #fbfdfe;
  padding: 14px;
}

.admin-detail-grid span {
  display: block;
  margin-bottom: 6px;
  color: #667781;
  font-size: 12px;
  font-weight: 900;
}

.admin-detail-grid strong {
  display: block;
  color: #111f2a;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-modal-body section h3 {
  margin-bottom: 10px;
  color: #0b617a;
  font-size: 16px;
}

.admin-modal-body section p,
.admin-modal-body section ul {
  margin: 0;
  color: #536873;
  line-height: 1.55;
}

.admin-fallback-form {
  display: grid;
  gap: 14px;
}

.admin-fallback-form label {
  display: grid;
  gap: 7px;
  color: #5f717b;
  font-size: 13px;
  font-weight: 850;
}

.admin-fallback-form input,
.admin-fallback-form select {
  width: 100%;
  border: 1px solid #d8e8ed;
  border-radius: 14px;
  background: #fff;
  color: #111f2a;
  padding: 11px 12px;
}

.admin-fallback-form > label:first-child,
.admin-weekdays label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-fallback-form input[type="checkbox"] {
  width: auto;
}

.admin-weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-weekdays label {
  border: 1px solid #d8e8ed;
  border-radius: 999px;
  background: #fff;
  padding: 8px 12px;
}

.admin-fallback-form button {
  width: max-content;
  border: 0;
  border-radius: 999px;
  background: #06485a;
  color: #fff;
  padding: 12px 18px;
  font-weight: 950;
  cursor: pointer;
}

.admin-modal-body section ul {
  padding-left: 20px;
}

.admin-form-builder {
  overflow: visible;
}

.admin-form-builder > header {
  align-items: flex-start;
}

.admin-form-builder > header p {
  margin: 6px 0 0;
  color: #657781;
  font-weight: 650;
  line-height: 1.45;
}

.admin-form-config {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.form-config-group {
  display: grid;
  gap: 14px;
}

.form-config-group h3 {
  margin: 0;
  color: #0b617a;
  font-size: 18px;
}

.form-config-step {
  border: 1px solid #e2edf0;
  border-radius: 22px;
  overflow: hidden;
  background: #fbfdfe;
}

.form-config-step > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e6f0f3;
}

.form-config-step label,
.form-config-field label {
  color: #627580;
  font-size: 13px;
  font-weight: 850;
}

.form-config-step input,
.form-config-field input {
  border: 1px solid #d8e5ea;
  border-radius: 12px;
  padding: 9px 10px;
  background: #fff;
  color: #13242e;
}

.form-config-step input[type="number"] {
  width: 74px;
}

.form-config-fields {
  display: grid;
}

.form-config-field {
  display: grid;
  grid-template-columns: 100px 112px 90px minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef5f7;
}

.form-config-field:last-child {
  border-bottom: 0;
}

.field-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-label {
  display: grid;
  gap: 6px;
}

.field-label input {
  width: 100%;
}

.field-type {
  border-radius: 999px;
  background: #edf8fb;
  color: #0b617a;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 950;
}

.admin-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 22px 22px;
  border-top: 1px solid #e2edf0;
}

.admin-form-actions button {
  border: 0;
  border-radius: 999px;
  background: #06485a;
  color: #fff;
  padding: 13px 18px;
  font-weight: 950;
  cursor: pointer;
}

.admin-form-actions button:first-child {
  background: #eef6f8;
  color: #0f2733;
}

.admin-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  pointer-events: none;
  border-radius: 999px;
  background: #062f3c;
  color: #fff;
  padding: 12px 18px;
  font-weight: 900;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.admin-toast.is-open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 860px) {
  .admin-login,
  .admin-grid,
  .admin-stats,
  .admin-mini-stats,
  .form-config-field,
  .admin-detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    display: grid;
  }

  .admin-table-toolbar {
    display: grid;
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .admin-shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0;
  }

  .admin-login {
    min-height: calc(100vh - 36px);
    gap: 22px;
  }

  .admin-login h1,
  .admin-header h1 {
    font-size: 42px;
  }

  .admin-login form,
  .admin-card > header,
  .admin-row {
    padding: 18px;
  }

  .admin-row {
    grid-template-columns: 1fr;
  }

  .admin-row-actions {
    justify-content: flex-start;
  }
}
