:root {
  --bg: #070a12;
  --bg-2: #0b1020;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --glass: rgba(255,255,255,.075);
  --glass-2: rgba(255,255,255,.115);
  --ink: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --line: rgba(148, 163, 184, .18);
  --line-strong: rgba(125, 211, 252, .32);
  --primary: #38bdf8;
  --primary-2: #818cf8;
  --success: #34d399;
  --danger: #fb7185;
  --warning: #fbbf24;
  --shadow: 0 30px 90px rgba(0, 0, 0, .35);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 72%);
  z-index: -2;
}
.ambient-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: -3; background: radial-gradient(circle at top, #111827 0%, #070a12 48%, #04060b 100%); }
.ambient-bg span { position: absolute; width: 460px; height: 460px; border-radius: 50%; filter: blur(76px); opacity: .44; animation: floatGlow 12s ease-in-out infinite; }
.ambient-bg span:nth-child(1) { background: #0ea5e9; left: -120px; top: -110px; }
.ambient-bg span:nth-child(2) { background: #7c3aed; right: -160px; top: 180px; animation-delay: -4s; }
.ambient-bg span:nth-child(3) { background: #10b981; left: 32%; bottom: -220px; animation-delay: -7s; opacity: .25; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 304px;
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(2,6,23,.92), rgba(15,23,42,.76));
  border-right: 1px solid var(--line);
  box-shadow: 20px 0 80px rgba(0,0,0,.32);
  backdrop-filter: blur(22px);
}
.brand-block { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; }
.brand-mark {
  width: 58px; height: 58px; border-radius: 20px;
  display: grid; place-items: center;
  font-size: 25px; font-weight: 950;
  color: white;
  background: linear-gradient(135deg, #22d3ee, #6366f1 50%, #a855f7);
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 20px 50px rgba(56,189,248,.27);
}
.brand-block h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.brand-block p { margin: 4px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.nav-stack { display: grid; gap: 10px; }
.nav-stack a {
  color: #b6c4d6;
  text-decoration: none;
  padding: 14px 15px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
  border: 1px solid transparent;
  transition: .2s ease;
}
.nav-stack a span { width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); }
.nav-stack a.active, .nav-stack a:hover {
  color: white;
  background: linear-gradient(135deg, rgba(56,189,248,.15), rgba(129,140,248,.10));
  border-color: rgba(125,211,252,.22);
  transform: translateX(4px);
}
.sidebar-card {
  margin-top: auto;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.045));
  border: 1px solid var(--line);
}
.sidebar-card p { margin: 0 0 10px; color: var(--soft); font-size: 13px; font-weight: 850; }
.sidebar-card small { display: block; margin-top: 12px; color: var(--muted); line-height: 1.5; }

.main { flex: 1; padding: 28px; min-width: 0; }
.hero-card, .panel, .metric-card {
  background: linear-gradient(135deg, rgba(15,23,42,.82), rgba(15,23,42,.48));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.hero-card {
  border-radius: 34px;
  padding: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 26px;
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at 80% 20%, rgba(56,189,248,.22), transparent 36%), radial-gradient(circle at 20% 100%, rgba(168,85,247,.18), transparent 35%);
  pointer-events: none;
}
.hero-card > * { position: relative; z-index: 1; }
.hero-card.compact { padding: 30px 34px; }
.eyebrow, .section-kicker { color: #7dd3fc; font-size: 12px; font-weight: 950; letter-spacing: .14em; text-transform: uppercase; }
.hero-card h1 { margin: 10px 0 10px; max-width: 860px; font-size: clamp(32px, 4.2vw, 62px); line-height: .96; letter-spacing: -.065em; }
.hero-card p { margin: 0; color: #b6c4d6; max-width: 760px; line-height: 1.65; font-size: 15px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-pills span { padding: 9px 12px; border-radius: 999px; background: rgba(255,255,255,.075); border: 1px solid var(--line); color: var(--soft); font-size: 12px; font-weight: 850; }

.btn {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 13px 17px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: rgba(255,255,255,.08);
  transition: .2s ease;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(125,211,252,.38); box-shadow: 0 16px 34px rgba(0,0,0,.22); }
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.primary, .btn.linkedin { background: linear-gradient(135deg, #06b6d4, #2563eb 52%, #7c3aed); color: white; border-color: rgba(255,255,255,.20); box-shadow: 0 20px 45px rgba(37,99,235,.25); }
.btn.secondary, .btn.ghost { background: rgba(255,255,255,.08); color: #e2e8f0; }
.btn.success { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.btn.danger-btn { background: rgba(251,113,133,.12); color: #fecdd3; border-color: rgba(251,113,133,.25); }
.btn.full { width: 100%; margin-top: 18px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.metric-grid.three { grid-template-columns: repeat(3, 1fr); }
.metric-card { border-radius: 26px; padding: 20px; position: relative; overflow: hidden; }
.metric-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--primary); opacity: .9; }
.metric-card.accent-purple::before { background: #a78bfa; } .metric-card.accent-green::before { background: #34d399; } .metric-card.accent-orange::before { background: #fbbf24; }
.metric-card p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 850; }
.metric-card h3 { margin: 9px 0 3px; font-size: 30px; letter-spacing: -.045em; }
.metric-card small { color: #91a1b8; }

.workspace { display: grid; grid-template-columns: minmax(380px, 500px) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { border-radius: 30px; padding: 24px; }
.cockpit-card { position: sticky; top: 28px; }
.panel-header { margin-bottom: 18px; }
.panel-header.split { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.panel-header h2 { margin: 6px 0 5px; font-size: 26px; letter-spacing: -.04em; }
.panel-header p { margin: 0; color: var(--muted); line-height: 1.55; }
.mode-tabs { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; padding: 7px; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 18px; }
.mode-tab { border: none; border-radius: 13px; padding: 12px 14px; font-weight: 950; cursor: pointer; color: #aab8ca; background: transparent; }
.mode-tab.active { color: white; background: linear-gradient(135deg, rgba(56,189,248,.24), rgba(129,140,248,.18)); box-shadow: inset 0 0 0 1px rgba(125,211,252,.22); }

label { display: block; margin: 14px 0 8px; color: #dbeafe; font-size: 13px; font-weight: 950; }
textarea, input[type="date"], input[type="time"], input[type="datetime-local"], input[type="file"] {
  width: 100%;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 17px;
  padding: 14px 15px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  color: #f8fafc;
  background: rgba(2,6,23,.52);
}
textarea { resize: vertical; min-height: 132px; line-height: 1.58; }
textarea::placeholder, input::placeholder { color: #64748b; }
textarea:focus, input:focus { border-color: rgba(56,189,248,.70); box-shadow: 0 0 0 4px rgba(56,189,248,.12); }
input[type="file"] { color: #b6c4d6; }
.input-grid, .form-grid.two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.field-note { margin: 8px 0 0; color: #7f8fa6; font-size: 12px; line-height: 1.45; }
.inline-check { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.055); border: 1px solid var(--line); border-radius: 16px; padding: 13px; color: #cbd5e1; font-size: 13px; font-weight: 850; }
.quick-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.quick-topics button { border: 1px solid rgba(125,211,252,.18); background: rgba(56,189,248,.08); color: #bfdbfe; padding: 9px 11px; border-radius: 999px; cursor: pointer; font-weight: 900; font-size: 12px; }
.quick-topics button:hover { background: rgba(56,189,248,.18); transform: translateY(-1px); }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }

.empty-state { border: 1px dashed rgba(125,211,252,.24); border-radius: 26px; padding: 60px 22px; text-align: center; color: var(--muted); background: radial-gradient(circle at top, rgba(56,189,248,.12), rgba(255,255,255,.035)); }
.empty-icon { width: 56px; height: 56px; display: inline-grid; place-items: center; border-radius: 18px; background: linear-gradient(135deg, rgba(56,189,248,.25), rgba(129,140,248,.22)); color: white; font-size: 26px; margin-bottom: 14px; box-shadow: 0 15px 35px rgba(56,189,248,.18); }
.empty-state h3 { margin: 0 0 8px; color: white; font-size: 22px; }
.empty-state p { margin: 0; }
.image-box { position: relative; background: rgba(2,6,23,.62); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; margin-bottom: 18px; min-height: 370px; }
.image-box img { width: 100%; height: 430px; object-fit: cover; display: block; }
.image-pending { min-height: 370px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; background: radial-gradient(circle at center, rgba(56,189,248,.14), rgba(2,6,23,.78)); }
.image-pending h3 { margin: 0 0 6px; font-size: 24px; }
.image-pending p { margin: 0 0 14px; color: var(--muted); }
.image-actions { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 10px; }
.post-editor { min-height: 300px; }
.prompt-editor { min-height: 110px; color: #aab8ca; background: rgba(2,6,23,.38); }
.quality-card { background: rgba(255,255,255,.055); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-top: 14px; }
.quality-card h3 { margin: 0 0 10px; font-size: 15px; }
.check-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; color: #b6c4d6; font-weight: 850; font-size: 13px; }
.actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.actions.left { justify-content: flex-start; }
.badge, .status-pill, .schedule-status { display: inline-flex; align-items: center; padding: 8px 11px; border-radius: 999px; font-size: 12px; font-weight: 950; }
.badge.success, .status-pill.success { background: rgba(16,185,129,.14); color: #86efac; }
.badge.danger { background: rgba(251,113,133,.14); color: #fecdd3; }
.status-pill.muted { background: rgba(255,255,255,.08); color: #cbd5e1; }
.status-pill.warning { background: rgba(251,191,36,.13); color: #fde68a; }
.loader { margin-top: 16px; display: flex; align-items: center; gap: 10px; color: #cbd5e1; font-weight: 900; }
.spinner { width: 24px; height: 24px; border: 3px solid rgba(255,255,255,.14); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
.result-box { margin-top: 16px; padding: 14px; border-radius: 16px; font-weight: 850; border: 1px solid var(--line); }
.result-box.success { background: rgba(16,185,129,.12); color: #bbf7d0; }
.result-box.error { background: rgba(251,113,133,.12); color: #fecdd3; }
.hidden { display: none !important; }

.schedule-list, .logs-list { display: grid; gap: 14px; }
.schedule-card, .log-card { background: rgba(15,23,42,.62); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 45px rgba(0,0,0,.16); }
.schedule-card { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 18px; padding: 16px; }
.schedule-thumb { border-radius: 20px; overflow: hidden; background: rgba(2,6,23,.65); min-height: 154px; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-weight: 950; border: 1px solid var(--line); }
.schedule-thumb img { width: 100%; height: 100%; object-fit: cover; min-height: 154px; }
.pending-visual { padding: 20px; text-align: center; }
.schedule-title-row, .log-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.schedule-title-row h3, .log-title-row h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.schedule-meta { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.schedule-excerpt { color: #b6c4d6; line-height: 1.6; margin: 12px 0 0; }
.error-text { color: #fecdd3; background: rgba(251,113,133,.12); border-radius: 14px; padding: 10px; }
.schedule-status { text-transform: capitalize; }
.schedule-status.scheduled { background: rgba(56,189,248,.13); color: #bae6fd; }
.schedule-status.posted { background: rgba(16,185,129,.13); color: #bbf7d0; }
.schedule-status.failed { background: rgba(251,113,133,.13); color: #fecdd3; }
.schedule-status.cancelled { background: rgba(148,163,184,.13); color: #cbd5e1; }
.log-card { display: grid; grid-template-columns: 12px 1fr; gap: 14px; padding: 16px; }
.log-dot { width: 12px; height: 12px; border-radius: 50%; background: #94a3b8; margin-top: 6px; }
.log-card.success .log-dot { background: var(--success); } .log-card.error .log-dot { background: var(--danger); }
.log-title-row span { color: #8392a7; font-size: 12px; white-space: nowrap; }
.log-card pre { margin: 10px 0 0; white-space: pre-wrap; background: rgba(2,6,23,.56); border-radius: 14px; padding: 12px; color: #b6c4d6; font-size: 12px; }
.image-modal { position: fixed; inset: 0; background: rgba(3,7,18,.86); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 28px; backdrop-filter: blur(12px); }
.image-modal img { max-width: min(92vw,1000px); max-height: 88vh; border-radius: 26px; box-shadow: 0 30px 100px rgba(0,0,0,.55); }
.modal-close { position: fixed; top: 24px; right: 24px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); font-size: 28px; cursor: pointer; background: rgba(255,255,255,.10); color: white; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floatGlow { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(30px,-18px,0) scale(1.08); } }
@media (max-width: 1220px) { .workspace { grid-template-columns: 1fr; } .cockpit-card { position: relative; top: 0; } .metric-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 880px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; }
  .nav-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .main { padding: 18px; }
  .hero-card, .panel-header.split, .schedule-title-row { flex-direction: column; align-items: flex-start; }
  .metric-grid, .metric-grid.three, .input-grid, .form-grid.two, .button-row, .check-grid, .schedule-card { grid-template-columns: 1fr; }
  .image-actions { position: static; padding: 12px; background: rgba(2,6,23,.52); }
}
@media (max-width: 560px) { .nav-stack { grid-template-columns: 1fr; } .hero-card h1 { font-size: 34px; } .sidebar, .main { padding: 16px; } }
