/* =========================================================
   Books by Tereza — dashboard
   Deliberately familiar: WordPress-admin inspired.
   ========================================================= */

:root {
  --wp-bg: #f0f0f1;
  --wp-panel: #ffffff;
  --wp-border: #c3c4c7;
  --wp-border-soft: #dcdcde;
  --wp-text: #1d2327;
  --wp-muted: #646970;
  --wp-blue: #2271b1;
  --wp-blue-dark: #135e96;
  --wp-sidebar: #1d2327;
  --wp-sidebar-hover: #2c3338;
  --wp-red: #b32d2e;
  --wp-green: #00a32a;
  --wp-radius: 3px;
  --wp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.bt-admin {
  margin: 0;
  padding-top: 32px;
  background: var(--wp-bg);
  color: var(--wp-text);
  font-family: var(--wp-font);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--wp-blue); }
a:hover { color: var(--wp-blue-dark); }

h1, h2, h3, h4 { color: var(--wp-text); }
h2 { font-size: 15px; margin: 0; }
h3 { font-size: 14px; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.screen-reader-shortcut {
  position: absolute; top: -1000px; left: 6px; z-index: 100000;
  background: #fff; color: var(--wp-blue); padding: 8px 12px;
}
.screen-reader-shortcut:focus { top: 6px; }

/* ---------------------------------------------------------- Admin bar */
#wpadminbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9990;
  height: 32px; display: flex; align-items: center;
  background: var(--wp-sidebar); color: #f0f0f1;
  font-size: 13px;
}
#wpadminbar .ab-item {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px; color: #c3c4c7;
  text-decoration: none; white-space: nowrap; font-size: 13px;
}
#wpadminbar .ab-item:hover, #wpadminbar .ab-item:focus { color: #72aee6; }
#wpadminbar .ab-item .bt-icon { width: 17px; height: 17px; }
#wpadminbar .ab-site { font-weight: 600; color: #fff; }
#wpadminbar .ab-right { margin-left: auto; display: flex; align-items: center; height: 32px; }
#wpadminbar .ab-user { color: #c3c4c7; }
#wpadminbar .ab-user strong { color: #fff; }

.bt-menu-toggle {
  display: none; width: 36px; height: 32px; border: 0; background: transparent;
  padding: 0 8px; cursor: pointer; flex-direction: column; justify-content: center; gap: 4px;
}
.bt-menu-toggle span { display: block; height: 2px; background: #f0f0f1; border-radius: 2px; }

/* ---------------------------------------------------------- Sidebar */
#adminmenuwrap {
  position: fixed; top: 32px; left: 0; bottom: 0; z-index: 9980;
  width: 164px; background: var(--wp-sidebar); color: #f0f0f1;
  display: flex; flex-direction: column; overflow-y: auto;
  transition: transform .22s ease;
}
.bt-sidebar-brand { padding: 16px 12px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.bt-sidebar-brand a {
  display: inline-flex; align-items: center; color: #fff; text-decoration: none;
  font-weight: 700; font-size: 21px; letter-spacing: .02em;
}
.bt-sidebar-brand small { display: block; color: #8c8f94; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }

.eye {
  position: relative; display: inline-block; width: .82em; height: .82em;
  margin: 0 .03em; border: .13em solid currentColor; border-radius: 50%;
  background: transparent; vertical-align: -0.02em;
}
.eye::after {
  content: ""; position: absolute; width: .28em; height: .28em; border-radius: 50%;
  background: currentColor; top: 50%; left: 50%; transform: translate(-20%, -45%);
}

#adminmenu { list-style: none; margin: 0; padding: 6px 0 18px; flex: 1; }
#adminmenu li { margin: 0; }
#adminmenu li a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; color: #c3c4c7; text-decoration: none;
  font-size: 13px; line-height: 1.3; border-left: 4px solid transparent;
}
#adminmenu li a .bt-icon { width: 17px; height: 17px; flex: 0 0 17px; opacity: .9; }
#adminmenu li a:hover, #adminmenu li a:focus { background: var(--wp-sidebar-hover); color: #fff; }
#adminmenu li.current > a {
  background: var(--wp-blue); color: #fff; border-left-color: #72aee6;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}
#adminmenu .bt-menu-separator { height: 1px; background: rgba(255,255,255,.08); margin: 7px 0; }

.bt-sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; color: #8c8f94; }
.bt-sidebar-foot a { display: flex; align-items: center; gap: 6px; color: #c3c4c7; text-decoration: none; margin-bottom: 6px; }
.bt-sidebar-foot a:hover { color: #72aee6; }
.bt-sidebar-foot .bt-icon { width: 14px; height: 14px; }

#wpcontent { margin-left: 164px; min-height: calc(100vh - 32px); }
.wrap { max-width: 1240px; padding: 14px 22px 40px; }
body.bt-admin #wpcontent > .wrap { margin: 0; }

.bt-page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding-top: 6px; }
.wp-heading-inline { font-size: 23px; font-weight: 400; line-height: 1.3; margin: 0; }
.bt-page-subtitle { margin: 4px 0 0; color: var(--wp-muted); font-size: 13px; }
.bt-page-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.wp-header-end { border: 0; border-top: 1px solid var(--wp-border-soft); margin: 14px 0 20px; }

/* ---------------------------------------------------------- Notices */
.notice {
  background: #fff; border: 1px solid var(--wp-border-soft); border-left: 4px solid #72aee6;
  box-shadow: 0 1px 1px rgba(0,0,0,.04); margin: 16px 0; padding: 2px 14px;
  border-radius: 2px;
}
.notice p { margin: .7em 0; }
.notice p:last-child { margin-bottom: .8em; }
.notice-success { border-left-color: var(--wp-green); }
.notice-warning { border-left-color: #dba617; }
.notice-error { border-left-color: #d63638; }
.notice-info { border-left-color: #72aee6; }

/* ---------------------------------------------------------- Buttons */
.button, .bt-admin .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 30px; height: auto; padding: 2px 10px;
  background: #f6f7f7; border: 1px solid var(--wp-blue); border-radius: var(--wp-radius);
  color: var(--wp-blue); font: inherit; font-size: 13px; line-height: 1.6;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.button:hover, .button:focus { background: #f0f0f1; border-color: var(--wp-blue-dark); color: var(--wp-blue-dark); }
.button:focus-visible { outline: 2px solid #72aee6; outline-offset: 1px; }
.button .bt-icon { width: 15px; height: 15px; }
.button-primary { background: var(--wp-blue); border-color: var(--wp-blue); color: #fff; }
.button-primary:hover, .button-primary:focus { background: var(--wp-blue-dark); border-color: var(--wp-blue-dark); color: #fff; }
.button-large { min-height: 38px; padding: 4px 16px; font-size: 14px; }
.button-small { min-height: 24px; padding: 0 8px; font-size: 11px; line-height: 1.8; }
.button[disabled] { opacity: .55; cursor: not-allowed; }
.bt-button-danger { color: var(--wp-red); border-color: var(--wp-red); background: #fff; }
.bt-button-danger:hover { background: var(--wp-red); border-color: var(--wp-red); color: #fff; }

.bt-link-delete {
  background: none; border: 0; padding: 0; margin: 0; color: var(--wp-red);
  font: inherit; font-size: 12px; cursor: pointer; text-decoration: none;
}
.bt-link-delete:hover { text-decoration: underline; }
.bt-inline-form { display: inline; margin: 0; }
.bt-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 3px;
  background: transparent; color: #50575e; cursor: pointer;
}
.bt-iconbtn:hover { background: #f0f0f1; border-color: var(--wp-border-soft); color: var(--wp-text); }
.bt-iconbtn--danger:hover { background: #fcf0f1; border-color: #d63638; color: #d63638; }
.bt-iconbtn .bt-icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------- Postboxes */
.postbox {
  background: var(--wp-panel); border: 1px solid var(--wp-border);
  box-shadow: 0 1px 1px rgba(0,0,0,.04); border-radius: 2px; margin-bottom: 20px;
}
.postbox-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 43px; padding: 0 14px; border-bottom: 1px solid var(--wp-border-soft);
}
.postbox-header h2 { font-size: 14px; font-weight: 600; margin: 0; }
.postbox-header .button { margin: 6px 0; }
.postbox > .inside { padding: 12px 16px 16px; }
.postbox p:first-child { margin-top: .4em; }
.postbox h3 { margin: 18px 0 6px; }
.postbox hr { border: 0; border-top: 1px solid var(--wp-border-soft); margin: 18px 0; }

/* ---------------------------------------------------------- List tables */
.wp-list-table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--wp-border); box-shadow: 0 1px 1px rgba(0,0,0,.04);
  font-size: 13px;
}
.wp-list-table th {
  text-align: left; font-weight: 600; color: var(--wp-text);
  padding: 9px 10px; border-bottom: 1px solid var(--wp-border);
  background: #fff;
}
.wp-list-table td { padding: 10px; border-top: 1px solid #f0f0f1; vertical-align: top; }
.wp-list-table.striped tbody tr:nth-child(odd) { background: #f6f7f7; }
.wp-list-table.striped tbody tr:nth-child(odd) td { background: transparent; }
.wp-list-table tr:hover td { background: #f6f7f7; }
.wp-list-table .row-title { font-size: 14px; font-weight: 600; color: var(--wp-blue); text-decoration: none; }
.wp-list-table .row-title:hover { color: var(--wp-blue-dark); text-decoration: underline; }
.row-actions { color: var(--wp-muted); font-size: 12px; margin-top: 4px; }
.row-actions a { text-decoration: none; }
.row-actions a:hover { text-decoration: underline; }
.row-actions > span { display: inline; }
.column-cover { width: 74px; }
.column-slug { width: 18%; }
.column-status { width: 11%; }
.column-date { width: 17%; }
.column-order, .column-books { width: 80px; }
.column-series { width: 16%; }
.bt-mini-table { border: 0; box-shadow: none; }
.bt-mini-table th { border-bottom: 1px solid var(--wp-border-soft); font-size: 12px; color: var(--wp-muted); }

.bt-muted { color: var(--wp-muted); }
.bt-stars { color: #dba617; letter-spacing: 1px; white-space: nowrap; }
.bt-series-emoji {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px; margin-right: 7px; font-size: 15px;
  vertical-align: middle;
}

/* ---------------------------------------------------------- Badges & tags */
.bt-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px;
  font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.bt-badge--ok { background: #edfaef; color: #1e7d34; }
.bt-badge--soon { background: #fcf9e8; color: #8a6d00; }
.bt-badge--muted { background: #f0f0f1; color: #50575e; }
.bt-badge--error { background: #fcf0f1; color: var(--wp-red); }
.bt-badge--home { background: #e7defb; color: #5b47a3; margin-left: 6px; }
.bt-tag { display: inline-block; background: #f0f0f1; border-radius: 3px; padding: 1px 6px; font-size: 11px; color: #50575e; font-family: Consolas, monospace; }
.bt-status-toggle {
  border: 0; background: none; cursor: pointer; font: inherit; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; font-size: 11px;
}
.bt-status-toggle.is-on { background: #edfaef; color: #1e7d34; }
.bt-status-toggle.is-off { background: #f0f0f1; color: #8c8f94; }

/* ---------------------------------------------------------- Dashboard */
.bt-stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.bt-stat {
  display: flex; flex-direction: column; gap: 2px; background: #fff;
  border: 1px solid var(--wp-border); border-radius: 2px; padding: 15px 16px 13px;
  text-decoration: none; color: inherit; box-shadow: 0 1px 1px rgba(0,0,0,.04);
}
.bt-stat:hover { border-color: var(--wp-blue); color: inherit; }
.bt-stat__icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; margin-bottom: 8px; }
.bt-stat__icon .bt-icon { width: 19px; height: 19px; }
.bt-stat__num { font-size: 27px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.bt-stat__label { color: var(--wp-muted); font-size: 11px; }

.bt-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.bt-progress { height: 8px; background: #f0f0f1; border-radius: 999px; overflow: hidden; margin: 4px 0 14px; }
.bt-progress span { display: block; height: 100%; background: var(--wp-green); border-radius: 999px; transition: width .4s ease; }
.bt-progress-label { font-size: 12px; color: var(--wp-muted); }
.bt-checklist { list-style: none; margin: 0; padding: 0; }
.bt-checklist li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid #f0f0f1; }
.bt-checklist li:first-child { border-top: 0; }
.bt-checkmark {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--wp-border);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
  color: #fff; margin-top: 1px;
}
.bt-checklist li.is-done .bt-checkmark { background: var(--wp-green); border-color: var(--wp-green); }
.bt-checklist__body { flex: 1; min-width: 0; }
.bt-checklist__body strong { display: block; font-size: 13px; }
.bt-checklist__body p { margin: 2px 0 0; color: var(--wp-muted); font-size: 12px; }
.bt-checklist .button { margin-left: auto; flex: 0 0 auto; }

.bt-list__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #f0f0f1; }
.bt-list__row:first-child { border-top: 0; }
.bt-list__title { font-weight: 600; text-decoration: none; }
.bt-list__title:hover { text-decoration: underline; }
.bt-list__row .bt-muted { font-size: 11px; display: block; }
.bt-list--small .bt-list__row { align-items: flex-start; }
.bt-quick { display: flex; flex-direction: column; gap: 2px; }
.bt-quick a {
  display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-radius: 3px;
  text-decoration: none; color: var(--wp-text); font-weight: 500;
}
.bt-quick a:hover { background: #f6f7f7; color: var(--wp-blue); }
.bt-quick .bt-icon { width: 17px; height: 17px; color: var(--wp-muted); }
.bt-health > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid #f0f0f1; font-size: 12px; }
.bt-health > div:first-child { border-top: 0; }
.bt-health span { color: var(--wp-muted); }
.bt-health .is-ok { color: #1e7d34; }
.bt-health .is-bad { color: var(--wp-red); }
.bt-tip .inside p { background: #f6f7f7; border-left: 3px solid #72aee6; padding: 8px 10px; }

/* ---------------------------------------------------------- Settings */
.bt-settings-tabs {
  display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--wp-border);
  margin: 0 0 20px;
}
.nav-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; margin: 0 3px -1px 0;
  background: #dcdcde; border: 1px solid var(--wp-border); border-bottom: none;
  border-radius: 3px 3px 0 0; color: #50575e; text-decoration: none; font-size: 13px; font-weight: 500;
}
.nav-tab .bt-icon { width: 15px; height: 15px; }
.nav-tab:hover { background: #f0f0f1; color: var(--wp-text); }
.nav-tab-active, .nav-tab-active:hover { background: #fff; color: var(--wp-text); border-bottom: 1px solid #fff; margin-bottom: -2px; }

.form-table { width: 100%; border-collapse: collapse; }
.form-table th {
  width: 230px; text-align: left; vertical-align: top; font-weight: 600;
  padding: 18px 16px 18px 0; font-size: 13px; border-bottom: 1px solid #f0f0f1;
}
.form-table td { padding: 12px 0 14px; vertical-align: top; border-bottom: 1px solid #f0f0f1; }
.form-table tr:last-child th, .form-table tr:last-child td { border-bottom: 0; }
.bt-settings-section { font-size: 14px; margin: 22px 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--wp-border-soft); }

input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input[type=url], select, textarea {
  font-family: var(--wp-font); font-size: 14px; color: var(--wp-text);
  background: #fff; border: 1px solid #8c8f94; border-radius: 4px;
  padding: 4px 8px; min-height: 30px; max-width: 100%;
}
textarea { width: 100%; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--wp-blue); box-shadow: 0 0 0 1px var(--wp-blue); outline: 0; }
input[type=file] { font-size: 12px; max-width: 100%; }
input[type=checkbox] { accent-color: var(--wp-blue); }
.regular-text { width: 25rem; max-width: 100%; }
.large-text { width: 100%; }
.small-text { width: 90px; }
.code, textarea.code { font-family: Consolas, Monaco, monospace; font-size: 12px; }
.description { font-size: 12px; color: var(--wp-muted); margin: 5px 0 0; line-height: 1.5; }
.description code { font-size: 11px; }
.bt-check { display: inline-flex; align-items: flex-start; gap: 7px; font-size: 13px; cursor: pointer; }
.bt-check input { margin: 2px 0 0; }
.bt-check--danger { color: var(--wp-red); margin-top: 6px; }
.bt-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.bt-two-col > .bt-field { margin-bottom: 0; }

.bt-color-field { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.bt-color-field input[type=color] { width: 38px; height: 32px; padding: 2px; border: 1px solid #8c8f94; border-radius: 4px; background: #fff; }
.bt-color-field .regular-text { width: 16rem; }
.bt-image-preview { margin-bottom: 8px; }
.bt-image-preview img { max-width: 220px; max-height: 150px; display: block; border: 1px solid var(--wp-border-soft); border-radius: 3px; padding: 3px; background: #fff; }
.bt-upload-row { margin-top: 6px; }
.bt-current-file { font-size: 12px; margin: 0 0 6px; }
.bt-save-row {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; gap: 8px; align-items: center;
  background: var(--wp-bg); border-top: 1px solid var(--wp-border-soft);
  padding: 12px 0; margin: 0;
}
.bt-settings-form .postbox:last-of-type { margin-bottom: 4px; }
.bt-test-result { margin-top: 10px; font-weight: 600; min-height: 1.4em; }
.bt-test-result.is-ok { color: #1e7d34; }
.bt-test-result.is-bad { color: var(--wp-red); }
.bt-help-list { margin: 8px 0 0 20px; padding: 0; }
.bt-help-list li { margin-bottom: 7px; }

/* ---------------------------------------------------------- Editor */
.bt-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 20px; align-items: start; }
.bt-editor-main { min-width: 0; }
.bt-editor-side { position: sticky; top: 52px; }
.bt-editor-heading { font-size: 16px; font-weight: 600; margin: 6px 0 10px; }
.bt-title-box .inside { padding: 12px; }
.bt-title-input {
  width: 100%; font-size: 22px; font-weight: 400; line-height: 1.4;
  padding: 7px 10px; border: 1px solid #8c8f94; border-radius: 4px; margin-bottom: 8px;
}
.bt-permalink {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: 12px; color: var(--wp-muted); background: #f6f7f7;
  border: 1px solid #f0f0f1; padding: 5px 8px; border-radius: 3px;
}
.bt-permalink input { min-height: 24px; padding: 2px 6px; font-size: 12px; width: 15rem; max-width: 100%; }
.bt-permalink .description { display: block; width: 100%; }
.bt-publish-actions { margin: 12px 0 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.bt-check--home { margin: 8px 0 12px; font-weight: 600; }
.bt-danger-zone { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--wp-border-soft); display: flex; justify-content: flex-end; }
.bt-cover-preview { text-align: center; }
.bt-cover-preview .book { max-width: 150px; }

/* Block cards */
.bt-block-editor { margin-bottom: 24px; }
.bt-block-card { background: #fff; border: 1px solid var(--wp-border); border-radius: 2px; box-shadow: 0 1px 1px rgba(0,0,0,.04); margin-bottom: 12px; }
.bt-block-card__head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #f6f7f7; border-bottom: 1px solid var(--wp-border-soft); }
.bt-block-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1px solid var(--wp-border-soft); color: #50575e; }
.bt-block-card__icon .bt-icon { width: 15px; height: 15px; }
.bt-block-card__name { min-width: 0; }
.bt-block-card__name strong { display: block; font-size: 13px; }
.bt-block-card__name small { display: block; color: var(--wp-muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.bt-block-card__actions { margin-left: auto; display: flex; gap: 1px; }
.bt-block-card__body { padding: 14px 16px 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.bt-block-card__body > .bt-field { margin-bottom: 12px; }
.bt-block-card.is-collapsed .bt-block-card__body { display: none; }
.bt-block-card [aria-expanded="true"] .bt-icon { transform: rotate(180deg); }

.bt-field { margin-bottom: 12px; min-width: 0; }
.bt-field--wide { grid-column: 1 / -1; }
.bt-label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 4px; }
.bt-control input[type=text], .bt-control input[type=email], .bt-control input[type=password], .bt-control input[type=date], .bt-control input[type=number], .bt-control select { width: 100%; }
.bt-control textarea { width: 100%; }
.bt-field--check .bt-control { padding-top: 2px; }
.bt-control input[type=color] { height: 32px; }

.bt-items { border-top: 1px solid #f0f0f1; padding-top: 10px; }
.bt-item { background: #f6f7f7; border: 1px solid var(--wp-border-soft); border-radius: 3px; padding: 10px; margin-bottom: 10px; }
.bt-item__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bt-item__head strong { font-size: 12px; color: #50575e; }
.bt-item-remove { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--wp-red); font: inherit; font-size: 11px; cursor: pointer; padding: 0; }
.bt-item-remove .bt-icon { width: 13px; height: 13px; }
.bt-item__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.bt-item__grid .bt-field { margin-bottom: 8px; }
.bt-item__grid .bt-field--wide { grid-column: 1 / -1; }
.bt-items-empty { color: var(--wp-muted); font-size: 12px; margin: 0 0 8px; }
.bt-item-add { margin-top: 2px !important; }

.bt-add-block { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: #fff; border: 1px dashed #8c8f94; border-radius: 3px; padding: 14px 16px; }
.bt-add-block h2 { font-size: 14px; }
.bt-add-block .description { margin: 2px 0 0; }
.bt-add-block__controls { display: flex; gap: 8px; align-items: center; }
.bt-add-block__controls select { min-width: 190px; }

/* ---------------------------------------------------------- Media */
.bt-media-upload { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.bt-media-upload > div { display: flex; flex-direction: column; gap: 4px; }
.bt-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-top: 8px; }
.bt-media-item { background: #fff; border: 1px solid var(--wp-border); border-radius: 2px; overflow: hidden; }
.bt-media-item__preview { background: #f6f7f7; height: 140px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid #f0f0f1; }
.bt-media-item__preview img { width: 100%; height: 100%; object-fit: cover; }
.bt-media-file { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 64px; background: #fcf0f1; color: var(--wp-red); font-weight: 700; font-size: 13px; border-radius: 4px; border: 1px solid #f0c9cb; }
.bt-media-item__body { padding: 9px 10px 11px; }
.bt-media-item__body strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-media-item__body small { display: block; color: var(--wp-muted); font-size: 11px; }
.bt-media-item__body code { display: block; font-size: 10px; color: #50575e; background: #f6f7f7; padding: 3px 5px; margin: 6px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-media-item__actions { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.bt-media-item__actions .bt-inline-form { display: inline-flex; }
.bt-book-thumb { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 60px; border-radius: 3px 6px 6px 3px; font-weight: 700; font-size: 16px; box-shadow: 2px 3px 6px rgba(0,0,0,.14); overflow: hidden; }
.bt-book-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------- Reviews / stats */
.bt-review-text { margin: 4px 0 0; color: var(--wp-muted); max-width: 520px; }
.bt-mini-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.bt-mini-stats > div { background: #fff; border: 1px solid var(--wp-border); padding: 10px 16px; min-width: 150px; border-radius: 2px; }
.bt-mini-stats strong { display: block; font-size: 19px; line-height: 1.2; }
.bt-mini-stats span { font-size: 11px; color: var(--wp-muted); }
.bt-filter-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tablenav { margin: 8px 0 10px; }
.tablenav-pages { display: flex; align-items: center; gap: 8px; justify-content: flex-end; font-size: 12px; color: var(--wp-muted); }
.tablenav-pages .displaying-num { margin-right: auto; }
.subsubsub { display: flex; gap: 6px; list-style: none; margin: 0 0 8px; padding: 0; font-size: 13px; color: var(--wp-muted); flex-wrap: wrap; }
.subsubsub a { text-decoration: none; }
.subsubsub a.current { font-weight: 600; color: var(--wp-text); }
.subsubsub .count { color: var(--wp-muted); }

/* ---------------------------------------------------------- Help */
.bt-help-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.bt-help-nav { position: sticky; top: 52px; }
.bt-help-nav h2 { font-size: 13px; }
.bt-help-nav ul { list-style: none; margin: 8px 0 0; padding: 0; }
.bt-help-nav li { margin-bottom: 5px; }
.bt-help-nav a { text-decoration: none; font-size: 12px; }
.bt-help-nav a:hover { text-decoration: underline; }
.bt-help-body .postbox { scroll-margin-top: 50px; }
.bt-help-body .inside p { max-width: 78ch; }
.bt-help-body .inside ul { max-width: 78ch; }
.bt-help-body .inside li { margin-bottom: 4px; }

/* ---------------------------------------------------------- Footer */
.bt-admin-footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 10px 22px 26px; padding-top: 14px; border-top: 1px solid var(--wp-border-soft);
  color: var(--wp-muted); font-size: 12px;
}

/* ---------------------------------------------------------- Login */
body.bt-login-body {
  margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 30px 16px; font-family: var(--wp-font); color: var(--wp-text);
  background: linear-gradient(160deg, #eaf7eb 0%, #f4f5f3 45%, #fff3c4 100%);
}
.bt-login { width: 100%; max-width: 360px; }
.bt-login-logo {
  display: flex; justify-content: center; align-items: center; text-decoration: none;
  color: #1d2621; font-size: 38px; font-weight: 700; letter-spacing: .02em; margin-bottom: 4px;
}
.bt-login-sub { text-align: center; color: #646970; font-size: 12px; margin: 0 0 18px; letter-spacing: .08em; text-transform: uppercase; }
.bt-login-box { background: #fff; border: 1px solid var(--wp-border); box-shadow: 0 4px 18px rgba(0,0,0,.08); padding: 22px 24px 24px; border-radius: 4px; }
.bt-login-box .notice { margin: 0 0 14px; font-size: 12px; }
.bt-login-box label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 4px; }
.bt-login-box label:first-of-type { margin-top: 0; }
.bt-login-box input[type=email], .bt-login-box input[type=password] { width: 100%; padding: 7px 9px; font-size: 15px; min-height: 38px; }
.bt-login-box .button-large { width: 100%; margin-top: 18px; }
.bt-password-wrap { position: relative; }
.bt-password-wrap input { padding-right: 52px; }
.bt-show-password { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--wp-blue); font: inherit; font-size: 11px; cursor: pointer; padding: 4px; }
.bt-login-help { font-size: 11px; color: #646970; margin: 16px 0 0; text-align: center; border-top: 1px solid #f0f0f1; padding-top: 12px; }
.bt-login-back { text-align: center; font-size: 12px; margin: 18px 0 0; }
.bt-login-back a { text-decoration: none; color: #50575e; }
.bt-login-back a:hover { color: var(--wp-blue); }

/* ---------------------------------------------------------- Responsive */
@media (max-width: 1180px) {
  .bt-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bt-dashboard-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .bt-editor-layout { grid-template-columns: minmax(0, 1fr) 280px; }
}

@media (max-width: 1024px) {
  .bt-dashboard-grid, .bt-editor-layout { grid-template-columns: 1fr; }
  .bt-editor-side { position: static; }
  .bt-help-grid { grid-template-columns: 1fr; }
  .bt-help-nav { position: static; }
  .bt-help-nav ul { display: flex; flex-wrap: wrap; gap: 6px 14px; }
}

@media (max-width: 960px) {
  #adminmenuwrap { transform: translateX(-100%); box-shadow: 8px 0 22px rgba(0,0,0,.18); }
  body.bt-menu-open #adminmenuwrap { transform: translateX(0); }
  #wpcontent { margin-left: 0; }
  .bt-menu-toggle { display: flex; }
  .bt-admin-footer { margin-left: 16px; margin-right: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 782px) {
  body.bt-admin { padding-top: 46px; }
  #wpadminbar { height: 46px; }
  #wpadminbar .ab-item { height: 46px; }
  #wpadminbar .ab-label { display: none; }
  #wpadminbar .ab-user { display: none; }
  .bt-menu-toggle { height: 46px; }
  #adminmenuwrap { top: 46px; }
  .bt-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt-block-card__body, .bt-item__grid, .bt-two-col { grid-template-columns: 1fr; }
  .form-table th, .form-table td { display: block; width: auto; padding: 0; border: 0; }
  .form-table th { padding-top: 14px; }
  .form-table td { padding: 5px 0 10px; }
  .form-table tr { display: block; border-bottom: 1px solid #f0f0f1; }
  .regular-text { width: 100%; }
  .bt-checklist .button { display: none; }
  .wp-list-table { display: block; overflow-x: auto; white-space: nowrap; }
  .wp-list-table td, .wp-list-table th { white-space: normal; min-width: 90px; }
  .bt-page-actions { margin-left: 0; width: 100%; }
  .bt-save-row { padding: 10px 0; }
  .bt-review-table { white-space: normal; }
}

/* ---------- Tracked links & waiting lists ---------- */
.bt-copy-row { margin: 4px 0 14px; }
.bt-copy-row > label { display: block; font-weight: 600; margin-bottom: 5px; }
.bt-copy-row__fields { display: flex; gap: 8px; }
.bt-copy-row__fields input { flex: 1 1 auto; min-width: 0; }
.bt-copy-row__fields .button { flex: 0 0 auto; }
.bt-mini-stat {
  background: #f6f7f7;
  border: 1px solid var(--wp-border-soft);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.bt-mini-stat span {
  display: block;
  font-size: 11px;
  color: var(--wp-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.bt-mini-stat strong { display: block; font-size: 22px; line-height: 1.25; }
.bt-mini-stat a { font-size: 12px; }

/* =========================================================
   Version 1.2 — analytics, requests, QR, 2FA, imports
   ========================================================= */

/* ---------- Stat grid variants ---------- */
.bt-stat-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bt-stat-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bt-stat-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.bt-week-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  background: #fff;
  border: 1px solid var(--wp-border);
  border-radius: 2px;
  margin-bottom: 20px;
}
.bt-week-strip__item {
  flex: 1 1 130px;
  padding: 12px 16px;
  border-left: 1px solid #f0f0f1;
}
.bt-week-strip__item:first-child { border-left: 0; }
.bt-week-strip__label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--wp-muted); }
.bt-week-strip__item strong { font-size: 20px; line-height: 1.2; }
.bt-week-strip__more { padding: 10px 16px; margin-left: auto; }

/* ---------- Activity list ---------- */
.bt-activity-list { list-style: none; margin: 0; padding: 0; }
.bt-activity-list li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid #f0f0f1; }
.bt-activity-list li:first-child { border-top: 0; }
.bt-activity-list__dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--wp-green); margin-top: 6px; }
.bt-activity-list__body { flex: 1; min-width: 0; font-size: 12px; }
.bt-activity-list__body strong { font-size: 12px; }
.bt-activity-list__body code { font-size: 11px; background: #f6f7f7; padding: 1px 5px; border-radius: 3px; margin: 0 4px; }
.bt-activity-list__body .bt-muted { display: block; }
.bt-activity-list__time { flex: 0 0 auto; font-size: 11px; color: var(--wp-muted); }

/* ---------- Chart ---------- */
.bt-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 210px;
  padding: 12px 4px 0;
  border-bottom: 1px solid var(--wp-border-soft);
  overflow-x: auto;
}
.bt-chart__day {
  flex: 1 0 12px;
  min-width: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 4px;
}
.bt-chart__bars { flex: 1; display: flex; align-items: flex-end; gap: 1px; width: 100%; min-height: 4px; }
.bt-chart__bar { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; }
.bt-chart__bar--views { background: #72aee6; }
.bt-chart__bar--buys { background: #00a32a; }
.bt-chart__label { font-size: 9px; color: var(--wp-muted); writing-mode: vertical-rl; transform: rotate(180deg); height: 42px; white-space: nowrap; }
.bt-chart__legend { font-size: 11px; color: var(--wp-muted); margin: 10px 0 0; }
.bt-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; }
.bt-dot--views { background: #72aee6; }
.bt-dot--buys { background: #00a32a; }

/* ---------- Horizontal bar list ---------- */
.bt-bar-list { list-style: none; margin: 0; padding: 0; }
.bt-bar-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12px; }
.bt-bar-list__label { flex: 0 0 90px; color: var(--wp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-bar-list__bar { flex: 1; height: 8px; background: #f0f0f1; border-radius: 999px; overflow: hidden; }
.bt-bar-list__bar span { display: block; height: 100%; background: #72aee6; border-radius: 999px; }
.bt-bar-list strong { flex: 0 0 40px; text-align: right; font-size: 12px; }

/* ---------- Small tables ---------- */
.bt-mini-table { margin: 0; }
.bt-mini-table th, .bt-mini-table td { padding: 6px 8px; font-size: 12px; }
.bt-num { text-align: right; white-space: nowrap; }
.bt-table-scroll { overflow-x: auto; }
.bt-row-actions { display: flex; gap: 6px; align-items: center; }
.bt-row-actions form { margin: 0; }

/* ---------- Requests ---------- */
.bt-filter-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.bt-request.is-handled { opacity: .72; }
.bt-request__meta { font-size: 12px; }
.bt-request__message {
  background: #f6f7f7;
  border-left: 3px solid #72aee6;
  padding: 10px 12px;
  margin: 0 0 12px;
  font-size: 13px;
}
.bt-request__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bt-request__actions form { margin: 0; }

/* ---------- QR screens ---------- */
.bt-qr-preview { text-align: center; }
.bt-qr-preview img { margin: 0 auto; max-width: 100%; height: auto; }
.bt-qr-preview__label { font-weight: 600; margin: 12px 0 0; font-size: 12px; word-break: break-word; }
.bt-qr-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.bt-qr-card {
  border: 1px dashed var(--wp-border);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  background: #fff;
}
.bt-qr-card__code { display: grid; place-items: center; margin-bottom: 8px; }
.bt-qr-card strong { display: block; font-size: 12px; }
.bt-qr-card small { display: block; color: var(--wp-muted); font-size: 11px; }
.bt-qr-card__hint { display: block; margin-top: 6px; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--wp-muted); }

/* ---------- Two-step login ---------- */
.bt-totp-setup { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-bottom: 18px; }
.bt-totp-qr {
  background: #fff;
  border: 1px solid var(--wp-border-soft);
  border-radius: 6px;
  padding: 12px;
  min-width: 170px;
  min-height: 170px;
  display: grid;
  place-items: center;
}
.bt-totp-qr img { width: 160px; height: 160px; }
.bt-totp-manual { flex: 1 1 240px; }
.bt-totp-secret { display: inline-block; font-size: 14px; letter-spacing: .14em; background: #f6f7f7; padding: 8px 12px; border-radius: 4px; word-break: break-all; }
.bt-recovery-codes {
  background: #fcf9e8;
  border: 1px solid #f0e6b8;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.bt-recovery-codes h3 { margin-top: 0; }
.bt-recovery-codes__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
  margin: 10px 0;
  padding: 0;
}
.bt-recovery-codes__list code { display: block; background: #fff; border: 1px solid #e6dcc0; border-radius: 4px; padding: 5px 8px; font-size: 13px; letter-spacing: .06em; text-align: center; }
.bt-inner-box { margin: 0; box-shadow: none; }
.bt-inner-box h3 { margin: 0 0 6px; font-size: 13px; }

/* ---------- Login extras ---------- */
.bt-login-lead { text-align: center; font-size: 13px; margin: 0 0 4px; }
.bt-login-email { text-align: center; font-weight: 600; margin: 0 0 16px; word-break: break-word; }
.bt-login-recovery { margin-top: 16px; border-top: 1px solid #f0f0f1; padding-top: 12px; }
.bt-login-recovery summary { cursor: pointer; font-size: 12px; color: var(--wp-blue); }
.bt-login-recovery form { margin-top: 10px; }
.bt-login-box input[type=text] { width: 100%; padding: 7px 9px; font-size: 15px; min-height: 38px; }
.bt-login-recovery .button { margin-top: 10px; width: 100%; }

/* ---------- Import and review helpers ---------- */
.bt-column-list { columns: 2; column-gap: 18px; font-size: 12px; }
.bt-column-list code { background: #f6f7f7; padding: 1px 5px; border-radius: 3px; }
.bt-review-source-line { font-size: 11px; margin: 4px 0 0; }
.bt-books-table .column-cover { width: 64px; }
.bt-books-table .column-order { width: 60px; }
.bt-books-table .column-waiting,
.bt-books-table .column-clicks { width: 92px; }
.bt-books-table .check-column { width: 32px; }

/* ---------- Responsive for new pieces ---------- */
@media (max-width: 1300px) {
  .bt-stat-grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .bt-stat-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
  .bt-stat-grid--3, .bt-stat-grid--4, .bt-stat-grid--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt-week-strip__item { flex: 1 1 45%; border-top: 1px solid #f0f0f1; }
  .bt-week-strip__item:nth-child(1), .bt-week-strip__item:nth-child(2) { border-top: 0; }
  .bt-week-strip__more { width: 100%; margin-left: 0; border-top: 1px solid #f0f0f1; }
  .bt-column-list { columns: 1; }
  .bt-activity-list__time { display: none; }
}

