/* ============================================================
   BackSEO Meta Description v2.3 — Dashboard Styles
   Back Studio © 2024  |  backseo.fr
   ============================================================ */

:root {
  --bsd-dark:    #1a1a2e;
  --bsd-gold:    #e8c547;
  --bsd-green:   #22c55e;
  --bsd-orange:  #f59e0b;
  --bsd-red:     #ef4444;
  --bsd-blue:    #3b82f6;
  --bsd-surface: #ffffff;
  --bsd-bg:      #f8fafc;
  --bsd-border:  #e2e8f0;
  --bsd-text:    #1e293b;
  --bsd-muted:   #64748b;
  --bsd-radius:  10px;
  --bsd-shadow:  0 2px 16px rgba(0,0,0,.07);
}

/* ── Reset WP padding ─────────────────────────────────────── */
.bsd-page { margin-right: 0 !important; }
.bsd-page .wrap { margin: 0; }

/* ── Header ───────────────────────────────────────────────── */
.bsd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bsd-dark);
  padding: 14px 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.bsd-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bsd-logo-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}

.bsd-version {
  font-size: 11px;
  font-weight: 400;
  color: var(--bsd-gold);
  margin-left: 4px;
}

.bsd-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.bsd-nav-item {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.bsd-nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.bsd-nav-item.active { background: var(--bsd-gold); color: var(--bsd-dark) !important; font-weight: 700; }

/* ── Content ──────────────────────────────────────────────── */
.bsd-content { max-width: 1100px; }

/* ── Section title ────────────────────────────────────────── */
.bsd-section-title { margin-bottom: 16px; }
.bsd-section-title h2 { font-size: 20px; color: var(--bsd-dark); margin: 0 0 4px; }
.bsd-section-title h3 { font-size: 17px; color: var(--bsd-dark); margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.bsd-subtitle { color: var(--bsd-muted); font-size: 13px; margin: 0; }
.bsd-section-optimized { margin-top: 32px; }

/* ── Badge ────────────────────────────────────────────────── */
.bsd-badge-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

/* ── Table ────────────────────────────────────────────────── */
.bsd-table-wrap {
  background: var(--bsd-surface);
  border: 1px solid var(--bsd-border);
  border-radius: var(--bsd-radius);
  overflow: hidden;
  box-shadow: var(--bsd-shadow);
  margin-bottom: 16px;
}

.bsd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bsd-table thead tr {
  background: var(--bsd-bg);
  border-bottom: 2px solid var(--bsd-border);
}

.bsd-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bsd-muted);
}

.bsd-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--bsd-border);
  vertical-align: middle;
}

.bsd-table tbody tr:last-child td { border-bottom: none; }
.bsd-table tbody tr:hover { background: #fafbfc; }
.bsd-row-optimized { background: #f0fdf4 !important; }
.bsd-row-optimized:hover { background: #dcfce7 !important; }

.bsd-post-title {
  font-weight: 600;
  color: var(--bsd-dark);
  text-decoration: none;
  font-size: 13px;
}
.bsd-post-title:hover { color: var(--bsd-blue); text-decoration: underline; }

.bsd-post-type {
  background: #f1f5f9;
  color: var(--bsd-muted);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}

/* ── Score cell ───────────────────────────────────────────── */
.bsd-score-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bsd-score-bar-wrap { flex: 1; }

.bsd-score-bar-bg {
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.bsd-score-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .3s ease;
}

.bsd-bar-green  { background: var(--bsd-green); }
.bsd-bar-orange { background: var(--bsd-orange); }
.bsd-bar-red    { background: var(--bsd-red); }

.bsd-score-pct {
  font-size: 12px;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}
.bsd-score-green  { color: #16a34a; }
.bsd-score-orange { color: #d97706; }
.bsd-score-red    { color: #dc2626; }

/* ── Buttons ──────────────────────────────────────────────── */
.bsd-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--bsd-border);
  background: var(--bsd-surface);
  color: var(--bsd-text);
  transition: all .15s;
  white-space: nowrap;
}
.bsd-btn:hover { border-color: var(--bsd-dark); color: var(--bsd-dark); }

.bsd-btn-primary { background: var(--bsd-dark); color: #fff !important; border-color: var(--bsd-dark); }
.bsd-btn-primary:hover { background: #2d2d4e; border-color: #2d2d4e; }

.bsd-btn-ghost { background: transparent; border-color: var(--bsd-border); color: var(--bsd-muted) !important; }
.bsd-btn-ghost:hover { border-color: var(--bsd-dark); color: var(--bsd-dark) !important; }

.bsd-btn-error { background: var(--bsd-red); color: #fff !important; border-color: var(--bsd-red); }
.bsd-btn-error:hover { background: #dc2626; }

.bsd-btn-sm { padding: 4px 10px; font-size: 12px; }
.bsd-btn-lg { padding: 10px 22px; font-size: 14px; }

.bsd-btn-copy { font-size: 12px; padding: 7px 12px; }
.bsd-btn-success-flash { background: var(--bsd-green) !important; border-color: var(--bsd-green) !important; color: #fff !important; }

.bsd-btn[disabled] { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* ── Notice ───────────────────────────────────────────────── */
.bsd-notice {
  padding: 12px 16px;
  border-radius: var(--bsd-radius);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.bsd-notice-success { background: #dcfce7; color: #166534; border-left: 4px solid var(--bsd-green); }

/* ── Cards ────────────────────────────────────────────────── */
.bsd-card {
  background: var(--bsd-surface);
  border: 1px solid var(--bsd-border);
  border-radius: var(--bsd-radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--bsd-shadow);
}

.bsd-card-disabled { opacity: .55; pointer-events: none; }

.bsd-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--bsd-dark);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bsd-border);
}

.bsd-card-desc {
  font-size: 13px;
  color: var(--bsd-muted);
  margin: 0 0 14px;
  line-height: 1.6;
}

/* ── Fields ───────────────────────────────────────────────── */
.bsd-field { margin-bottom: 18px; }
.bsd-field:last-child { margin-bottom: 0; }

.bsd-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--bsd-dark);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.bsd-hint {
  font-size: 12px;
  color: var(--bsd-muted);
  margin: 0 0 8px;
  line-height: 1.5;
}

.bsd-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 2px solid var(--bsd-border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--bsd-text);
  background: var(--bsd-surface);
  transition: border-color .2s;
}
.bsd-input:focus { border-color: var(--bsd-dark); outline: none; }
.bsd-input[readonly] { background: var(--bsd-bg); color: var(--bsd-muted); cursor: default; }

.bsd-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.bsd-input-row .bsd-input { flex: 1; }

.bsd-code-preview {
  display: block;
  margin-top: 8px;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 12px;
  color: #334155;
  word-break: break-all;
}

.bsd-url-code {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--bsd-muted);
  background: var(--bsd-bg);
  padding: 3px 8px;
  border-radius: 4px;
}

/* ── Alerts ───────────────────────────────────────────────── */
.bsd-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}
.bsd-alert p { margin: 4px 0 0; font-size: 12px; }

.bsd-alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.bsd-alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

.bsd-alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

/* ── Toggle ───────────────────────────────────────────────── */
.bsd-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bsd-mb { margin-bottom: 16px; }

.bsd-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.bsd-toggle input { opacity: 0; width: 0; height: 0; }

.bsd-toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  cursor: pointer;
  transition: background .2s;
}
.bsd-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.bsd-toggle input:checked + .bsd-toggle-slider { background: var(--bsd-green); }
.bsd-toggle input:checked + .bsd-toggle-slider::before { transform: translateX(20px); }

.bsd-toggle-label { font-size: 13px; font-weight: 600; color: var(--bsd-text); }

/* ── Save row ─────────────────────────────────────────────── */
.bsd-save-row { padding-top: 8px; }

/* ── Promo card ───────────────────────────────────────────── */
.bsd-promo-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d52 100%);
  border-radius: 16px;
  padding: 32px 36px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
  color: #fff;
  max-width: 700px;
}

.bsd-promo-logo { flex-shrink: 0; }

.bsd-promo-body h2 {
  font-size: 22px;
  color: var(--bsd-gold);
  margin: 0 0 10px;
}

.bsd-promo-body p {
  font-size: 14px;
  color: rgba(255,255,255,.8);
  margin: 0 0 12px;
  line-height: 1.6;
}

.bsd-promo-services {
  font-size: 13px !important;
  color: rgba(255,255,255,.7) !important;
  line-height: 2 !important;
}

.bsd-promo-card .bsd-btn-primary {
  background: var(--bsd-gold);
  color: var(--bsd-dark) !important;
  border-color: var(--bsd-gold);
  margin-top: 8px;
}
.bsd-promo-card .bsd-btn-primary:hover { background: var(--bsd-gold); filter: brightness(1.1); }

/* ── Empty state ──────────────────────────────────────────── */
.bsd-empty {
  text-align: center;
  padding: 40px;
  color: var(--bsd-muted);
  font-size: 14px;
  background: var(--bsd-surface);
  border: 1px dashed var(--bsd-border);
  border-radius: var(--bsd-radius);
}
