/* WordPress classic wp-admin look. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px; color: #3c434a; background: #f0f0f5;
}

/* ---- Admin bar (glassmorphism, all pages) ---- */
#wpadminbar {
  position: fixed; top: 0; left: 0; right: 0; height: 32px; z-index: 100;
  background: linear-gradient(90deg, #1e1b4b 0%, #0d0c0c 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 24px rgba(74, 5, 235, 0.15);
  color: #fff;
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; font-size: 13px;
}
#wpadminbar .ab-brand { font-weight: 600; }
#wpadminbar .ab-right strong { color: #fff; }
#wpadminbar .ab-right { display: flex; align-items: center; gap: 8px; }
/* ---- Text size control ---- */
.fs-control { display: inline-flex; align-items: center; gap: 2px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 2px; }
.fs-btn { background: transparent; border: 0; color: rgba(255,255,255,.65); cursor: pointer; font-family: 'Inter', sans-serif; font-weight: 700; line-height: 1; padding: 3px 7px; border-radius: 6px; }
.fs-btn:hover { color: #fff; background: rgba(255,255,255,.1); }
.fs-btn.active { background: linear-gradient(135deg, #4a05eb, #06b6d4); color: #fff; }
#menu-toggle {
  display: none; background: none; border: 0; color: #eee;
  font-size: 20px; cursor: pointer; padding: 0 12px 0 0; min-height: 0; line-height: 1;
}
#menu-toggle:hover { background: none; color: #72aee6; }
#menu-overlay { display: none; }

/* ---- Admin menu (glassmorphism, all pages) ---- */
#adminmenumain {
  position: fixed; top: 32px; bottom: 0; left: 0; width: 160px;
  background: linear-gradient(180deg, #1e1b4b 0%, #0d0c0c 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 24px rgba(74, 5, 235, 0.15);
  display: flex; flex-direction: column;
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
}
#adminmenu { list-style: none; margin: 12px 0 0; padding: 0; flex: 1; overflow-y: auto; }
#adminmenu li a {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255, 255, 255, 0.82); text-decoration: none; font-size: 14px;
  padding: 8px 12px; border-left: 4px solid transparent; border-radius: 0 16px 16px 0;
  margin-right: 8px; transition: background 0.2s, color 0.2s;
}
#adminmenu li a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
#adminmenu li.current a {
  background: linear-gradient(135deg, #4a05eb, #06b6d4);
  color: #fff; border-left-color: transparent;
  box-shadow: 0 0 16px rgba(74, 5, 235, 0.4); font-weight: 600;
}
#adminmenu .mi { width: 20px; text-align: center; }
#adminmenu-foot { color: rgba(255, 255, 255, 0.45); font-size: 11px; padding: 12px; line-height: 1.5; }

/* ---- Submenus (dropdown) ---- */
#adminmenu .has-submenu { position: relative; }
#adminmenu .submenu-toggle .caret { margin-left: auto; font-size: 11px; transition: transform .2s; }
#adminmenu .has-submenu.open .submenu-toggle .caret { transform: rotate(180deg); }
#adminmenu .submenu { display: none; list-style: none; margin: 0; padding: 0; background: #14181c; }
#adminmenu .has-submenu.open .submenu { display: block; }
#adminmenu .submenu li a { padding: 8px 12px 8px 40px; font-size: 13px; }
#adminmenu .submenu li.current a { background: #2271b1; color: #fff; border-left-color: #fff; }

/* ---- Content ---- */
#wpcontent { margin: 32px 0 0 160px; padding: 20px; min-height: calc(100vh - 32px); }
.wrap h1 {
  font-size: 23px; font-weight: 400; color: #1d2327;
  margin: 0 0 16px; padding: 9px 0 4px;
}
.wrap h2 { font-size: 14px; color: #1d2327; margin: 1.5em 0 0.6em; }
.wrap p { margin: 0 0 12px; }
.muted { color: #646970; }
.wrap > p > a:first-child { color: #2271b1; }

/* ---- Postboxes (dashboard widgets) ---- */
.postbox {
  background: #fff; border: 1px solid #c3c4c7;
  box-shadow: 0 1px 1px rgba(0,0,0,.04); margin-bottom: 20px;
}
.postbox > h2, .postbox-header {
  font-size: 14px; padding: 8px 12px; margin: 0;
  border-bottom: 1px solid #c3c4c7; color: #1d2327; font-weight: 600;
}
.postbox .inside { padding: 12px; margin: 0; }
.dashboard-widgets { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; align-items: start; }
.at-glance { list-style: none; margin: 0; padding: 0; }
.at-glance li { padding: 6px 0; border-bottom: 1px solid #f0f0f5; font-size: 14px; }
.at-glance li:last-child { border-bottom: 0; }

/* ---- Tables (wp-list-table) ---- */
table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid #c3c4c7; margin: 12px 0 24px; font-size: 13px;
}
th, td { text-align: left; padding: 8px 10px; }
thead th, tr:first-child th {
  color: #2c3338; font-weight: 400; border-bottom: 1px solid #c3c4c7;
}
tbody tr:nth-child(odd), tr:nth-child(even) { background: #fff; }
table tr:nth-child(odd) td { background: #f6f7f7; }
td { border-bottom: 1px solid #f0f0f5; color: #3c434a; }
td.url { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status {
  display: inline-block; background: #f0f0f5; border: 1px solid #c3c4c7;
  padding: 2px 8px; border-radius: 11px; font-size: 12px; color: #3c434a;
}

/* ---- Forms ---- */
form { margin: 12px 0 24px; }
.form-table th { width: 200px; }
label { display: block; margin: 0 0 12px; font-size: 13px; }
label small { color: #646970; display: block; margin-top: 2px; }
input[type=text], input[type=number], input:not([type]), select, textarea {
  border: 1px solid #8c8f94; border-radius: 4px; background: #fff;
  color: #2c3338; padding: 6px 8px; font-size: 14px; width: 100%; max-width: 400px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: #2271b1; outline: 2px solid #2271b1; outline-offset: -2px; }

/* ---- Buttons ---- */
button, .button {
  display: inline-block; font-size: 13px; line-height: 2.153;
  padding: 0 12px; border-radius: 3px; cursor: pointer;
  border: 1px solid #2271b1; background: #2271b1; color: #fff;
  text-decoration: none; min-height: 30px;
}
button:hover, .button:hover { background: #135e96; border-color: #135e96; }
button.link {
  background: none; border: 0; color: #2271b1; padding: 0;
  min-height: 0; line-height: inherit; text-decoration: underline;
}
button.link:hover { color: #135e96; background: none; }
td form { margin: 0; display: inline; }

a { color: #2271b1; }
a:hover { color: #135e96; }
.warn {
  background: #fcf9e8; border: 1px solid #c3c4c7; border-left: 4px solid #dba617;
  padding: 12px; margin: 12px 0;
}

/* ---- Mobile: off-canvas drawer sidebar (WP breakpoint 782px) ---- */
@media (max-width: 782px) {
  #menu-toggle { display: block; }
  #adminmenumain {
    position: fixed; top: 32px; bottom: 0; left: 0; width: 240px; z-index: 150;
    transform: translateX(-105%); transition: transform .25s ease;
    box-shadow: 2px 0 8px rgba(0,0,0,.3);
  }
  body.menu-open #adminmenumain { transform: translateX(0); }
  body.menu-open { overflow: hidden; }
  #menu-overlay {
    display: none; position: fixed; top: 32px; right: 0; bottom: 0; left: 0;
    background: rgba(0,0,0,.5); z-index: 140;
  }
  body.menu-open #menu-overlay { display: block; }
  #adminmenu-foot { display: block; }
  #wpcontent { margin: 32px 0 0; padding: 12px; }
  .dashboard-widgets { grid-template-columns: 1fr; }
  .wrap h1 { font-size: 20px; }

  /* Tables: swipeable horizontal scroll */
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px -12px 24px; padding: 0 12px; }
  .table-scroll table { margin: 0; }
  th, td { padding: 6px 8px; font-size: 12px; }
  td.url { max-width: 180px; }

  /* Forms: full-width inputs */
  input[type=text], input[type=number], input:not([type]), select, textarea { max-width: 100%; }
  .form-table th { width: auto; display: block; }
  .form-table td { display: block; }

  /* AEO visibility report (selectors prefixed with body: template <style>
     blocks load after this file, so higher specificity wins) */
  body .avr-hero { gap: 12px; }
  body .avr-scorecard { flex: 1 1 100%; min-width: 0; padding: 24px 16px; }
  body .avr-score-num { font-size: 44px; }
  body .avr-infocard { min-width: 0; padding: 16px; }
  body .avr-bizname { font-size: 20px; }
  body .avr-url { font-size: 14px; word-break: break-all; }
  body .avr-meta3 { gap: 16px; }
  body .avr-card { padding: 16px; }
  body .avr-tabbar { overflow-x: auto; }
  body .avr-tab { padding: 14px 18px; font-size: 13px; white-space: nowrap; flex-shrink: 0; }
  body .avr-tabpane { padding: 16px; }
  body .avr-donuts { gap: 20px; }
  body .avr-btnrow { flex-wrap: wrap; }
  body .avr-schemacard { min-width: 0; }

  /* AEO wizard dialog */
  body .aiv-overlay { padding: 12px 8px; }
  body .aiv-header { font-size: 17px; padding: 14px 16px; }
  body .aiv-body { padding: 20px 16px; min-height: 0; }
  body .aiv-footer { flex-wrap: wrap; justify-content: center; }
  body .aiv-desc { font-size: 15px; }
}

/* ---- Small phones ---- */
@media (max-width: 480px) {
  #wpadminbar { font-size: 12px; padding: 0 10px; }
  #wpadminbar .ab-brand { display: none; }
  #wpadminbar .ab-right { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- AI Content (provider-style) ---------- */
.ac-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 12px; }
.ac-campaign label { display: block; font-size: 12px; color: #646970; margin-bottom: 4px; }
.ac-campaign select { min-width: 220px; font-size: 15px; font-weight: 600; border: 0; border-bottom: 1px solid #c3c4c7; border-radius: 0; background: transparent; padding: 4px 24px 4px 0; }
.ac-title { font-size: 15px; color: #8a8f98; }
.ac-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ac-add-btn { background: #1a73e8; border-color: #1a73e8; font-weight: 600; padding: 0 22px; line-height: 2.6; }
.ac-add-btn:hover { background: #1765cc; border-color: #1765cc; }
.ac-filters { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ac-filters select { min-width: 180px; }
.ac-table td.ac-ctitle { max-width: 340px; }
.ac-row-actions { white-space: nowrap; }
.ac-row-actions a { margin-right: 10px; text-decoration: none; font-size: 16px; }
.ac-delform { display: inline; margin: 0; }
.ac-delform .link { font-size: 16px; text-decoration: none; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; color: #fff; }
.badge-ok { background: #34a853; }
.badge-err { background: #ea4335; }
.badge-warn { background: #f9ab00; color: #3c4043; }
.ac-pager { display: flex; align-items: center; gap: 18px; margin-top: 10px; flex-wrap: wrap; }
.ac-pager label { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.ac-pgbtns .button { min-width: 36px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* modal wizard */
.ac-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.ac-modal[hidden] { display: none; }
.ac-dialog { background: #fff; border-radius: 8px; width: 640px; max-width: 100%; max-height: calc(100vh - 80px); overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,.3); }
.ac-dhead { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: #5f6368; color: #fff; border-radius: 8px 8px 0 0; position: sticky; top: 0; z-index: 2; }
.ac-dhead h2 { margin: 0; font-size: 18px; color: #fff; }
.ac-x { background: none; border: 0; color: #fff; font-size: 24px; line-height: 1; padding: 0 4px; min-height: 0; }
.ac-x:hover { background: none; color: #ddd; }
.ac-dbody { padding: 20px 24px 24px; }
.ac-dbody h3 { margin: 18px 0 10px; }
.ac-profiles { display: flex; flex-direction: column; gap: 0; border: 1px solid #dadce0; border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.ac-profile { display: flex; align-items: center; gap: 12px; width: 100%; background: #fff; border: 0; border-bottom: 1px solid #eee; border-radius: 0; padding: 12px 14px; text-align: left; min-height: 0; color: #1a1a1a; }
.ac-profile:last-child { border-bottom: 0; }
.ac-profile:hover { background: #f1f3f4; color: #1a1a1a; }
.ac-profile .ac-pmeta strong { color: #111; font-weight: 700; }
.ac-profile .ac-pmeta small.muted { color: #5f6368; }
.ac-profile .ac-pchev { color: #2271b1; font-weight: 700; }
.ac-pico { font-size: 22px; }
.ac-pmeta { flex: 1; min-width: 0; }
.ac-pmeta strong { display: block; }
.ac-pmeta small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-pchev { color: #1a73e8; font-size: 22px; }
.ac-outline-btn { width: 100%; background: #fff; color: #1a73e8; border: 1px solid #1a73e8; font-weight: 600; padding: 10px; line-height: 1.6; }
.ac-outline-btn:hover { background: #e8f0fe; border-color: #1a73e8; }
.ac-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ac-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.ac-wfoot { display: flex; justify-content: space-between; margin-top: 18px; }
.tagbox { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid #8c8f94; border-radius: 3px; padding: 6px 8px; background: #fff; cursor: text; }
.tagbox input { border: 0; outline: 0; flex: 1; min-width: 120px; padding: 2px; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: #e8f0fe; color: #1a73e8; border-radius: 12px; padding: 3px 6px 3px 10px; font-size: 12px; }
.tag-x { background: none; border: 0; color: #1a73e8; padding: 0 2px; min-height: 0; line-height: 1; font-size: 14px; }
.tag-x:hover { background: none; color: #d93025; }
.ac-types { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.ac-type { background: #fff; color: #3c4043; border: 1px solid #dadce0; border-radius: 8px; padding: 10px 16px; font-weight: 500; }
.ac-type:hover { border-color: #1a73e8; background: #fff; }
.ac-type.sel { border-color: #1a73e8; background: #e8f0fe; color: #1a73e8; font-weight: 600; }
.qrow { display: flex; gap: 8px; margin-bottom: 8px; }
.qrow input { flex: 1; }
@media (max-width: 600px) {
  .ac-grid2, .ac-grid3 { grid-template-columns: 1fr; }
  .ac-head { flex-direction: column; align-items: stretch; }
  .ac-title { text-align: left; }
  .ac-dialog { width: 100%; }
}

/* ---------- Competition (provider-style, mirrors AI Content) ---------- */
.cp-card { background: #fff; border: 1px solid #dadce0; border-radius: 8px; padding: 18px 20px 14px; }
.cp-card .table-scroll { margin: 0 -4px; }
.cp-pill { display: inline-block; background: #e8eaed; color: #5f6368; border-radius: 12px; padding: 2px 12px; font-size: 12px; font-weight: 500; margin-left: 8px; }
.cp-target a { color: #1a73e8; }
.cp-view { color: #1a73e8; }
.cp-del { color: #f9ab00; font-size: 20px; font-weight: 700; }
.cp-del:hover { color: #e8710a; }
.cp-st-ok { color: #34a853; font-weight: 500; }
.cp-st-warn { color: #b06000; font-weight: 500; }
.cp-st-err { color: #d93025; font-weight: 500; }
/* provider-style modal */
.cp-dialog { width: 560px; }
.cp-dhead { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.cp-dhead h2 { margin: 0; font-size: 20px; }
.cp-x { color: #5f6368; }
.cp-x:hover { color: #202124; }
.cp-desc { color: #3c4043; margin: 0 0 18px; }
.cp-field { margin-bottom: 18px; }
.cp-field > label { display: block; font-size: 12px; color: #80868b; margin-bottom: 2px; }
.cp-field input, .cp-field select, .cp-field textarea {
  width: 100%; border: 0; border-bottom: 1px solid #80868b; border-radius: 0;
  background: transparent; padding: 6px 2px; font-size: 15px; color: #202124;
  font-family: inherit;
}
.cp-field input:focus, .cp-field select:focus, .cp-field textarea:focus { border-bottom: 2px solid #1a73e8; outline: 0; }
.cp-field small.muted { display: block; margin-top: 4px; }
.cp-cost { background: #f1f3f4; border-radius: 8px; padding: 16px 18px; color: #80868b; text-align: center; margin: 20px 0 8px; }
.cp-mfoot { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.cp-cancel { background: none; border: 0; color: #5f6368; font-weight: 600; }
.cp-cancel:hover { background: #f1f3f4; color: #202124; }
.cp-start { background: #1a73e8; border-color: #1a73e8; color: #fff; font-weight: 600; padding: 8px 34px; }
.cp-start:hover { background: #1765cc; border-color: #1765cc; }
.cp-start:disabled, .cp-start:disabled:hover { background: #c3c4c7; border-color: #c3c4c7; color: #f0f0f5; cursor: not-allowed; box-shadow: none; transform: none; }

/* ---------- Dashboard: Glassmorphism (scoped, dashboard page only) ---------- */
body.page-dashboard {
  --glass-primary: #4a05eb;
  --glass-secondary: #06b6d4;
  --glass-accent: #f472b6;
  --glass-bg: #1e1b4b;
  --glass-surface: #0d0c0c;
  --glass-text: #ffffff;
  --glass-text-dim: rgba(255, 255, 255, 0.65);
  --glass-line: rgba(255, 255, 255, 0.14);
  --glass-card: rgba(255, 255, 255, 0.06);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--glass-text);
  background-color: var(--glass-bg);
  background-image:
    radial-gradient(640px 420px at 12% 8%, rgba(74, 5, 235, 0.38), transparent 62%),
    radial-gradient(560px 420px at 88% 18%, rgba(6, 182, 212, 0.24), transparent 62%),
    radial-gradient(760px 520px at 50% 108%, rgba(244, 114, 182, 0.13), transparent 62%);
  background-attachment: fixed;
}

/* Frosted-glass widgets */
body.page-dashboard .postbox {
  background: var(--glass-card);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  box-shadow: 0 0 24px rgba(74, 5, 235, 0.18);
  color: var(--glass-text);
}
body.page-dashboard .postbox > h2 {
  color: var(--glass-text);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
body.page-dashboard .postbox .inside { padding: 18px; }
body.page-dashboard .postbox h3 { color: var(--glass-text); font-weight: 700; }
body.page-dashboard .wrap > h1 {
  color: var(--glass-text);
  font-weight: 800;
  font-size: 30px;
  text-shadow: 0 0 24px rgba(74, 5, 235, 0.55);
}
body.page-dashboard .muted { color: var(--glass-text-dim); }
body.page-dashboard a { color: #67e8f9; }
body.page-dashboard a:hover { color: #a5f3fc; }

/* Icon chips + stat numbers */
body.page-dashboard .ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 12px; font-size: 17px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(74, 5, 235, 0.55), rgba(6, 182, 212, 0.45));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
}
body.page-dashboard .at-glance li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}
body.page-dashboard .at-glance li:last-child { border-bottom: 0; }
body.page-dashboard .stat-num { color: #fff; font-weight: 800; font-size: 16px; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  body.page-dashboard .stat-num {
    background: linear-gradient(135deg, #c4b5fd, #67e8f9);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
}

/* Quick Links: gradient pills */
body.page-dashboard .quick-links .inside p {
  display: flex; flex-wrap: wrap; gap: 12px; margin: 0;
}
body.page-dashboard .quick-links a.button,
body.page-dashboard .owner-box a.button {
  background: linear-gradient(135deg, #4a05eb, #06b6d4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: #fff; font-weight: 700;
  padding: 10px 20px; line-height: 1.6;
  box-shadow: 0 0 20px rgba(74, 5, 235, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
body.page-dashboard .quick-links a.button:hover,
body.page-dashboard .owner-box a.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(6, 182, 212, 0.45);
  background: linear-gradient(135deg, #5b16ff, #0ac4e8);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* Glass tables (owner panel, recent reports) */
body.page-dashboard .postbox table {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}
body.page-dashboard .postbox th {
  color: var(--glass-text-dim);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
body.page-dashboard .postbox td {
  color: var(--glass-text);
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
body.page-dashboard .postbox table tr:nth-child(odd) td { background: rgba(255, 255, 255, 0.03); }
body.page-dashboard .postbox table tr:last-child td { border-bottom: 0; }
/* Kill the legacy white row backgrounds (they sit on <tr>, behind the translucent <td>) */
body.page-dashboard .postbox tbody tr:nth-child(odd),
body.page-dashboard .postbox table tr:nth-child(even),
body.page-dashboard .postbox table tbody tr { background: transparent; }

/* Glassy status badges (amber default, green/red semantics) */
body.page-dashboard .status {
  background: rgba(249, 171, 0, 0.15);
  border: 1px solid rgba(249, 171, 0, 0.45);
  color: #fcd34d;
  font-weight: 600; border-radius: 12px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
body.page-dashboard .status-complete {
  background: rgba(52, 168, 83, 0.18);
  border-color: rgba(52, 168, 83, 0.5);
  color: #86efac;
}
body.page-dashboard .status-error {
  background: rgba(234, 67, 53, 0.18);
  border-color: rgba(234, 67, 53, 0.5);
  color: #fca5a5;
}

/* Dark-glass topbar + sidebar (dashboard page only) */
body.page-dashboard #wpadminbar {
  background: rgba(13, 12, 12, 0.6);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}
body.page-dashboard #wpadminbar .ab-brand,
body.page-dashboard #wpadminbar .ab-right,
body.page-dashboard #wpadminbar .ab-right strong { color: #fff; }
body.page-dashboard #wpadminbar button.link { color: #fff; }
body.page-dashboard #menu-toggle { color: #fff; }
body.page-dashboard #menu-toggle:hover { color: #67e8f9; background: none; }
body.page-dashboard #adminmenumain {
  background: rgba(13, 12, 12, 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}
body.page-dashboard #adminmenu li a { color: rgba(255, 255, 255, 0.82); }
body.page-dashboard #adminmenu li a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
body.page-dashboard #adminmenu li.current a,
body.page-dashboard #adminmenu .submenu li.current a {
  background: linear-gradient(135deg, #4a05eb, #06b6d4);
  color: #fff; border-left-color: transparent;
  box-shadow: 0 0 16px rgba(74, 5, 235, 0.4);
}
body.page-dashboard #adminmenu .submenu { background: rgba(0, 0, 0, 0.35); }
body.page-dashboard #adminmenu-foot { color: rgba(255, 255, 255, 0.45); }

/* Notices on the dashboard */
body.page-dashboard .notice {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-line);
  border-left-width: 4px;
  border-radius: 12px;
  color: #fff;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
body.page-dashboard .notice p { color: #fff; }
body.page-dashboard .notice-success { border-left-color: #34a853; }
body.page-dashboard .notice-warning { border-left-color: #f9ab00; }
body.page-dashboard .notice-error { border-left-color: #ea4335; }

/* Print: force light, ink-friendly dashboard */
@media print {
  body.page-dashboard {
    background: #fff !important; background-image: none !important;
    color: #1d2327;
  }
  body.page-dashboard .postbox {
    background: #fff; border: 1px solid #c3c4c7; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; color: #1d2327;
  }
  body.page-dashboard .wrap > h1,
  body.page-dashboard .postbox > h2,
  body.page-dashboard .postbox h3 { color: #1d2327; text-shadow: none; }
  body.page-dashboard .muted { color: #646970; }
  body.page-dashboard a { color: #1d4ed8; }
  body.page-dashboard .ic {
    background: #f0f0f5; border-color: #c3c4c7; box-shadow: none;
  }
  body.page-dashboard .stat-num { color: #1d2327; background: none; }
  body.page-dashboard .postbox table { border-color: #c3c4c7; }
  body.page-dashboard .postbox th { color: #2c3338; background: #f6f7f7; border-bottom-color: #c3c4c7; }
  body.page-dashboard .postbox td { color: #3c434a; border-bottom-color: #f0f0f5; background: #fff; }
  body.page-dashboard .postbox table tr:nth-child(odd) td { background: #f6f7f7; }
  body.page-dashboard .status { background: #f0f0f5; border-color: #c3c4c7; color: #3c434a; }
  body.page-dashboard .quick-links a.button,
  body.page-dashboard .owner-box a.button {
    background: #fff; color: #1d2327; border: 1px solid #c3c4c7;
    box-shadow: none; transform: none;
  }
  body.page-dashboard .notice { background: #fff; border-color: #c3c4c7; color: #1d2327; }
  body.page-dashboard .notice p { color: #1d2327; }
}

/* ---------- Print / PDF export ---------- */
.print-header { display: none; }
@media print {
  #wpadminbar, #adminmenumain, #menu-overlay, #menu-toggle { display: none !important; }
  #wpwrap { display: block; }
  #wpcontent { margin: 0; padding: 0; min-height: 0; }
  body { background: #fff; color: #1d2327; }
  form, button, input, textarea, select, .no-print { display: none !important; }
  .table-scroll { overflow: visible; margin: 12px 0 24px; padding: 0; }
  .print-header {
    display: block !important;
    border-bottom: 3px solid #1d4ed8;
    padding-bottom: 8px; margin-bottom: 16px;
  }
  .print-header .brand { font-size: 22px; font-weight: 700; color: #1d4ed8; }
  .print-header .meta { font-size: 11px; color: #555; }
  a { color: #1d4ed8; text-decoration: none; }
  table { page-break-inside: auto; }
  tr { page-break-inside: avoid; }
  h1, h2, h3 { page-break-after: avoid; }
  .postbox { page-break-inside: avoid; }
}

/* ---- Account page (provider-style blue header cards) ---- */
.account-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .account-grid { grid-template-columns: 1fr; } }
.card-blue { background: #fff; border: 1px solid #c3c4c7; border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 20px; overflow: hidden; }
.card-blue > h2 { background: #1e88e5; color: #fff; font-size: 16px; font-weight: 600;
  padding: 14px 20px; margin: 0; }
.card-blue .inside { padding: 20px; }
.card-blue .field-label { display: block; font-size: 13px; color: #555; margin: 14px 0 4px; }
.card-blue .field-label:first-child { margin-top: 0; }
.card-blue input[type=text], .card-blue input[type=email], .card-blue input[type=password] {
  width: 100%; border: 0; border-bottom: 1px solid #bbb; padding: 6px 0; font-size: 15px;
  border-radius: 0; background: transparent; }
.card-blue input:focus { outline: none; border-bottom: 2px solid #1e88e5; }
.card-blue .hint { font-size: 13px; color: #666; margin: 8px 0 0; }
.card-blue .update-row { text-align: right; margin-top: 16px; }
.card-blue .btn-update { background: none; border: 0; color: #999; font-size: 13px;
  letter-spacing: 1px; cursor: pointer; padding: 6px 0; }
.card-blue .btn-update:hover { color: #1e88e5; }
.account-facts { margin: 0; }
.account-facts dt { font-size: 14px; color: #333; margin-top: 16px; }
.account-facts dt:first-child { margin-top: 0; }
.account-facts dd { margin: 2px 0 0; font-size: 14px; color: #777; }

/* ---- Upgrade plan packs ---- */
.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0; }
@media (max-width: 900px) { .pack-grid { grid-template-columns: 1fr; } }
.pack { border: 1px solid #c3c4c7; border-radius: 6px; padding: 20px; text-align: center; background: #fbfbfc; }
.pack h3 { margin: 0 0 8px; font-size: 16px; }
.pack-credits { font-size: 22px; font-weight: 700; color: #1e88e5; margin: 8px 0; }
.pack-price { font-size: 15px; color: #555; margin: 0 0 16px; }

/* Mention Tracker — provider-style list + wizard */
.mt-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.12); padding: 20px 24px; }
.mt-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mt-card-head h2 { margin: 0; font-size: 20px; font-weight: 500; }
.mt-add { background: none; border: 0; font-size: 30px; line-height: 1; color: #5f6368; cursor: pointer; padding: 0 6px; }
.mt-add:hover { color: #1a73e8; }
table.mt-table { width: 100%; border-collapse: collapse; }
.mt-table th { text-align: left; font-size: 12px; font-weight: 500; color: #9aa0a6; padding: 12px 8px; border-bottom: 1px solid #e0e0e0; white-space: nowrap; }
.mt-table td { padding: 13px 8px; border-bottom: 1px solid #f1f3f4; font-size: 14px; }
.mt-empty { text-align: center !important; color: #9aa0a6; padding: 26px 8px !important; }
.mt-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding-top: 14px; font-size: 13px; color: #5f6368; }
.mt-foot select { border: 0; border-bottom: 1px solid #c3c4c7; border-radius: 0; background: transparent; padding: 2px 18px 2px 0; font-size: 13px; }
.mt-pgsep { color: #bdc1c6; }
.mt-pgbtn { color: #5f6368; text-decoration: none; font-size: 20px; line-height: 1; padding: 2px 8px; }
.mt-pgbtn[aria-disabled="true"] { color: #dadce0; pointer-events: none; }
.mt-pgbtn[href]:hover { color: #1a73e8; }
.mt-dhead { background: #9e9e9e !important; }
/* vertical stepper */
.mt-step { position: relative; padding-left: 44px; margin-bottom: 6px; }
.mt-step::before { content: ""; position: absolute; left: 60px; top: 34px; bottom: -6px; width: 1px; background: #e0e0e0; }
.mt-step:last-child::before { display: none; }
.mt-stephead { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px -44px; }
.mt-dot { width: 30px; height: 30px; border-radius: 50%; background: #9e9e9e; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex: none; }
.mt-steplabel { font-size: 17px; }
.mt-step.todo .mt-steplabel { color: #9aa0a6; }
.mt-step.current .mt-dot { background: #1a73e8; }
.mt-step.current .mt-steplabel { color: #202124; font-weight: 500; }
.mt-step.done .mt-dot { background: #1a73e8; }
.mt-step.done .mt-steplabel { color: #202124; }
.mt-stepbody { padding: 6px 0 18px; }
/* type cards */
.mt-typecards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 10px 0 4px; }
.mt-typecard { background: #fff; border: 1px solid #dadce0; border-radius: 8px; padding: 26px 16px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #202124; }
.mt-typecard:hover { border-color: #1a73e8; }
.mt-typecard.sel { border-color: #1a73e8; background: #e8f0fe; box-shadow: 0 0 0 1px #1a73e8; }
.mt-ticon { font-size: 34px; }
.mt-typecard strong { font-size: 16px; }
.mt-typecard small { color: #9aa0a6; font-size: 12px; }
/* underline fields */
.mt-line { display: block; margin: 18px 0; }
.mt-line input[type=text], .mt-line input[type=number], .mt-line select {
  display: block; width: 100%; border: 0; border-bottom: 1px solid #c3c4c7;
  border-radius: 0; background: transparent; padding: 8px 0; font-size: 15px; }
.mt-line input:focus, .mt-line select:focus { outline: 0; border-bottom-color: #1a73e8; }
.mt-line > small, .mt-line small { display: block; color: #9aa0a6; font-size: 12px; margin-top: 4px; }
.mt-flabel { display: block; font-size: 15px; margin-bottom: 2px; }
.mt-line .tagbox { border: 0; border-bottom: 1px solid #c3c4c7; border-radius: 0; padding: 6px 0; }
.mt-dayswrap { display: flex; align-items: baseline; gap: 8px; border-bottom: 1px solid #c3c4c7; }
.mt-dayswrap input { border: 0 !important; flex: 1; }
.mt-dayssuffix { color: #5f6368; font-size: 14px; }
.mt-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.mt-nav .button:disabled { background: #e0e0e0; border-color: #e0e0e0; color: #9aa0a6; cursor: not-allowed; }
.mt-quota { background: #f1f3f4; border-radius: 6px; padding: 16px; text-align: center; color: #9aa0a6; font-size: 14px; margin: 18px 0 0; }
@media (max-width: 600px) { .mt-typecards { grid-template-columns: 1fr; } }
