/* ══════════════════════════════════════════════════════════
   Admin Panel CSS — Rafael França CMS v2
   ══════════════════════════════════════════════════════════ */

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

:root {
  /* Palette */
  --c-bg:          #0F1015;
  --c-surface:     #1A1C22;
  --c-surface-2:   #21242C;
  --c-surface-3:   #282B36;
  --c-surface-4:   #30333F;
  --c-gold:        #C3A166;
  --c-gold-light:  #D4B87A;
  --c-gold-dim:    rgba(195,161,102,0.1);
  --c-gold-glow:   rgba(195,161,102,0.25);
  --c-gold-border: rgba(195,161,102,0.18);
  --c-danger:      #E05252;
  --c-danger-dim:  rgba(224,82,82,0.12);
  --c-success:     #4CAF78;
  --c-warning:     #E0A852;
  --c-info:        #5299E0;
  --c-text:        #E8E6E0;
  --c-text-2:      #C8C5BC;
  --c-muted:       #B3AEA5;
  --c-dim:         #949086;
  --c-border:      rgba(255,255,255,0.06);
  --c-border-gold: rgba(195,161,102,0.14);

  /* Layout */
  --sidebar-w:     248px;
  --header-h:      64px;

  /* Typography */
  --f-display:     'Cormorant Garamond', Georgia, serif;
  --f-body:        'Montserrat', system-ui, sans-serif;
  --f-mono:        'Courier New', monospace;

  /* Easing */
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);

  /* Transitions */
  --t-fast:        150ms var(--ease-out);
  --t-med:         250ms var(--ease-out);
}

/* Base */
html { height: 100%; font-size: 16px; }
body {
  min-height: 100%;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
a { text-decoration: none; color: inherit; }

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

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  padding: 0 12px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 8px 16px;
  border-bottom: 1px solid var(--c-border-gold);
  margin-bottom: 12px;
  flex-shrink: 0;
}
.brand-name {
  display: block;
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-gold);
  line-height: 1.2;
}
.brand-sub {
  display: block;
  font-size: 0.68rem;
  color: var(--c-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}
.sidebar-brand-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.login-brand-logo {
  height: 72px;
  width: auto;
  object-fit: contain;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar-sep { height: 1px; background: var(--c-border); margin: 8px 4px; flex-shrink: 0; }
.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-muted);
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background var(--t-fast), color var(--t-fast);
  flex-shrink: 0;
}
.sidebar-btn:hover { background: var(--c-gold-dim); color: var(--c-text-2); }
.sidebar-btn.active { background: var(--c-gold-dim); color: var(--c-gold); font-weight: 600; }
.sidebar-btn--sm { font-size: 0.78rem; padding: 7px 12px; }
.sidebar-badge {
  margin-left: auto;
  background: var(--c-gold-dim);
  color: var(--c-gold);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  min-width: 22px;
  text-align: center;
}
.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--c-border-gold);
  flex-shrink: 0;
}
.sidebar-action {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.sidebar-action--site { background: var(--c-gold-dim); color: var(--c-gold); border-color: var(--c-gold-border); }
.sidebar-action--site:hover { background: rgba(195,161,102,0.2); border-color: rgba(195,161,102,0.35); color: var(--c-gold-light); }
.sidebar-action--logout { background: rgba(224,82,82,0.08); color: #E05252; border-color: rgba(224,82,82,0.2); }
.sidebar-action--logout:hover { background: rgba(224,82,82,0.16); border-color: rgba(224,82,82,0.4); color: #f07070; }

/* Main */
.admin-main { flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; }
.admin-view { display: none; flex: 1; flex-direction: column; }
.admin-view.active { display: flex; }

/* List View */
#view-list { padding: 36px 44px; }
.view-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.view-title { font-family: var(--f-display); font-size: 2rem; font-weight: 600; color: var(--c-text); }
.view-sub { font-size: 0.82rem; color: var(--c-muted); margin-top: 4px; }

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  transition: all var(--t-fast);
}
.search-bar:focus-within { border-color: var(--c-gold-border); box-shadow: 0 0 0 3px var(--c-gold-dim); }
.search-bar input { flex: 1; background: none; border: none; outline: none; color: var(--c-text); font-family: var(--f-body); font-size: 1.05rem; }
.search-bar input::placeholder { color: var(--c-dim); }
.search-kbd { font-size: 0.7rem; color: var(--c-dim); background: var(--c-surface-3); border: 1px solid var(--c-border); padding: 1px 5px; border-radius: 4px; }
.stats-bar { font-size: 0.78rem; color: var(--c-muted); margin-bottom: 12px; }

.posts-list { display: flex; flex-direction: column; gap: 8px; }
.post-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  transition: all var(--t-fast);
}
.post-row:hover { border-color: var(--c-gold-border); box-shadow: 0 4px 24px rgba(0,0,0,0.3); transform: translateY(-1px); }
.post-row-thumb { width: 72px; height: 52px; border-radius: 7px; overflow: hidden; background: var(--c-surface-3); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.post-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-row-info { flex: 1; min-width: 0; }
.post-row-title { font-size: 0.9rem; font-weight: 600; color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-row-excerpt { font-size: 0.76rem; color: var(--c-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-row-date { font-size: 0.7rem; color: var(--c-dim); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.post-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--f-body);
  transition: all var(--t-fast);
}
.action-btn.edit:hover { border-color: var(--c-gold-border); color: var(--c-gold); background: var(--c-gold-dim); }
.action-btn.delete:hover { border-color: rgba(224,82,82,0.4); color: var(--c-danger); background: var(--c-danger-dim); }

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 80px 24px; color: var(--c-muted); gap: 14px; }
.empty-state p { font-size: 0.92rem; }

/* Editor View */
#view-editor { flex-direction: column; height: 100vh; overflow: hidden; }
.editor-view-header { padding: 0 28px; height: var(--header-h); border-bottom: 1px solid var(--c-border); background: var(--c-surface); flex-shrink: 0; align-items: center; }
.editor-header-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.editor-meta-status { display: flex; align-items: center; gap: 14px; margin-top: 2px; }
.save-status { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--c-muted); }
.save-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-dim); }
.save-status.unsaved .save-dot { background: var(--c-warning); }
.save-status.saved .save-dot { background: var(--c-success); }
.word-count { font-size: 0.72rem; color: var(--c-dim); }
.editor-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }

.editor-layout { display: flex; flex: 1; overflow: hidden; }
.editor-panel { overflow-y: auto; }
.form-panel { flex: 1; min-width: 0; padding: 28px 36px; }
.preview-panel { width: 50%; flex-shrink: 0; border-left: 1px solid var(--c-border); background: var(--c-surface); }
.preview-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--c-border); background: var(--c-surface-2); position: sticky; top: 0; z-index: 1; }
.preview-label { font-size: 0.78rem; font-weight: 600; color: var(--c-gold); text-transform: uppercase; letter-spacing: 0.07em; }
.preview-hint { font-size: 0.72rem; color: var(--c-dim); }
.preview-content { padding: 28px 32px; }
.preview-cover { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: 20px; display: block; }
.preview-article-title { font-family: var(--f-display); font-size: 1.6rem; color: var(--c-text); margin-bottom: 8px; }
.preview-article-date { font-size: 0.8rem; color: var(--c-gold); display: block; margin-bottom: 12px; }
.preview-article-excerpt { color: var(--c-muted); font-size: 0.9rem; margin-bottom: 20px; border-bottom: 1px solid var(--c-border); padding-bottom: 20px; }
.preview-article-body { font-size: 0.95rem; line-height: 1.8; color: var(--c-text-2); }
.preview-article-body h2 { font-family: var(--f-display); font-size: 1.4rem; color: var(--c-text); margin: 20px 0 10px; }
.preview-article-body h3 { font-size: 1.1rem; color: var(--c-gold-light); margin: 16px 0 8px; }
.preview-article-body p { margin-bottom: 14px; }
.preview-article-body ul, .preview-article-body ol { padding-left: 20px; margin-bottom: 14px; }
.preview-article-body strong { color: var(--c-gold-light); }

/* Editor Fields & Rich Text */
.post-form { display: flex; flex-direction: column; gap: 20px; padding-bottom: 40px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--c-gold-light); display: flex; align-items: center; gap: 8px; }
.label-badge { background: var(--c-gold-dim); color: var(--c-gold); font-size: 0.65rem; padding: 2px 8px; border-radius: 20px; letter-spacing: 0.03em; text-transform: none; font-weight: 500; }
.form-group--title { gap: 4px; }
.title-char-count { font-size: 0.7rem; color: var(--c-dim); text-align: right; }
.title-input { font-family: var(--f-display); font-size: 2rem; font-weight: 600; color: var(--c-text); background: transparent; border: none; border-bottom: 2px solid var(--c-border); padding: 10px 0; width: 100%; transition: border-color var(--t-fast); }
.title-input:focus { outline: none; border-bottom-color: var(--c-gold); }
.title-input::placeholder { color: var(--c-dim); }
.form-input, .form-textarea { background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 8px; padding: 14px 18px; color: var(--c-text); font-family: var(--f-body); font-size: 1.12rem; line-height: 1.5; width: 100%; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--c-gold-border); box-shadow: 0 0 0 3px var(--c-gold-dim); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--c-dim); }
.form-textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 0.72rem; color: var(--c-muted); }
.counter-num { font-weight: 600; color: var(--c-gold); }
.textarea-footer { display: flex; justify-content: space-between; align-items: center; }
.slug-field { display: flex; align-items: center; background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 8px; overflow: hidden; }
.slug-prefix { padding: 0 12px; font-size: 0.82rem; color: var(--c-muted); background: var(--c-surface-3); border-right: 1px solid var(--c-border); height: 100%; display: flex; align-items: center; white-space: nowrap; }
.slug-input { flex: 1; background: transparent; border: none; padding: 12px 12px; color: var(--c-text); font-family: var(--f-body); font-size: 0.9rem; }
.slug-input:focus { outline: none; }

/* Editor label row with tabs */
.editor-label-row { display: flex; align-items: center; justify-content: space-between; }
.editor-view-tabs { display: flex; gap: 2px; background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 8px; padding: 3px; }
.view-tab { background: none; border: none; padding: 5px 14px; border-radius: 6px; font-size: 0.78rem; font-weight: 600; color: var(--c-muted); cursor: pointer; transition: all var(--t-fast); font-family: var(--f-body); }
.view-tab.active { background: var(--c-gold-dim); color: var(--c-gold); }

/* Toolbar & Rich Editor */
.editor-toolbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--c-surface-2); border: 1px solid var(--c-border); border-bottom: none; border-radius: 10px 10px 0 0; flex-wrap: wrap; }
.toolbar-group { display: flex; align-items: center; gap: 6px; }
.toolbar-btn { min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: none; background: transparent; color: var(--c-muted); font-size: 0.88rem; cursor: pointer; transition: all var(--t-fast); font-family: var(--f-body); }
.toolbar-btn:hover, .toolbar-btn.active { background: var(--c-gold-dim); color: var(--c-gold); }
.toolbar-btn--text { width: auto; padding: 0 10px; font-size: 0.82rem; font-weight: 600; }
.toolbar-btn--right { width: auto; padding: 0 12px; font-size: 0.8rem; margin-left: auto; font-weight: 600; border: 1px solid var(--c-border); background: rgba(255,255,255,0.02); }
.toolbar-sep { width: 1px; height: 22px; background: var(--c-border); margin-inline: 4px; flex-shrink: 0; }
.toolbar-spacer { flex: 1; }
.editor-group { gap: 0; }
.rich-editor { background: var(--c-surface-2); border: 1px solid var(--c-border); border-top: none; border-radius: 0 0 10px 10px; padding: 24px 28px; min-height: 400px; color: var(--c-text); font-size: 1.18rem; line-height: 1.9; outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.rich-editor:focus { border-color: var(--c-gold-border); box-shadow: 0 0 0 3px var(--c-gold-dim); }
.rich-editor:empty::before { content: attr(data-placeholder); color: var(--c-dim); white-space: pre-line; }
.rich-editor.fullscreen { position: fixed; inset: 0; z-index: 1000; border-radius: 0; border: none; min-height: 100vh; padding: 40px min(80px, 10vw); background: var(--c-bg); overflow-y: auto; }
.rich-editor h2 { font-family: var(--f-display); font-size: 1.5rem; color: var(--c-text); margin: 24px 0 12px; border-bottom: 1px solid var(--c-border-gold); padding-bottom: 8px; }
.rich-editor h3 { font-size: 1.2rem; color: var(--c-gold-light); margin: 20px 0 10px; }
.rich-editor p { margin-bottom: 16px; }
.rich-editor ul, .rich-editor ol { padding-left: 24px; margin-bottom: 16px; }
.rich-editor strong { color: var(--c-gold-light); }
.rich-editor blockquote { border-left: 3px solid var(--c-gold); padding: 12px 20px; margin: 20px 0; color: var(--c-muted); background: var(--c-gold-dim); border-radius: 0 8px 8px 0; font-style: italic; }
.content-preview-panel { background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 0 0 10px 10px; padding: 20px 24px; min-height: 350px; font-size: 1.05rem; line-height: 1.85; color: var(--c-text); }

/* Meta Accordion */
.meta-accordion { border: 1px solid var(--c-border); border-radius: 10px; overflow: hidden; }
.meta-accordion-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; background: var(--c-surface-2); border: none; color: var(--c-muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer; font-family: var(--f-body); transition: color var(--t-fast); }
.meta-accordion-toggle:hover { color: var(--c-gold); }
.accordion-chevron { margin-left: auto; transition: transform var(--t-med); }
.meta-accordion-toggle[aria-expanded="true"] .accordion-chevron { transform: rotate(180deg); }
.meta-accordion-body { padding: 20px; background: var(--c-surface); display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--c-border); }
.meta-accordion-body.collapsed { display: none; }

/* Cover Group */
.cover-group { gap: 10px; }
.cover-input-area { display: flex; flex-direction: column; gap: 10px; }
.cover-dropzone { border: 2px dashed var(--c-border); border-radius: 10px; padding: 28px 20px; cursor: pointer; text-align: center; color: var(--c-muted); font-size: 0.85rem; transition: all var(--t-fast); }
.cover-dropzone:hover, .cover-dropzone.drag-over { border-color: var(--c-gold-border); background: var(--c-gold-dim); color: var(--c-gold); }
.dropzone-hint { display: block; font-size: 0.72rem; color: var(--c-dim); margin-top: 6px; }
.cover-or { display: flex; align-items: center; gap: 12px; color: var(--c-dim); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.cover-or::before, .cover-or::after { content: ''; flex: 1; height: 1px; background: var(--c-border); }
.cover-url-row { display: flex; gap: 8px; align-items: stretch; }
.cover-url-row .form-input { flex: 1; }
.cover-preview { display: none; border-radius: 10px; overflow: hidden; position: relative; }
.cover-preview.visible { display: block; }
.cover-preview img { width: 100%; height: 180px; object-fit: cover; display: block; }
.cover-preview-remove { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.7); color: white; border: none; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }

/* Buttons */
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; background: linear-gradient(135deg, var(--c-gold) 0%, #A8873E 100%); color: #1A1C22; font-size: 0.9rem; font-weight: 700; border-radius: 8px; border: none; cursor: pointer; font-family: var(--f-body); transition: transform var(--t-fast), box-shadow var(--t-fast); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--c-gold-glow); }
.btn-lg { padding: 14px 32px; font-size: 0.95rem; }
.btn-sm { padding: 8px 14px; font-size: 0.8rem; }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; background: transparent; border: 1px solid var(--c-border); border-radius: 8px; color: var(--c-muted); font-size: 0.9rem; cursor: pointer; font-family: var(--f-body); transition: all var(--t-fast); }
.btn-ghost:hover { border-color: var(--c-gold-border); background: rgba(255,255,255,0.02); color: var(--c-text); }
.btn-danger { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; background: var(--c-danger-dim); border: 1px solid rgba(224,82,82,0.3); border-radius: 8px; color: var(--c-danger); font-size: 0.9rem; font-weight: 700; cursor: pointer; font-family: var(--f-body); transition: all var(--t-fast); }
.btn-danger:hover { background: rgba(224,82,82,0.2); border-color: rgba(224,82,82,0.5); }
.btn-back { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 8px; cursor: pointer; color: var(--c-muted); flex-shrink: 0; transition: all var(--t-fast); }
.btn-back:hover { border-color: var(--c-gold-border); color: var(--c-gold); background: var(--c-gold-dim); }
.btn-icon-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 8px; color: var(--c-muted); font-size: 0.78rem; font-weight: 600; cursor: pointer; font-family: var(--f-body); transition: all var(--t-fast); }
.btn-icon-toggle:hover, .btn-icon-toggle[aria-pressed="true"] { border-color: var(--c-gold-border); color: var(--c-gold); background: var(--c-gold-dim); }

/* Form actions */
.form-actions { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-top: 1px solid var(--c-border); gap: 12px; flex-wrap: wrap; }
.form-actions-right { display: flex; align-items: center; gap: 12px; }

/* Toasts */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 4000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 10px; font-size: 0.83rem; min-width: 240px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); pointer-events: all; border: 1px solid transparent; animation: toastIn 0.3s var(--ease-out); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.toast-success { background: rgba(76,175,120,0.15); border-color: rgba(76,175,120,0.3); color: #4CAF78; }
.toast-error { background: rgba(224,82,82,0.12); border-color: rgba(224,82,82,0.3); color: var(--c-danger); }
.toast-dismiss { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; opacity: 0.6; font-size: 1rem; padding: 0; }
.toast-dismiss:hover { opacity: 1; }

/* Modals */
.confirm-modal, .link-dialog { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,0.7); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.confirm-box { background: var(--c-surface); border: 1px solid rgba(224,82,82,0.2); border-radius: 16px; padding: 36px; max-width: 420px; width: 100%; text-align: center; }
.confirm-title { font-family: var(--f-display); font-size: 1.6rem; color: var(--c-text); margin-bottom: 12px; }
.confirm-text { color: var(--c-muted); font-size: 0.88rem; margin-bottom: 28px; line-height: 1.6; }
.confirm-actions { display: flex; justify-content: center; gap: 12px; }
.link-dialog-box { background: var(--c-surface); border: 1px solid var(--c-border-gold); border-radius: 16px; padding: 28px; max-width: 380px; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.link-dialog-title { font-family: var(--f-display); font-size: 1.3rem; color: var(--c-text); }
.link-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* Login Screen */
.login-screen { position: fixed; inset: 0; z-index: 9999; background: var(--c-bg); display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; background: var(--c-surface); border: 1px solid var(--c-border-gold); border-radius: 20px; padding: 48px 40px; text-align: center; box-shadow: 0 32px 80px rgba(0,0,0,0.5); }
.login-logo { margin-bottom: 24px; }
.login-title { font-family: var(--f-display); font-size: 1.8rem; color: var(--c-text); margin-bottom: 6px; }
.login-sub { font-size: 0.82rem; color: var(--c-muted); margin-bottom: 32px; line-height: 1.5; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.login-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-gold-light); }
.login-input-wrap { position: relative; }
.login-input { width: 100%; background: var(--c-surface-2); border: 1.5px solid var(--c-border); border-radius: 10px; padding: 12px 46px 12px 16px; color: var(--c-text); font-size: 0.92rem; outline: none; font-family: var(--f-body); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.login-input:focus { border-color: var(--c-gold); box-shadow: 0 0 0 3px var(--c-gold-dim); }
.login-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--c-muted); font-size: 0.8rem; font-family: var(--f-body); }
.login-eye:hover { color: var(--c-gold); }
.login-error { color: var(--c-danger); font-size: 0.78rem; margin-top: 4px; min-height: 18px; }
.login-attempts { font-size: 0.75rem; color: var(--c-warning); margin-top: 4px; min-height: 18px; }
.login-btn { width: 100%; padding: 13px 20px; background: linear-gradient(135deg, var(--c-gold) 0%, #A8873E 100%); color: #1A1C22; font-size: 0.9rem; font-weight: 700; border-radius: 10px; border: none; cursor: pointer; margin-top: 4px; font-family: var(--f-body); transition: opacity var(--t-fast), transform var(--t-fast); }
.login-btn:hover { transform: translateY(-1px); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.login-footer { font-size: 0.72rem; color: var(--c-dim); margin-top: 20px; }
.login-back-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; font-size: 0.82rem; color: var(--c-gold); text-decoration: none; transition: opacity var(--t-fast); }
.login-back-link:hover { opacity: 0.75; }

/* Responsive */
@media (max-width: 900px) {
  .admin-sidebar { width: 60px; padding: 0 8px 16px; }
  .brand-name, .brand-sub, .sidebar-btn span:not(.sidebar-badge), .sidebar-badge { display: none; }
  .sidebar-btn { justify-content: center; padding: 10px; }
  .sidebar-action { justify-content: center; padding: 10px; }
  .sidebar-action span { display: none; }
  .preview-panel { display: none; }
  #view-list { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .form-panel { padding: 20px; }
}

@media (max-width: 600px) {
  .login-card { padding: 36px 24px; }
  #view-list { padding: 16px; }
  .view-title { font-size: 1.5rem; }
  .post-row { flex-wrap: wrap; }
}
