/* ===== Toast Notifications ===== */
.lsp-toast {
  position: fixed;
  right: 32px;
  bottom: 90px;
  z-index: 10000;
  min-width: 260px;
  max-width: 340px;
  padding: 12px 14px;
  border-radius: 999px;
  background: #0f172a;
  color: #f9fafb;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .22s ease, transform .22s ease;
}

.lsp-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lsp-toast .lsp-toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #bbf7d0, #22c55e);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lsp-toast .lsp-toast-icon svg {
  width: 13px;
  height: 13px;
  stroke: #022c22;
}

.lsp-toast.warning .lsp-toast-icon {
  background: radial-gradient(circle at 30% 20%, #fef3c7, #f59e0b);
}

.lsp-toast.warning svg {
  stroke: #78350f;
}

.lsp-toast.error .lsp-toast-icon {
  background: radial-gradient(circle at 30% 20%, #fecaca, #ef4444);
}

.lsp-toast.error svg {
  stroke: #7f1d1d;
}

/* ===== Activity Feed ===== */
..lsp-activity {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lsp-activity-item {
  display: flex;
  align-items: center;
  gap: 12px;                /* 🔑 spacing between msg / badge / ago */
  padding: 10px 12px;
  border-bottom: 1px solid #e6e9f2;
}

/* Equal columns on desktop */
.lsp-activity-item .msg {
  flex: 1 1 60%;
}

.lsp-activity-item .badge {
  flex: 0 0 auto;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.lsp-activity-item .ago {
  flex: 0 0 120px;
  text-align: right;
  opacity: 0.7;
  font-size: 12px;
}


.lsp-activity-item.type-info {
  border-left: 4px solid #22c55e;
}

.lsp-activity-item.type-success {
  border-left: 4px solid #22c55e;
}

.lsp-activity-item.type-warning {
  border-left: 4px solid #f59e0b;
}

.lsp-activity-item.type-error {
  border-left: 4px solid #ef4444;
}

/* ===== Animations ===== */
@keyframes lspFlash {
  0% {
    background: rgba(34, 197, 94, .15);
  }
  100% {
    background: transparent;
  }
}

#lsp-last-sync.lsp-flash {
  animation: lspFlash 1.2s ease-out;
  border-radius: 6px;
  padding: 2px 6px;
}

@keyframes lspPulse {
  0% {
    box-shadow: 0 10px 24px rgba(37, 99, 235, .25), 0 0 0 0 rgba(255, 87, 87, .35);
  }
  70% {
    box-shadow: 0 10px 24px rgba(37, 99, 235, .25), 0 0 0 16px rgba(255, 87, 87, 0);
  }
  100% {
    box-shadow: 0 10px 24px rgba(37, 99, 235, .25), 0 0 0 0 rgba(255, 87, 87, 0);
  }
}

@keyframes lspSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes lsp-fade-in {
  to {
    opacity: 1;
  }
}

@keyframes lsp-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Floating Save Button ===== */
.wrap.lightsyncpro .submit,
.wrap.lightsyncpro .submit input[type="submit"],
.wrap.lightsyncpro .lsp-card .button-primary {
  display: none !important;
}

.wrap.lightsyncpro .full-save {
  display: inline-flex !important;
  position: fixed;
  right: 35px;
  bottom: 20px;
  z-index: 9999;
  min-width: 260px;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  color: #fff !important;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(135deg, var(--lsp-primary, #ff5757), var(--lsp-primary-600, #2563eb));
  box-shadow: 0 10px 24px rgba(37, 99, 235, .25), 0 0 0 0 rgba(255, 87, 87, .35);
  transform: translateY(0);
  transition: box-shadow .25s ease, transform .2s ease, opacity .2s ease;
}

.cat-hidden {
  display: none !important;
}

.wrap.lightsyncpro .full-save.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.wrap.lightsyncpro .pulse-button {
  animation: lspPulse 1.6s ease-out infinite;
}

.wrap.lightsyncpro .full-save.is-dirty {
  animation: lspPulse 1.6s ease-out infinite;
}

.wrap.lightsyncpro .full-save.is-saving {
  opacity: .85;
  animation: none;
}

.wrap.lightsyncpro .full-save.is-saving::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .8);
  border-top-color: transparent;
  vertical-align: -2px;
  animation: lspSpin .9s linear infinite;
}

.wrap.lightsyncpro .full-save .status {
  display: inline-block !important;
  opacity: 0;
  transition: opacity .2s ease;
}

.wrap.lightsyncpro .full-save.is-saved .status {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .wrap.lightsyncpro .full-save,
  .wrap.lightsyncpro .full-save.is-dirty {
    transition: none;
    animation: none;
  }
}

/* ===== Progress Ring ===== */
.wrap.lightsyncpro {
  --lsp-accent: #ff5757;
  --lsp-accent-2: #ff7a7a;
  --lsp-track: #e5e7eb;
  --lsp-ring-gap: 7px;
  overflow: visible;
}

.lsp-sub {
  opacity: 0;
  animation: lsp-fade-in .4s ease-out forwards;
  animation-delay: 1s;
}

.wrap.lightsyncpro .lsp-progress.is-circle {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}

.wrap.lightsyncpro .lsp-ring {
  --size: 88px;
  --p: 0;
  width: var(--size);
  height: var(--size);
  min-width: var(--size);
  min-height: var(--size);
  aspect-ratio: 1 / 1;
  flex: 0 0 var(--size);
  border-radius: 50%;
  position: relative;
  box-sizing: border-box;
  background: conic-gradient(var(--lsp-accent) calc(var(--p)*1%), var(--lsp-track) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(50% - var(--lsp-ring-gap)), #000 calc(50% - var(--lsp-ring-gap) + 1px));
  mask: radial-gradient(farthest-side, transparent calc(50% - var(--lsp-ring-gap) + 1px), #000 calc(50% - var(--lsp-ring-gap) + 1px));
  animation: lsp-spin 1s linear infinite paused;
}

.lsp-modal .lsp-ring {
  width: var(--size);
  height: var(--size);
  min-width: var(--size);
  min-height: var(--size);
  aspect-ratio: 1 / 1;
  flex: 0 0 var(--size);
}

.wrap.lightsyncpro .lsp-percent {
  font-size: 18px;
}

.wrap.lightsyncpro .lsp-sub {
  font-size: 18px;
  color: var(--lsp-subtext, #6b7280);
  margin-top: 2px;
}

.wrap.lightsyncpro .lsp-ring.indeterminate {
  animation-play-state: running;
  background: conic-gradient(var(--lsp-accent) 25%, var(--lsp-track) 0);
}

.wrap.lightsyncpro .lsp-log {
  margin-top: 10px;
  max-height: 220px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--lsp-border, #e5e7eb);
  border-radius: 8px;
  padding: 10px;
}

.wrap.lightsyncpro {
  position: relative;
}

.wrap.lightsyncpro > * {
  position: relative;
  z-index: 1;
}

.wrap.lightsyncpro .lsp-bg-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .65;
  filter: saturate(1.05);
}

@media (prefers-reduced-motion:reduce) {
  .wrap.lightsyncpro .lsp-bg-canvas {
    display: none !important;
  }
}

/* ===== Modal Progress Layout ===== */
.lsp-modal #lsp-progress.lsp-progress.is-circle {
  display: grid;
  grid-template-columns: var(--size, 88px) 1fr;
  grid-template-areas:
    "ring center"
    "log  log";
  gap: 14px 16px;
  align-items: center;
}

.lsp-modal #lsp-progress .lsp-ring {
  grid-area: ring;
}

.lsp-modal #lsp-progress .lsp-center {
  grid-area: center;
}

.lsp-modal #lsp-progress #lsp-log {
  grid-area: log;
}

.lsp-modal #lsp-progress .lsp-sub {
  margin-top: 4px;
  max-width: 52ch;
  line-height: 1.35;
  white-space: normal;
}

.lsp-modal #lsp-progress #lsp-log {
  margin-top: 6px;
  max-height: 220px;
  overflow: auto;
}

.lsp-modal {
  transform: translateZ(0);
}

.lsp-modal .lsp-progress.is-circle {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}

.lsp-modal .lsp-ring {
  --size: 88px;
  --p: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  position: relative;
  background: conic-gradient(var(--lsp-primary, #ff5757) calc(var(--p)*1%), var(--lsp-track, #e5e7eb) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(50% - var(--lsp-ring-gap, 7px)), #000 calc(50% - var(--lsp-ring-gap, 7px) + 1px));
  mask: radial-gradient(farthest-side, transparent calc(50% - var(--lsp-ring-gap, 7px)), #000 calc(50% - var(--lsp-ring-gap, 7px) + 1px));
}

.lsp-modal .lsp-center {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

.lsp-modal .lsp-percent {
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  color: var(--lsp-text, #0f172a);
}

.lsp-modal .lsp-indeterminate {
  opacity: .85;
}

.lsp-modal .lsp-log {
  margin-top: 10px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, .04);
  border: 1px solid rgba(15, 23, 42, .08);
  font-size: 12px;
}

html {
  scroll-behavior: smooth;
}

/* ===== Hero Section ===== */
body {
  margin: 0;
  background: #ededed;
  color: var(--lsp-text);
}

.hero {
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(135deg, var(--lsp-primary), var(--lsp-primary-600));
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero:before {
  content: "";
  position: absolute;
  inset: -40px;
  background:
    radial-gradient(circle at 15% 35%, rgba(255,255,255,.22), transparent 20%),
    radial-gradient(circle at 65% 15%, rgba(255,255,255,.16), transparent 20%),
    radial-gradient(circle at 85% 65%, rgba(255,255,255,.14), transparent 20%);
  pointer-events: none;
  filter: saturate(1.1);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

.logo img {
  filter: drop-shadow(2px 4px 10px rgb(0,0,0,0.5)) !important;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: .2px;
  color: #ffffff;
}

.hero p {
  margin: 0;
  opacity: .92;
  line-height: 1.45;
  font-size: 13px;
  max-width: 64ch;
}

.kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width:900px) {
  .kpis {
    justify-content: flex-start;
  }
}

.kpi {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  padding: 10px 12px;
  border-radius: 14px;
  min-width: 156px;
  backdrop-filter: blur(6px);
}

.kpi .label {
  font-size: 11px;
  opacity: .85;
  font-weight: 600;
}

.kpi .value {
  font-size: 14px;
  font-weight: 800;
  margin-top: 2px;
}

/* ===== Command Bar ===== */
.commandbar {
  margin-top: 14px;
  position: sticky !important;
  top: 3%;
  z-index: 3 !important;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--lsp-border);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

@media (max-width: 980px) {
  .commandbar {
    flex-wrap: wrap;
  }
}

.pillrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--lsp-border);
  font-weight: 700;
  font-size: 12px;
  color: var(--lsp-text);
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.14);
}

.dot.idle {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245,158,11,.14);
}

/* ===== Buttons ===== */
.btn, .button-link-delete {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--lsp-primary), var(--lsp-primary-600));
  box-shadow: 0 12px 26px rgba(37,99,235,.22);
}

.btn.ghost, .button-link-delete {
  background: #fff;
  border: 1px solid var(--lsp-border);
  color: var(--lsp-text);
  box-shadow: 0 10px 18px rgba(15,23,42,.04);
}

.btn:active {
  transform: translateY(1px);
}

.btn.small {
  padding: 8px 12px;
  font-size: 12px;
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ===== Layout: Sidebar + Content ===== */
.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  margin-top: 18px;
}

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

.side {
  position: sticky;
  top: 115px;
  align-self: start;
  height: max-content;
}

@media (max-width:1024px) {
  .side {
    position: static;
  }
}

.nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--lsp-border);
  text-decoration: none;
  color: var(--lsp-text);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

.nav a:hover {
  border-color: rgba(37,99,235,.35);
}

.nav a.active {
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 4px var(--lsp-ring), 0 10px 20px rgba(15,23,42,.06);
  color: var(--lsp-primary-600);
}

/* ===== Section Styles ===== */
.section {
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--lsp-border);
}

.section:last-child {
  border-bottom: 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: .2px;
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 11.5px;
  padding: 7px 10px;
  border: 1px solid var(--lsp-border);
  background: #fff;
  color: var(--lsp-text);
}

.badge.success {
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.08);
}

.badge.locked {
  border-color: rgba(245,158,11,.35);
  background: rgba(245,158,11,.10);
}

.badge.muted {
  opacity: .9;
}

/* ===== Panels ===== */
.panel {
  background: #fff;
  border: 1px solid var(--lsp-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 14px;
}

/* ===== Two Column Layout ===== */
.twocol {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  align-items: start;
}

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

.help {
  background: #fff;
  border: 1px dashed rgba(37,99,235,.35);
  border-radius: var(--radius);
  padding: 14px;
}

.adobe {
  background: #fff;
  border: 1px dashed rgba(37,99,235,.35);
  border-radius: var(--radius);
  padding: 30px !important;
}

.adobe h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 900;
  color: #ff5757 !important;
}

.help h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 900;
  color: var(--lsp-primary-600);
}

.help p {
  margin-bottom: 20px;
  color: var(--lsp-subtext);
  font-size: 12.5px;
  line-height: 1.45;
}

/* ===== Form Elements ===== */
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

label {
  font-weight: 700;
  font-size: 12.5px;
}

input[type="text"], select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--lsp-border);
  font: inherit;
  font-size: 13px;
  background: #fff;
  outline: none;
}

input[type="text"]:focus, select:focus {
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 4px var(--lsp-ring);
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--lsp-border);
  border-radius: 14px;
  background: #fff;
}

.toggle input {
  width: 18px;
  height: 18px;
}

.desc {
  color: var(--lsp-subtext);
  font-size: 12.5px;
  line-height: 1.45;
  margin-top: 8px;
}

/* ===== Toast (Alternative Style) ===== */
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  min-width: 280px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 999px;
  background: #0f172a;
  color: #f9fafb;
  font-weight: 800;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .22s ease, transform .22s ease;
}

.toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.toast .ico {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #bbf7d0, #22c55e);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.toast.error .ico {
  background: radial-gradient(circle at 30% 20%, #fecaca, #ef4444);
}

.toast svg {
  width: 14px;
  height: 14px;
  stroke: #052e16;
}

.toast.error svg {
  stroke: #450a0a;
}