.admin-sidebar {
  background: #0f2d59;
}

.navlink {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  border-radius: .5rem;
}

.navlink:hover {
  background: rgba(30, 58, 138, .6);
}

.navlink.active {
  background: #fff;
  color: #0f2d59;
}

.modal-backdrop {
  background: rgba(15, 23, 42, .65);
}

.field-label {
  display: block;
  margin-bottom: .375rem;
  font-size: .875rem;
  font-weight: 700;
}

.field-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: .5rem;
  padding: .75rem 1rem;
  background: #fff;
  outline: none;
}

.field-input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(191, 219, 254, .5);
}

.editor-link-dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Basic SEO editor - no CKEditor dependency */
.seo-editor-card {
  overflow: visible;
}

.seo-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.seo-meta-field {
  min-width: 0;
}

.seo-meta-title,
.seo-meta-description {
  grid-column: span 2;
}

.seo-counter {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .6875rem;
  color: #94a3b8;
  pointer-events: none;
}

.seo-counter.bottom-3 {
  top: auto;
  bottom: .75rem;
  transform: none;
}

.seo-hint {
  margin-top: .25rem;
  font-size: .75rem;
  color: #64748b;
}

.seo-toolbar-wrap {
  border: 1px solid #cbd5e1;
  border-radius: .875rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.seo-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
  padding: .5rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.editor-btn,
.editor-select {
  min-height: 2.25rem;
  border: 1px solid #e2e8f0;
  border-radius: .5rem;
  background: #fff;
  color: #0f172a;
  font-size: .8125rem;
  font-weight: 700;
  padding: .375rem .625rem;
  transition: .15s ease;
}

.editor-btn {
  min-width: 2.25rem;
}

.editor-btn:hover,
.editor-select:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.editor-btn-wide {
  padding-inline: .75rem;
}

.editor-select {
  min-width: 8rem;
  cursor: pointer;
}

.toolbar-separator {
  width: 1px;
  height: 1.75rem;
  background: #cbd5e1;
  margin: 0 .125rem;
}

.seo-editor-body {
  background: #fff;
}

.editor-surface-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .625rem .875rem;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  font-size: .75rem;
  font-weight: 700;
}

.service-rich-editor,
.service-html-source {
  min-height: 420px;
  max-height: 620px;
  overflow-y: auto;
  padding: 1.25rem;
  outline: none;
  line-height: 1.75;
  color: #0f172a;
}

.service-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}

.service-rich-editor:focus {
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, .18);
}

.service-rich-editor h1,
.service-rich-editor h2,
.service-rich-editor h3,
.service-rich-editor h4 {
  color: #0f172a;
  font-weight: 900;
  line-height: 1.25;
  margin: 1.15rem 0 .55rem;
}

.service-rich-editor h1 { font-size: 2rem; }
.service-rich-editor h2 { font-size: 1.5rem; }
.service-rich-editor h3 { font-size: 1.25rem; }
.service-rich-editor h4 { font-size: 1.1rem; }

.service-rich-editor p {
  margin: .65rem 0;
}

.service-rich-editor a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.service-rich-editor img {
  max-width: 100%;
  height: auto;
  border-radius: .5rem;
  margin: .75rem 0;
}

.service-rich-editor blockquote {
  margin: 1rem 0;
  padding: .75rem 1rem;
  border-left: 4px solid #0f2d59;
  background: #f8fafc;
  color: #475569;
}

.service-rich-editor ul,
.service-rich-editor ol {
  padding-left: 1.5rem;
  margin: .75rem 0;
}

.service-rich-editor table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.service-rich-editor td,
.service-rich-editor th {
  border: 1px solid #cbd5e1;
  padding: .5rem;
}

.service-html-source {
  width: 100%;
  border: 0;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .8125rem;
  line-height: 1.6;
  background: #0f172a;
  color: #e2e8f0;
}

.seo-inline-box {
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
  background: #fff;
  padding: .875rem;
}

@media (max-width: 768px) {
  .seo-meta-grid {
    grid-template-columns: 1fr;
  }

  .seo-meta-title,
  .seo-meta-description {
    grid-column: span 1;
  }

  .service-rich-editor,
  .service-html-source {
    min-height: 340px;
  }
}
