/*
 * ReadJutsu Admin CSS
 * Font files: copy SpaceGrotesk.woff2 + Inter.woff2 from pagefluent/admin/assets/fonts/
 * into this plugin's admin/assets/fonts/ directory.
 */

@font-face {
  font-family: "Space Grotesk";
  src: url(../assets/fonts/SpaceGrotesk.woff2) format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url(../assets/fonts/Inter.woff2) format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --readjutsu-primary: #0069ff;
  --readjutsu-light: #ffffff;
  --readjutsu-dark: #000000;
  --readjutsu-medium-dark: #252436;
  --readjutsu-gray: #adb5bd;
  --readjutsu-gutter: 2vw;
  --readjutsu-font-primary: "Inter", system-ui, -apple-system, sans-serif;
  --readjutsu-font-heading:
    "Space Grotesk", system-ui, -apple-system, sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */

.toplevel_page_readjutsu-options #wpcontent {
  padding-left: 0;
}
#readjutsu-settings p {
  margin: 0;
}

/* ── Loading mask ───────────────────────────────────────────────────────────── */

#readjutsu-loading-mask {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  z-index: 9999;
}

/* ── Toast ──────────────────────────────────────────────────────────────────── */

#readjutsu-toast {
  font-size: 18px;
  font-weight: 600;
  opacity: 0;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  border-radius: 5px;
  padding: 15px 25px;
  z-index: 10000;
  box-shadow: rgba(99, 99, 99, 0.2) 0 2px 8px;
  color: #fff;
}

#readjutsu-toast span {
  display: none;
}

.readjutsu-toast--success {
  background-color: #4caf50;
}
.readjutsu-toast--error {
  background-color: #f44336;
}

#readjutsu-toast.active {
  animation: readjutsuToast 3s ease-out forwards;
}

@keyframes readjutsuToast {
  0% {
    opacity: 0;
    top: 0;
  }
  10% {
    opacity: 1;
    top: 5vh;
  }
  90% {
    opacity: 1;
    top: 5vh;
  }
  100% {
    opacity: 0;
    top: 0;
  }
}

/* ── Topbar ─────────────────────────────────────────────────────────────────── */

.readjutsu-topbar {
  background-color: var(--readjutsu-primary);
  color: var(--readjutsu-light);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 8px 20px;
  font-size: 14px;
  position: sticky;
  top: 32px;
  z-index: 100;
  flex-wrap: wrap;
}

.readjutsu-topbar__copy {
  font-weight: 700;
  white-space: nowrap;
}

.readjutsu-topbar__pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.readjutsu-topbar__pill {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.readjutsu-topbar__cta {
  background: #fff;
  color: var(--readjutsu-primary);
  border-radius: 20px;
  padding: 5px 14px;
  font-family: var(--readjutsu-font-heading);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 150ms ease;
}
.readjutsu-topbar__cta:hover {
  opacity: 0.88;
  color: var(--readjutsu-primary);
}

/* ── Wrapper ────────────────────────────────────────────────────────────────── */

#readjutsu-settings {
  font-family: var(--readjutsu-font-primary);
  font-size: 16px;
  padding: var(--readjutsu-gutter);
}

/* ── Header ─────────────────────────────────────────────────────────────────── */

.readjutsu-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--readjutsu-light);
  border-radius: 16px;
  padding: 16px 40px;
  margin-bottom: 10px;
}

.readjutsu-settings-header__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--readjutsu-font-heading);
  font-weight: 700;
  letter-spacing: -1.8px;
  font-size: 30px;
}

.readjutsu-settings-header__title span {
  font-size: 13px;
  font-weight: 400;
  color: var(--readjutsu-dark);
  border: 1px dashed var(--readjutsu-primary);
  padding: 5px 11px;
  border-radius: 10px;
  letter-spacing: 0;
}

.readjutsu-settings-header__links {
  display: flex;
  gap: 16px;
  font-size: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.readjutsu-settings-header__links li {
  display: flex;
  align-items: center;
  gap: 5px;
}

.readjutsu-settings-header__links a {
  color: var(--readjutsu-dark);
  text-decoration: none;
}
.readjutsu-settings-header__links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Layout: sidebar + content ──────────────────────────────────────────────── */

.readjutsu-settings-main {
  display: flex;
  gap: var(--readjutsu-gutter);
  position: relative;
  margin-bottom: 10px;
}

/* ── Sidebar menu ───────────────────────────────────────────────────────────── */

.readjutsu-settings__menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--readjutsu-dark);
  color: var(--readjutsu-light);
  border-radius: 20px;
  margin: 0;
  padding: var(--readjutsu-gutter);
  height: fit-content;
  width: 300px;
  list-style: none;
  position: sticky;
  top: 50px;
}

.readjutsu-settings__menu li {
  font-family: var(--readjutsu-font-heading);
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  padding: 14px 15px;
  border-radius: 20px;
}

.readjutsu-settings__menu li:hover {
  background-color: var(--readjutsu-medium-dark);
}
.readjutsu-settings__menu li.active {
  background-color: var(--readjutsu-medium-dark);
}
.readjutsu-settings__menu li.readjutsu-pro-card-li {
  width: 100%;
  padding: 0 !important;
  cursor: default !important;
  background: none !important;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px !important;
}

/* Save button in sidebar */
#readjutsu-settings
  .readjutsu-settings__menu
  input.button.readjutsu-settings__submit-btn {
  width: 100%;
  margin: 12px 0 4px;
}

.readjutsu-settings__menu p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  width: 100%;
}

/* ── Submit button ──────────────────────────────────────────────────────────── */

.readjutsu-settings__submit-btn,
#readjutsu-settings input.button.readjutsu-settings__submit-btn {
  font-family: var(--readjutsu-font-heading);
  font-size: 16px;
  font-weight: 700;
  width: fit-content;
  background-color: var(--readjutsu-primary);
  border: 1px solid var(--readjutsu-primary);
  border-radius: 20px;
  color: var(--readjutsu-light) !important;
  padding: 10px 15px;
  cursor: pointer;
  text-decoration: none !important;
  box-shadow: none;
  line-height: 1;
  transition: background 150ms ease;
}

.readjutsu-settings__submit-btn:hover,
#readjutsu-settings input.button.readjutsu-settings__submit-btn:hover {
  background-color: var(--readjutsu-light);
  color: var(--readjutsu-dark) !important;
}

/* ── Sidebar Pro card ───────────────────────────────────────────────────────── */

.readjutsu-sidebar-pro {
  width: 100%;
  background: var(--readjutsu-medium-dark);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 0 0 1px rgba(0, 105, 255, 0.2);
  box-sizing: border-box;
}

.readjutsu-sidebar-pro__title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--readjutsu-font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--readjutsu-light);
}
.readjutsu-sidebar-pro__title svg {
  color: var(--readjutsu-primary);
  flex-shrink: 0;
}

.readjutsu-sidebar-pro__features {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.readjutsu-sidebar-pro__pill {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 3px 8px;
  white-space: nowrap;
}

.readjutsu-sidebar-pro__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0069ff 0%, #00aaff 100%);
  color: #fff;
  border-radius: 12px;
  padding: 9px 12px;
  font-family: var(--readjutsu-font-heading);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition:
    opacity 150ms ease,
    box-shadow 150ms ease;
  text-align: center;
  line-height: 1;
}
.readjutsu-sidebar-pro__cta:hover {
  opacity: 0.9;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(0, 105, 255, 0.4);
}

/* ── Content panels ─────────────────────────────────────────────────────────── */

.readjutsu-settings__content {
  flex-grow: 1;
  width: 100%;
}

.readjutsu-settings__menu-content {
  display: none;
  flex-direction: column;
  gap: var(--readjutsu-gutter);
  background-color: var(--readjutsu-light);
  border-radius: 20px;
  padding: var(--readjutsu-gutter);
  position: absolute;
  visibility: hidden;
  opacity: 0;
}

.readjutsu-settings__menu-content.active {
  display: flex;
  position: relative;
  opacity: 1;
  visibility: visible;
}

.readjutsu-is-ready .readjutsu-settings__menu-content.active {
  animation: readjutsuPanelIn 180ms ease forwards;
}

@keyframes readjutsuPanelIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Panel heading ──────────────────────────────────────────────────────────── */

.readjutsu-settings__menu-content__title {
  font-family: var(--readjutsu-font-heading);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 900;
  border-bottom: 1px dashed var(--readjutsu-primary);
  padding-bottom: calc(var(--readjutsu-gutter) / 2);
}

/* ── Tip callout ────────────────────────────────────────────────────────────── */

.readjutsu-settings__menu-content__tip {
  border: 1px dashed var(--readjutsu-primary);
  border-radius: 16px;
  padding: 10px 14px;
  width: fit-content;
  font-size: 13px;
  background: #e8f0ff;
  color: var(--readjutsu-dark);
}

.readjutsu-settings__menu-content__tip code {
  background: rgba(0, 105, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}

/* ── Option rows ────────────────────────────────────────────────────────────── */

.readjutsu-settings__menu-content__option {
  display: flex;
  gap: 25px;
  align-items: flex-start;
}

.readjutsu-option--stacked {
  flex-direction: column;
}

.readjutsu-settings__menu-content__label {
  width: 25%;
  max-width: 200px;
}

.readjutsu-settings__menu-content__label strong {
  font-family: var(--readjutsu-font-heading);
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
}

.readjutsu-settings__menu-content__label p {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

.readjutsu-settings__menu-content__option__input {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Toggle switch ──────────────────────────────────────────────────────────── */

.readjutsu-settings__activate {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.readjutsu-settings__activate input {
  opacity: 0;
  width: 0;
  height: 0;
}

.readjutsu-settings__activate__toggle {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ddd;
  transition: 0.3s ease;
  border-radius: 13px;
}

.readjutsu-settings__activate__toggle::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.readjutsu-settings__activate
  input:checked
  + .readjutsu-settings__activate__toggle {
  background: var(--readjutsu-primary);
}

.readjutsu-settings__activate
  input:checked
  + .readjutsu-settings__activate__toggle::before {
  transform: translateX(24px);
}

/* ── Radio group (horizontal) ───────────────────────────────────────────────── */

.readjutsu-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}

.readjutsu-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
}

.readjutsu-radio-label input[type="radio"] {
  accent-color: var(--readjutsu-primary);
  cursor: pointer;
}

/* ── Post types checkboxes ──────────────────────────────────────────────────── */

.readjutsu-post-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.readjutsu-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
}

.readjutsu-checkbox-label input[type="checkbox"] {
  accent-color: var(--readjutsu-primary);
  cursor: pointer;
}

/* ── Text / number inputs ───────────────────────────────────────────────────── */

.readjutsu-input-text {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 14px;
  width: 200px;
  font-family: var(--readjutsu-font-primary);
  transition: border-color 150ms ease;
}

.readjutsu-input-text:focus {
  outline: none;
  border-color: var(--readjutsu-primary);
  box-shadow: 0 0 0 2px rgba(0, 105, 255, 0.15);
}

.readjutsu-input-number {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 14px;
  width: 80px;
  font-family: var(--readjutsu-font-primary);
  transition: border-color 150ms ease;
}

.readjutsu-input-number:focus {
  outline: none;
  border-color: var(--readjutsu-primary);
  box-shadow: 0 0 0 2px rgba(0, 105, 255, 0.15);
}

.readjutsu-input-unit {
  font-size: 13px;
  color: #888;
  font-weight: 600;
}

/* ── Color pickers ──────────────────────────────────────────────────────────── */

.readjutsu-color-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.readjutsu-color-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  color: #555;
  font-weight: 500;
}

.readjutsu-color-label input[type="color"] {
  width: 44px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  padding: 2px;
}

/* ── Style cards — shared ───────────────────────────────────────────────────── */

.readjutsu-badge-cards,
.readjutsu-bar-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.readjutsu-style-card {
  position: relative;
}

.readjutsu-style-card input[type="radio"] {
  position: absolute;
  visibility: hidden;
  opacity: 0;
}

.readjutsu-style-card label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 2px solid #e2e2e2;
  border-radius: 16px;
  cursor: pointer;
  width: 130px;
  padding: 14px 10px;
  transition:
    border-color 160ms ease,
    background 160ms ease;
  background: #fafafa;
  position: relative;
}

.readjutsu-style-card label:hover {
  border-color: var(--readjutsu-primary);
}

.readjutsu-style-card input[type="radio"]:checked + label {
  border-color: var(--readjutsu-primary);
  background: rgba(0, 105, 255, 0.06);
}

.readjutsu-style-card input[type="radio"]:checked + label::after {
  content: "";
  position: absolute;
  top: -9px;
  left: -9px;
  width: 18px;
  height: 18px;
  background: var(--readjutsu-primary);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  border: 2px solid #fff;
}

.readjutsu-style-card__preview {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
}

.readjutsu-style-card__preview--dark {
  background: #1a1a2e;
}
.readjutsu-style-card__preview--center {
  background: #f0f0f0;
}

.readjutsu-style-card__name {
  font-family: var(--readjutsu-font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

/* Bar card wider preview */
.readjutsu-style-card--bar .readjutsu-style-card__preview {
  height: 36px;
  background: #f0f0f0;
  border-radius: 6px;
  padding: 0 8px;
  overflow: visible;
}

/* ── Locked Pro cards ───────────────────────────────────────────────────────── */

.readjutsu-locked-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 2px solid #e2e2e2;
  border-radius: 16px;
  width: 130px;
  padding: 14px 10px;
  text-decoration: none;
  background: #fafafa;
  opacity: 0.65;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    opacity 160ms ease;
}

.readjutsu-locked-card:hover {
  border-color: var(--readjutsu-primary);
  opacity: 1;
}

.readjutsu-locked-card--bar {
  width: 130px;
}

/* ── PRO badge ──────────────────────────────────────────────────────────────── */

.readjutsu-pro-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--readjutsu-primary);
  color: #fff;
  font-family: var(--readjutsu-font-primary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 4px;
  line-height: 1;
  border: 2px solid #fff;
}

/* ── Badge previews inside cards ────────────────────────────────────────────── */

.readjutsu-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--readjutsu-font-primary);
  line-height: 1;
}

.readjutsu-preview-badge--pill {
  background: var(--readjutsu-primary);
  color: #fff;
  border-radius: 999px;
  padding: 4px 9px;
}

.readjutsu-preview-badge--minimal {
  color: var(--readjutsu-primary);
}

.readjutsu-preview-badge--inline {
  color: var(--readjutsu-primary);
  font-style: italic;
}

.readjutsu-preview-badge--floating {
  background: var(--readjutsu-primary);
  color: #fff;
  border-radius: 999px 0 0 999px;
  padding: 5px 10px;
  box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.2);
}

.readjutsu-preview-badge--bordered {
  color: var(--readjutsu-primary);
  border: 1.5px solid var(--readjutsu-primary);
  border-radius: 999px;
  padding: 4px 9px;
}

.readjutsu-preview-badge--glass {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 4px 9px;
  backdrop-filter: blur(4px);
}

/* ── Progress bar previews inside cards ─────────────────────────────────────── */

.readjutsu-preview-bar {
  height: 5px;
  border-radius: 999px;
  position: relative;
}

.readjutsu-preview-bar--shimmer {
  background: linear-gradient(
    90deg,
    #0069ff 0%,
    #66b3ff 40%,
    #0069ff 60%,
    #00aaff 100%
  );
  background-size: 200% 100%;
  animation: readjutsuShimmer 1.5s infinite linear;
}

@keyframes readjutsuShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.readjutsu-preview-bar__pct {
  position: absolute;
  right: -2px;
  top: -20px;
  background: #0069ff;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 3px;
  line-height: 1;
}

.readjutsu-preview-donut {
  display: block;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media only screen and (max-width: 991px) {
  .readjutsu-settings-header {
    flex-direction: column-reverse;
    gap: 12px;
  }
  .readjutsu-settings-main {
    flex-direction: column;
  }
  .readjutsu-settings__menu {
    width: auto;
    position: unset;
    padding: 20px;
  }
}

/* ── PRO menu tag + feature teaser ───────────────────────────────────────────── */

.readjutsu-menu-pro {
  margin-left: 6px;
  background: #0069ff;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1;
  vertical-align: middle;
}

.readjutsu-pro-teaser {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  padding: 28px;
  border: 1px dashed #c3d4ff;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7faff, #fff);
}

.readjutsu-pro-teaser__preview {
  flex: 1 1 240px;
  max-width: 320px;
}
.readjutsu-pro-teaser__copy {
  flex: 1 1 240px;
}
.readjutsu-pro-teaser__copy h3 {
  margin: 10px 0 6px;
  font-size: 18px;
}
.readjutsu-pro-teaser__copy p {
  margin: 0 0 16px;
  color: #555;
}

/* Frontend TOC classes, scoped preview inside the admin teaser only. */
.readjutsu-pro-teaser .readjutsu-toc {
  border: 1px solid #e2e8f5;
  border-left: 3px solid #0069ff;
  border-radius: 8px;
  padding: 14px 18px;
  background: #fff;
}
.readjutsu-pro-teaser .readjutsu-toc__title {
  margin: 0 0 0.5em;
  font-weight: 700;
}
.readjutsu-pro-teaser .readjutsu-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.readjutsu-pro-teaser .readjutsu-toc__item {
  margin: 0.3em 0;
}
.readjutsu-pro-teaser .readjutsu-toc__item--l1 {
  padding-left: 1.2em;
}
.readjutsu-pro-teaser .readjutsu-toc a {
  color: #0069ff;
  text-decoration: none;
}

/* ── Analytics tab ──────────────────────────────────────────────────────────── */

/* Panels stretch inside the stacked option (it keeps align-items:flex-start). */
.readjutsu-analytics-panel {
  width: 100%;
}

.readjutsu-analytics-period {
  display: flex;
  gap: 6px;
  margin: 4px 0 14px;
}
.readjutsu-analytics-period .button {
  border-radius: 999px;
  border: 1px solid var(--readjutsu-gray);
  background: var(--readjutsu-light);
  color: var(--readjutsu-dark);
  font-family: var(--readjutsu-font-heading);
  font-size: 12px;
  line-height: 1;
  padding: 7px 14px;
  height: auto;
  box-shadow: none;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}
.readjutsu-analytics-period .button:hover {
  border-color: var(--readjutsu-primary);
  color: var(--readjutsu-primary);
}
.readjutsu-analytics-period .button.button-primary {
  background: var(--readjutsu-primary);
  border-color: var(--readjutsu-primary);
  color: var(--readjutsu-light);
}

.readjutsu-analytics-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.readjutsu-stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #e3e6ea;
  border-radius: 10px;
  background: var(--readjutsu-light);
}
.readjutsu-stat-card__value {
  font-family: var(--readjutsu-font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--readjutsu-primary);
  line-height: 1.1;
}
.readjutsu-stat-card__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--readjutsu-gray);
}

.readjutsu-analytics-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e3e6ea;
  border-radius: 10px;
  overflow: hidden;
  background: var(--readjutsu-light);
}
.readjutsu-analytics-table th,
.readjutsu-analytics-table td {
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
}
.readjutsu-analytics-table thead th {
  font-family: var(--readjutsu-font-heading);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--readjutsu-gray);
  border-bottom: 1px solid #e3e6ea;
  background: #fafbfc;
}
.readjutsu-analytics-table tbody tr:nth-child(even) {
  background: #fafbfc;
}
.readjutsu-analytics-table tbody td a {
  color: var(--readjutsu-dark);
  text-decoration: none;
  font-weight: 600;
}
.readjutsu-analytics-table tbody td a:hover {
  color: var(--readjutsu-primary);
}
.readjutsu-analytics-table__num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* In-cell horizontal bar chart (depth / completion) */
.readjutsu-cell-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}
.readjutsu-cell-bar__track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #e9eef5;
  overflow: hidden;
}
.readjutsu-cell-bar__track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--readjutsu-primary);
}
/* Fill color (depth + completion) is value-driven (red→orange→green), set
   inline by the partial as hsl(value × 1.2, 75%, 44%); the blue above is only
   a fallback. */
.readjutsu-cell-bar__value {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  min-width: 34px;
  text-align: right;
}

/* PRO badge inside the settings menu: the absolute positioning is meant for
   the locked style cards — in a menu li it anchors to the menu container. */
.readjutsu-settings__menu li .readjutsu-pro-badge,
.readjutsu-pro-badge--inline {
  position: static;
  margin-left: 6px;
  border: none;
  vertical-align: middle;
}

/* ── Analytics locked state: ghost dashboard + upsell overlay ───────────────── */

.readjutsu-analytics-locked {
  position: relative;
  width: 100%;
}
.readjutsu-analytics-locked__ghost {
  filter: blur(1.5px);
  opacity: 0.65;
  pointer-events: none;
  user-select: none;
}
.readjutsu-skel {
  display: inline-block;
  height: 10px;
  max-width: 100%;
  border-radius: 999px;
  background: #dde3ea;
  vertical-align: middle;
}
.readjutsu-stat-card__value .readjutsu-skel {
  height: 16px;
}

.readjutsu-analytics-locked__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.55) 100%
  );
  border-radius: 10px;
}
.readjutsu-analytics-locked__overlay strong {
  font-family: var(--readjutsu-font-heading);
  font-size: 16px;
}
.readjutsu-analytics-locked__overlay p {
  margin: 0;
  max-width: 420px;
  font-size: 13px;
  color: #50575e;
}
.readjutsu-analytics-locked__overlay .button {
  margin-top: 6px;
}
