:root {
  --bg: #07070a;
  --panel-bg: #0f0f15;
  --panel-border: #1a1a26;
  --accent-gold: #c5a880;
  --accent-gold-glow: rgba(197, 168, 128, 0.15);
  --accent-magenta: #d8005b;
  --accent-magenta-glow: rgba(216, 0, 91, 0.15);
  --text-white: #ffffff;
  --text-slate: #8e8e9f;
  --card-bg: #12121c;
  
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
}

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

body {
  background-color: var(--bg);
  color: #d1d1e0;
  font-family: var(--font-sans);
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Ambient glow background */
.ambient-glow {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.12;
}

.orb-gold {
  width: 500px; height: 500px;
  background-color: var(--accent-gold);
  top: -100px; right: -100px;
}

.orb-magenta {
  width: 500px; height: 500px;
  background-color: var(--accent-magenta);
  bottom: -150px; left: -100px;
}

.grid-mesh {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* NAVBAR */
.navbar {
  height: 65px;
  border-bottom: 1px solid var(--panel-border);
  background-color: rgba(15, 15, 21, 0.7);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  gap: 2px;
  background: linear-gradient(135deg, #181827, #07070a);
  border: 1px solid var(--panel-border);
  padding: 6px 10px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
}

.logo-h { color: var(--accent-magenta); }
.logo-u { color: #ffffff; }
.logo-m { color: var(--accent-gold); }

.brand-text .main-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--text-white);
  display: block;
  line-height: 1.1;
}

.brand-text .sub-title {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
}

.nav-center-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  background-color: rgba(26, 26, 38, 0.4);
  border: 1px solid var(--panel-border);
  padding: 8px 24px;
  border-radius: 30px;
}

.n-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.n-stat-num {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-white);
}

.n-stat-lbl {
  font-size: 8px;
  text-transform: uppercase;
  color: var(--text-slate);
  letter-spacing: 0.5px;
}

.n-stat-sep {
  width: 1px; height: 20px;
  background-color: var(--panel-border);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-magenta);
  box-shadow: 0 0 10px var(--accent-magenta);
  animation: pulseGlow 1.8s infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); box-shadow: 0 0 4px var(--accent-magenta); }
  100% { transform: scale(1.1); box-shadow: 0 0 14px var(--accent-magenta); }
}

.live-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-white);
}

/* APP GRID CONTAINER */
.app-container {
  margin-top: 65px;
  height: calc(100vh - 65px);
  display: grid;
  grid-template-columns: 290px 1fr 310px;
}

/* SIDEBAR LEFT */
.sidebar-left {
  background-color: var(--panel-bg);
  border-right: 1px solid var(--panel-border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-white);
  margin-bottom: 16px;
}

.badge {
  background-color: var(--accent-gold-glow);
  color: var(--accent-gold);
  border: 1px solid rgba(197, 168, 128, 0.3);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 8.5px;
}

.calendar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-item {
  background-color: var(--card-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.calendar-item:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.cal-date {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.cal-desc {
  font-size: 11px;
  color: var(--text-white);
  line-height: 1.4;
  margin-bottom: 8px;
}

.cal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cal-type {
  font-size: 8px;
  font-weight: 700;
  color: var(--text-slate);
  text-transform: uppercase;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 2px 6px;
  border-radius: 4px;
}

.cal-status {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
}

.cal-status.scheduled { background-color: var(--accent-gold-glow); color: var(--accent-gold); }
.cal-status.review { background-color: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.cal-status.draft { background-color: rgba(255, 255, 255, 0.05); color: var(--text-slate); }

.section-divider {
  height: 1px;
  background-color: var(--panel-border);
  margin: 20px 0;
}

.events-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-card {
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid;
}

.event-card.magenta {
  background-color: var(--accent-magenta-glow);
  border-left-color: var(--accent-magenta);
}

.event-card.gold {
  background-color: var(--accent-gold-glow);
  border-left-color: var(--accent-gold);
}

.ec-tag {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.event-card.magenta .ec-tag { color: var(--accent-magenta); }
.event-card.gold .ec-tag { color: var(--accent-gold); }

.ec-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.4;
  margin-bottom: 4px;
}

.ec-time {
  font-size: 9px;
  color: var(--text-slate);
}

/* CENTER COLUMN: THE GRID WORKSPACE */
.grid-workspace {
  background-color: #030305;
  padding: 30px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.workspace-header {
  width: 100%;
  max-width: 600px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.wh-left h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 6px;
}

.wh-left p {
  font-size: 11.5px;
  color: var(--text-slate);
  line-height: 1.5;
}

.wh-right {
  display: flex;
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 4px;
  border-radius: 8px;
}

.grid-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-slate);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.grid-mode-btn.active {
  background-color: var(--accent-gold);
  color: #07070a;
}

.instagram-feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 600px;
}

/* Slot cards styling */
.feed-slot {
  aspect-ratio: 1 / 1;
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feed-slot:hover {
  transform: scale(1.02);
  border-color: var(--accent-gold);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.slot-visual {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  position: relative;
}

.slot-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feed-slot:hover .slot-visual::after {
  opacity: 1;
}

.slot-overlay-info {
  position: absolute;
  bottom: 12px; left: 12px; right: 12px;
  z-index: 10;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.feed-slot:hover .slot-overlay-info {
  opacity: 1;
  transform: translateY(0);
}

.so-type {
  font-size: 8px;
  font-weight: 800;
  color: var(--accent-gold);
  text-transform: uppercase;
}

.so-caption {
  font-size: 10px;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-badge-top {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 12;
  font-size: 16px;
}

/* Fallback elegant designs inside mock visuals */
.mock-pattern {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 15px;
}

.mock-pattern.gold {
  background: radial-gradient(circle at center, rgba(197,168,128,0.1) 0%, #0c0c12 100%);
  border: 1px solid rgba(197, 168, 128, 0.05);
}

.mock-pattern.magenta {
  background: radial-gradient(circle at center, rgba(216,0,91,0.1) 0%, #0c0c12 100%);
  border: 1px solid rgba(216, 0, 91, 0.05);
}

.mock-pattern h4 {
  font-family: var(--font-serif);
  font-size: 11px;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.mock-pattern p {
  font-size: 8px;
  color: var(--text-slate);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Single Post View Detail */
.single-post-detail {
  width: 100%;
  max-width: 600px;
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  overflow: hidden;
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.single-post-detail.hide {
  display: none;
}

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

.spd-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 380px;
}

.spd-gfx-pane {
  background-color: #07070a;
  border-right: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

.spd-meta-pane {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.spd-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.spd-status {
  font-size: 9px;
  font-weight: 800;
  color: var(--accent-gold);
  background-color: var(--accent-gold-glow);
  padding: 2px 8px;
  border-radius: 4px;
}

.spd-date {
  font-size: 10px;
  color: var(--text-slate);
}

.spd-caption-box h4 {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-white);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.spd-caption-box p {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-slate);
}

.spd-stats {
  display: flex;
  gap: 18px;
  border-top: 1px solid var(--panel-border);
  padding-top: 14px;
  margin-top: 14px;
  font-size: 11.5px;
}

.spd-stats strong {
  color: var(--text-white);
}

.btn-secondary {
  width: 100%;
  background-color: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-white);
  border-radius: 6px;
  padding: 10px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 14px;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.02);
  border-color: var(--text-slate);
}

/* SIDEBAR RIGHT */
.sidebar-right {
  background-color: var(--panel-bg);
  border-left: 1px solid var(--panel-border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Systems Architect profile */
.architect-profile {
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.04) 0%, rgba(216, 0, 91, 0.04) 100%);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 16px;
}

.ap-tag {
  font-size: 8px;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.ap-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-white);
}

.ap-role {
  font-size: 10.5px;
  color: var(--text-slate);
  margin-bottom: 8px;
}

.ap-bio {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-slate);
  text-align: justify;
  margin-bottom: 12px;
}

.ap-links {
  display: flex;
  gap: 12px;
}

.ap-links a {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-gold);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-gold);
  padding-bottom: 1px;
}

/* Vibe auditor */
.palette-auditor h3, .ratio-auditor h3 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-white);
}

.panel-desc {
  font-size: 10.5px;
  color: var(--text-slate);
  line-height: 1.4;
  margin-bottom: 12px;
}

.active-palette-preview {
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  margin-bottom: 12px;
}

.color-band {
  height: 100%;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
}

.color-band:hover {
  transform: scaleY(1.15);
  filter: brightness(1.2);
}

.palette-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.leg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-slate);
}

.leg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

/* Ratio auditor */
.spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.spec-item {
  background-color: var(--card-bg);
  border: 1px solid var(--panel-border);
  padding: 10px 12px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spec-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-white);
}

.spec-val {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-gold);
  background-color: var(--accent-gold-glow);
  padding: 2px 8px;
  border-radius: 4px;
}

/* EDITOR MODAL */
.editor-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(7, 7, 10, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.editor-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(-20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.editor-modal.active .modal-content {
  transform: translateY(0);
}

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

.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-white);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-slate);
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--text-white);
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-slate);
}

.form-group select, .form-group textarea {
  background-color: var(--card-bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 10px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--text-white);
  outline: none;
  width: 100%;
}

.form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent-gold);
}

.btn-primary {
  width: 100%;
  background-color: var(--accent-gold);
  color: #07070a;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary:hover {
  background-color: #b0936e;
  box-shadow: 0 0 15px var(--accent-gold-glow);
}
