/* ================================================================
   DESIGN TOKENS
================================================================ */
:root {
  --ace-primary: #0b0817;
  --ace-accent:  #cc44ff;
  --ace-surface: #110e24;
  /* Internal palette */
  --surface2:   #19163a;
  --border:     rgba(180,80,255,0.12);
  --border-h:   rgba(180,80,255,0.38);
  --text:       #b8a8d8;
  --text-soft:  #5e5080;
  --head:       #e8d8ff;
  --cyan:       #00d4e8;
  --ff-title:   'Fraunces', Georgia, serif;
  --ff-body:    'DM Sans', sans-serif;
  --ff-mono:    'DM Mono', monospace;
}

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

body {
  font-family: var(--ff-body);
  background: var(--ace-primary);
  color: var(--text);
  line-height: 1.6;
}

/* ================================================================
   HEADER
================================================================ */
.site-header {
  background: var(--ace-primary);
  position: relative;
  overflow: hidden;
}
.site-header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ace-accent), var(--cyan), transparent);
  opacity: 0.45;
}
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 1.5rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.header-logo {
  font-family: var(--ff-title); font-size: 2.8rem; font-weight: 700;
  color: var(--head); letter-spacing: -0.02em; text-decoration: none;
  display: inline-flex; align-items: baseline; gap: 0;
}
.header-logo .brace { color: var(--ace-accent); }
.header-logo .domain { color: var(--text-soft); font-size: 0.88rem; font-weight: 400; margin-left: 1px; }
.header-actions { display: flex; gap: 1.5rem; align-items: center; }
.header-link {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--text-soft); text-decoration: none; transition: color 0.2s; text-transform: uppercase;
}
.header-link:hover { color: var(--cyan); }
.header-link.new-btn {
  color: var(--cyan); border: 1px solid rgba(0,212,232,0.3);
  padding: 0.32rem 0.85rem; border-radius: 3px; transition: all 0.2s;
}
.header-link.new-btn:hover { background: rgba(0,212,232,0.1); border-color: var(--cyan); }

/* ================================================================
   HERO STRIP
================================================================ */
.hero-strip { border-bottom: 1px solid var(--border); padding: 0.85rem 0; }
.hero-strip-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 2.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.hero-strip-label {
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--text-soft); text-transform: uppercase; white-space: nowrap;
}
.hero-strip-line { flex: 1; height: 1px; background: var(--border); }
.hero-strip-tag {
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--cyan); text-transform: uppercase; white-space: nowrap;
}

/* ================================================================
   MAIN WRAP + CONTENT
================================================================ */
.main-wrap {
  background: var(--ace-surface);
  border-bottom: 1px solid var(--border);
  min-height: 60vh;
}
.main-content {
  max-width: 1100px; margin: 0 auto; padding: 3rem 2.5rem 5rem;
}

/* ================================================================
   FEATURED ARTICLE — imagem esquerda, texto direita
================================================================ */
.featured-article {
  display: grid; grid-template-columns: 1fr 420px; gap: 0;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  margin-bottom: 3rem; background: var(--surface2);
  transition: border-color 0.3s;
}
.featured-article:hover { border-color: rgba(200,60,255,0.3); }
.featured-banner {
  overflow: hidden; position: relative; min-height: 320px; background: var(--surface2);
}
.featured-banner-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s ease;
}
.featured-article:hover .featured-banner-img { transform: scale(1.03); }
.featured-banner-placeholder {
  width: 100%; height: 100%; min-height: 320px; display: flex;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #18143a 0%, #0e1a3a 100%);
}
.featured-banner-placeholder .big-letter {
  font-family: var(--ff-title); font-size: 8rem; font-weight: 700;
  color: rgba(204,68,255,0.1); line-height: 1;
}
.featured-info {
  padding: 2.5rem 2.5rem 2rem; display: flex; flex-direction: column; justify-content: space-between;
}
.featured-label {
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--ace-accent); text-transform: uppercase; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.featured-label::before { content: ''; width: 24px; height: 1px; background: var(--ace-accent); }
.featured-title {
  font-family: var(--ff-title); font-size: 1.75rem; font-weight: 600;
  color: var(--head); line-height: 1.25; margin-bottom: 1rem;
  transition: color 0.2s; display: block; text-decoration: none;
}
.featured-article:hover .featured-title { color: #fff; }
.featured-excerpt {
  font-size: 0.9rem; color: var(--text); line-height: 1.65;
  margin-bottom: 1.5rem; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.featured-meta {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  padding-top: 1.2rem; border-top: 1px solid var(--border); margin-top: auto;
}
.featured-author { display: flex; align-items: center; gap: 0.6rem; }
.author-name-small { font-size: 0.78rem; color: var(--text-soft); font-family: var(--ff-body); text-decoration: none; }
.author-name-small:hover { color: var(--cyan); }
.featured-date { font-family: var(--ff-mono); font-size: 11px; color: var(--text-soft); text-decoration: none; }
.featured-date:hover { color: var(--cyan); }
.read-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--ace-accent); text-transform: uppercase; text-decoration: none;
  transition: gap 0.2s;
}
.read-link:hover { gap: 0.7rem; }

/* ================================================================
   SECTION HEADING
================================================================ */
.section-heading {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
}
.section-heading h2 {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--text-soft); text-transform: uppercase; white-space: nowrap;
}
.section-heading-line { flex: 1; height: 1px; background: var(--border); }
.section-count {
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--text-soft); text-transform: uppercase; white-space: nowrap;
}

/* ================================================================
   ARTICLE GRID — 2 colunas
================================================================ */
.new-articles-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
  align-items: stretch;
}
.mobile-featured { display: none; }

@media (max-width: 760px) {
  .new-articles-grid { grid-template-columns: 1fr; }
  .desktop-featured { display: none; }
  .mobile-featured { display: block; }
}

.art-card {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
  min-height: 420px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.art-card:hover {
  border-color: rgba(200,60,255,0.28); transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(140,30,220,0.2);
}
.card-img-wrap {
  overflow: hidden; flex-shrink: 0;
  background: var(--surface2);
}
.card-img-wrap a { display: block; width: 100%; }
.card-img {
  width: 100%; height: auto; display: block;
  transition: transform 0.4s ease;
}
.art-card:hover .card-img { transform: scale(1.03); }
.card-img-placeholder-inner {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #18143a 0%, #0e1a3a 100%);
}
.card-img-placeholder-inner span {
  font-family: var(--ff-title); font-size: 3.5rem; font-weight: 700;
  color: rgba(204,68,255,0.1);
}
.art-card .card-body { padding: 1.2rem 1.3rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.card-title-new {
  font-family: var(--ff-title); font-size: 1.05rem; font-weight: 600;
  color: var(--head); line-height: 1.35; margin-bottom: 0.6rem; display: block;
  text-decoration: none; transition: color 0.2s;
}
.art-card:hover .card-title-new { color: #fff; }
.card-excerpt-new {
  font-size: 0.82rem; color: var(--text); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 1rem;
}
.card-footer-new {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 0.8rem; border-top: 1px solid var(--border);
  margin-top: auto;
}
.card-meta-new { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.05em; color: var(--text-soft); text-decoration: none; }
.card-meta-new:hover { color: var(--cyan); }
.card-author-new { font-family: var(--ff-mono); font-size: 10px; color: var(--text-soft); text-decoration: none; }
.card-author-new:hover { color: var(--cyan); }

/* ================================================================
   CONTAINER (article, form, settings, drafts pages)
================================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--ace-surface);
  padding: 2.5rem 3rem;
  min-height: 60vh;
}

/* ================================================================
   TOP BAR (drafts, settings, etc.)
================================================================ */
.top-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-family: var(--ff-title); font-size: 1.5rem; font-weight: 700; color: var(--head);
}
.new-post-link {
  font-family: var(--ff-mono); font-size: 0.78rem; color: var(--text-soft);
  text-decoration: none; letter-spacing: 0.04em; transition: color 0.2s; text-transform: uppercase;
}
.new-post-link:hover { color: var(--cyan); }

/* ================================================================
   CARDS (drafts/old index fallback)
================================================================ */
.card {
  padding: 1.8rem 0; border-bottom: 1px solid var(--border);
}
.card-title {
  display: block; font-family: var(--ff-title); font-size: 1.25rem; font-weight: 600;
  color: var(--head); text-decoration: none; margin-bottom: 0.3rem;
}
.card-title:hover { color: var(--ace-accent); }
.card-date {
  display: block; font-family: var(--ff-mono); font-size: 0.78rem;
  color: var(--text-soft); margin-bottom: 0.6rem;
}
.card-excerpt { color: var(--text); font-size: 0.95rem; line-height: 1.5; }
.card-meta-line {
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.45rem;
}
.card-meta-line .card-date { margin-bottom: 0; }
.card-author { font-family: var(--ff-mono); font-size: 0.78rem; color: var(--text-soft); }
.card-meta-line .card-date::after { content: "·"; margin-left: 0.6rem; color: var(--border-h); }
.empty-state { text-align: center; color: var(--text-soft); margin-top: 4rem; font-style: italic; }

/* grid fallback (old index) */
.articles-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem;
  margin-top: 0.5rem; align-items: stretch;
}
.card-grid {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; padding: 0; border-bottom: none;
  transition: box-shadow 0.2s, transform 0.2s;
  background: var(--surface2);
}
.card-grid:hover { box-shadow: 0 6px 24px rgba(140,30,220,0.18); transform: translateY(-2px); }
.card-banner-link {
  display: block; overflow: hidden; flex-shrink: 0; aspect-ratio: 1200/630;
}
.card-banner-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.35s ease;
}
.card-grid:hover .card-banner-img { transform: scale(1.02); }
.card-body { padding: 1.1rem 1.3rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.card-grid .card-title { font-size: 1rem; line-height: 1.35; margin-bottom: 0.35rem; }
.card-grid .card-excerpt {
  font-size: 0.86rem; line-height: 1.45; color: var(--text-soft); flex: 1;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical;
}

/* ================================================================
   ARTICLE PAGE
================================================================ */
.article-page { padding-top: 2rem; }
.article-title {
  font-family: var(--ff-title); font-size: 2rem; font-weight: 700;
  line-height: 1.3; color: var(--head); margin-bottom: 0.5rem;
}
.article-meta {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;
}
.article-date-line {
  font-family: var(--ff-mono); font-size: 0.82rem; color: var(--text-soft); text-decoration: none;
}
.article-date-line:hover { color: var(--cyan); }
.filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--ff-mono); font-size: 0.8rem; color: var(--text);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.6rem 1rem; margin-bottom: 1.5rem;
}
.filter-clear { color: var(--text-soft); text-decoration: none; font-size: 0.75rem; }
.filter-clear:hover { color: var(--cyan); }
.author-card {
  display: inline-flex; align-items: center; gap: 0.7rem;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.5rem 0.9rem;
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(204,68,255,0.3); flex-shrink: 0;
}
.author-name {
  display: block; font-size: 0.9rem; font-weight: bold;
  color: var(--head); text-decoration: none; white-space: nowrap;
}
.author-name:hover { color: var(--ace-accent); }
.author-role-preview { display:block; font-family: var(--ff-mono); font-size:0.72rem; color: var(--ace-accent); font-weight:600; letter-spacing:0.03em; }
.article-divider { border: none; border-top: 1px solid var(--border); margin: 0 0 1.2rem; }
.article-content { margin-top: 0; line-height: 1.7; color: var(--text); }
.article-content h1, .article-content h2, .article-content h3 {
  margin: 1.4rem 0 0.5rem; color: var(--head); font-family: var(--ff-title);
}
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { padding-left: 1.4rem; margin: 0.2rem 0 0.8rem; }
.article-content li { margin-bottom: 0.2rem; }
.article-content a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.article-content img { max-width: 100%; border-radius: 6px; margin: 1rem 0; border: 1px solid var(--border); }
.article-content blockquote {
  border-left: 4px solid var(--ace-accent); padding: 0.5rem 1rem;
  color: var(--text); margin: 1.5rem 0;
  background: rgba(204,68,255,0.05); border-radius: 0 6px 6px 0;
}
.article-content code {
  background: var(--surface2); color: var(--cyan);
  padding: 0.15em 0.4em; border-radius: 3px;
  font-family: var(--ff-mono); font-size: 0.88em; border: 1px solid var(--border);
}
.article-content pre {
  background: #0d0b1e; color: #cdd6f4;
  padding: 1.2rem; border-radius: 8px; overflow-x: auto; margin: 1.5rem 0;
  border: 1px solid var(--border); border-left: 3px solid var(--ace-accent);
}
.article-content pre code { background: transparent; padding: 0; color: inherit; border: none; font-size: 0.88em; }
.article-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 0.6rem 0.8rem; text-align: left; }
.article-content th { background: var(--surface2); font-weight: bold; color: var(--head); }
.article-content p:empty { margin: 0; height: 0.4rem; }
.article-content p > br:only-child { display: block; height: 0.4rem; }

.back-link {
  display: inline-block; margin-top: 3rem; color: var(--text-soft);
  font-family: var(--ff-mono); font-size: 0.85rem; text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover { color: var(--ace-accent); }

/* Article banner */
.article-banner-wrap { margin: -2.5rem -3rem 2rem; overflow: hidden; }
.article-banner-img { width: 100%; height: auto; display: block; }

/* ================================================================
   POST FORM
================================================================ */
.post-page h2 {
  font-family: var(--ff-title); font-size: 1.5rem; margin-bottom: 2rem; color: var(--head);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block; font-family: var(--ff-mono); font-size: 0.85rem; font-weight: bold;
  color: var(--text-soft); margin-bottom: 0.4rem; letter-spacing: 0.03em; text-transform: uppercase;
}
.hint { font-weight: normal; color: var(--border-h); }
.form-group input[type="text"] {
  width: 100%; padding: 0.65rem 0.8rem;
  border: 1px solid var(--border); border-radius: 5px;
  font-size: 1rem; font-family: var(--ff-body);
  background: var(--surface2); color: var(--head);
  transition: border-color 0.2s;
}
.form-group input[type="text"]:focus { outline: none; border-color: rgba(204,68,255,0.4); }
.form-group input[type="file"] { font-size: 0.9rem; color: var(--text-soft); }
#editor {
  height: 420px; background: var(--surface2); border-radius: 0 0 5px 5px;
  font-family: var(--ff-body); font-size: 1rem; color: var(--text);
}
.ql-toolbar {
  border-radius: 5px 5px 0 0;
  background: var(--surface2) !important;
  border-color: var(--border) !important;
}
.ql-toolbar .ql-stroke { stroke: var(--text-soft) !important; }
.ql-toolbar .ql-fill { fill: var(--text-soft) !important; }
.ql-toolbar button:hover .ql-stroke { stroke: var(--head) !important; }
.ql-container { border-color: var(--border) !important; background: var(--surface2); }
.ql-editor p { margin-bottom: 0 !important; line-height: 1.4 !important; }
.ql-editor { line-height: 1.4 !important; color: var(--text); }
.divider {
  text-align: center; color: var(--text-soft); font-family: var(--ff-mono);
  font-size: 0.82rem; margin-bottom: 1.5rem; letter-spacing: 0.04em;
}

/* ================================================================
   BUTTONS
================================================================ */
.submit-btn {
  background: var(--ace-surface); color: var(--head);
  border: 1px solid var(--border);
  padding: 0.8rem 2.5rem; font-size: 1rem; border-radius: 5px;
  cursor: pointer; margin-top: 0.5rem;
  font-family: var(--ff-body); letter-spacing: 0.02em; transition: all 0.2s;
}
.submit-btn:hover { background: var(--ace-accent); color: #fff; border-color: var(--ace-accent); }
.submit-btn:disabled { background: var(--surface2); cursor: not-allowed; color: var(--text-soft); }
.preview-btn {
  background: transparent; color: var(--head);
  border: 1.5px solid var(--border);
  padding: 0.8rem 1.8rem; font-size: 1rem; border-radius: 5px;
  cursor: pointer; font-family: var(--ff-body); transition: all 0.2s;
}
.preview-btn:hover { background: var(--surface2); border-color: var(--border-h); }
.publish-direct-btn {
  background: #22863a; color: #fff; border: none;
  padding: 0.8rem 2rem; font-size: 1rem; border-radius: 5px;
  cursor: pointer; font-family: var(--ff-body); transition: background 0.2s;
}
.publish-direct-btn:hover { background: #1a6d2e; }
.publish-direct-btn:disabled { background: var(--surface2); cursor: not-allowed; color: var(--text-soft); }
.unpublish-direct-btn {
  background: transparent; color: var(--ace-accent);
  border: 1.5px solid rgba(204,68,255,0.4);
  padding: 0.8rem 1.8rem; font-size: 1rem; border-radius: 5px;
  cursor: pointer; font-family: var(--ff-body); transition: all 0.2s;
}
.unpublish-direct-btn:hover { background: rgba(204,68,255,0.12); border-color: var(--ace-accent); }
.delete-btn {
  background: none; border: 1px solid rgba(204,68,255,0.35); color: var(--ace-accent);
  padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; transition: all .15s;
}
.delete-btn:hover { background: var(--ace-accent); color: #fff; }
.publish-btn {
  background: var(--ace-surface); color: var(--head);
  border: 1px solid var(--border);
  padding: 0.4rem 1.2rem; font-size: 0.85rem; border-radius: 4px;
  cursor: pointer; font-family: var(--ff-body); transition: all 0.2s;
}
.publish-btn:hover { background: #22863a; border-color: #22863a; }
.publish-btn:disabled { background: var(--surface2); cursor: not-allowed; color: var(--text-soft); }
#feedback { margin-top: 1rem; font-size: 0.9rem; }
.feedback-ok { color: #4caf50; }
.feedback-err { color: var(--ace-accent); }
.feedback-ok a { color: #4caf50; font-weight: bold; }
.status-badge-published {
  font-family: var(--ff-mono); font-size: 0.78rem; color: #4caf50; font-weight: bold;
  letter-spacing: 0.03em; align-self: center;
}
.save-published-btn { background: #22863a !important; border-color: #22863a !important; }
.save-published-btn:hover { background: #1a6d2e !important; }

/* ================================================================
   POST ACTIONS
================================================================ */
.post-actions {
  display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; flex-wrap: wrap;
}

/* ================================================================
   PREVIEW PANEL
================================================================ */
.preview-panel {
  margin-top: 3rem; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.preview-header {
  background: var(--surface2); color: var(--head);
  padding: 0.7rem 1.2rem; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--ff-mono); font-size: 0.85rem; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.preview-close {
  background: transparent; border: 1px solid var(--border); color: var(--text-soft);
  padding: 0.25rem 0.8rem; border-radius: 4px; cursor: pointer; font-size: 0.8rem;
  font-family: var(--ff-mono); transition: all 0.2s;
}
.preview-close:hover { border-color: var(--ace-accent); color: var(--ace-accent); }
.preview-body { background: var(--ace-surface); padding: 2.5rem 3rem; }

/* ================================================================
   IMAGE LIBRARY
================================================================ */
.img-library {
  margin-top: 2rem; border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.img-library-header {
  background: var(--surface2); padding: 0.7rem 1rem;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-family: var(--ff-mono); font-size: 0.88rem;
  font-weight: bold; color: var(--text-soft); user-select: none;
}
.img-library-header:hover { background: var(--ace-surface); }
.img-lib-arrow { font-size: 0.75rem; color: var(--text-soft); }
.img-library-body { display: none; padding: 1rem; background: var(--ace-surface); }
.img-upload-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.img-upload-status { font-size: 0.82rem; color: #4caf50; font-family: var(--ff-mono); }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 0.75rem; }
.img-empty { color: var(--text-soft); font-size: 0.88rem; font-style: italic; grid-column: 1/-1; }
.img-thumb {
  border: 2px solid var(--border); border-radius: 6px; overflow: hidden;
  cursor: pointer; transition: border-color 0.15s, transform 0.15s; background: var(--surface2);
}
.img-thumb:hover { border-color: var(--ace-accent); transform: scale(1.03); }
.img-thumb.img-thumb-inserted { border-color: #4caf50; }
.img-thumb img { width: 100%; height: 80px; object-fit: cover; display: block; }
.img-thumb-name {
  display: block; font-family: var(--ff-mono); font-size: 0.65rem; color: var(--text-soft);
  padding: 0.2rem 0.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.img-lib-hint { font-family: var(--ff-mono); font-size: 0.75rem; color: var(--text-soft); margin: 0 0 0.8rem; font-style: italic; }
.file-upload-section { margin-top: 2rem; }

/* ================================================================
   DRAFT PAGE
================================================================ */
.draft-card { position: relative; }
.draft-header { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.agent-badge {
  font-family: var(--ff-mono); font-size: 0.68rem; background: rgba(0,212,232,0.12);
  color: var(--cyan); padding: 0.15rem 0.5rem; border-radius: 20px;
  letter-spacing: 0.04em; white-space: nowrap; border: 1px solid rgba(0,212,232,0.2);
}
.draft-actions { margin-top: 1rem; }
.drafts-link {
  font-family: var(--ff-mono); font-size: 0.78rem; color: var(--text-soft);
  text-decoration: none; transition: color 0.2s;
}
.drafts-link:hover { color: var(--cyan); }
.badge-dismiss {
  background: none; border: none; color: inherit; cursor: pointer;
  font-size: 1em; padding: 0 0 0 4px; opacity: 0.7; line-height: 1;
}
.badge-dismiss:hover { opacity: 1; }

/* ================================================================
   LOGIN
================================================================ */
.login-box {
  background: var(--ace-surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 2.5rem 2rem;
  width: 100%; max-width: 360px;
}
.login-box h2 {
  font-family: var(--ff-title); font-size: 1.2rem; color: var(--head);
  margin-bottom: 1.5rem; text-align: center;
}
.login-box input[type="password"] {
  width: 100%; padding: 0.65rem 0.8rem;
  border: 1px solid var(--border); border-radius: 5px;
  font-size: 1rem; background: var(--surface2); color: var(--head);
}

/* ================================================================
   BANNER (form)
================================================================ */
.banner-preview-wrap { margin-bottom: 0.8rem; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.banner-preview-img { width: 100%; max-height: 240px; object-fit: cover; display: block; }
.banner-preview-label {
  display: block; font-family: var(--ff-mono); font-size: 0.75rem; color: var(--text-soft);
  padding: 0.3rem 0.5rem; background: var(--surface2);
}
.banner-hint { display: block; font-family: var(--ff-mono); font-size: 0.75rem; color: var(--text-soft); margin-top: 0.3rem; }
.featured-toggle-label { display: flex; align-items: center; gap: 0.5rem; font-family: var(--ff-mono); font-size: 0.85rem; color: var(--text); cursor: pointer; }
.featured-toggle-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--ace-accent); cursor: pointer; }

/* ================================================================
   DATE FIELD
================================================================ */
.form-group-date { max-width: 220px; }
.form-group-date input[type=date] {
  width: 100%; padding: 0.55rem 0.8rem;
  border: 1px solid var(--border); border-radius: 5px;
  font-size: 0.95rem; font-family: var(--ff-mono);
  background: var(--surface2); color: var(--text);
}

/* ================================================================
   SETTINGS
================================================================ */
.settings-section { margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.settings-section:last-of-type { border-bottom: none; }
.settings-section-title {
  font-family: var(--ff-mono); font-size: 0.78rem; font-weight: bold;
  color: var(--text-soft); margin-bottom: 1.2rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.color-pickers { display: flex; flex-direction: column; gap: 1rem; }
.color-picker-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.color-picker-row label {
  min-width: 140px; font-family: var(--ff-mono); font-size: 0.88rem;
  font-weight: bold; color: var(--text-soft);
}
.color-picker-wrap { display: flex; align-items: center; gap: 0.5rem; }
.color-input {
  width: 44px; height: 36px; border: 1px solid var(--border); border-radius: 5px;
  padding: 2px; cursor: pointer; background: none;
}
.color-text {
  width: 88px; padding: 0.4rem 0.6rem;
  border: 1px solid var(--border); border-radius: 5px;
  font-family: var(--ff-mono); font-size: 0.88rem;
  background: var(--surface2); color: var(--text);
}
.color-hint { font-family: var(--ff-mono); font-size: 0.75rem; color: var(--text-soft); font-style: italic; }

/* ================================================================
   IMPORT
================================================================ */
.import-section { margin-top: 2rem; }
.import-drop-area {
  border: 2px dashed var(--border); border-radius: 8px; padding: 2.5rem 1.5rem;
  text-align: center; background: var(--surface2); cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.import-drop-area.drag-over { border-color: var(--ace-accent); background: rgba(204,68,255,0.06); }
.import-icon { font-size: 2.5rem; color: var(--border-h); display: block; margin-bottom: 0.5rem; line-height: 1; }
.import-drop-area p { color: var(--text-soft); font-size: 0.9rem; margin: 0.3rem 0; }
.import-btn-label {
  display: inline-block; margin: 0.6rem 0; padding: 0.4rem 1.2rem;
  background: var(--ace-surface); color: var(--head); border-radius: 4px;
  font-family: var(--ff-mono); font-size: 0.85rem; cursor: pointer; transition: all 0.2s;
  border: 1px solid var(--border);
}
.import-btn-label:hover { background: var(--ace-accent); color: #fff; border-color: var(--ace-accent); }
.import-hint { font-family: var(--ff-mono); font-size: 0.75rem !important; color: var(--text-soft) !important; letter-spacing: 0.04em; }
#importStatus { font-size: 0.85rem; margin-top: 0.5rem; min-height: 1.2em; font-family: var(--ff-mono); }
.import-ok { color: #4caf50; }
.import-err { color: var(--ace-accent); }

/* ================================================================
   FOOTER
================================================================ */
.site-footer {
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 1.5rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--ff-mono); font-size: 0.78rem; color: var(--text-soft);
}
.footer-inner a { color: var(--cyan); text-decoration: none; }
.footer-inner a:hover { color: #fff; }
.footer-inner span { color: var(--text-soft); }
