/* ==========================================================================
   KenmoreCMS Modern Design System
   ========================================================================== */

:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Brand Palette */
  --primary: #e31837;
  --primary-hover: #c4122d;
  --primary-active: #a50e24;
  --primary-light: #fff1f2;
  --primary-glow: rgba(227, 24, 55, 0.2);

  /* Neutrals & Slate */
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-850: #172033;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white:     #ffffff;

  /* Semantics */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(227, 24, 55, 0.15);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-family);
  margin: 0;
  background: #f8fafc;
  color: var(--slate-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Login Page
   ========================================================================== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: 
    radial-gradient(circle at 10% 20%, rgba(227, 24, 55, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(15, 23, 42, 0.08) 0%, transparent 40%),
    linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.login-card-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 10;
}

.login-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, #ff6b81 100%);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.brand-logo-container {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 6px rgba(227, 24, 55, 0.25));
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--slate-900);
}

.brand-badge {
  background: var(--slate-900);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.login-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 6px 0;
}

.login-subtitle {
  font-size: 13.5px;
  color: var(--slate-500);
  margin: 0;
  line-height: 1.4;
}

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  margin-bottom: 20px;
}

.alert-danger {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-hover);
}

.alert-danger i {
  font-size: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon > i {
  position: absolute;
  left: 14px;
  color: var(--slate-400);
  font-size: 16px;
  pointer-events: none;
  transition: var(--transition);
}

.input-with-icon input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  font-size: 14px;
  font-family: inherit;
  color: var(--slate-900);
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.input-with-icon input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px var(--primary-glow);
}

.input-with-icon input:focus + i,
.input-with-icon:focus-within > i {
  color: var(--primary);
}

.btn-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--slate-400);
  font-size: 16px;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.btn-toggle-pw:hover {
  color: var(--slate-700);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--white);
  background: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(227, 24, 55, 0.25);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(227, 24, 55, 0.35);
}

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

.btn-block {
  width: 100%;
  margin-top: 6px;
}

.login-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--slate-100);
  text-align: center;
}

.login-footer p {
  margin: 0;
  font-size: 12px;
  color: var(--slate-400);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */

.topbar {
  background: var(--slate-900);
  color: var(--white);
  border-bottom: 1px solid var(--slate-800);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.topbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
}

.brand-mark-sm {
  display: flex;
  align-items: center;
}

.topbar-brand .brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-badge-pill {
  font-size: 10px;
  font-weight: 700;
  background: var(--primary);
  color: var(--white);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--slate-400);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.nav-item i {
  font-size: 15px;
}

.nav-item:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 12px 4px 4px;
  background: var(--slate-800);
  border: 1px solid var(--slate-700);
  border-radius: var(--radius-full);
}

.user-avatar {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--primary) 0%, #ff4b60 100%);
  color: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.user-email {
  font-size: 12.5px;
  color: var(--slate-300);
  font-weight: 500;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--slate-700);
  color: var(--slate-400);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* ==========================================================================
   Admin Content & Layout
   ========================================================================== */

.content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px 24px;
}

.content h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--slate-900);
  margin: 0 0 20px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(227, 24, 55, 0.2);
  transition: var(--transition);
}

.button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(227, 24, 55, 0.3);
}

/* ==========================================================================
   Tables
   ========================================================================== */

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-top: 16px;
}

th, td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--slate-100);
  font-size: 13.5px;
}

th {
  background: var(--slate-50);
  color: var(--slate-600);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--slate-200);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: var(--transition);
}

tbody tr:hover {
  background: #f8fafc;
}

td a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  display: inline-block;
  transition: var(--transition);
}

td a:hover {
  background: var(--primary);
  color: var(--white);
}

/* ==========================================================================
   Forms & Controls
   ========================================================================== */

.edit-form {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 800px;
}

.edit-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--slate-700);
}

.edit-form input[type=text],
.edit-form input[type=email],
.edit-form input[type=password],
.edit-form input[type=number],
.edit-form input[type=datetime-local],
.edit-form textarea,
.edit-form select {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  color: var(--slate-900);
  transition: var(--transition);
}

.edit-form input:focus,
.edit-form textarea:focus,
.edit-form select:focus {
  outline: none;
  background: var(--white);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.edit-form .checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.edit-form button[type=submit] {
  align-self: flex-start;
  padding: 11px 24px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(227, 24, 55, 0.2);
  transition: var(--transition);
}

.edit-form button[type=submit]:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.danger {
  background: var(--danger);
  color: var(--white);
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.danger:hover {
  background: var(--danger-hover);
}

fieldset {
  border: 1px solid var(--slate-200);
  background: #fdfdfd;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 6px 0;
}

legend {
  font-weight: 700;
  font-size: 14px;
  color: var(--slate-800);
  padding: 0 8px;
}

/* ==========================================================================
   Asset / Media Grid
   ========================================================================== */

.upload-form {
  background: var(--white);
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  transition: var(--transition);
}

.upload-form:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-form button {
  padding: 10px 20px;
  background: var(--slate-900);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.asset-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
}

.asset-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--slate-300);
}

.asset-card img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-100);
}

.asset-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-700);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-card input[type=text] {
  font-size: 11px;
  padding: 6px 8px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  color: var(--slate-600);
  cursor: pointer;
}

.asset-card input[type=text]:focus {
  background: var(--white);
  border-color: var(--primary);
}

#quill-editor {
  background: var(--white);
  min-height: 260px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.ql-toolbar.ql-snow {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-color: var(--slate-200);
}

.ql-container.ql-snow {
  border-color: var(--slate-200);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1400px) {
  .topbar-inner {
    height: auto;
    padding: 12px 16px;
    flex-direction: column;
    gap: 12px;
  }
  .topbar-left {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  .topbar-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .content {
    padding: 20px 16px;
  }
  .login-card {
    padding: 28px 20px;
  }
}

/* ==========================================================================
   Page Position Banner & Route Details
   ========================================================================== */

.url-position-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(230, 43, 30, 0.06) 0%, rgba(26, 75, 140, 0.06) 100%);
  border: 1px solid rgba(230, 43, 30, 0.18);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.url-position-banner .url-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.url-position-banner .url-label {
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.url-position-banner .url-root {
  color: var(--text-muted);
  font-family: monospace;
}

.url-position-banner .url-slug {
  font-weight: 700;
  color: var(--kenmore-red);
  background: rgba(230, 43, 30, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
}

.url-position-banner .position-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Position Table Cell */
.position-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.position-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-dark);
}

.position-details {
  display: flex;
  flex-direction: column;
}

.position-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-dark);
}

.position-page {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.position-page code {
  background: #f1f5f9;
  padding: 1px 4px;
  border-radius: 3px;
}

/* Position Badges */
.slot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Two-column layout for Edit + Live Preview */
.edit-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
}

.edit-sidebar {
  position: sticky;
  top: 80px;
}

.preview-panel,
.live-mockup-panel,
.footer-mockup-panel,
.carousel-mockup-panel,
.flow-mockup-panel,
.banner-mockup-panel {
  position: sticky;
  top: 90px;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.08);
}

.preview-header,
.mockup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.preview-header h3,
.preview-title,
.mockup-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-badge,
.preview-tag,
.live-badge {
  background: #059669;
  color: #ecfdf5;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.live-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
}

.preview-container {
  margin-bottom: 16px;
}

.preview-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 14px;
  line-height: 1.4;
}

/* SERP & Social Mockup */
.serp-box {
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  font-family: Arial, sans-serif;
}
.serp-url {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.serp-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #60a5fa;
  margin-bottom: 6px;
  line-height: 1.3;
}
.serp-desc {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
}
.social-card-box {
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}
.social-card-img {
  width: 100%;
  height: 130px;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.social-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.social-card-body {
  padding: 12px;
}
.social-card-domain {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}
.social-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 4px 0;
}

/* Mock Components */
.hero-mock-card,
.mock-hero-banner {
  position: relative;
  min-height: 240px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  border: 1px solid #e2e8f0;
  background-color: #0f172a;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
}

.hero-mock-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-mock-overlay,
.mock-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.85) 100%);
  z-index: 2;
  pointer-events: none;
}

.hero-mock-content,
.mock-hero-content {
  position: relative;
  z-index: 3;
  padding: 20px;
  color: #ffffff !important;
  width: 100%;
}

.hero-mock-content h2,
.hero-mock-content h3,
.mock-title {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  color: #ffffff !important;
  margin: 0 0 6px 0 !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.7);
}

.hero-mock-content p,
.mock-sub {
  font-size: 0.82rem !important;
  color: #f1f5f9 !important;
  opacity: 0.95 !important;
  margin: 0 0 12px 0 !important;
  line-height: 1.4 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}

.hero-mock-btn,
.mock-btn {
  display: inline-block !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
}

.mock-btn {
  display: inline-block;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  text-decoration: none;
}

/* Mock Tile Card */
.tile-mock-card {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.mock-tile-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  text-align: center;
}

.mock-tile-img-box {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
}

.mock-tile-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mock-tile-no-img {
  color: #94a3b8;
  font-size: 2.5rem;
}

.mock-tile-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.mock-tile-link {
  font-size: 0.75rem;
  color: #2563eb;
  font-family: monospace;
}

/* Image Thumbnails in Tables */
.table-img-thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: #f8fafc;
}

.table-tile-thumb {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  padding: 2px;
}

.table-link-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--kenmore-navy);
  text-decoration: none;
  font-size: 0.9rem;
}

.table-link-preview:hover {
  color: var(--kenmore-red);
}

.table-link-preview code {
  font-weight: 600;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}

@media (max-width: 992px) {
  .edit-layout {
    grid-template-columns: 1fr;
  }
  .edit-sidebar {
    position: static;
  }
}

/* ==========================================================================
   PAGE POSITIONS & SITE MAP VISUAL HIERARCHY
   ========================================================================== */

.view-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-pill:hover {
  background: #f8fafc;
  border-color: var(--kenmore-navy);
  color: var(--kenmore-navy);
}

.tab-pill.active {
  background: var(--kenmore-navy);
  border-color: var(--kenmore-navy);
  color: #ffffff;
}

.tab-pill.active code {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.tab-pill code {
  font-size: 0.8rem;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}

.position-section-group {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.section-group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.group-title-col h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.route-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 2px 10px;
  border-radius: 9999px;
}

.route-badge code {
  color: #1e40af;
  font-weight: 700;
}

.group-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Position Cards */
.position-card {
  display: flex;
  gap: 20px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.position-card:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.position-card.announcement-card {
  border-left: 4px solid #f59e0b;
}

.pos-badge-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
}

.pos-number-badge {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--kenmore-navy);
}

.pos-number-badge.special {
  color: #d97706;
}

.pos-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
}

.pos-preview-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pos-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.pos-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.pos-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.pos-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 8px;
  border-radius: 4px;
}

/* Slices & Visual Previews */
.hero-live-slice {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.hero-slice-bg {
  min-height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-slice-overlay {
  background: rgba(0, 0, 0, 0.45);
  padding: 16px 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slice-headline {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.slice-subcopy {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
}

.slice-btn {
  align-self: flex-start;
  margin-top: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 4px;
}

.hero-slice-placeholder {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #64748b;
  font-weight: 600;
}

/* Horizontal Tiles Scroll */
.tiles-horizontal-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.tile-mini-card {
  min-width: 110px;
  max-width: 110px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.tile-slot-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.tile-mini-img-box {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 4px;
}

.tile-mini-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.tile-mini-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

/* Feature Slices */
.feature-slice-row {
  display: flex;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
}

.feature-slice-text p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
}

.feature-slice-img img {
  height: 64px;
  max-width: 120px;
  object-fit: contain;
  border-radius: 4px;
}

.announcement-banner-preview img {
  width: 100%;
  max-height: 90px;
  object-fit: cover;
  border-radius: 6px;
}

/* Pages Grid */
.pages-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.page-preview-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-route-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--kenmore-navy);
}

.page-route-pill code {
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
}

.page-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.page-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  flex: 1;
}

.page-card-url-bar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

/* Interactive Device Frame */
.live-frame-container {
  background: #0f172a;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.frame-url-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 680px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 6px 14px;
}

.frame-url-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.85rem;
  font-family: monospace;
  outline: none;
}

.frame-url-bar button, .btn-ext-icon {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame-url-bar button:hover, .btn-ext-icon:hover {
  color: #ffffff;
}

.device-switch-btns {
  display: flex;
  gap: 6px;
}

.btn-device {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-device.active {
  background: var(--kenmore-navy);
  color: #ffffff;
  border-color: var(--kenmore-navy);
}

.frame-wrapper {
  width: 100%;
  height: 600px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: max-width 0.3s ease;
}

.frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Website overview */
.website-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:20px; }
.website-card { background:var(--white); border:1px solid var(--slate-200); border-radius:12px; padding:24px; }
.website-card h2 { margin:0 0 12px; }
.website-card p { margin:12px 0; }
.website-card a { display:block; padding:8px 0; color:var(--primary); }
.website-card summary { cursor:pointer; font-weight:600; }


/* ==========================================================================
   CSS FIXES FOR UI ALIGNMENT ISSUES
   ========================================================================== */

/* Fix 1: Footer Navigation - Add spacing to "View Footer on Website" button */
.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 20px;
}

.page-header-row .header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.page-header-row .btn-secondary,
.page-header-row .btn-primary {
  padding: 10px 18px;
  margin: 0;
}

/* Fix 2: Media & Asset Library - Better spacing and alignment */
.asset-upload-card {
  background: var(--white);
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  transition: var(--transition);
}

.asset-upload-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-dropzone {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dropzone-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: var(--slate-100);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--slate-600);
}

.dropzone-content {
  flex: 1;
}

.dropzone-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--slate-900);
}

.dropzone-content p {
  font-size: 0.88rem;
  color: var(--slate-600);
  line-height: 1.5;
  margin: 0 0 14px 0;
}

.file-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.file-input-wrapper input[type="file"] {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  background: var(--slate-50);
  font-size: 0.88rem;
}

.upload-status-msg {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  display: none;
}

.upload-status-msg.success {
  display: block;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}

.upload-status-msg.error {
  display: block;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

/* Assets Filter Bar - Better spacing between search and count */
.assets-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  gap: 20px;
  flex-wrap: wrap;
}

.search-input-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
}

.search-input-box i {
  position: absolute;
  left: 14px;
  color: var(--slate-400);
  font-size: 16px;
  pointer-events: none;
}

.search-input-box input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  font-size: 14px;
  font-family: inherit;
  color: var(--slate-900);
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.search-input-box input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.assets-showing-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-600);
  white-space: nowrap;
  padding: 8px 16px;
  background: var(--slate-50);
  border-radius: var(--radius-full);
}

/* Asset Grid Improvements */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.asset-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}

.asset-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--slate-300);
}

.asset-img-container {
  position: relative;
  width: 100%;
  height: 160px;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-100);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.asset-img-container img,
.asset-img-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.storage-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.storage-badge.s3-badge {
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
}

.storage-badge.local-badge {
  background: rgba(100, 116, 139, 0.9);
  color: #ffffff;
}

.asset-info-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.asset-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-700);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-url-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.copy-url-group input[type="text"] {
  flex: 1;
  font-size: 0.78rem;
  padding: 6px 10px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  color: var(--slate-600);
  cursor: pointer;
  font-family: monospace;
}

.copy-url-group input[type="text"]:focus {
  background: var(--white);
  border-color: var(--primary);
  outline: none;
}

.btn-copy {
  flex-shrink: 0;
  padding: 6px 12px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  color: var(--slate-600);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-copy:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

.btn-copy.copied {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}

.asset-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--slate-100);
}

.asset-date {
  font-size: 0.75rem;
  color: var(--slate-500);
}

.btn-asset-delete {
  padding: 6px 14px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-asset-delete:hover {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}

/* Fix 3 & 4: Landing Tiles and Sections - Better button alignment */
.page-header-row .btn-secondary,
.page-header-row .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.page-header-row .btn-secondary {
  background: var(--white);
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
}

.page-header-row .btn-secondary:hover {
  background: var(--slate-50);
  border-color: var(--slate-400);
  color: var(--slate-900);
}

.page-header-row .btn-primary {
  background: var(--primary);
  color: var(--white);
  border: none;
  box-shadow: 0 2px 6px rgba(227, 24, 55, 0.2);
}

.page-header-row .btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(227, 24, 55, 0.3);
}

/* Empty State Styling */
.empty-state-full {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: var(--slate-50);
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-lg);
}

.empty-state-full i {
  font-size: 3.5rem;
  color: var(--slate-300);
  margin-bottom: 16px;
}

.empty-state-full h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--slate-700);
  margin: 0 0 8px 0;
}

.empty-state-full p {
  font-size: 0.92rem;
  color: var(--slate-500);
  margin: 0;
  max-width: 400px;
  line-height: 1.5;
}

.empty-state-full code {
  background: var(--white);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--slate-200);
  color: var(--primary);
  font-weight: 600;
}

/* Table improvements */
.table-container {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.empty-cell {
  padding: 40px 20px !important;
  text-align: center;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-state i {
  font-size: 2.5rem;
  color: var(--slate-300);
}

.empty-state p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.9rem;
}

/* Count Badge Styling */
.count-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-700);
}

.count-badge i {
  font-size: 1rem;
  color: var(--primary);
}

/* Order Badge */
.order-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-700);
}

/* Button Action Styles */
.btn-action-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  color: var(--slate-700);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-action-edit:hover {
  background: var(--slate-50);
  border-color: var(--slate-400);
  color: var(--slate-900);
}

.btn-action-delete {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-action-delete:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--white);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header-row .header-actions {
    flex-direction: column;
    width: 100%;
  }

  .page-header-row .btn-secondary,
  .page-header-row .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .assets-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-box {
    width: 100%;
  }

  .assets-showing-label {
    text-align: center;
  }

  .asset-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}


/* ==========================================================================
   EDIT PAGE HEADER LAYOUT FIX
   ========================================================================== */

.edit-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--slate-200);
  gap: 20px;
  flex-wrap: wrap;
}

.edit-page-header .header-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 300px;
}

.edit-page-header .header-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.edit-page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--slate-900);
  margin: 0;
  line-height: 1.2;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--slate-100);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  color: var(--slate-700);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  width: fit-content;
}

.btn-back:hover {
  background: var(--slate-200);
  border-color: var(--slate-400);
  color: var(--slate-900);
  transform: translateX(-2px);
}

.btn-back i {
  font-size: 1rem;
}

/* Form Group Labels with Links */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.link-assets {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 10px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.link-assets:hover {
  background: var(--primary);
  color: var(--white);
}

.link-assets i {
  font-size: 0.9rem;
}

/* Form Group Row (for side-by-side fields) */
.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .form-group-row {
    grid-template-columns: 1fr;
  }
}

/* Form Actions Footer */
.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 20px;
  margin-top: 24px;
  border-top: 1px solid var(--slate-200);
  flex-wrap: wrap;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: transparent;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  color: var(--slate-700);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-ghost:hover {
  background: var(--slate-100);
  border-color: var(--slate-400);
  color: var(--slate-900);
}

/* Danger Zone */
.danger-zone {
  margin-top: 48px;
  padding: 24px;
  background: var(--danger-bg);
  border: 2px dashed var(--danger-border);
  border-radius: var(--radius-lg);
}

.danger-zone .delete-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: var(--danger);
  border: none;
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  width: fit-content;
}

.btn-danger:hover {
  background: var(--danger-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Help Text */
.help-text {
  font-size: 0.82rem;
  color: var(--slate-500);
  font-weight: 400;
}

.help-text code {
  background: var(--slate-100);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--slate-700);
  font-size: 0.8rem;
}

/* Key Badge */
.key-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-700);
}

/* No Image Text */
.no-img-text {
  font-size: 0.8rem;
  color: var(--slate-400);
  font-style: italic;
}

/* Headline Cell */
.headline-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.headline-cell strong {
  color: var(--slate-900);
  font-size: 0.92rem;
}

.subcopy-preview {
  font-size: 0.8rem;
  color: var(--slate-500);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* Small Secondary Button */
.btn-sm-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  color: var(--slate-700);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-sm-secondary:hover {
  background: var(--slate-50);
  border-color: var(--slate-400);
  color: var(--slate-900);
}

/* Responsive Edit Page Header */
@media (max-width: 768px) {
  .edit-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .edit-page-header .header-left {
    min-width: auto;
  }

  .edit-page-header .header-right {
    width: 100%;
  }

  .edit-page-header .header-right .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}


/* ==========================================================================
   TABLE BORDER FIX - Remove double borders
   ========================================================================== */

/* Remove border from table-container wrapper to avoid double borders */
.table-container {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

/* Table styling - single clean border */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-top: 0;
}

/* Ensure first row doesn't have top border inside */
thead tr:first-child th:first-child {
  border-top-left-radius: var(--radius-lg);
}

thead tr:first-child th:last-child {
  border-top-right-radius: var(--radius-lg);
}

/* Ensure last row doesn't have bottom border issues */
tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-lg);
}

tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-lg);
}

/* Remove any double borders between table elements */
th {
  border-left: none;
  border-right: none;
  border-top: none;
}

td {
  border-left: none;
  border-right: none;
  border-top: none;
}

/* Only keep bottom borders for rows */
th {
  border-bottom: 1px solid var(--slate-200);
}

td {
  border-bottom: 1px solid var(--slate-100);
}

/* Remove border from last row */
tbody tr:last-child td {
  border-bottom: none;
}


/* ==========================================================================
   FIX: Ensure "View on Website" button in header-right is styled as button
   ========================================================================== */

/* Override any conflicting link styles in edit-page-header */
.edit-page-header .header-right .btn-secondary,
.edit-page-header .header-right a.btn-secondary {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}

.edit-page-header .header-right .btn-secondary:hover,
.edit-page-header .header-right a.btn-secondary:hover {
  background: var(--slate-50);
  border-color: var(--slate-400);
  color: var(--slate-900);
  text-decoration: none;
  transform: translateY(-1px);
}

.edit-page-header .header-right .btn-secondary i,
.edit-page-header .header-right a.btn-secondary i {
  font-size: 1rem;
}

/* Ensure proper button styling across all contexts */
a.btn-secondary,
button.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}

a.btn-secondary:hover,
button.btn-secondary:hover {
  background: var(--slate-50);
  border-color: var(--slate-400);
  color: var(--slate-900);
  text-decoration: none;
}


/* ==========================================================================
   CONSISTENT BUTTON STYLING FOR ALL VIEW ON WEBSITE LINKS
   ========================================================================== */

/* Primary button styling - consistent everywhere */
a.btn-primary,
button.btn-primary,
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(227, 24, 55, 0.2);
}

a.btn-primary:hover,
button.btn-primary:hover,
.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(227, 24, 55, 0.3);
}

/* Ensure icons in buttons are proper size */
.btn-primary i,
.btn-secondary i {
  font-size: 1rem;
  flex-shrink: 0;
}

/* Specific styling for page-header-row buttons */
.page-header-row .header-actions a.btn-secondary,
.page-header-row .header-actions a.btn-primary {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

/* Links Table for inline editing (like footer) */
.links-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  font-size: 0.88rem;
}

.links-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  background: #f8fafc;
  padding: 12px 16px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.links-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
  vertical-align: middle;
  background: #ffffff;
}

.links-table tbody tr {
  transition: all 0.15s ease;
}

.links-table tbody tr:hover {
  background: #f8fafc;
}

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

.links-table .order-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #0f172a;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid #e2e8f0;
}

.links-table .key-badge {
  display: inline-block;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: lowercase;
}

.links-table .badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.links-table .btn-action-edit,
.links-table .btn-action-delete {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  vertical-align: middle;
}

.links-table .btn-action-edit {
  color: #0369a1;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.links-table .btn-action-edit:hover {
  background: #dbeafe;
  border-color: #0369a1;
  color: #0c4a6e;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(3, 105, 161, 0.15);
}

.links-table .btn-action-delete {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
  margin-left: 0;
}

.links-table .btn-action-delete:hover {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.15);
}

/* Ensure forms display inline in action cells */
.links-table td form {
  display: inline-block;
  margin: 0;
  vertical-align: middle;
}

/* Actions column should use flexbox for horizontal layout */
.links-table td[style*="text-align:right"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Dialog/Modal Styles */
dialog {
  border: none;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  max-width: 500px;
  width: 90%;
  background: #ffffff;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

dialog h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 16px;
}
