:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-light: #e0e7ff;
  --accent: #38bdf8;
  --success: #10b981;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.15);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(79, 70, 229, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
textarea,
select {
  font: inherit;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* =========================================
   BOOT WARNING
   ========================================= */
.boot-warning {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
}

.boot-warning__card {
  max-width: 500px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.boot-warning__card h1 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.boot-warning__card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* =========================================
   LAYOUT
   ========================================= */
.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  padding: 2rem 1.5rem;
  background: #ffffff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
}

.sidebar__brand h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  background: linear-gradient(135deg, var(--text), var(--brand));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar__brand h1::after {
  content: "Admin";
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.65rem;
  background: var(--brand);
  color: #ffffff;
  -webkit-text-fill-color: initial;
  border-radius: 6px;
  vertical-align: middle;
  letter-spacing: 0.05em;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar__brand p,
.meta-card__label,
.panel__note,
#page-editor-path,
#file-editor-path {
  color: var(--muted);
}

.sidebar__eyebrow,
.topbar__eyebrow,
.panel__eyebrow,
.meta-card__label {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 0.25rem;
}

.sidebar__brand p {
  margin: 0.5rem 0 0;
  line-height: 1.5;
  font-size: 0.85rem;
}

.sidebar__nav {
  display: grid;
  gap: 0.4rem;
}

.nav-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  text-align: left;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn:hover {
  background: var(--surface-alt);
}

.nav-btn.active {
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 600;
}

.sidebar__meta {
  margin-top: auto;
  display: grid;
  gap: 0.75rem;
}

.meta-card {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  font-size: 0.85rem;
}

.meta-card strong {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  color: var(--text);
  font-size: 1rem;
}

#server-state::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* Main Area */
.main {
  padding: 2rem 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.topbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  position: sticky;
  top: 1rem;
  z-index: 50;
}

.topbar h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.topbar__actions,
.editor-top__actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* =========================================
   SCREENS & PANELS
   ========================================= */
.screen {
  display: none;
  animation: fadeIn 0.3s ease;
}

.screen--active {
  display: block;
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stat-card,
.panel,
.field-card,
.checkbox-card,
.quick-action,
.activity-box,
.result-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card {
  padding: 1.5rem;
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--brand-light);
}

.stat-card__label {
  color: var(--muted);
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
}

.stat-card__value {
  display: block;
  margin: 0.5rem 0;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.stat-card p,
.activity-box,
.result-box,
.panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.panel {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.panel--tight {
  padding: 1.25rem;
}

.panel--empty {
  text-align: center;
  padding: 5rem 2rem;
  background: var(--surface);
  border: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.panel--empty::before {
  content: "";
  width: 80px;
  height: 80px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3Cpath d='M9 15l2 2 4-4'%3E%3C/path%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.panel--empty h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text);
}

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.panel__header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel__header--stack {
  flex-direction: column;
  align-items: stretch;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.quick-action {
  padding: 1.25rem;
  text-align: left;
  cursor: pointer;
  background: var(--surface);
}

.quick-action:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.quick-action strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  color: var(--brand);
}

.quick-action span {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.field-card__hint,
.item-meta,
.panel__note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* Specific Editor Card Styling */
.item-card {
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.item-card:hover {
  border-color: var(--brand);
  background: #ffffff;
}

.item-card__title {
  color: var(--text);
  font-family: inherit;
}

.item-card__tag {
  background: var(--surface-alt);
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
}

.item-card:focus-within .item-card__tag {
  background: var(--brand-light);
  color: var(--brand);
  border-color: var(--brand-light);
}

.activity-box,
.result-box {
  padding: 1rem 1.25rem;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-family: inherit;
}

/* =========================================
   ASSETS PREVIEW
   ========================================= */
.asset-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.asset-preview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
  padding: 1.25rem;
  display: grid;
  gap: 0.75rem;
}

.asset-preview-card__label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.asset-preview-card__frame,
.asset-preview-card__loader {
  min-height: 200px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.asset-preview-card__frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(#f8fafc 0% 25%, transparent 0% 50%) 50% / 20px 20px;
  opacity: 0.4;
  z-index: 0;
}

.asset-preview-card__image {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.asset-preview-card__loader {
  flex-direction: column;
  gap: 1rem;
}

.asset-preview-card__image--loader {
  max-height: 100px;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(0.95); }
}

.asset-preview-card__loader-text,
.asset-preview-card__path {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  word-break: break-all;
}

.asset-preview-card__loader-text {
  font-weight: 500;
  color: var(--text);
}

/* =========================================
   WORKSPACE & LISTS
   ========================================= */
.workspace {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.workspace__sidebar {
  position: sticky;
  top: 6rem; /* below topbar */
}

.list {
  display: grid;
  gap: 0.5rem;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Custom Scrollbar for lists */
.list::-webkit-scrollbar,
.code-area::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.list::-webkit-scrollbar-track,
.code-area::-webkit-scrollbar-track {
  background: transparent;
}
.list::-webkit-scrollbar-thumb,
.code-area::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.list::-webkit-scrollbar-thumb:hover,
.code-area::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.folder-section {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.folder-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  user-select: none;
  transition: background 0.2s;
}

.folder-section__header:hover {
  background: #e2e8f0;
}

.folder-section__name {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

.folder-section__count {
  min-width: 24px;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.folder-section__items {
  display: grid;
  gap: 0.25rem;
  padding-left: 0.5rem;
  margin-top: 0.25rem;
}

.list-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.list-item:hover {
  background: var(--surface-alt);
  transform: translateX(4px);
}

.list-item.active {
  background: var(--brand-light);
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.list-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
}

.list-item.active strong {
  color: var(--brand-dark);
}

.list-item small {
  display: block;
  color: var(--muted);
  margin-top: 0.2rem;
  font-size: 0.8rem;
}

/* =========================================
   PAGE EDITOR
   ========================================= */
.page-editor {
  display: grid;
  gap: 1.5rem;
}

.editor-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

.editor-top h3 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.tab-btn.active {
  background: var(--brand);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 450px;
  gap: 1.5rem;
  align-items: start;
}

.editor-fields {
  display: grid;
  gap: 1.5rem;
}

.editor-preview {
  position: sticky;
  top: 6rem;
}

.preview-panel {
  padding: 0;
  overflow: hidden;
}

.preview-panel .panel__header {
  padding: 1.25rem 1.25rem 0;
  margin-bottom: 1rem;
}

.preview-panel iframe {
  width: 100%;
  min-height: 70vh;
  border: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
  display: block;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel--active {
  display: block;
}

/* =========================================
   FORMS & INPUTS
   ========================================= */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.field-grid--meta {
  grid-template-columns: 1fr;
}

.field-list {
  display: grid;
  gap: 1rem;
}

.field-card,
.checkbox-card {
  padding: 1.25rem;
  display: grid;
  gap: 0.5rem;
  border: none;
  background: transparent;
  box-shadow: none;
}

.field-card__label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.checkbox-card {
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
}

.text-input,
.text-area,
.code-area,
.field-inline-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.text-input:focus,
.text-area:focus,
.code-area:focus,
.field-inline-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
  background: #ffffff;
}

.text-area {
  resize: vertical;
  min-height: 32px;
  line-height: 1.4;
}

.code-area {
  min-height: 520px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  background: #0f172a;
  color: #f8fafc;
  border-color: #334155;
  padding: 1.25rem;
}

.code-area:focus {
  border-color: var(--brand);
  box-shadow: none;
}

.code-area--large {
  min-height: 75vh;
}

.item-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  display: grid;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.item-card:focus-within {
  box-shadow: var(--shadow);
  border-color: #cbd5e1;
}

.item-card__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.item-card__title {
  font-weight: 600;
  font-size: 0.95rem;
}

.item-card__tag {
  white-space: nowrap;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--line);
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.file-input-wrapper input[type=file] {
  font-size: 0.85rem;
  padding: 0.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  width: 100%;
  cursor: pointer;
}

/* =========================================
   BUTTONS
   ========================================= */
.primary-btn,
.ghost-btn,
.mini-btn {
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  font-size: 0.95rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-btn {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.primary-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.primary-btn:active {
  transform: translateY(0);
}

.ghost-btn {
  background: #ffffff;
  border-color: var(--line);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.ghost-btn:hover {
  background: var(--surface-alt);
  border-color: #cbd5e1;
}

.mini-btn {
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
}

.empty-inline {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--muted);
  border: 1px dashed #cbd5e1;
  text-align: center;
  font-size: 0.9rem;
}

/* =========================================
   TOASTS
   ========================================= */
.toast-stack {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  display: grid;
  gap: 0.75rem;
  z-index: 9999;
}

.toast {
  min-width: 300px;
  max-width: 400px;
  padding: 1rem 1.25rem;
  color: #ffffff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast--success {
  background: var(--text); /* Modern platforms often use dark toasts */
  border-left: 4px solid var(--success);
}

.toast--error {
  background: var(--text);
  border-left: 4px solid var(--danger);
}

.toast--info {
  background: var(--text);
  border-left: 4px solid var(--brand);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100%) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1200px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .editor-preview,
  .workspace__sidebar {
    position: static;
  }

  .preview-panel iframe {
    min-height: 50vh;
  }
}

@media (max-width: 992px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 1.5rem;
  }

  .sidebar__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .topbar,
  .editor-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar__actions,
  .editor-top__actions,
  .form-actions {
    width: 100%;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================
   NAV MANAGER
   ========================================= */
.nav-items-list {
  display: grid;
  gap: 1rem;
}

.nav-item-editor {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  align-items: flex-end;
  padding: 1rem;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  animation: slideIn 0.2s ease;
}

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

.nav-item-editor .field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.nav-item-editor .remove-nav-item {
  height: 42px;
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--danger);
  cursor: pointer;
  transition: all 0.2s;
}

.nav-item-editor .remove-nav-item:hover {
  background: #fef2f2;
  border-color: var(--danger);
}

/* Blog Post Editor Styles - Profesional */
.blog-posts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, rgba(6, 182, 212, 0.06) 100%);
  border-radius: 16px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.blog-posts-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-posts-header h3::before {
  content: "📝";
}

.blog-post-editor {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 0;
  margin-bottom: 0;
  position: relative;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-editor::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4, #8b5cf6);
  background-size: 200% 100%;
  animation: blogGradientShift 3s ease infinite;
  border-radius: 20px 20px 0 0;
}

.blog-post-editor:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(139, 92, 246, 0.15), 0 0 0 1px rgba(139, 92, 246, 0.1) inset;
}

@keyframes blogGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.blog-post-editor .post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 19px 19px 0 0;
  gap: 1rem;
  margin-top: -1px;
  border-bottom: 1px solid #e2e8f0;
}

.blog-post-editor .post-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-post-editor .post-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #166534;
  padding: 0.5rem 1rem;
  background: #dcfce7;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid #bbf7d0;
}

.blog-post-editor .post-status::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.blog-post-editor .post-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-post-editor .delete-post-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 12px;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.blog-post-editor .delete-post-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.blog-post-editor .delete-post-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.blog-post-editor .delete-post-btn:hover::before {
  opacity: 1;
}

.blog-post-editor .delete-post-btn svg {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
  width: 20px;
  height: 20px;
}

.blog-post-editor .delete-post-btn:hover svg {
  transform: rotate(15deg) scale(1.1);
}

.blog-post-editor .post-body {
  padding: 1.5rem;
  background: #fff;
}

.blog-post-editor .post-section {
  margin-bottom: 2rem;
}

.blog-post-editor .post-section:last-child {
  margin-bottom: 0;
}

.blog-post-editor .post-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #667eea;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(135deg, #f0f4ff 0%, #eef2ff 100%);
  border-radius: 8px;
  border-left: 3px solid #667eea;
}

.blog-post-editor .post-section-title::before {
  content: "";
  display: none;
}

.blog-post-editor .post-field {
  margin-bottom: 1rem;
}

.blog-post-editor .post-field:last-child {
  margin-bottom: 0;
}

.blog-post-editor .post-label {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.content-preview-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #667eea;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1rem 0 0.5rem 0;
  padding: 0.4rem 0.8rem;
  background: linear-gradient(135deg, #f0f4ff 0%, #eef2ff 100%);
  border-radius: 6px;
  display: inline-block;
}

.blog-post-editor .post-field:last-child {
  margin-bottom: 0;
}

.blog-post-editor .post-label {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.blog-post-editor .text-input,
.blog-post-editor .text-area {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #1e293b;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.blog-post-editor .text-input::placeholder,
.blog-post-editor .text-area::placeholder {
  color: #94a3b8;
}

.blog-post-editor .text-input:focus,
.blog-post-editor .text-area:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
  outline: none;
  background: #fff;
  transform: translateY(-1px);
}

.blog-post-editor .text-area {
  resize: vertical;
  min-height: 100px;
  line-height: 1.7;
}

.blog-post-editor .js-blog-content {
  min-height: 220px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  background: #fff;
  color: #1e293b;
}

/* Content Formatting Toolbar */
.content-editor-wrapper {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 1rem;
}

.content-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}

.content-toolbar .tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.6rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.content-toolbar .tool-btn:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(164, 29, 127, 0.25);
}

.content-toolbar .tool-btn strong {
  font-weight: 800;
  font-size: 0.9rem;
}

.content-toolbar .tool-btn em {
  font-style: italic;
  font-size: 0.9rem;
}

.content-toolbar .tool-btn u {
  text-decoration: underline;
  font-size: 0.85rem;
}

.content-toolbar .tool-sep {
  width: 1px;
  height: 28px;
  background: #cbd5e1;
  margin: 0 0.3rem;
}

.content-toolbar .tool-select {
  height: 36px;
  padding: 0 0.6rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: 0.8rem;
  cursor: pointer;
  min-width: 90px;
}

.content-toolbar .tool-select:hover {
  border-color: #667eea;
}

.content-toolbar .tool-select option {
  background: #fff;
  color: #334155;
}

.content-editor-wrapper .text-area {
  border: none;
  border-radius: 0;
  resize: vertical;
  min-height: 220px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  background: #fff;
  color: #1e293b;
  padding: 1.25rem;
}

.content-editor-wrapper .text-area:focus {
  box-shadow: none;
  border-color: transparent;
}

.blog-post-editor .image-section {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
  padding: 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(6, 182, 212, 0.15);
}

.blog-post-editor .post-image-wrapper {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.blog-post-editor .post-image-preview {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  border: 3px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.25s ease;
  background: #f8fafc;
}

.blog-post-editor .post-image-preview:hover {
  transform: scale(1.05) rotate(1deg);
  border-color: #667eea;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.blog-post-editor .post-image-preview.error {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 2px dashed #cbd5e1;
}

.blog-post-editor .post-image-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.blog-post-editor .post-image-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.blog-post-editor .post-image-upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45);
  background: linear-gradient(135deg, #9f7aea 0%, #7c3aed 100%);
}

.blog-post-editor .post-image-upload-btn:active {
  transform: translateY(0);
}

.blog-post-editor .meta-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.blog-post-editor .meta-section .post-field {
  margin-bottom: 0;
}

.empty-blog-state {
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 20px;
  border: 2px dashed #cbd5e1;
}

.empty-blog-state::before {
  content: "";
  display: block;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.empty-blog-state h4 {
  color: #1e293b;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.empty-blog-state p {
  color: #64748b;
  font-size: 0.95rem;
  max-width: 300px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .blog-post-editor .post-header {
    padding: 0.85rem 1rem;
    flex-wrap: wrap;
  }
  
  .blog-post-editor .post-body {
    padding: 1rem;
  }
  
  .blog-post-editor .post-image-wrapper {
    flex-direction: column;
  }
  
  .blog-post-editor .post-image-preview {
    width: 100%;
    height: 140px;
  }
  
  .blog-post-editor .meta-section {
    grid-template-columns: 1fr;
  }
}

/* Blog Manager - Panel de Control */
.blog-manager {
  background: transparent;
}

.blog-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(6, 182, 212, 0.04) 100%);
  border-radius: 16px;
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.blog-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.blog-stat strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand);
  background: var(--brand-light);
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
}

.blog-add-section {
  display: flex;
  align-items: center;
}

.blog-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

.blog-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.45);
  background: linear-gradient(135deg, #9f7aea 0%, #7c3aed 100%);
}

.blog-btn-primary:active {
  transform: translateY(-1px);
}

.blog-btn-primary svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.blog-posts-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0.5rem;
}

.blog-post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}

.blog-post-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--brand-light);
}

.blog-post-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--surface-alt) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.blog-post-card__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-post-card__title h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.blog-post-card__badge {
  font-size: 0.7rem;
  color: #166534;
  padding: 0.25rem 0.6rem;
  background: #dcfce7;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.blog-post-card__actions {
  display: flex;
  gap: 0.5rem;
}

.blog-post-card__actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-post-card__actions .btn-publish {
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.blog-post-card__actions .btn-publish:hover {
  background: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.blog-post-card__actions .btn-delete {
  background: #fff;
  color: #dc2626;
  border: 2px solid #fecaca;
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
}

.blog-post-card__actions .btn-delete:hover {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.blog-post-card__body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 400px;
}

/* Estilos del editor interno - Similar al blog real */
.blog-post-editor {
  background: #fff;
  border: none;
  padding: 0;
  margin: 0;
  position: relative;
  overflow: visible;
  box-shadow: none;
  transition: none;
}

/* Vista previa del contenido - Como se verá en el blog */
.blog-content-preview {
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  border: 2px solid var(--brand-light);
  min-height: 180px;
  font-family: var(--font-headline, 'Inter', sans-serif);
  margin-top: 1.5rem;
  box-shadow: inset 0 2px 8px rgba(164, 29, 127, 0.08);
  position: relative;
}

.blog-content-preview::before {
  content: 'VISTA PREVIA EN TIEMPO REAL';
  position: absolute;
  top: -12px;
  left: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.08em;
}

.content-preview-label {
  display: none;
}

.blog-content-preview h2,
.blog-content-preview h3 {
  color: #1a1a2e;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.blog-content-preview h2 {
  font-size: 1.2rem;
}

.blog-content-preview h3 {
  font-size: 1.1rem;
}

.blog-content-preview p {
  color: #555;
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  text-align: justify;
}

.blog-content-preview strong {
  font-weight: 700;
  color: #1a1a2e;
}

.blog-content-preview em {
  font-style: italic;
}

.blog-content-preview u {
  text-decoration: underline;
}

.blog-content-preview ul,
.blog-content-preview ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.blog-content-preview li {
  color: #555;
  line-height: 1.6;
  margin-bottom: 0.25rem;
}

.blog-content-preview span[style*="color"] {
  padding: 0 2px;
}

.blog-post-editor .post-section {
  margin-bottom: 1.5rem;
}

.blog-post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}

.blog-post-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.blog-post-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--surface-alt) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.blog-post-card__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-post-card__title h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.blog-post-card__badge {
  font-size: 0.7rem;
  color: #166534;
  padding: 0.25rem 0.6rem;
  background: #dcfce7;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.blog-post-card__actions {
  display: flex;
  gap: 0.5rem;
}

.blog-post-card__actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-post-card__actions .btn-publish {
  background: var(--success);
  color: #fff;
  border: none;
}

.blog-post-card__actions .btn-publish:hover {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.blog-post-card__actions .btn-delete {
  background: #fff;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.blog-post-card__actions .btn-delete:hover {
  background: #fef2f2;
  border-color: var(--danger);
}

.blog-post-card__body {
  padding: 1.5rem;
}

.blog-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.blog-stat strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand);
  background: var(--brand-light);
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
}

.blog-actions-buttons {
  display: flex;
  gap: 0.75rem;
}

.blog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  padding: 0 0.5rem;
}

.blog-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

.blog-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.45);
  background: linear-gradient(135deg, #9f7aea 0%, #7c3aed 100%);
}

.blog-btn-primary:active {
  transform: translateY(-1px);
}

.blog-btn-primary svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.blog-posts-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 0 0.5rem;
}

.blog-add-section {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.blog-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.blog-btn-add:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.5);
  background: linear-gradient(135deg, #9f7aea 0%, #7c3aed 100%);
}

.blog-btn-add:active {
  transform: translateY(-1px);
}

.blog-publish-section {
  display: flex;
  justify-content: center;
  padding: 2rem 0 0 0;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}

.blog-btn-publish {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
  letter-spacing: 0.02em;
}

.blog-btn-publish:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.45);
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

.blog-btn-publish:active {
  transform: translateY(-1px);
}

.blog-btn-publish svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

@media (max-width: 768px) {
  .blog-actions-bar {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .blog-post-card__header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .blog-post-card__actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .blog-post-card__body {
    padding: 1.25rem;
  }
  
  .blog-post-editor .post-image-wrapper {
    flex-direction: column;
  }
  
  .blog-post-editor .post-image-preview {
    width: 100%;
    height: 160px;
  }
  
  .blog-post-editor .meta-section {
    grid-template-columns: 1fr;
  }
  
  .blog-post-editor .image-section {
    padding: 1rem;
  }
  
  .blog-post-editor .post-image-controls {
    width: 100%;
  }
}

