/* ===================================================================
   KBL Advisors — Blog Redesign (Public)
   =================================================================== */

:root {
  --bl-paper: #F4F1EA;
  --bl-paper-2: #EBE6DC;
  --bl-ink: #14120F;
  --bl-ink-2: #2A2722;
  --bl-muted: #7B7468;
  --bl-rule: #D9D3C5;
  --bl-rule-2: #C8C1B1;
  --bl-accent: #3F6378;
  --bl-accent-ink: #2B4657;
}

.bl-page {
  background: var(--bl-paper);
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--bl-ink);
  -webkit-font-smoothing: antialiased;
}
.bl-page a { color: inherit; text-decoration: none; }

.bl-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 56px;
}
@media (max-width: 1100px) { .bl-inner { padding: 0 32px; } }
@media (max-width: 600px)  { .bl-inner { padding: 0 20px; } }

/* Masthead */
.bl-masthead {
  padding: 22px 0 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--bl-rule);
}
@media (max-width: 760px) {
  .bl-masthead { grid-template-columns: 1fr; gap: 10px; padding: 18px 0 12px; text-align: center; }
  .bl-mast-right { justify-content: center; }
}
.bl-mast-left {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--bl-muted);
}
.bl-mast-title {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.bl-mast-title h1 {
  font-family: 'Cormorant Garamond', 'Baskervville', serif;
  font-weight: 500;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1; letter-spacing: -.01em;
  margin: 0;
}
.bl-mast-right {
  display: flex; justify-content: flex-end; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--bl-muted);
}
.bl-rss {
  display: flex; align-items: center; gap: 8px;
  color: var(--bl-muted); text-decoration: none;
}
.bl-rss:hover { color: var(--bl-ink); }
.bl-rss svg { width: 14px; height: 14px; }

/* Toolbar */
.bl-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 10px 0; border-bottom: 1px solid var(--bl-rule);
  position: sticky;
  top: 73px;
  background: var(--bl-paper); z-index: 5;
  flex-wrap: wrap;
}
@media (min-width: 640px) { .bl-toolbar { top: 86px; } }
.bl-toolbar-tagline {
  font-family: 'Cormorant Garamond', 'Baskervville', serif;
  font-style: italic;
  font-size: 16px; line-height: 1.35; color: var(--bl-ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bl-search {
  display: flex; align-items: center; gap: 10px;
  background: #FFFFFF; border: 1px solid var(--bl-rule-2);
  border-radius: 999px; padding: 6px 16px 6px 14px;
  width: 280px; flex: none; transition: all .18s ease;
}
.bl-search:focus-within { border-color: var(--bl-ink); box-shadow: 0 0 0 3px rgba(20,18,15,.06); }
.bl-search svg { width: 15px; height: 15px; color: var(--bl-muted); flex: none; }
.bl-search input {
  border: 0; outline: 0; background: transparent;
  font-family: 'Inter', sans-serif; font-size: 14px; color: var(--bl-ink);
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
}
.bl-search input::placeholder { color: var(--bl-muted); }
.bl-kbd {
  font-size: 11px; color: var(--bl-muted);
  border: 1px solid var(--bl-rule); border-radius: 4px;
  padding: 2px 6px; background: var(--bl-paper);
  font-family: 'Inter', sans-serif; flex: none;
}
@media (max-width: 640px) {
  .bl-search { width: 100%; }
  .bl-kbd { display: none; }
}

/* Hero */
.bl-hero {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 40px;
  padding: 24px 0 32px; align-items: stretch;
  border-bottom: 1px solid var(--bl-rule);
}
@media (max-width: 1100px) { .bl-hero { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 760px)  { .bl-hero { grid-template-columns: 1fr; gap: 20px; } }

.bl-hero-media {
  position: relative; height: 300px; overflow: hidden;
  background: var(--bl-paper-2); display: block; min-width: 0;
}
@media (max-width: 1200px) { .bl-hero-media { height: 280px; } }
@media (max-width: 760px)  { .bl-hero-media { height: 44vw; max-height: 280px; } }
.bl-hero-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 1.2s cubic-bezier(.2,.6,.2,1);
}
.bl-hero:hover .bl-hero-media img { transform: scale(1.02); }
.bl-hero-minutes {
  position: absolute; bottom: 18px; left: 18px;
  color: #fff; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0,0,0,.45);
  display: flex; align-items: center; gap: 10px;
}
.bl-hero-minutes::before { content: ""; width: 24px; height: 1px; background: #fff; display: inline-block; }

.bl-hero-placeholder {
  height: 300px;
  background: linear-gradient(135deg, #EBE6DC 0%, #DDD5CC 50%, #D0C8BC 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', 'Baskervville', serif;
  font-size: 42px; color: #C4B9AD; text-decoration: none;
}
@media (max-width: 760px) { .bl-hero-placeholder { height: 44vw; max-height: 280px; } }

.bl-hero-body {
  display: flex; flex-direction: column; justify-content: center;
  gap: 14px; padding: 4px 0; min-width: 0;
}
.bl-hero-eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--bl-accent); font-weight: 600;
}
.bl-dot { width: 5px; height: 5px; background: var(--bl-accent); border-radius: 50%; }
.bl-hero-body h2 {
  font-family: 'Cormorant Garamond', 'Baskervville', serif; font-weight: 500;
  font-size: clamp(28px, 3vw, 40px); line-height: 1.05; letter-spacing: -.012em;
  margin: 0; color: var(--bl-ink);
}
.bl-hero-body h2 a { color: inherit; }
.bl-hero-body h2 a:hover { color: var(--bl-accent-ink); }
.bl-hero-preview {
  font-size: 15px; line-height: 1.55; color: var(--bl-ink-2); margin: 0; max-width: 52ch;
}
.bl-byline {
  display: flex; align-items: center; gap: 12px;
  color: var(--bl-muted); font-size: 12px;
  padding-top: 14px; border-top: 1px solid var(--bl-rule);
}
.bl-byline-author { color: var(--bl-ink); }
.bl-sep { width: 3px; height: 3px; background: var(--bl-muted); border-radius: 50%; opacity: .6; display: inline-block; }
.bl-cta {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bl-ink); font-weight: 600;
  align-self: flex-start; padding: 11px 18px;
  background: var(--bl-paper-2); border: 1px solid var(--bl-rule-2);
  transition: all .18s ease; text-decoration: none;
}
.bl-cta:hover { background: var(--bl-ink); color: var(--bl-paper); border-color: var(--bl-ink); }
.bl-cta svg { width: 14px; height: 14px; transition: transform .2s ease; }
.bl-cta:hover svg { transform: translateX(3px); }

/* Latest section */
.bl-latest { padding: 32px 0 0; }
.bl-latest-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 22px;
}
.bl-latest-head h3 {
  font-family: 'Cormorant Garamond', 'Baskervville', serif; font-weight: 500;
  font-size: 28px; margin: 0; letter-spacing: -.01em;
}
.bl-latest-count { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--bl-muted); }

/* Grid + sidebar layout */
.bl-latest-wrap {
  display: grid; grid-template-columns: minmax(0,1fr) 240px; gap: 56px;
  padding: 8px 0 80px;
}
@media (max-width: 900px) { .bl-latest-wrap { grid-template-columns: 1fr; gap: 40px; } }

/* Sidebar */
.bl-sidebar { min-width: 0; }
.bl-sidebar-block + .bl-sidebar-block { margin-top: 32px; }
.bl-sidebar h4 {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--bl-muted);
  font-weight: 600; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--bl-rule);
}
.bl-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.bl-cats li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--bl-rule);
  font-size: 14px;
}
.bl-cats li a { color: var(--bl-ink-2); text-decoration: none; flex: 1; transition: color .15s; }
.bl-cats li:hover a { color: var(--bl-ink); }
.bl-cats li.active a { color: var(--bl-ink); font-weight: 500; }
.bl-cat-count { color: var(--bl-muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.bl-cats li.active .bl-cat-count { color: var(--bl-accent); }

/* Card grid */
.bl-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 40px 28px;
}
@media (max-width: 1000px) { .bl-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px)  { .bl-grid { grid-template-columns: 1fr; } }

.bl-card {
  display: flex; flex-direction: column; gap: 14px;
  text-decoration: none; color: inherit; cursor: pointer;
}
.bl-card-thumb { aspect-ratio: 5/4; overflow: hidden; background: var(--bl-paper-2); }
.bl-card-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .8s cubic-bezier(.2,.6,.2,1);
}
.bl-card:hover .bl-card-thumb img { transform: scale(1.03); }
.bl-card-thumb-ph {
  aspect-ratio: 5/4;
  background: linear-gradient(135deg, #EBE6DC 0%, #DDD5CC 50%, #D0C8BC 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', 'Baskervville', serif;
  font-size: 28px; color: #C4B9AD;
}
.bl-card-eyebrow {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--bl-accent); font-weight: 600; margin-top: 6px;
}
.bl-card h4 {
  font-family: 'Cormorant Garamond', 'Baskervville', serif; font-weight: 500;
  font-size: 24px; line-height: 1.15; letter-spacing: -.005em; margin: 0; color: var(--bl-ink);
  transition: color .15s;
}
.bl-card:hover h4 { color: var(--bl-accent-ink); }
.bl-card-dek { font-size: 14px; line-height: 1.55; color: var(--bl-ink-2); margin: 0; max-width: 38ch; }
.bl-card-meta {
  font-size: 12px; color: var(--bl-muted);
  display: flex; gap: 10px; align-items: center; margin-top: 4px;
}

/* Pagination */
.bl-pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; margin-top: 60px; font-size: 14px; flex-wrap: wrap;
}
.bl-pagination a, .bl-pagination span {
  padding: 8px 16px; border: 1px solid var(--bl-rule-2);
  color: var(--bl-ink-2); text-decoration: none; transition: all .15s;
}
.bl-pagination a:hover { background: var(--bl-paper-2); }
.bl-pg-active { background: var(--bl-ink) !important; color: var(--bl-paper) !important; border-color: var(--bl-ink) !important; }

/* Empty state */
.bl-empty { text-align: center; color: var(--bl-muted); font-size: 15px; padding: 60px 0; }

/* Footnote */
.bl-footnote {
  border-top: 1px solid var(--bl-rule); padding: 24px 0 56px;
  display: flex; justify-content: space-between;
  color: var(--bl-muted); font-size: 12px; letter-spacing: .06em;
}
@media (max-width: 600px) { .bl-footnote { flex-direction: column; gap: 8px; } }

/* ===================================================================
   KBL Advisors — Blog & Admin Styles (Legacy)
   =================================================================== */

/* --- Blog toolbar (Search / RSS) --- */
.blog-toolbar-link {
    color: #6b7280;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.blog-toolbar-link:hover {
    color: #111;
    background-color: rgba(0, 0, 0, 0.06);
}

/* --- Blog Public Content --- */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    font-family: 'Libre Baskerville', serif;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}
.blog-content h1 { font-size: 2rem; }
.blog-content h2 { font-size: 1.6rem; }
.blog-content h3 { font-size: 1.3rem; }

.blog-content p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.blog-content a {
    color: #111;
    text-decoration: underline;
}
.blog-content a:hover {
    color: #000;
}

.blog-content ul,
.blog-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
}
.blog-content ul { list-style-type: disc; }
.blog-content ol { list-style-type: decimal; }
.blog-content li { margin-bottom: 0.4rem; line-height: 1.7; }

.blog-content blockquote {
    border-left: 4px solid #111;
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: #555;
    font-style: italic;
}

.blog-content pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

.blog-content code {
    background: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.9em;
}

.blog-content pre code {
    background: none;
    padding: 0;
}

.blog-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
}
.blog-content th,
.blog-content td {
    border: 1px solid #ddd;
    padding: 0.6rem 0.8rem;
    text-align: left;
}
.blog-content th { background: #f5f5f5; font-weight: 600; }

.blog-content hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 2rem 0;
}

/* Tag chip */
.tag-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f3f3f3;
    color: #111;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}
.tag-chip:hover { background: #e5e5e5; }


/* ===================================================================
   ADMIN PANEL
   =================================================================== */

/* --- Login Page --- */
.admin-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
}

.admin-login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 48px 40px 40px;
    width: 100%;
    max-width: 400px;
}

.admin-login-card .login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.admin-login-card .login-logo h1 {
    font-family: 'Libre Baskerville', serif;
    font-size: 24px;
    color: #111;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.admin-login-card .login-logo p {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

.admin-login-card .login-divider {
    width: 40px;
    height: 2px;
    background: #0857AB;
    margin: 16px auto 0;
    border-radius: 1px;
}

.admin-login-card label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-login-card input[type="text"],
.admin-login-card input[type="password"] {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 11px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #111;
    background: #fafafa;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.admin-login-card input[type="text"]:focus,
.admin-login-card input[type="password"]:focus {
    border-color: #0857AB;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(8, 87, 171, 0.08);
}

.admin-login-card .login-btn {
    width: 100%;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    letter-spacing: 0.01em;
}

.admin-login-card .login-btn:hover {
    background: #0857AB;
}

.admin-login-card .login-btn:active {
    transform: scale(0.985);
}

.admin-login-card .login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

/* --- Admin Layout --- */
.admin-wrap {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 250px;
    min-height: 100vh;
    background: #111827;
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    transition: transform 0.25s ease;
}

.admin-sidebar .sidebar-brand {
    padding: 24px 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-sidebar .sidebar-brand a {
    color: #fff;
    text-decoration: none;
    font-family: 'Libre Baskerville', serif;
    font-size: 17px;
    display: block;
}

.admin-sidebar .sidebar-brand span {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-sidebar .sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.admin-sidebar .sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 400;
    transition: color 0.15s, background-color 0.15s;
    border-left: 3px solid transparent;
}

.admin-sidebar .sidebar-nav a:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.04);
}

.admin-sidebar .sidebar-nav a.active {
    color: #fff;
    background: rgba(8, 87, 171, 0.25);
    border-left-color: #0857AB;
    font-weight: 500;
}

.admin-sidebar .sidebar-nav a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.admin-sidebar .sidebar-nav a.active svg {
    opacity: 1;
}

.admin-sidebar .sidebar-footer {
    padding: 16px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-sidebar .sidebar-footer a {
    display: block;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    padding: 5px 0;
    transition: color 0.15s;
}

.admin-sidebar .sidebar-footer a:hover {
    color: #fff;
}

/* Main content area */
.admin-main {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
    background: #f3f4f6;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 32px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 30;
}

.admin-topbar h1 {
    font-family: 'Libre Baskerville', serif;
    font-size: 20px;
    color: #111;
    margin: 0;
    font-weight: 400;
}

.admin-topbar .topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-body {
    padding: 28px 32px 40px;
}

/* --- Cards --- */
.admin-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.admin-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card-header h2 {
    font-family: 'Libre Baskerville', serif;
    font-size: 16px;
    color: #111;
    margin: 0;
    font-weight: 400;
}

.admin-card-body {
    padding: 22px;
}

/* --- Stat Cards --- */
.admin-stat {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 22px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s, transform 0.2s;
}

.admin-stat:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.admin-stat .stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.admin-stat .stat-value {
    font-family: 'Libre Baskerville', serif;
    font-size: 32px;
    line-height: 1;
}

/* --- Tables --- */
.admin-table {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    border-collapse: collapse;
}

.admin-table thead {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table thead th {
    text-align: left;
    padding: 12px 18px;
    font-weight: 600;
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.1s;
}

.admin-table tbody tr:last-child {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: #f9fafb;
}

.admin-table tbody td {
    padding: 14px 18px;
    color: #374151;
    vertical-align: middle;
}

.admin-table tbody td a {
    color: #111;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.admin-table tbody td a:hover {
    color: #0857AB;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.btn-primary {
    background: #111;
    color: #fff;
}
.btn-primary:hover {
    background: #0857AB;
    color: #fff;
}

.btn-outline {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}
.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-danger {
    background: transparent;
    color: #dc2626;
    padding: 4px 0;
    font-size: 12px;
}
.btn-danger:hover {
    color: #991b1b;
}

.btn-sm {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 6px;
}

.btn-link {
    background: none;
    border: none;
    color: #0857AB;
    padding: 0;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
}
.btn-link:hover {
    text-decoration: underline;
}

.btn-link-danger {
    background: none;
    border: none;
    color: #dc2626;
    padding: 0;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
}
.btn-link-danger:hover {
    color: #991b1b;
    text-decoration: underline;
}

/* --- Status Badges --- */
.badge {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 999px;
    line-height: 1.4;
}

.badge-green { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-blue { background: #dbeafe; color: #1e40af; }

/* --- Filter Tabs --- */
.filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-tab {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    padding: 7px 14px;
    border-radius: 7px;
    text-decoration: none;
    color: #6b7280;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: all 0.15s;
}

.filter-tab:hover {
    color: #111;
    border-color: #d1d5db;
    background: #f9fafb;
}

.filter-tab.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* --- Forms --- */
.form-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    padding: 9px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #111;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #0857AB;
    box-shadow: 0 0 0 3px rgba(8, 87, 171, 0.08);
}

.form-textarea {
    resize: vertical;
}

.form-input-lg {
    font-family: 'Libre Baskerville', serif;
    font-size: 22px;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 8px 0 12px;
}

.form-input-lg:focus {
    border-color: #0857AB;
    box-shadow: none;
}

/* --- Flash Messages --- */
.flash-message {
    padding: 14px 18px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.flash-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* --- Empty State --- */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    color: #9ca3af;
    font-size: 14px;
}

.empty-state a {
    color: #0857AB;
    text-decoration: none;
}
.empty-state a:hover {
    text-decoration: underline;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
    border-top: 1px solid #f3f4f6;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}

.pagination a,
.pagination span {
    padding: 5px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    transition: all 0.15s;
}

.pagination a:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.pagination .active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* --- Action Links (in tables) --- */
.action-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-links a,
.action-links button {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0;
}

.action-links .action-edit { color: #0857AB; }
.action-links .action-edit:hover { color: #064080; text-decoration: underline; }
.action-links .action-view { color: #6b7280; }
.action-links .action-view:hover { color: #374151; }
.action-links .action-delete { color: #dc2626; }
.action-links .action-delete:hover { color: #991b1b; text-decoration: underline; }
.action-links .action-approve { color: #16a34a; }
.action-links .action-approve:hover { color: #15803d; text-decoration: underline; }
.action-links .action-spam { color: #ea580c; }
.action-links .action-spam:hover { color: #c2410c; text-decoration: underline; }

/* --- List Items --- */
.list-item {
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.list-item:last-child {
    border-bottom: none;
}

/* --- Tag Chips (admin) --- */
.admin-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 5px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #374151;
    transition: background 0.15s;
}

.admin-tag:hover {
    background: #e5e7eb;
}

.admin-tag .tag-count {
    font-size: 11px;
    color: #9ca3af;
}

.admin-tag .tag-delete {
    color: #dc2626;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-left: 2px;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.admin-tag .tag-delete:hover {
    opacity: 1;
}

/* --- Post Editor Tag Chips --- */
.editor-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #dbeafe;
    color: #1e40af;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
}

.editor-tag button {
    background: none;
    border: none;
    color: #1e40af;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    opacity: 0.6;
}

.editor-tag button:hover {
    opacity: 1;
}

/* --- Author Avatar --- */
.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Libre Baskerville', serif;
    font-size: 16px;
    color: #6b7280;
    flex-shrink: 0;
}

/* --- Comment Card --- */
.comment-card {
    padding: 18px 22px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.1s;
}

.comment-card:last-child {
    border-bottom: none;
}

.comment-card:hover {
    background: #fafafa;
}

.comment-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.comment-meta .author {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.comment-meta .email,
.comment-meta .date,
.comment-meta .sep,
.comment-meta .on-post {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #9ca3af;
}

.comment-meta .on-post a {
    color: #0857AB;
    text-decoration: none;
}
.comment-meta .on-post a:hover {
    text-decoration: underline;
}

.comment-body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* --- Cover Image Drop Zone --- */
.cover-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.cover-dropzone:hover {
    border-color: #9ca3af;
    background: #fafafa;
}

.cover-dropzone.dragover {
    border-color: #0857AB;
    background: #eff6ff;
}

.cover-dropzone p {
    font-family: 'Inter', sans-serif;
    margin: 0;
}

.cover-dropzone .drop-main {
    font-size: 13px;
    color: #6b7280;
}

.cover-dropzone .drop-hint {
    font-size: 11px;
    color: #d1d5db;
    margin-top: 4px;
}

/* --- Section Headers (sidebar panels in post editor) --- */
.panel-title {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

/* --- Subscriber Stats --- */
.subscriber-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    padding: 22px;
}

.subscriber-stat .label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.subscriber-stat .value {
    font-family: 'Libre Baskerville', serif;
    font-size: 32px;
    line-height: 1.2;
}

/* --- EasyMDE overrides --- */
.EasyMDEContainer .CodeMirror {
    min-height: 350px;
    font-size: 14px;
    border-radius: 8px;
    border-color: #e5e7eb;
}

.EasyMDEContainer .CodeMirror-focused {
    border-color: #0857AB;
    box-shadow: 0 0 0 3px rgba(8, 87, 171, 0.08);
}

.EasyMDEContainer .editor-toolbar {
    border-color: #e5e7eb;
    border-radius: 8px 8px 0 0;
}

/* --- Mobile Sidebar Toggle --- */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #374151;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 35;
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .sidebar-toggle {
        display: block;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-topbar {
        padding: 0 16px;
    }

    .admin-body {
        padding: 20px 16px;
    }
}
