/* Panel de administración autoadministrable - Super Mascota Lebrija */

:root {
  --admin-bg: #f1f5f9;
  --admin-surface: #ffffff;
  --admin-sidebar: #1e293b;
  --admin-brand: #20a39e;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--admin-text);
  background: var(--admin-bg);
}

/* Login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-container {
  width: 100%;
  max-width: 400px;
  background: var(--admin-surface);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
}

.login-form .form-group {
  margin-bottom: 1rem;
}

.login-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
}

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

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
}

.forgot-link {
  font-size: 0.85rem;
  color: var(--admin-brand);
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  padding: 0.75rem;
  background: var(--admin-brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-login:hover {
  background: #1b7f7b;
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.login-footer a {
  color: var(--admin-muted);
  text-decoration: none;
}

.login-footer a:hover {
  color: var(--admin-brand);
}

/* Panel */
.panel-page {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--admin-sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 0;
}

.panel-main {
  flex: 1;
  overflow-y: auto;
}

.panel-header {
  background: var(--admin-surface);
  padding: 1.25rem 2rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h1 {
  margin: 0;
  font-size: 1.4rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--admin-muted);
}

.user-info {
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.logout-link {
  color: #64748b;
  font-weight: 600;
  text-decoration: none;
}

.logout-link:hover {
  color: var(--admin-brand);
}

.panel-content {
  padding: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--admin-surface);
  padding: 1.25rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--admin-brand);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--admin-muted);
}

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

.panel-card {
  background: var(--admin-surface);
  padding: 1.25rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.panel-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.panel-card p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--admin-muted);
  line-height: 1.5;
}

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

.btn-admin {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 6px;
  border: none;
  background: var(--admin-brand);
  color: #fff;
  cursor: pointer;
}

.btn-admin:hover {
  background: #1b7f7b;
}

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

.btn-admin.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-admin.btn-danger:hover {
  background: #fecaca;
}

.full-width {
  grid-column: 1 / -1;
}

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

.activity-table th,
.activity-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.activity-table th {
  font-size: 0.85rem;
  color: var(--admin-muted);
  font-weight: 600;
}

/* Multiidioma */
.mb {
  margin-bottom: 1.5rem;
}

.muted {
  color: var(--admin-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.lang-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.lang-item.lang-inactive {
  opacity: 0.7;
}

.lang-flag {
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 28px;
  color: var(--admin-brand);
}

.lang-name {
  flex: 1;
}

.lang-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: #e2e8f0;
  border-radius: 4px;
  color: var(--admin-muted);
}

.lang-badge.lang-ok {
  background: rgba(32, 163, 158, 0.15);
  color: var(--admin-brand);
}

.btn-small {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.mt {
  margin-top: 1rem;
}

.form-row {
  padding: 0.5rem 0;
}

.lang-ok {
  color: #16a34a;
  font-weight: 600;
}

.lang-warn {
  color: #ca8a04;
  font-weight: 600;
}

.language-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
}

.section-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--admin-brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.language-hero h2 {
  margin: 0 0 0.4rem;
  font-size: 1.45rem;
}

.language-hero p {
  max-width: 680px;
  margin-bottom: 0;
}

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

.language-card {
  background: var(--admin-surface);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.language-card.active {
  border-color: rgba(32, 163, 158, 0.55);
  box-shadow: 0 12px 30px rgba(32, 163, 158, 0.12);
}

.language-card.inactive {
  opacity: 0.78;
}

.language-card-header,
.card-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.language-code {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(32, 163, 158, 0.13);
  color: var(--admin-brand);
  font-weight: 800;
}

.language-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.language-card p {
  flex: 1;
  margin: 0;
  color: var(--admin-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.add-language-card {
  align-items: flex-start;
  border-style: dashed;
  background: #f8fafc;
}

.add-language-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--admin-brand);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
}

.language-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px minmax(160px, 1fr) auto;
  gap: 1rem;
  align-items: end;
}

.language-form label {
  display: block;
  color: var(--admin-text);
  font-size: 0.88rem;
  font-weight: 700;
}

.language-form input,
.language-form select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
}

/* Formulario de edición */
.edit-form {
  max-width: 720px;
}

.edit-section {
  margin-bottom: 1.5rem;
}

.edit-section label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.edit-section input[type="text"],
.edit-section textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}

.edit-section input:focus,
.edit-section textarea:focus {
  outline: none;
  border-color: var(--admin-brand);
}

.edit-section textarea {
  resize: vertical;
  min-height: 100px;
}

.upload-area {
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  background: #f8fafc;
  position: relative;
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-placeholder p {
  margin: 0.25rem 0;
  color: var(--admin-muted);
  font-size: 0.9rem;
}

.upload-hint {
  font-size: 0.8rem !important;
}

.edit-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

a.btn-admin {
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
}

/* Page Builder */
.page-builder-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-builder-toolbar h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.page-builder-toolbar p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 0.9rem;
}

.pages-table td {
  vertical-align: middle;
}

.pages-table strong {
  display: block;
  margin-bottom: 0.2rem;
}

.page-description {
  display: block;
  color: var(--admin-muted);
  font-size: 0.8rem;
}

.page-url {
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-published {
  background: rgba(32, 163, 158, 0.14);
  color: #158783;
}

.status-review {
  background: #fef3c7;
  color: #92400e;
}

.status-draft {
  background: #e2e8f0;
  color: #475569;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.builder-page .panel-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.builder-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.block-palette {
  width: 200px;
  flex-shrink: 0;
  background: var(--admin-surface);
  border-right: 1px solid #e2e8f0;
  padding: 1rem;
}

.block-palette h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.palette-hint {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: var(--admin-muted);
}

.block-types {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.block-type {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.block-type:hover {
  background: rgba(32, 163, 158, 0.08);
  border-color: var(--admin-brand);
}

.builder-canvas {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: #f8fafc;
}

.blocks-list {
  max-width: 680px;
  margin: 0 auto;
}

.block {
  background: var(--admin-surface);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.block-handle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.block-type-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--admin-muted);
}

.block-actions {
  display: flex;
  gap: 0.25rem;
}

.block-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  font-size: 0.75rem;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  cursor: pointer;
}

.block-btn:hover {
  background: #fff;
  border-color: var(--admin-brand);
}

.block-btn-delete:hover {
  border-color: #dc2626;
  color: #dc2626;
}

.block-preview {
  padding: 1rem;
}

.block-field {
  margin-bottom: 0.75rem;
}

.block-field:last-child {
  margin-bottom: 0;
}

.block-field input,
.block-field textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: inherit;
}

.block-field textarea {
  resize: vertical;
  min-height: 60px;
}

.block-field-image {
  margin-top: 0.5rem;
}

.upload-area.small {
  padding: 1rem;
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  text-align: center;
  background: #f8fafc;
  position: relative;
}

.upload-area.small span {
  font-size: 0.85rem;
  color: var(--admin-muted);
}

.add-block-trigger {
  padding: 0.5rem 0;
  display: flex;
  justify-content: center;
}

.add-block-btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  background: transparent;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--admin-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.add-block-btn:hover {
  border-color: var(--admin-brand);
  color: var(--admin-brand);
}

.block-preview-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.column-preview input,
.column-preview textarea {
  width: 100%;
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: inherit;
  margin-bottom: 0.5rem;
}

.column-preview textarea {
  resize: vertical;
  min-height: 50px;
}

.block-preview-inline {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inline-input {
  flex: 1;
  min-width: 120px;
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.gallery-upload span {
  font-size: 0.85rem;
}

/* Editor visual */
.visual-editor-page {
  height: 100vh;
  overflow: hidden;
  background: #0f172a;
}

.editor-topbar {
  height: 72px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  gap: 1rem;
}

.editor-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.editor-back {
  color: var(--admin-brand);
  font-weight: 700;
  text-decoration: none;
}

.editor-kicker {
  display: block;
  color: var(--admin-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.editor-brand h1 {
  margin: 0.1rem 0 0;
  font-size: 1.25rem;
}

.editor-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.editor-save-status {
  color: var(--admin-muted);
  font-size: 0.85rem;
}

.editor-shell {
  height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: clamp(170px, 22vw, 300px) minmax(260px, 1fr) clamp(190px, 24vw, 340px);
}

.editor-sidebar,
.editor-properties {
  background: #111827;
  color: #e5e7eb;
  overflow-y: auto;
}

.editor-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-properties {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-user {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-user span,
.editor-user strong {
  display: block;
}

.editor-user span {
  font-size: 0.8rem;
  color: #cbd5e1;
}

.editor-user strong {
  margin-top: 0.25rem;
  color: #fff;
}

.editor-search {
  padding: 1rem;
}

.editor-search input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #0b1220;
  color: #fff;
  padding: 0.7rem 0.85rem;
  font-family: inherit;
}

.editor-panel-section {
  padding: 0 1rem 1.2rem;
}

.editor-panel-section h2,
.property-group h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.widget-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.widget-card {
  min-height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #1f2937;
  color: #e5e7eb;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
  font-weight: 700;
}

.widget-card:hover,
.layer-item:hover {
  border-color: var(--admin-brand);
  color: #fff;
}

.widget-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(32, 163, 158, 0.16);
  color: #5eead4;
}

.layers-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.layer-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #0b1220;
  color: #cbd5e1;
  padding: 0.7rem 0.85rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.layer-item.active {
  border-color: var(--admin-brand);
  background: rgba(32, 163, 158, 0.14);
  color: #fff;
}

.editor-stage {
  min-width: 0;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    #e5e7eb;
  background-size: 24px 24px;
  overflow-y: auto;
}

.editor-device-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: rgba(241, 245, 249, 0.92);
  border-bottom: 1px solid #cbd5e1;
  backdrop-filter: blur(10px);
}

.device-tabs {
  display: flex;
  gap: 0.4rem;
}

.device-tab {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}

.device-tab.active {
  background: var(--admin-brand);
  border-color: var(--admin-brand);
  color: #fff;
}

.stage-size {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
}

.page-canvas {
  width: min(1000px, calc(100% - 3rem));
  margin: 1.5rem auto 3rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.canvas-section {
  position: relative;
  padding: 3rem;
  border: 2px solid transparent;
}

.canvas-section.selected {
  border-color: var(--admin-brand);
}

.section-toolbar {
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: -18px;
  background: var(--admin-brand);
  color: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.section-toolbar button {
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
}

.canvas-hero {
  background: linear-gradient(135deg, #ecfeff 0%, #f8fafc 58%, #ccfbf1 100%);
}

.canvas-hero-content {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

.canvas-hero h2 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.canvas-hero p {
  color: #475569;
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--admin-brand) !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.canvas-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.canvas-actions span {
  display: inline-flex;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--admin-brand);
  color: #fff;
  font-weight: 800;
}

.canvas-actions span + span {
  background: #0f172a;
}

.canvas-image-placeholder {
  min-height: 280px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.08), rgba(32, 163, 158, 0.22)),
    #fff;
  border: 2px dashed rgba(32, 163, 158, 0.45);
  display: grid;
  place-items: center;
  color: #0f766e;
  font-weight: 800;
}

.canvas-section-header {
  text-align: center;
}

.add-widget-line {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.55rem 1rem;
  border: 2px dashed #cbd5e1;
  border-radius: 999px;
  color: var(--admin-brand);
  font-weight: 800;
}

.canvas-section h3 {
  margin: 0 0 1.5rem;
  font-size: 2rem;
}

.canvas-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.canvas-card-grid article {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.canvas-card-grid h4 {
  margin: 0 0 0.5rem;
}

.canvas-card-grid p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}

.properties-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.properties-tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #cbd5e1;
  padding: 0.9rem 0.5rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
}

.properties-tabs button.active {
  border-color: var(--admin-brand);
  color: #fff;
}

.property-group {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.property-group label {
  display: block;
  margin-bottom: 0.85rem;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 700;
}

.property-group input,
.property-group textarea {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #0b1220;
  color: #fff;
  padding: 0.7rem 0.85rem;
  font-family: inherit;
}

.property-group textarea {
  resize: vertical;
}

.property-group input[type="color"] {
  height: 44px;
  padding: 0.2rem;
}

.full-button {
  width: 100%;
  margin-top: 0.35rem;
}

.publish-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.publish-card strong {
  color: #fff;
}

@media (max-width: 900px) {
  .builder-layout {
    flex-direction: column;
  }

  .block-palette {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }

  .block-types {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .block-preview-columns {
    grid-template-columns: 1fr;
  }

  .page-builder-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pages-table {
    min-width: 820px;
  }

  .table-card {
    overflow-x: auto;
  }

  .language-hero,
  .card-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .language-form {
    grid-template-columns: 1fr;
  }

  .editor-topbar {
    padding: 0 0.75rem;
  }

  .editor-brand,
  .editor-top-actions {
    gap: 0.5rem;
  }

  .editor-save-status {
    display: none;
  }

  .stage-size {
    display: none;
  }

  .editor-sidebar,
  .editor-properties {
    font-size: 0.9rem;
  }

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

  .page-canvas {
    width: calc(100% - 1rem);
  }

  .canvas-section {
    padding: 1.5rem;
  }

  .canvas-hero-content,
  .canvas-card-grid {
    grid-template-columns: 1fr;
  }

  .canvas-hero h2 {
    font-size: 1.8rem;
  }

}

@media (max-width: 768px) {
  .panel-page {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

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

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

  .editor-topbar {
    height: auto;
    padding: 1rem;
  }

  .editor-shell {
    height: auto;
    min-height: calc(100vh - 72px);
    grid-template-columns: 1fr;
  }

  .visual-editor-page {
    height: auto;
    overflow: auto;
  }

  .canvas-hero-content,
  .canvas-card-grid {
    grid-template-columns: 1fr;
  }
}
