:root {
  --color-primary: #fa6400;
  --color-primary-dark: #d85400;
  --color-secondary: #0e2036;
  --color-secondary-light: #1a3354;
  --color-bg: #f4f6f9;
  --color-surface: #ffffff;
  --color-text: #2c3e50;
  --color-text-muted: #6b7c93;
  --color-border: #e2e8f0;
  --font-title: 'Heebo', sans-serif;
  --font-body: 'Roboto Condensed', sans-serif;
  --sidebar-width: 240px;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(14, 32, 54, 0.08);
}

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

body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

h1, h2, h3, h4, strong {
  font-family: var(--font-title);
  font-weight: 600;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

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

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

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  background: var(--color-secondary);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow: hidden;
}

.sidebar__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  background: var(--color-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar__brand-link {
  display: block;
  width: 100%;
  line-height: 0;
}

.sidebar__brand-link:hover {
  opacity: 0.92;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 168px;
  height: auto;
  margin: 0 auto;
}

.brand-logo--login {
  max-width: 220px;
  margin-bottom: 8px;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  border-radius: var(--radius);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar__nav {
  flex: 1;
  min-height: 0;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sidebar__nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__nav-group + .sidebar__nav-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__nav-group-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__nav-group--collapsible.is-collapsed .sidebar__nav-group-items {
  display: none;
}

.sidebar__nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 4px 14px 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.sidebar__nav-toggle:hover .sidebar__nav-label {
  color: rgba(255, 255, 255, 0.55);
}

.sidebar__nav-toggle .sidebar__nav-label {
  padding: 0;
}

.sidebar__nav-toggle-icon {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(255, 255, 255, 0.45);
  border-bottom: 2px solid rgba(255, 255, 255, 0.45);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.sidebar__nav-group--collapsible.is-expanded .sidebar__nav-toggle-icon {
  transform: rotate(45deg);
  margin-top: -2px;
}

.sidebar__nav-label {
  padding: 4px 14px 6px;
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.nav-link {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-link--active {
  background: var(--color-primary);
  color: #fff;
}

.nav-link--active:hover {
  color: #fff;
}

.sidebar__footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar__settings,
.sidebar__logout {
  display: block;
  padding: 0;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

.sidebar__logout {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.sidebar__settings:hover,
.sidebar__settings--active,
.sidebar__logout:hover {
  color: #fff;
}

.sidebar__user {
  padding: 16px 0;
}

.sidebar__user-info {
  margin-bottom: 16px;
  padding: 0 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__user-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px;
}

.sidebar__user-name {
  display: block;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.sidebar__user-role {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.65);
}

.sidebar__logout-form {
  display: block;
  margin: 0;
  padding: 0;
}

.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px 40px;
  max-width: 1200px;
  min-width: 0;
}

.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-secondary);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar-toggle[aria-expanded="true"] .sidebar-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.sidebar-toggle[aria-expanded="true"] .sidebar-toggle__bar:nth-child(2) {
  opacity: 0;
}

.sidebar-toggle[aria-expanded="true"] .sidebar-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.sidebar-backdrop {
  display: none;
}

body.sidebar-open {
  overflow: hidden;
}

/* Page header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.page-title {
  font-size: 26px;
  color: var(--color-secondary);
}

.page-subtitle {
  color: var(--color-text-muted);
  margin-top: 4px;
  font-size: 14px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--color-secondary);
}

.stat-card--accent {
  border-left-color: var(--color-primary);
}

.stat-card__value {
  display: block;
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1;
}

.stat-card--accent .stat-card__value {
  color: var(--color-primary);
}

.stat-card__label {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Panels */
.panel {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel__title {
  font-size: 16px;
  color: var(--color-secondary);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.home-grid--proximas {
  margin-top: 24px;
  align-items: stretch;
}

.panel--home-list {
  display: flex;
  flex-direction: column;
  height: 300px;
}

.panel--home-proximas {
  height: auto;
  min-height: 100%;
}

.panel--home-proximas .panel__body {
  flex: 1;
  min-height: calc(5 * var(--home-list-item-height));
}

:root {
  --home-list-item-height: 54px;
}

.panel--home-list .panel__header {
  flex-shrink: 0;
  margin-bottom: 0;
}

.panel--home-list .panel__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-top: 16px;
}

.panel--home-list .empty-state {
  margin: 0;
}

.link {
  font-size: 13px;
  font-weight: 500;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge--pendiente {
  background: #fef3cd;
  color: #856404;
}

.badge--borrador {
  background: #ffe082;
  color: #8a6d00;
}

.badge--confirmada {
  background: #d4edda;
  color: #155724;
}

.badge--cancelada {
  background: #f8d7da;
  color: #721c24;
}

.badge--completada {
  background: #d1ecf1;
  color: #0c5460;
}

.badge--procesando {
  background: #cce5ff;
  color: #004085;
}

.badge--resuelto {
  background: #d4edda;
  color: #155724;
}

/* Reserva list */
.reserva-list {
  list-style: none;
}

.reserva-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}

.reserva-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.reserva-item__main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.reserva-item__propiedad {
  font-size: 13px;
  color: var(--color-text-muted);
}

.reserva-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Calendar widget */
.calendar-widget {
  min-height: 280px;
}

.calendar-widget--full {
  min-height: 420px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar-nav__title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-secondary);
}

.calendar-nav__btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  color: var(--color-secondary);
  transition: border-color 0.15s, color 0.15s;
}

.calendar-nav__btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-grid__head {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 6px 0;
  font-family: var(--font-title);
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4px;
  border-radius: 4px;
  font-size: 13px;
  position: relative;
  min-height: 48px;
}

.calendar-day--empty {
  visibility: hidden;
}

.calendar-day--today {
  background: rgba(250, 100, 0, 0.08);
}

.calendar-day--today .calendar-day__num {
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-day--booked {
  background: rgba(14, 32, 54, 0.06);
}

.calendar-day--booked .calendar-day__num {
  font-weight: 700;
  color: var(--color-secondary);
}

.calendar-day__dots {
  display: flex;
  gap: 2px;
  margin-top: 2px;
}

.calendar-day__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-primary);
}

.calendar-day__dot--confirmada {
  background: #28a745;
}

.calendar-day__dot--pendiente {
  background: #ffc107;
}

/* Propiedades */
.propiedades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: 1fr;
  gap: 20px;
  align-items: stretch;
}

.propiedad-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 240px;
}

.propiedad-card__content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.propiedad-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.propiedad-card__header h2 {
  font-size: 18px;
  color: var(--color-secondary);
}

.propiedad-card__ubicacion {
  font-size: 13px;
  color: var(--color-text-muted);
}

.propiedad-card__desc {
  font-size: 14px;
  color: var(--color-text-muted);
  flex: 1 1 auto;
}

.propiedad-card__spacer {
  flex: 1 1 auto;
}

.propiedad-card__stats {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: auto;
  flex-shrink: 0;
}

.propiedad-card__stat strong {
  font-weight: 700;
  color: var(--color-text);
}

.propiedad-card__stat-value {
  color: var(--color-primary);
  font-weight: 700;
}

.propiedad-card__actions {
  flex-shrink: 0;
  padding-top: 12px;
  width: 100%;
}

.propiedad-card__actions .btn {
  width: 100%;
  justify-content: center;
}

/* Table */
.table-wrap {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--color-secondary);
  color: #fff;
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  text-align: left;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}

.data-table td small {
  display: block;
  color: var(--color-text-muted);
  font-size: 12px;
}

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

.data-table tbody tr:hover {
  background: rgba(250, 100, 0, 0.03);
}

/* Filters */
.page-actions-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-bar label span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  font-family: var(--font-title);
}

.filter-bar select {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--color-surface);
  color: var(--color-text);
  min-width: 160px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn--sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn--icon-only {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: 0;
}

.btn--icon-only .icon {
  display: block;
}

.data-table__actions--icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
  padding-left: 8px;
  padding-right: 8px;
}

.form-input--readonly {
  background: #f4f6f8;
  color: var(--color-text-muted);
  cursor: default;
}

.email-dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  background: rgba(250, 100, 0, 0.03);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.email-dropzone--dragover {
  border-color: var(--color-primary);
  background: rgba(250, 100, 0, 0.08);
}

.email-dropzone__icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 8px;
}

.email-dropzone__text {
  margin: 0;
  font-size: 14px;
  color: var(--color-text);
}

.email-dropzone__hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.email-adjuntos-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.email-adjuntos-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  font-size: 13px;
}

.email-adjuntos-list button {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.email-adjuntos-list button:hover {
  color: var(--color-primary);
}

/* Login */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(160deg, #f4f6f9 0%, #e8edf3 100%);
}

.login-card {
  background: var(--color-surface);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(14, 32, 54, 0.12);
  border: 1px solid var(--color-border);
}

.login-card__header {
  text-align: center;
  margin-bottom: 32px;
}

.login-card__header p {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-form label span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  font-family: var(--font-title);
  font-weight: 600;
}

.login-form input {
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
}

.login-form input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Messages & empty */
.messages {
  margin-bottom: 20px;
}

.message {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 8px;
}

.message--error {
  background: #f8d7da;
  color: #721c24;
}

.message--success {
  background: #d4edda;
  color: #155724;
}

.message--warning {
  background: #fff3cd;
  color: #856404;
}

.empty-state {
  text-align: center;
  padding: 32px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.blog-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
}

.blog-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.blog-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.blog-card__header h2 {
  font-size: 18px;
  line-height: 1.3;
}

.blog-card__header h2 a {
  color: var(--color-secondary);
}

.blog-card__header h2 a:hover {
  color: var(--color-primary);
}

.blog-card__meta {
  font-size: 13px;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.blog-card__excerpt {
  font-size: 14px;
  color: var(--color-text-muted);
  flex: 1;
  margin-top: 5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.blog-card__actions {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 20px;
  width: 100%;
}

.blog-card__actions .btn {
  width: 100%;
  justify-content: center;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.blog-layout--detail {
  grid-template-columns: 1fr 300px;
}

.blog-sidebar {
  position: sticky;
  top: 24px;
}

.blog-article {
  min-height: 200px;
}

.blog-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Forms */
.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.form-row--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.form-input,
.form-textarea,
.form-select,
.form-row input[type="text"],
.form-row input[type="url"],
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--color-surface);
  color: var(--color-text);
}

.form-textarea,
.form-row textarea {
  resize: vertical;
}

.form-input:focus,
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-hint {
  font-size: 12px;
  color: var(--color-text-muted);
}

.form-error {
  color: #721c24;
  font-size: 12px;
}

.form-file {
  font-size: 13px;
  margin-top: 6px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.blog-delete-form {
  margin-top: 16px;
}

.char-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
}

.btn--danger {
  background: #dc3545;
  color: #fff;
}

.btn--danger:hover {
  background: #c82333;
  color: #fff;
}

.og-preview {
  max-width: 100%;
  border-radius: var(--radius);
  margin-bottom: 8px;
}

/* SEO card */
.seo-card__intro {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.seo-card__section {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--color-border);
}

.seo-card__section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.seo-card__section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-secondary);
  margin-bottom: 14px;
}

.seo-dl dt {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-top: 12px;
}

.seo-dl dt:first-child {
  margin-top: 0;
}

.seo-dl dd {
  font-size: 14px;
  margin-top: 4px;
  color: var(--color-text);
}

.seo-dl code {
  font-size: 12px;
  background: var(--color-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.seo-list {
  margin: 0;
  padding-left: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(250, 100, 0, 0.1);
  color: var(--color-primary-dark);
  border-radius: 20px;
  font-size: 12px;
}

/* Public blog page */
.public-body {
  background: var(--color-bg);
  min-height: 100vh;
}

.public-header {
  background: var(--color-secondary);
  padding: 16px 0;
}

.public-header__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.public-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: var(--font-title);
  font-weight: 600;
}

.public-brand:hover {
  color: #fff;
}

.public-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.public-article__header {
  margin-bottom: 32px;
}

.public-article__header h1 {
  font-size: 2rem;
  color: var(--color-secondary);
  line-height: 1.25;
  margin-bottom: 12px;
}

.public-article__header time {
  font-size: 14px;
  color: var(--color-text-muted);
}

.llm-context {
  margin-top: 48px;
  padding: 20px;
  background: var(--color-surface);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-secondary);
  font-size: 14px;
  color: var(--color-text-muted);
}

.llm-context ul {
  margin-top: 8px;
  padding-left: 20px;
}

/* Responsive */
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-grid,
  .home-grid--proximas {
    grid-template-columns: 1fr;
  }

  .home-grid--proximas {
    margin-top: 0;
  }

  .sidebar-toggle {
    display: inline-flex;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 101;
    margin: 0;
    box-shadow: var(--shadow);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(14, 32, 54, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .sidebar-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
  }

  .sidebar {
    width: min(280px, 85vw);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(14, 32, 54, 0.25);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar__brand {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--color-secondary);
  }

  .sidebar__nav {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
  }

  .sidebar__footer {
    margin-top: 12px;
    padding-bottom: 16px;
  }

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

  .main {
    margin-left: 0;
    padding: 20px 16px;
    max-width: none;
    width: 100%;
  }

  .page-header {
    flex-direction: column;
    padding-right: 52px;
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .blog-layout,
  .blog-layout--detail {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }
}

/* Auto-save toast */
#save-toast-root,
.save-toast-container {
  position: fixed !important;
  right: 24px !important;
  bottom: 24px !important;
  left: auto !important;
  top: auto !important;
  z-index: 99999 !important;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.save-toast {
  background: var(--color-secondary);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(14, 32, 54, 0.24);
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 500;
  border-left: 4px solid var(--color-primary);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.save-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.save-toast--hide {
  opacity: 0;
  transform: translateY(8px);
}
