/* public/assets/css/app.css */

:root {
  --bg: #0f172a;
  --bg-soft: #020617;
  --surface: #0b1220;
  --surface-soft: #111827;
  --border: rgba(148, 163, 184, 0.25);
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.1);
  --accent-strong: #4f46e5;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --danger: #ef4444;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.85);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(59,130,246,0.25), transparent 55%), radial-gradient(circle at bottom right, rgba(16,185,129,0.2), transparent 55%), #020617;
  color: var(--text-main);
  min-height: 100vh;
}

body {
  -webkit-font-smoothing: antialiased;
}
a:link,
a:visited,
a:hover,
a:active {
  text-decoration: none;
}
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(90deg, rgba(15,23,42,0.98), rgba(15,23,42,0.96));
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  border: none;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  background: rgba(15,23,42,0.9);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.btn-icon:hover {
  background: rgba(30, 64, 175, 0.8);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}


    .brand-mark {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: conic-gradient(from 210deg, #22c55e, #4ade80, #22c55e, #4f46e5);
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 12px 35px rgba(34, 197, 94, 0.7);
      flex-shrink: 0;
    }

    .brand-mark span {
      font-weight: 800;
      font-size: 16px;
      color: #020617;
    }
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: radial-gradient(circle at 30% 0, #a855f7, #22c55e);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.7);
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 14px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.workspace-switcher {
  padding: 6px 10px;
  background: rgba(15,23,42,0.9);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.ws-name {
  font-weight: 500;
}

.ws-pill {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at 0 0, #34d399, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #022c22;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.app-body {
  flex: 1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 0;
}
body.editor-layout .app-body {
  grid-template-columns: minmax(0, 1fr);
}

body.editor-layout .app-sidebar {
  display: none;
}
.app-sidebar {
  border-right: 1px solid rgba(148, 163, 184, 0.2);
  background: radial-gradient(circle at 0 0, #020617, #020617);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
}

.nav-item .nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
}

.nav-item:hover {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
}

.nav-item.is-active {
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  color: #f9fafb;
}

.nav-item.is-active .nav-dot {
  background: #e5e7eb;
}

.sidebar-footer {
  margin-top: auto;
}

.sidebar-help {
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at 0 0, rgba(79,70,229,0.16), rgba(15,23,42,0.9));
}

.sidebar-help-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.sidebar-help-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.app-main {
  padding: 24px 24px 28px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 520px;
  margin-top: 6px;
}

.page-actions {
  display: flex;
  flex-shrink: 0;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  padding: 8px 16px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f9fafb;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.7);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: rgba(15,23,42,0.96);
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.5);
}

.btn-secondary:hover {
  background: rgba(15,23,42,0.9);
}

.btn-ghost {
  background: rgba(15,23,42,0.9);
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.4);
}
.editor-sidebar-left .btn-ghost.is-active {
  background-color: #0f172a; 
  color: #ffffff;
  border-color: #0f172a;
}

.editor-sidebar-left .btn-ghost.full.is-active {
  background-color: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.btn-ghost:hover {
  background: rgba(30, 64, 175, 0.85);
}

.filters-bar {
  display: contents;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.filters-left {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--text-muted);
  cursor: pointer;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--text-main);
}

.chip.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.filters-right {
  flex-shrink: 0;
}

.input-search {
  width: 240px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15,23,42,0.96);
  color: var(--text-main);
  font-size: 13px;
}

.input-search::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.template-card {
  background: radial-gradient(circle at top, #111827, #020617);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.template-thumb {
  position: relative;
  padding: 10px;
}

.thumb-image {
  border-radius: 14px;
  background: #020617;
  background-size: cover;
  background-position: center;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.template-thumb .btn-open {
  position: absolute;
  right: 18px;
  bottom: 18px;
  font-size: 12px;
  padding-inline: 12px;
}

.template-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.template-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.badge {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent);
}

.size {
  color: var(--text-muted);
}

.template-name {
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 960px) {
  .app-body {
    grid-template-columns: 0 minmax(0, 1fr);
  }

  .app-sidebar {
    position: unset;
    inset: 64px auto 0 0;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.2s ease-out;
    z-index: 50;
  }

  .app-sidebar.is-open {
    transform: translateX(0);
  }
}

.quota-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(15,23,42,0.9);
  overflow: hidden;
  margin-top: 6px;
}

.quota-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #22c55e);
}

.btn-small {
  padding: 8px 8px;
  font-size: 12px;
}

.auth-body {
  min-height: 100vh;
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1f2937, #020617);
  color: var(--text-main);
}

.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: radial-gradient(circle at top, #111827, #020617);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 24px 22px 22px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-logo img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
}

.auth-brand-text {
  display: flex;
  flex-direction: column;
}

.auth-app-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.auth-app-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  margin: 10px 0 4px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.auth-alert {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.7);
  color: #fecaca;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 10px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-field label {
  font-size: 12px;
  color: var(--text-muted);
}

.auth-field input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15,23,42,0.96);
  color: var(--text-main);
  font-size: 13px;
}

.auth-field input::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
}

.auth-footer-text {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: left;
}

.editor-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}
.vx-topbar,
.vx-toolbar {
  width: 100%;
}

body.editor-layout .app-main.editor-main {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.editor-layout .editor-shell {
  flex: 1 1 auto;
  min-height: 0;
}
.editor-header {
  flex: 0 0 auto;
  padding: 5px 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);

  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 5px;

  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(2, 6, 23, 0.96);
  backdrop-filter: blur(12px);
}

.editor-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crumb-back {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15,23,42,0.9);
}

.crumb-back:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.crumb-title {
  display: flex;
  flex-direction: column;
}

.crumb-label {
  font-size: 11px;
  color: var(--text-muted);
}

.crumb-name {
  font-size: 14px;
  font-weight: 600;
}

.editor-actions {
  display: flex;
  gap: 8px;
}

.editor-shell {
  display: grid;
  grid-template-columns: 65px minmax(0, 1fr) 260px;
  gap: 14px;
  min-height: 420px;
  align-items: flex-start;
}
.panel {
  background: radial-gradient(circle at top, #111827, #020617);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 10px 10px 12px;
  box-shadow: var(--shadow-soft);
}

.panel-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.panel-text {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.panel-text.small {
  font-size: 11px;
}

.editor-sidebar-left,
.editor-sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-canvas-wrap {
  display: grid;
  align-items: center;
  justify-content: center;
}

.canvas-frame {
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top, #020617, #020617);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.canvas-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.canvas-inner {
  background: #dedede;
  padding: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: auto;
}

.canvas-inner.has-grid {
  background-color: #e5e7eb;
  background-image:
    linear-gradient(to right, rgba(148,163,184,0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148,163,184,0.35) 1px, transparent 1px);
  background-size: 40px 40px;
}
#canvasInner {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

#canvasInner canvas {
  display: block;
}

#canvasGridOverlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;

  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.35) 1px, transparent 1px);
  background-size: 32px 32px;

  opacity: 0.6;
  display: none;
}
.zoom-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
}
.zoom-control input[type="range"] {
  width: 110px;
}
#zoomLabel {
  font-size: 12px;
  color: var(--text-muted);
}
.btn-toggle {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-toggle.is-active {
  border-color: var(--accent);
  background: rgba(59,130,246,0.18);
  color: #e5e7eb;
}

.font-style-buttons {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.align-buttons {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

#propFontFamily {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15,23,42,0.96);
  color: var(--text-main);
  font-size: 13px;
  padding: 6px 8px;
}

#propStrokeWidth,
#propCurveRadius,
#propCornerRadius {
  width: 100%;
}

.panel-divider {
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  margin: 10px 0;
}

.editor-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.editor-modal-backdrop.show {
  display: flex;
}
.editor-modal {
  background: #020617;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.4);
  padding: 16px 18px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 18px 45px rgba(15,23,42,0.8);
}
.editor-modal-header h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.editor-modal-body {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.editor-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.editor-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15,23,42,0.96);
  color: var(--text-main);
  font-size: 13px;
}

.editor-input::placeholder {
  color: rgba(148,163,184,0.8);
}
.btn-danger {
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  border: none;
  background: #ef4444;
  color: #ffffff;
  cursor: pointer;
}
.btn-danger:hover {
  background: #dc2626;
}

#designCanvas {
  display: block;
  background: #ffffff;
  border-radius: 0px;
}

/* Panel properties */
.prop-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.prop-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.prop-value {
  font-weight: 500;
}

.prop-group {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#propTextContent {
  min-height: 70px;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15,23,42,0.96);
  color: var(--text-main);
  font-size: 13px;
  padding: 6px 8px;
}

#propFontSize,
#propFillColor {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15,23,42,0.96);
  color: var(--text-main);
  font-size: 13px;
  padding: 6px 8px;
}

.btn-ghost.full,
.btn-primary.full,
.btn-secondary.full {
  width: 100%;
  justify-content: left;
  margin-bottom: 10px;
}

.btn-ghost.danger {
  border-color: rgba(239, 68, 68, 0.7);
  color: #fecaca;
}

.btn-ghost.danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .editor-shell {
    grid-template-columns: 200px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .editor-sidebar-right {
    grid-column: 1 / span 2;
  }
}

@media (max-width: 768px) {
  .editor-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }

  .editor-sidebar-left,
  .editor-sidebar-right {
    order: 1;
  }

  .editor-canvas-wrap {
    order: 0;
  }

  .canvas-inner {
    max-width: 100%;
    overflow: auto;
  }

  #designCanvas {
    max-width: 100%;
    height: auto !important;
  }
}


  .menu-toggle {
    display: none;
  }

@media (max-width: 640px) {
  .app-topbar {
    padding-inline: 12px;
  }

  .brand-text .brand-sub {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .user-menu {
    display: none;
  }

  .page-header {
    flex-direction: column;
	width: 330px;
  }

  .editor-actions {
      display: initial;
  }

  .template-grid {
    flex-direction: column;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filters-right {
    width: 100%;
  }

  .input-search {
    width: 100%;
  }
}
.btn-toggle {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-toggle.is-active {
  border-color: var(--accent);
  background: rgba(59,130,246,0.18);
  color: #e5e7eb;
}

.font-style-buttons {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.align-buttons {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.align-buttons.is-tabs{
  gap: 0;
  flex-wrap: nowrap;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15,23,42,0.55);
}

.align-buttons.is-tabs .btn-toggle{
  flex: 1 1 0;
  border: 0;
  border-radius: 0;
  padding: 7px 10px;
  font-size: 12px;
  background: transparent;
  color: var(--text-muted);
}

.align-buttons.is-tabs .btn-toggle + .btn-toggle{
  border-left: 1px solid rgba(148, 163, 184, 0.22);
}

.align-buttons.is-tabs .btn-toggle.is-active{
  background: rgba(59,130,246,0.22);
  color: #e5e7eb;
}
#propFontFamily {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15,23,42,0.96);
  color: var(--text-main);
  font-size: 13px;
  padding: 6px 8px;
}

#propStrokeWidth,
#propCurveRadius {
  width: 100%;
}
.btn-toggle {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-toggle.is-active {
  border-color: var(--accent);
  background: rgba(59,130,246,0.18);
  color: #e5e7eb;
}

.font-style-buttons {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.align-buttons {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

#propFontFamily {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15,23,42,0.96);
  color: var(--text-main);
  font-size: 13px;
  padding: 6px 8px;
}

#propStrokeWidth,
#propCurveRadius,
#propCornerRadius {
  width: 100%;
}

.panel-divider {
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  margin: 10px 0;
}

.editor-main .editor-sidebar-left,
.editor-main .editor-sidebar-right {
  position: sticky;
  top: 80px;        
  align-self: flex-start;
  z-index: 30;
}

body.no-scroll {
  overflow: hidden;
}

.asset-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.asset-modal.hidden {
  display: none !important;
}

.asset-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.asset-modal-dialog {
  position: relative;
  width: 90%;
  max-width: 960px;
  max-height: 80vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.asset-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.asset-modal-header .title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.asset-modal-header .title .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
}

.asset-modal-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}
.asset-modal-close:hover {
  background: #e5e7eb;
}

.asset-modal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.asset-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.asset-filter {
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}
.asset-filter.active {
  background: #111827;
  color: #f9fafb;
  border-color: #111827;
}

.asset-search {
  margin-left: auto;
  min-width: 160px;
}
.asset-search input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 6px 10px;
  font-size: 12px;
}

.asset-modal-body {
  padding: 12px 16px 16px;
  flex: 1;
  overflow: auto;
  background: #f3f4f6;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.asset-card {
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
}
.asset-card:hover {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.asset-thumb {
  position: relative;
  padding-top: 100%;
  background: #e5e7eb;
  overflow: hidden;
}
.asset-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;       
  object-position: top center;
  background-color: #e5e7eb;
}

.asset-name {
  padding: 4px 6px 6px;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* empty & load more */
.asset-empty {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

.asset-more {
  margin-top: 12px;
  text-align: center;
}
.asset-more button {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.asset-more button:hover {
  background: #f3f4f6;
}

/* helper class umum kalau belum ada */
.hidden {
  display: none !important;
}
/* ========== /Asset Library Modal ========== */


/* ==== HANDLE RESIZE CANVAS ==== */
.canvas-inner {
  position: relative; /* penting supaya handle nempel ke canvas */
}

/* garis pegangan kanan & bawah */
.canvas-resize-handle {
  position: absolute;
  background: transparent;
  z-index: 20;
}

/* handle kanan (resize lebar) */
.canvas-resize-handle-right {
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: ew-resize;
}

/* handle bawah (resize tinggi) */
.canvas-resize-handle-bottom {
  left: 0;
  bottom: -4px;
  height: 8px;
  width: 100%;
  cursor: ns-resize;
}

/* sudut kanan bawah (resize dua arah) – opsional */
.canvas-resize-handle-corner {
  right: -6px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  cursor: nwse-resize;
  border-radius: 4px;
}



/* ==== Scrollbar lebih gelap (global) ==== */

/* Firefox */
* {
  scrollbar-width: none;                    /* lebih ramping */
  scrollbar-color: #020617 #020617;        /* thumb | track */
}

/* Chrome, Edge, Safari (WebKit) */
*::-webkit-scrollbar {
  width: 2px;
  height: 2px;
}

*::-webkit-scrollbar-track {
  background: #020617;                      /* track sangat gelap */
}

*::-webkit-scrollbar-thumb {
  background: #020617;                      /* abu gelap */
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #020617;                      /* sedikit lebih terang saat hover */
}




    /* ==== Canvas Pages Bar (Multi Halaman) ==== */
    .canvas-pages-bar {
      margin: 0px 0 10px;
      padding: 8px 12px;
      border-radius: 10px;
      border: 1px solid rgba(148, 163, 184, 0.35);
      background: rgba(15, 23, 42, 0.02);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .canvas-pages-left {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .canvas-pages-label {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-weight: 600;
      color: #6b7280;
    }

    .canvas-pages-list {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .canvas-page-pill {
      border-radius: 999px;
      border: 1px solid var(--line, #1e4136);
      background: #1e4136;
      padding: 4px 10px;
      font-size: 12px;
      line-height: 1.2;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      color: #f9fafb;
      transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
    }

    .canvas-page-pill.is-active {
      background: #fff;
      color: #111827;
    }

    .canvas-page-pill-add {
      background: transparent;
      border-style: dashed;
      color: var(--accent);
    }

    .canvas-page-pill-add span {
      font-size: 14px;
      font-weight: 700;
    }

    .canvas-pages-right {
      font-size: 11px;
      color: #9ca3af;
      text-align: right;
      max-width: 260px;
    }
	
    /* Tombol hapus halaman melayang di pojok kanan atas canvas */
    .canvas-frame {
      position: relative; /* supaya tombol melayang relatif ke frame */
    }

    .canvas-page-duplicate-floating {
		border-radius: 999px;
		  border: 1px solid #26dc54;
		  background: #e9fee2;
		  padding: 3px 5px;
		  font-size: 10px;
		  line-height: 1.2;
		  cursor: pointer;
		  display: inline-flex;
		  align-items: center;
		  gap: 4px;
		  color: #28b91c;
		  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
		  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.12);
		}
    .canvas-page-delete-floating {
      border-radius: 999px;
      border: 1px solid #dc2626;
      background: #fee2e2;
      padding: 3px 5px;
      font-size: 10px;
      line-height: 1.2;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      color: #b91c1c;
      transition:
        background 0.12s ease,
        color 0.12s ease,
        border-color 0.12s ease,
        box-shadow 0.12s ease;
      box-shadow: 0 4px 10px rgba(220, 38, 38, 0.12);
    }

    .canvas-page-delete-floating:hover {
      background: #fecaca;
    }

    .canvas-page-duplicate-floating:hover {
      background: #c5f5b5;
    }

    .canvas-page-delete-floating span {
      font-weight: 700;
      font-size: 14px;
    }

    .canvas-page-duplicate-floating span {
      font-weight: 700;
      font-size: 14px;
    }

    @media (max-width: 900px) {
      .canvas-page-delete-floating {
        top: 6px;
        right: 6px;
        padding: 4px 8px;
      }
      .canvas-page-duplicate-floating {
        top: 6px;
        right: 6px;
        padding: 4px 8px;
      }
	  
  .app-body{
	  grid-template-columns: 0 minmax(0, 1fr) !important;
  }
  
    }

    @media (max-width: 900px) {
      .canvas-pages-bar {
        flex-direction: column;
        align-items: flex-start;
      }
      .canvas-pages-right {
        text-align: left;
        max-width: 100%;
      }
    }
	
	
    /* ==== Shape Palette (Elemen Shape) ==== */
    .shape-palette {
      border-radius: 8px;
      border: 1px dashed rgba(148, 163, 184, 0.6);
      padding: 6px;
      background: #f9fafb;
      margin-top: 6px;
    }
    .shape-palette-label {
      font-size: 11px;
      font-weight: 600;
      color: #4b5563;
      margin-bottom: 4px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }
    .shape-palette-grid {
      display: inherit;
      flex-wrap: wrap;
      gap: 4px;
	  padding: 10px;
    }
    .shape-btn {
      flex: 0 0 calc(50% - 4px);
      font-size: 10px;
      padding: 10px 10px;
      border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.7);
      background: #ffffff;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
	  margin: 2px;
    }
    .shape-btn:hover {
      background: #e5f0ff;
    }
	
	
	  /* ==== Mobile Unsupported Page (HP) ==== */
/* =======================
   Phone gate (HP) - full page
   ======================= */
html.vx-phone-locked,
body.vx-phone-locked{
  overflow: hidden !important;
}

.vx-mobile-unsupported{
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;

  z-index: 2147483647 !important;
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
  background: rgba(11,18,32,0.98);
}

.vx-mobile-unsupported-box{
  width: min(520px, 100%);
  background: #ffffff;
  color: #0b1220;
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}

.vx-mobile-title{
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.vx-mobile-sub{
  font-size: 14px;
  color: #334155;
  line-height: 1.45;
  margin-bottom: 14px;
}

.vx-devices{
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 14px 0 16px;
}

.vx-device{
  width: 96px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  text-align: center;
  position: relative;
  color: #0f172a;
}

.vx-device svg{
  width: 34px;
  height: 34px;
}

.vx-device-label{
  font-size: 12px;
  margin-top: 6px;
  color: #334155;
  font-weight: 700;
}

.vx-device.active{
  border-color: rgba(16,185,129,0.55);
  background: rgba(16,185,129,0.10);
}

.vx-device.active .vx-device-label{
  color: #065f46;
}

.vx-device.soon .vx-device-arrow{
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 16px;
  color: #ef4444;
  font-weight: 900;
}

.vx-mobile-back{
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
}

@media (max-width: 420px){
  .vx-devices{ gap: 10px; }
  .vx-device{ width: 92px; }
}

  
/* === Editor: Sidebar kanan - layout modern & compact === */

.editor-sidebar-right .panel {
  padding: 8px 10px 14px;
}
/* === STEP 3: Right sidebar background match + tab controls === */
body.editor-layout .editor-sidebar-right{
  background: linear-gradient(180deg, #20242a, #1d2026);
  border-left: 1px solid rgba(255,255,255,0.06);
  padding: 10px;
  overflow: hidden; /* biar tidak double scroll */
}

body.editor-layout .editor-sidebar-right .editor-sidebar-inner{
  height: 100%;
  min-height: 0;
}

/* panel kanan: scroll ada di panel (bukan di aside) */
body.editor-layout .editor-sidebar-right .panel.panel-right{
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  background: transparent; /* biar background sidebar terlihat, section tetap punya card sendiri */
}

/* Tabs ala “Inkscape” (segmented) */
body.editor-layout .editor-sidebar-right .vx-tabs{
  display:flex;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}

body.editor-layout .editor-sidebar-right .vx-tab{
  flex:1;
  border: 0;
  padding: 7px 10px;
  background: transparent;
  color: #a6a8b2;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 6px;
}

body.editor-layout .editor-sidebar-right .vx-tab + .vx-tab{
  border-left: 1px solid rgba(255,255,255,0.10);
}

body.editor-layout .editor-sidebar-right .vx-tab.is-active{
  background: #2a2c31;
  color: #e9e9f1;
  box-shadow: inset 0 -2px 0 rgba(108,92,231,0.55);
}

/* Select lama disembunyikan (tetap ada utk kompatibilitas JS) */
body.editor-layout .vx-hidden-select{
  display:none !important;
}
/* Kartu per bagian (prop-section) */
.editor-sidebar-right .prop-section {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: radial-gradient(
    circle at top left,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.88)
  );
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.editor-sidebar-right .prop-section.compact {
  padding: 6px 10px;
}

/* Judul tiap section (Teks & Font, Warna & Gradient, dll) */
.editor-sidebar-right .prop-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.editor-sidebar-right .prop-section-title::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(to bottom, #6366f1, #22c55e);
}

/* Baris label + value (misal: Jenis = Teks) */
.editor-sidebar-right .prop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.editor-sidebar-right .prop-row .prop-label {
  font-size: 12px;
  color: var(--text-muted);
}

.editor-sidebar-right .prop-row .prop-value {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.6);
  max-width: 55%;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Input & select di sidebar kanan (biar seragam & rapi) */
.editor-sidebar-right .prop-group textarea,
.editor-sidebar-right .prop-group select,
.editor-sidebar-right .prop-group input[type="number"],
.editor-sidebar-right .prop-group input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-main);
  font-size: 12px;
  padding: 5px 8px;
}

/* Input warna (color picker) */
.editor-sidebar-right .prop-group input[type="color"] {
  width: 48px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: transparent;
}

/* Row slider: range + angka di kanan (sebaris) */
.editor-sidebar-right .slider-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-sidebar-right .slider-row input[type="range"] {
  flex: 1;
}

/* Baris ukuran canvas: lebar × tinggi + tombol */
.editor-sidebar-right .canvas-size-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* dua input canvasWidthInput & canvasHeightInput akan fleksibel (lebih lebar) */
.editor-sidebar-right .canvas-size-input {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-main);
  font-size: 12px;
  padding: 4px 6px;
}

/* Tombol toggle (mode warna, align, group, layer, dll) */
.editor-sidebar-right .align-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.editor-sidebar-right .btn-toggle {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  font-size: 11px;
  padding: 3px 10px;
  line-height: 1.4;
  cursor: pointer;
  min-height: 24px;
  white-space: nowrap;
}

/* JELASIN yang aktif: btn-toggle.is-active */
.editor-sidebar-right .btn-toggle.is-active {
  border-color: #6366f1;
  background: radial-gradient(
    circle at top,
    rgba(99, 102, 241, 0.95),
    rgba(56, 189, 248, 0.85)
  );
  color: #0b1120;
  font-weight: 600;
}

/* Untuk section kecil seperti Status & Hapus Objek */
.editor-sidebar-right .prop-section.compact .panel-text {
  margin-bottom: 4px;
}

/* Checkbox lebih rapih */
.editor-sidebar-right .prop-group input[type="checkbox"] {
  margin-right: 6px;
}

/* Textarea konten teks */
.editor-sidebar-right #propTextContent {
  min-height: 64px;
  resize: vertical;
}
/* judul section bisa diklik untuk collapse/expand */
.editor-sidebar-right .prop-section-title {
  cursor: pointer;
}

/* icon panah di kanan judul */
.editor-sidebar-right .prop-section-title::after {
  content: "▾";
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.18s ease;
}

/* wrapper isi section (akan kita buat dari JS) */
.editor-sidebar-right .prop-section-body {
  margin-top: 4px;
}

/* kalau section dikasih class .collapsed → isi disembunyikan */
.editor-sidebar-right .prop-section.collapsed .prop-section-body {
  display: none;
}

/* dan icon panah diputar */
.editor-sidebar-right .prop-section.collapsed .prop-section-title::after {
  transform: rotate(-90deg);
}

/* === RULER (PENGGARIS) DI SEKITAR CANVAS === */

.canvas-ruler-shell {
  display: inline-block;
  margin-top: 6px;
}

.canvas-ruler-row,
.canvas-ruler-main {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: stretch;
}

.canvas-ruler-main {
  margin-top: 0;
}

.canvas-ruler-corner {
  background: radial-gradient(circle at top left, #020617, #020617);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  border-right: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-ruler-origin {
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 10px;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
}

.btn-ruler-origin:hover {
  background: rgba(59, 130, 246, 0.95);
  border-color: rgba(59, 130, 246, 1);
  color: #0b1120;
}

.ruler-horizontal,
.ruler-vertical {
  position: relative;
  background: #020617;
  color: #9ca3af;
  font-size: 10px;
  user-select: none;
  overflow: hidden;
}

.ruler-horizontal {
  height: 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.ruler-vertical {
  width: 32px;
  border-right: 1px solid rgba(148, 163, 184, 0.35);
}

/* Tick kecil & besar */
.ruler-tick {
  position: absolute;
  background: rgba(148, 163, 184, 0.5);
  pointer-events: none;
}

.ruler-tick-h {
  /* tick vertikal di ruler atas */
  width: 1px;
  bottom: 0;
  height: 6px;
}

.ruler-tick-h.ruler-tick-major {
  height: 10px;
}

.ruler-tick-v {
  /* tick horizontal di ruler kiri */
  height: 1px;
  right: 0;
  width: 6px;
}

.ruler-tick-v.ruler-tick-major {
  width: 10px;
}

.ruler-label {
  position: absolute;
  font-size: 10px;
  line-height: 1;
  color: #9ca3af;
  pointer-events: none;
  white-space: nowrap;
}

.ruler-label-h {
  top: 2px;
}

.ruler-label-v {
  left: 4px;
}

/* Pastikan canvasInner jadi kontainer posisi */
#canvasInner {
  position: relative;
}

/* Overlay grid & crosshair tidak mengganggu klik */
#canvasGridOverlay {
  position: absolute;
  inset: 0;              /* top:0; right:0; bottom:0; left:0 */
  pointer-events: none;
  z-index: 2;            /* di atas canvas */
}

/* Crosshair */
#crosshairVertical,
#crosshairHorizontal {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  display: none;
}

#crosshairVertical {
  width: 1px;
  top: 0;
  bottom: 0;
  background: rgba(96, 165, 250, 0.95);
}

#crosshairHorizontal {
  height: 1px;
  left: 0;
  right: 0;
  background: rgba(96, 165, 250, 0.95);
}

/* Indikator origin ruler (titik 0,0) */
#rulerOriginMarker {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.95);
  background: radial-gradient(circle, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.8));
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
  pointer-events: none;
  z-index: 3;
  transform: translate(-50%, -50%);
  display: none;
}

/* tanda + di tengah lingkaran origin */
#rulerOriginMarker::before,
#rulerOriginMarker::after {
  content: "";
  position: absolute;
  background: rgba(96, 165, 250, 0.98);
  border-radius: 999px;
}

#rulerOriginMarker::before {
  width: 1px;
  height: 8px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#rulerOriginMarker::after {
  width: 8px;
  height: 1px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Tooltip besar untuk tombol sidebar editor */
[data-tooltip] {
  position: relative;
}

/* Bubble tooltip */
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(8px, -50%);
  opacity: 0;
  pointer-events: none;
  white-space: normal;

  width: 260px;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: 10px;

  background: rgba(15, 23, 42, 0.96);   /* gelap elegan */
  color: #f9fafb;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.45);
  z-index: 999;

  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* Segitiga kecil di samping bubble */
[data-tooltip]::before {
  content: "";
  position: absolute;
  left: calc(100% - 2px);
  top: 50%;
  transform: translateY(-50%);
  border-width: 7px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(15, 23, 42, 0.96);
  opacity: 0;
  z-index: 1000;
  transition: opacity 0.15s ease;
}

/* Saat di-hover, tooltip muncul */
[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
  opacity: 1;
}

/* Sedikit geser saat muncul supaya terasa halus */
[data-tooltip]:hover::after {
  transform: translate(12px, -50%);
}

/* Sidebar compact: scroll VERTIKAL, horizontal disembunyikan */
.editor-sidebar-inner.tools-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 4px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;     /* scroll ke bawah */
  overflow-x: hidden;   /* kalau ada overflow horizontal, jangan muncul scroll */
  box-sizing: border-box;
  border-right: 1px solid rgba(148, 163, 184, 0.4);
}
/* ===== Tool Groups + Submenu (polish, smooth, glass) ===== */
.vx-toolgroups{ position: relative; }

.vx-tool-sep{
  width: 76%;
  height: 1px;
  margin: 10px auto;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
}

.vx-group-btn{
  position: relative;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}

/* indikator kecil “punya submenu” */
.vx-group-btn::after{
  content:"";
  position:absolute;
  right: 10px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(255,255,255,0.45);
  border-bottom: 2px solid rgba(255,255,255,0.45);
  transform: rotate(-45deg);
  opacity: .55;
  transition: transform .16s ease, opacity .16s ease;
}

.vx-group-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(2,6,23,0.18);
}

.vx-group-btn.is-open{
  background: rgba(16,185,129,0.16);
  border-color: rgba(16,185,129,0.26);
  box-shadow: 0 14px 34px rgba(2,6,23,0.28);
}

.vx-group-btn.is-open::after{
  transform: rotate(45deg);
  opacity: .95;
}

/* SUBMENU: jangan pakai display none biar animasi halus */
.vx-tool-submenu{
  position: fixed;
  left: 0;
  top: 0;

  width: 270px;
  max-height: min(72vh, 560px);
  overflow: auto;

  padding: 10px;
  border-radius: 16px;

  background: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 22px 90px rgba(2,6,23,0.55);
  backdrop-filter: blur(16px) saturate(1.25);

  z-index: 99999;

  opacity: 0;
  transform: translateX(-10px) scale(0.98);
  transform-origin: left top;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity .16s ease,
    transform .16s ease,
    visibility 0s linear .16s;
}

.vx-tool-submenu.open{
  opacity: 1;
  transform: translateX(0) scale(1);
  visibility: visible;
  pointer-events: auto;

  transition:
    opacity .16s ease,
    transform .16s ease,
    visibility 0s;
}

/* header kecil di atas submenu */
.vx-tool-submenu::before{
  content: attr(data-title);
  display: block;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .2px;
  color: rgba(255,255,255,0.88);
  padding: 8px 10px 10px;
  margin: -2px 0 8px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

/* item submenu jadi row modern */
.vx-tool-submenu .tool-icon-btn{
  width: 100%;
  max-width: none;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;

  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  margin: 0 0 7px 0;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);

  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.vx-tool-submenu .tool-icon-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
}

.vx-tool-submenu .tool-icon svg{
  width: 18px;
  height: 18px;
  display: block;
}

.vx-tool-submenu .tool-label{
  font-size: 12px;
  letter-spacing: 0;
  opacity: .95;
}

/* Sidebar kiri jangan ng-clip keluaran lain */
.editor-sidebar-left {
  width: 100%;
  overflow: visible;
}

.tool-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;

  width: 100%;
  max-width: 35px;   /* aman di kolom 80px */
  min-width: 0;      /* ⬅️ PENTING: override min-width dari .btn-ghost.full */

  padding: 6px 0;
  margin: 0 auto;

  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: #FFF;
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
  margin-bottom: 10px;
}

.tool-icon-btn .tool-icon {
  font-size: 15px;
  line-height: 1;
}

.tool-icon-btn .tool-label {
  display: block;
  font-size: 11px;
}

/* State aktif (kalau JS-mu pakai .is-active tinggal ikut) */
.tool-icon-btn.is-active {
  background: rgba(59, 130, 246, 0.1); /* biru muda */
  border-color: rgba(59, 130, 246, 0.6);
}

/* Matikan tooltip lama (pseudo-element) hanya di dalam editor */
.editor-shell [data-tooltip]::before,
.editor-shell [data-tooltip]::after {
  display: none !important;
  content: none !important;
}

/* Tooltip global editor */
#editorTooltip {
  position: fixed;
  max-width: 260px;
  z-index: 9999;
  pointer-events: none;

  background: #0f172a;
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.3;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.45);

  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

#editorTooltip.show {
  opacity: 1;
  transform: translateY(0);
}

/* Baris tools di bawah header */
.editor-tools-row {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f3f4f6; /* abu terang */
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Tombol icon tools */
.editor-tools-row .tool-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;

  min-width: 56px;
  padding: 6px 4px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;

  background: transparent;
}

/* Icon besar di atas */
.editor-tools-row .tool-icon-btn .tool-icon {
  font-size: 20px;
  line-height: 1;
}

/* Label di bawah icon */
.editor-tools-row .tool-icon-btn .tool-label {
  font-size: 10px;
}

/* State aktif (kalau JS kasih .is-active) */
.editor-tools-row .tool-icon-btn.is-active {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.7);
}

/* Tooltip ke BAWAH */
.editor-tools-row .tool-icon-btn {
  position: relative;
}

.editor-tools-row .tool-icon-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: 100%;         /* di bawah tombol */
  transform: translate(-50%, 8px);
  max-width: 260px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
  white-space: normal;
  text-align: left;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.45);
  z-index: 999;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.editor-tools-row .tool-icon-btn:hover::after {
  opacity: 1;
  transform: translate(-50%, 4px);
}

/* === Publish Modal: layout & form === */

/* Biar modal publish ukurannya pas */
#modalPublishDesign .editor-modal {
  max-width: 720px;
  width: 100%;
}

/* Header modal */
#modalPublishDesign .editor-modal-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#modalPublishDesign .editor-modal-title {
  font-size: 1rem;
  font-weight: 600;
}

/* Body & footer */
#modalPublishDesign .editor-modal-body {
  padding: 16px;
  max-height: 70vh;
  overflow-y: auto;
}

#modalPublishDesign .editor-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Grup form */
#modalPublishDesign .form-group {
  margin-bottom: 12px;
}

#modalPublishDesign .form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #FFF;
}

/* Input/select textarea ala editor-input */
#modalPublishDesign .form-control {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 0.875rem;
  background-color: #ffffff;
}

#modalPublishDesign .form-control:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

/* Radio inline */
#modalPublishDesign .form-inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

#modalPublishDesign .radio-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Help text & estimasi */
#modalPublishDesign .form-text.text-muted {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #6b7280;
}

#modalPublishDesign .text-strong {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Alert info */
#modalPublishDesign .alert {
  border-radius: 8px;
  padding: 10px 12px;
}

#modalPublishDesign .alert-info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.publish-pricing-group {
  display: none;
}
  /* ==== Kolaborasi Desain ==== */
  .collab-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #9ca3af;
  }

  .collab-plan {
    font-weight: 600;
    color: #e5e7eb;
  }

  .collab-limit {
    font-size: 12px;
  }

  .collab-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
  }

  .collab-alert {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    margin-top: 4px;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(248,113,113,0.8);
    color: #fecaca;
  }

  .collab-alert.success {
    background: rgba(22,163,74,0.12);
    border-color: rgba(34,197,94,0.8);
    color: #bbf7d0;
  }

  .collab-list-wrapper {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(148,163,184,0.35);
  }

  .collab-subtitle {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
  }

  .collab-empty {
    font-size: 12px;
    color: #9ca3af;
  }
  
  /* === Kolaborasi Desain: Layout Modal & List === */

.collab-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 12px;
  font-size: 12px;
}

.collab-plan {
  color: #e5e7eb;
  font-weight: 500;
}

.collab-limit {
  color: #9ca3af;
}

.collab-list-wrapper {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
}

.collab-subtitle {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #e5e7eb;
}

.collab-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.collab-empty {
  font-size: 12px;
  color: #9ca3af;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.75);
  text-align: center;
}

/* Item kolaborator */

.collab-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.collab-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.collab-name {
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
}

.collab-email {
  font-size: 11px;
  color: #9ca3af;
  word-break: break-all;
}

.collab-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin-top: 2px;
}

.collab-role {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.9);
}

.collab-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.collab-badge-default {
  background: #4b5563;
  color: #f9fafb;
  border: 1px solid #6b7280;
}

.collab-badge-pending {
  background: #f59e0b;
  color: #111827;
  border: 1px solid #fbbf24;
}

.collab-badge-accepted {
  background: #16a34a;
  color: #f9fafb;
  border: 1px solid #22c55e;
}

.collab-badge-removed {
  background: #dc2626;
  color: #f9fafb;
  border: 1px solid #fca5a5;
}

.collab-date {
  color: #9ca3af;
}

/* Pesan undangan */

.collab-item-message {
  margin-top: 4px;
  font-size: 12px;
  color: #d1d5db;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.85);
}

/* Tombol aksi kecil (hapus / cabut akses) */

.collab-item-actions {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}

.btn-xsmall {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.8);
  background: rgba(127, 29, 29, 0.9);
  color: #fee2e2;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-xsmall:hover {
  background: rgba(185, 28, 28, 1);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.3);
}

.btn-xsmall:active {
  transform: scale(0.97);
}

        /* FLOATING WHATSAPP BUTTON */
        .contactwa {
            position: fixed;
            bottom: 16px;
            right: 16px;
            cursor: pointer;
            z-index: 1001;
        }

        .contactwa .inner {
            background: #0434a7;
            color: #e5e7eb;
            border-radius: 999px;
            padding: 8px 14px;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 18px 40px rgba(15, 23, 42, 0.6);
            font-size: 0.86rem;
            font-weight: 500;
        }

        .contactwa .iconwa {
            width: 30px;
            height: 30px;
            border-radius: 999px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(248, 250, 252, 0.1);
        }

        .contactwa .iconwa i {
            font-size: 1.1rem;
            color: #22c55e;
        }

        /* WHATSAPP MODAL */
        .formWaBox {
            position: fixed;
            inset: 0;
            z-index: 1050;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(15, 23, 42, 0.65);
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s ease, visibility 0.2s ease;
        }

        .formWaBox.open {
            opacity: 1;
            visibility: visible;
        }

        .formWa {
            background: #ffffff;
            border-radius: 18px;
            width: calc(100% - 32px);
            max-width: 480px;
            position: relative;
            padding-top: 56px;
            box-shadow: 0 18px 45px rgba(15, 23, 42, 0.6);
        }

        .formWaBody {
            max-height: 80vh;
            overflow-y: auto;
        }

        .formWaBody .heading {
            position: absolute;
            inset: 0 0 auto 0;
            height: 56px;
            padding: 10px 18px;
            display: flex;
            align-items: center;
            gap: 10px;
            border-radius: 18px 18px 0 0;
            background: #00257b;
            color: #e5e7eb;
        }

        .formWaBody .heading i.fa-whatsapp {
            font-size: 1.6rem;
            color: #22c55e;
        }

        .formWaBody .heading h3 {
            margin: 0;
            font-size: 1rem;
            font-weight: 500;
        }

        .formWaBody .heading .close {
            margin-left: auto;
            cursor: pointer;
            font-size: 1.5rem;
            line-height: 1;
            color: #9ca3af;
        }

        .formWaBody .heading .close:hover {
            color: #f97316;
        }

        .formWaBody .form {
            padding: 20px 20px 20px;
            font-size: 0.9rem;
        }

        .formWaBody .input {
            position: relative;
            margin-bottom: 14px;
        }

        .formWaBody .input i.fa-user {
            position: absolute;
            top: 10px;
            left: 10px;
            color: #9ca3af;
        }

        .formWaBody .input input[type="text"],
        .formWaBody .input textarea {
            width: 100%;
            border-radius: 10px;
            border: 1px solid #e5e7eb;
            padding: 9px 12px 9px 32px;
            font-size: 0.9rem;
            outline: none;
        }

        .formWaBody .input textarea {
            min-height: 90px;
            padding-left: 12px;
        }

        .formWaBody .input input:focus,
        .formWaBody .input textarea:focus {
            border-color: var(--vibri-primary);
            box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
        }

        .formWaBody button[type="submit"] {
            width: 100%;
            border-radius: 999px;
            border: none;
            padding: 10px 16px;
            background: #0f172a;
            color: #e5e7eb;
            font-weight: 600;
            font-size: 0.92rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .formWaBody button[type="submit"] i {
            font-size: 1rem;
        }

        .formWaBody button[type="submit"]:hover {
            background: #1f2937;
        }
.btn-ghost.is-loading {
  position: relative;
  opacity: 0.7;
  cursor: wait;
}

.btn-ghost.is-loading::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.7);
  border-top-color: transparent;
  transform: translateY(-50%);
  animation: btn-spin 0.7s linear infinite;
}

@keyframes btn-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* ====== PANEL LAYER (gaya Photoshop) ====== */

.layer-list {
  margin-top: 4px;
  border-radius: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 2px 0;
  font-size: 11px;
}

/* scrollbar tipis */
.layer-list::-webkit-scrollbar {
  width: 6px;
}
.layer-list::-webkit-scrollbar-track {
  background: transparent;
}
.layer-list::-webkit-scrollbar-thumb {
  background: #c5cadb;
  border-radius: 3px;
}

/* satu baris layer */
.layer-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 3px;
  cursor: pointer;
  user-select: none;
}

/* baris aktif (objek yang sedang terseleksi) */
.layer-item.is-active {
  background: rgba(74, 51, 51, 0.9);
  border-left: 2px solid #ff4f4f;
  padding-left: 4px;
}

.layer-item:hover:not(.is-active) {
  background: rgba(108, 108, 108, 0.9);
}

/* tombol mata & delete */
.layer-eye {
  border: none;
  background: transparent;
  padding: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  color: #B7B7B7;
}
.layer-delete {
  border: none;
  background: transparent;
  padding: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  color: #F00;
}

.layer-eye:hover,
.layer-delete:hover {
  color: #111;
}

/* ikon tipe objek (T, 🖼, dll) */
.layer-icon {
  width: 16px;
  text-align: center;
  font-size: 11px;
  color: #FFF;
}

/* input nama layer */
.layer-name {
  flex: 1;
  border: none;
  background: transparent;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 11px;
  min-width: 0;
}

.layer-name:focus {
  outline: none;
  background: #ffffff;
  box-shadow: 0 0 0 1px #c0c7ff;
}
/* Saat sedang di-drag */
.layer-item.is-dragging {
  opacity: 0.6;
}

/* Indikator garis drop di atas item */
.layer-item.is-drop-before {
  box-shadow: 0 -2px 0 0 #4f6bff inset;
}

/* Indikator garis drop di bawah item */
.layer-item.is-drop-after {
  box-shadow: 0 2px 0 0 #4f6bff inset;
}

/* Layer yang "dipin" sementara di paling atas list */
.layer-item.is-sticky {
  position: sticky;
  top: 0;
  z-index: 2;
}



/* ========== icon Library Modal ========== */

/* wrapper modal */
.icon-modal {
  position: fixed;
  inset: 0;
  z-index: 1200; /* pastikan di atas header dan canvas */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* disembunyikan saat ada class .hidden */
.icon-modal.hidden {
  display: none !important;
}

/* backdrop gelap */
.icon-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

/* kotak dialog */
.icon-modal-dialog {
  position: relative;
  width: 90%;
  max-width: 960px;
  max-height: 80vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* header modal */
.icon-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.icon-modal-header .title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.icon-modal-header .title .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
}

.icon-modal-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}
.icon-modal-close:hover {
  background: #e5e7eb;
}

/* toolbar: filter + search */
.icon-modal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.icon-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.icon-filter {
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}
.icon-filter.active {
  background: #111827;
  color: #f9fafb;
  border-color: #111827;
}

.icon-search {
  margin-left: auto;
  width: 100%;
}
.icon-search input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 6px 10px;
  font-size: 12px;
}

/* body: grid icon */
.icon-modal-body {
  padding: 12px 16px 16px;
  flex: 1;
  overflow: auto;
  background: #f3f4f6;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.icon-card {
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
}
.icon-card:hover {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.icon-thumb {
  position: relative;
  padding-top: 100%;
  background: #e5e7eb;
  overflow: hidden;
}
.icon-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;        /* ⟵ seluruh gambar masuk (kepala–kaki) */
  object-position: top center;/* ⟵ mulai dari atas, turun ke bawah   */
  background-color: #e5e7eb;  /* abu-abu di area kosong kanan/kiri    */
}

.icon-name {
  padding: 4px 6px 6px;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* empty & load more */
.icon-empty {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

.icon-more {
  margin-top: 12px;
  text-align: center;
}
.icon-more button {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.icon-more button:hover {
  background: #f3f4f6;
}
.timeline-bar {
  position: relative;
  height: 6px;
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.timeline-playhead {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 12px;
  background: #0070f3;
  border-radius: 999px;
  transform: translateX(0);
}

.timeline-track {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.timeline-track-label {
  font-size: 11px;
  color: #666;
  min-width: 40px;
}

.timeline-track-body {
  position: relative;
  flex: 1;
  height: 8px;
  background: rgba(0,0,0,0.04);
  border-radius: 999px;
  overflow: hidden;
}

.timeline-clip-audio {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(0, 112, 243, 0.4);
  border-radius: 999px;
}
/* ===== Audio Library (list) ===== */
.audio-lib-upload { padding: 10px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.audio-lib-upload .row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.audio-lib-grid { padding: 10px; display:flex; flex-direction:column; gap:10px; }
.audio-item { border: 1px solid rgba(0,0,0,0.08); border-radius: 10px; padding: 10px; background:#fff; }
.audio-item .top { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.audio-item .name { font-weight:600; color:#0f172a; }
.audio-item .meta { font-size:12px; color: rgba(0,0,0,0.55); margin-top:3px; }
.audio-item .controls { display:flex; align-items:center; gap:8px; margin-top:8px; }
.audio-item .btn-mini { padding:6px 10px; border-radius:10px; border:1px solid rgba(0,0,0,0.08); background: #23d8e1;
  cursor: pointer;
  color: #fff; }
.audio-item .progress { flex:1; }
.audio-item .time { font-size:12px; color: rgba(0,0,0,0.55); min-width:72px; text-align:right; }


/* ===== Audio Library: toolbar + upload toggle ===== */
.asset-modal-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.asset-search.audio-search-row{
  display:flex;
  align-items:center;
  gap:8px;
}

.asset-search.audio-search-row input{
  width:280px;
  max-width:60vw;
}

/* upload box rapi */
.audio-lib-upload{
  padding:10px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  margin-bottom:10px;
  background:#fff;
}

.audio-upload-row{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.audio-upload-row .input.small{
  min-width:180px;
}

#audioLibUploadFile.input.small{
  min-width:240px;
}

@media (max-width: 640px){
  .asset-search.audio-search-row input{ width:100%; max-width:100%; }
  .audio-upload-row .input.small, #audioLibUploadFile.input.small{ min-width:100%; }
}
.spin{
  width:14px;height:14px;
  border:2px solid rgba(0,0,0,.2);
  border-top-color: rgba(0,0,0,.7);
  border-radius:50%;
  display:inline-block;
  vertical-align:-2px;
  margin-right:8px;
  animation:spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}


/* =========================================================
   Vx Editor UI Skin (Template) — CSS only, no emoji
   Scope: hanya aktif saat <body class="vx-editor">
   ========================================================= */

body.vx-editor{
  --bg: #1f2126;
  --bg2:#262a30;
  --panel:#2b3037;
  --panel2:#2f3540;
  --line:#3a404c;
  --line2:#424a58;
  --text:#e7eaf0;
  --muted:#aeb6c6;
  --muted2:#9099ab;
  --accent:#4aa3ff;
  --accent2:#2f81f7;
  --good:#4bd37b;
  --warn:#f6c756;
  --bad:#ff5f6a;
  --shadow: 0 10px 25px rgba(0,0,0,.25);
  --radius: 10px;
  --radius2: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

html, body{height:100%}
body.vx-editor{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow:hidden;
}

body.vx-editor *{box-sizing:border-box}

/* ===== Layout root (ikut template: .app) ===== */
body.vx-editor .app{
  height:100%;
  display:flex;
  flex-direction:column;
  min-width:980px;
}

/* ===== Topbar ===== */
body.vx-editor .topbar{
  background: linear-gradient(180deg, #1c1e23, #191b20);
  border-bottom: 1px solid #12141a;
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 10px;
  user-select:none;
}
body.vx-editor .app-title{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:240px;
  padding-right:10px;
  border-right:1px solid rgba(255,255,255,.06);
}
body.vx-editor .logo{
  width:22px;height:22px;
  display:grid;place-items:center;
  border-radius:6px;
  background: radial-gradient(circle at 30% 30%, #5fd0ff, #2f81f7);
  box-shadow: 0 8px 20px rgba(47,129,247,.25);
}
body.vx-editor .logo svg{width:14px;height:14px;fill:#fff}
body.vx-editor .app-title .name{font-weight:700;letter-spacing:.2px}
body.vx-editor .app-title .sub{color:var(--muted2);font-size:12px}

body.vx-editor .menubar{
  display:flex;
  gap:14px;
  color:var(--muted);
  font-size:13px;
  flex:1;
  overflow:hidden;
  white-space:nowrap;
}
body.vx-editor .menubar button{
  background:none;
  border:0;
  color:inherit;
  padding:6px 8px;
  border-radius:8px;
  cursor:pointer;
}
body.vx-editor .menubar button:hover{
  background: rgba(255,255,255,.06);
  color: var(--text);
}
body.vx-editor .window-actions{display:flex; gap:8px}
body.vx-editor .pill{
  width:12px;height:12px;border-radius:999px;
  background:#343843;
  border:1px solid rgba(255,255,255,.08);
}

/* ===== Toolbar ===== */
body.vx-editor .toolbar{
  background: linear-gradient(180deg, #21242a, #1e2026);
  border-bottom: 1px solid rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
}
body.vx-editor .toolgroup{
  display:flex;
  align-items:center;
  gap:6px;
  padding-right:10px;
  margin-right:8px;
  border-right:1px solid rgba(255,255,255,.06);
}
body.vx-editor .icon-btn{
  width:34px;height:34px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition:.12s ease;
}
body.vx-editor .icon-btn svg{width:18px;height:18px;fill:var(--text);opacity:.9}
body.vx-editor .icon-btn:hover{transform:translateY(-1px); background:rgba(255,255,255,.06)}
body.vx-editor .icon-btn:active{transform:translateY(0)}
body.vx-editor .icon-btn.active{
border-color: rgba(74,163,255,.45);
  background: rgba(74,163,255,.14);
  box-shadow: 0 0 0 3px rgba(74,163,255,.10);
}

body.vx-editor .field{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  min-width:140px;
}
body.vx-editor .field label{
  font-size:12px;
  color: var(--muted2);
  width:14px;
  text-align:center;
  font-family: var(--mono);
}
body.vx-editor .field input{
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size:12px;
}
body.vx-editor .field .unit{color:var(--muted2);font-size:12px}
body.vx-editor .toolbar-spacer{flex:1}

/* Segmented mode */
body.vx-editor .seg{
  display:flex;
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  overflow:hidden;
}
body.vx-editor .seg button{
  border:0;
  background:transparent;
  color: var(--muted);
  padding:8px 10px;
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
}
body.vx-editor .seg button svg{width:16px;height:16px;fill: var(--muted)}
body.vx-editor .seg button.active{background: rgba(255,255,255,.07); color: var(--text)}
body.vx-editor .seg button.active svg{fill: var(--text)}

/* ===== Workspace ===== */
body.vx-editor .work{flex:1; display:flex; min-height:0}

/* Left tools */
body.vx-editor .left-tools{
  width:58px;
  background: linear-gradient(180deg, #1d2026, #1b1d22);
  border-right: 1px solid rgba(255,255,255,.06);
  padding:8px;
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow:auto;
}

/* Stage */
body.vx-editor .stage{
  flex:1;
  min-width:0;
  background:
    radial-gradient(circle at 20% 20%, rgba(74,163,255,.08), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(246,199,86,.06), transparent 45%),
    #1b1e23;
  position:relative;
  overflow:hidden;
}
body.vx-editor .stage-inner{
  position:absolute;
  inset:14px 14px 54px 14px;
  background:#8f949c1a;
  border:1px solid rgba(255,255,255,.06);
  border-radius: var(--radius2);
  overflow:auto;
  padding:22px;
}
body.vx-editor .paper{
  width:794px;
  height:1123px;
  margin:0 auto;
  background:#fff;
  border-radius:6px;
  box-shadow: var(--shadow);
  position:relative;
}
body.vx-editor canvas#editorCanvas{
  width:100%;
  height:100%;
  display:block;
  border-radius:6px;
}

/* Zoom bar */
body.vx-editor .zoombar{
  position:absolute;
  left:14px;
  bottom:14px;
  display:flex;
  gap:10px;
  align-items:center;
  padding:8px 10px;
  background: rgba(30,32,38,.8);
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  backdrop-filter: blur(8px);
}
body.vx-editor .zoombar .txt{font-size:12px;color: var(--muted)}
body.vx-editor .zoombar .mini{
  width:30px;height:30px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  display:grid;
  place-items:center;
  cursor:pointer;
}
body.vx-editor .zoombar .mini svg{width:16px;height:16px;fill: var(--text);opacity:.85}

/* Right sidebar */
body.vx-editor .sidebar{
  width:330px;
  background: linear-gradient(180deg, #20242a, #1d2026);
  border-left: 1px solid rgba(255,255,255,.06);
  display:flex;
  flex-direction:column;
  min-height:0;
}
body.vx-editor .side-tabs{
  display:flex;
  gap:6px;
  padding:10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
body.vx-editor .tab{
  flex:1;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  padding:8px 10px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:13px;
  user-select:none;
}
body.vx-editor .tab svg{width:16px;height:16px;fill: var(--muted)}
body.vx-editor .tab.active{
  background: rgba(74,163,255,.14);
  border-color: rgba(74,163,255,.45);
  color: var(--text);
}
body.vx-editor .tab.active svg{fill: var(--text)}

body.vx-editor .side-subtabs{
  display:flex;
  gap:6px;
  padding:0 10px 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
body.vx-editor .subtab{
  flex:1;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  color: var(--muted2);
  padding:7px 8px;
  cursor:pointer;
  font-size:12px;
  text-align:center;
  user-select:none;
}
body.vx-editor .subtab.active{
  background: rgba(255,255,255,.07);
  color: var(--text);
  border-color: rgba(255,255,255,.12);
}

body.vx-editor .panel{padding:12px 10px; overflow:auto; min-height:0}
body.vx-editor .card{
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:12px;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
}
body.vx-editor .card + .card{margin-top:10px}
body.vx-editor .card h3{
  margin:0 0 10px 0;
  font-size:13px;
  color: var(--text);
  display:flex;
  align-items:center;
  gap:8px;
}
body.vx-editor .card h3 svg{width:16px;height:16px;fill: var(--muted)}
body.vx-editor .grid2{display:grid; grid-template-columns:1fr 1fr; gap:10px}
body.vx-editor .f{display:flex; flex-direction:column; gap:6px}
body.vx-editor .f span{font-size:12px; color: var(--muted2)}
body.vx-editor .f input,
body.vx-editor .f select{
  height:34px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding:0 10px;
  outline:0;
  font-family: var(--mono);
  font-size:12px;
}
body.vx-editor .row{display:flex; gap:10px; align-items:center}
body.vx-editor .btn{
  height:38px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding:0 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  cursor:pointer;
  font-weight:600;
}
body.vx-editor .btn svg{width:18px;height:18px;fill: var(--text);opacity:.9}
body.vx-editor .btn.primary{
  background: linear-gradient(180deg, rgba(74,163,255,.25), rgba(47,129,247,.18));
  border-color: rgba(74,163,255,.45);
  box-shadow: 0 0 0 3px rgba(74,163,255,.10);
}
body.vx-editor .btn.small{height:34px;border-radius:10px;font-weight:600}
body.vx-editor .hint{font-size:12px;color: var(--muted2);line-height:1.4}

/* Bottom bar */
body.vx-editor .bottombar{
  height:54px;
  background: linear-gradient(180deg, #1e2026, #1a1c21);
  border-top: 1px solid rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  gap:10px;
  padding:6px 10px;
}
body.vx-editor .status{
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--muted2);
  font-size:12px;
  min-width:280px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
body.vx-editor .status .badge{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: var(--muted);
}
body.vx-editor .palette{
  flex:1;
  display:flex;
  align-items:center;
  gap:4px;
  overflow:auto;
  padding:6px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
}
body.vx-editor .sw{
  width:18px;height:18px;border-radius:4px;
  border:1px solid rgba(0,0,0,.25);
  flex:0 0 auto;
  cursor:pointer;
}
body.vx-editor .coord{
  min-width:240px;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  color: var(--muted2);
  font-family: var(--mono);
  font-size:12px;
}
body.vx-editor .coord .kv{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}

/* Scrollbar */
body.vx-editor ::-webkit-scrollbar{height:10px;width:10px}
body.vx-editor ::-webkit-scrollbar-thumb{background:#3a404c;border-radius:999px}
body.vx-editor ::-webkit-scrollbar-track{background:transparent}


/* ============================
   Editor UI — Template Skin
   ============================ */
/* ===== Editor Layout (fix scroll + timeline) ===== */
body.editor-layout{
  background:#15161a;
  color:#e9e9f1;
  overflow:hidden;
  height:100vh;
}

/* shell full tinggi layar */
body.editor-layout .app-shell{
  height:100vh;
  min-height:0;
}

/* app-body jadi 2 baris: topbar + area kerja */
body.editor-layout .app-body{
  height:100vh;
  min-height:0;
  grid-template-rows: auto 1fr;
}

/* penempatan grid (topbar span full, area kerja di row 2) */
body.editor-layout .app-topbar{ grid-column: 1 / -1; }
body.editor-layout .app-sidebar,
body.editor-layout .app-main{
  grid-row: 2;
  min-height:0;
}

/* main jadi flex kolom, tapi scroll dikasih di child (bukan body) */
body.editor-layout .app-main{
  display:flex;
  flex-direction:column;
  min-height:0;
  height:auto;         /* penting: jangan 100vh di sini */
  overflow:hidden;     /* tetap lock, scroll ada di dalam */
}

/* matikan widget WA */
body.editor-layout .contactwa,
body.editor-layout #helpViaWa{ display:none !important; }

/* ===== Scroll internal untuk editor ===== */
body.editor-layout .editor-shell{
  flex:1 1 auto;
  min-height:0;
  height:100%;
  overflow:hidden; /* grid 3 kolom tetap, tapi tiap kolom bisa scroll sendiri */
}

body.editor-layout .editor-sidebar-left,
body.editor-layout .editor-sidebar-right{
  min-height:0;
  height:100%;
  overflow:auto;
}

body.editor-layout .editor-canvas-wrap{
  min-height:0;
  height:100%;
  overflow:auto;              /* ini yang bikin timeline di bawah bisa dicapai */
  overscroll-behavior: contain;
}

/* icons (sprite) */
body.editor-layout .ic,
body.editor-layout .tool-icon {
  width:18px; height:18px;
  flex:none;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* header */
body.editor-layout .editor-header {
  flex:0 0 auto;
  padding:12px 14px;
  background:#1f2126;
  border-bottom:1px solid rgba(255,255,255,.08);
}
body.editor-layout .vx-topbar {
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
}
body.editor-layout .vx-left { display:flex; align-items:center; gap:12px; }
body.editor-layout .vx-title { display:flex; flex-direction:column; line-height:1.1; }
body.editor-layout .vx-title-main { font-weight:800; font-size:14px; }
body.editor-layout .vx-title-sub { font-size:12px; color:#a6a8b2; }

body.editor-layout .vx-menubar { display:flex; align-items:center; gap:10px; }
body.editor-layout .vx-menu-btn {
  background:transparent; border:0; cursor:pointer;
  color:#a6a8b2; font-size:13px;
  padding:6px 10px; border-radius:10px;
}
body.editor-layout .vx-menu-btn:hover {
  background:rgba(255,255,255,.06); color:#e9e9f1;
}

body.editor-layout .vx-window-actions { display:flex; align-items:center; gap:8px; }
body.editor-layout .vx-window-actions .vx-dot { width:12px; height:12px; border-radius:999px; background:rgba(255,255,255,.18); }
body.editor-layout .vx-window-actions .vx-dot.red { background:#ff5f57; }
body.editor-layout .vx-window-actions .vx-dot.yellow { background:#febc2e; }
body.editor-layout .vx-window-actions .vx-dot.green { background:#28c840; }
/* ===== Window actions (3 dot buttons) ===== */
.vx-window-actions{
  display: flex;
  align-items: center;
  gap: 8px;
}

.vx-window-actions .vx-dot-btn{
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  color: rgba(0,0,0,.78);
}

.vx-window-actions .vx-dot-btn.red{ background:#ff5f57; }
.vx-window-actions .vx-dot-btn.yellow{ background:#ffbd2e; }
.vx-window-actions .vx-dot-btn.green{ background:#28c840; }

.vx-window-actions .vx-dot-btn .vx-dot-ic{
  width: 13px;
  height: 13px;
  display: block;
  opacity: .92;
}

.vx-window-actions .vx-dot-btn:focus-visible{
  outline: 2px solid rgba(255,255,255,.65);
  outline-offset: 2px;
}
/* toolbar row */
body.editor-layout .vx-toolbar {
  margin-top:10px;
  display:flex; align-items:center; gap:10px;
  flex-wrap:wrap;
  background:#2a2c31;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:8px;
}
body.editor-layout .vx-toolgroup { display:flex; align-items:center; gap:8px; }
body.editor-layout .vx-divider { width:1px; height:28px; background:rgba(255,255,255,.10); margin:0 4px; }
body.editor-layout .vx-spacer { flex:1 1 auto; }

body.editor-layout .vx-btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  color:#e9e9f1;
  cursor:pointer;
  font-size:13px;
}
body.editor-layout .vx-btn:hover { background:rgba(0,0,0,.28); }
body.editor-layout .vx-btn:active { transform:translateY(1px); }
body.editor-layout .vx-btn.vx-icon-only { padding:8px; width:38px; justify-content:center; }
body.editor-layout .vx-btn.vx-primary {
  border-color:transparent;
  background:linear-gradient(90deg,#6C5CE7,#00E5FF);
  color:#fff;
}
body.editor-layout .vx-btn.vx-primary:hover { filter:brightness(1.04); }

body.editor-layout .vx-zoom-badge {
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  color:#e9e9f1;
}
body.editor-layout .vx-zoom-group #zoomSlider { width:160px; accent-color:#6C5CE7; }

/* make editor content fill remaining */
body.editor-layout .editor-shell {
  flex:1 1 auto;
  height:auto !important;
  min-height:0;
}

/* left tools: icon-only */
body.editor-layout .editor-leftbar {
  background:#1f2126;
  border-right:1px solid rgba(255,255,255,.08);
}
/* ===============================
   Editor: Right Properties Panel
   (samakan dengan header & kiri)
================================ */
body.editor-layout .editor-sidebar-right,
main.app-main.editor-main .editor-sidebar-right{
  background:#1f2126;
  border-left:1px solid rgba(255,255,255,.08);
  box-shadow:-14px 0 30px rgba(0,0,0,.35);
}

/* wrapper panel kanan */
body.editor-layout .editor-sidebar-right .panel,
main.app-main.editor-main .editor-sidebar-right .panel{
  background:transparent;
  padding:5px 4px 10px;
}

/* judul panel */
body.editor-layout .editor-sidebar-right .panel-title,
main.app-main.editor-main .editor-sidebar-right .panel-title{
  color:#e9e9f1;
  font-weight:800;
  font-size:13px;
  letter-spacing:.02em;
  margin:4px 6px 10px;
}

/* kartu/section di panel kanan */
body.editor-layout .editor-sidebar-right .prop-section,
main.app-main.editor-main .editor-sidebar-right .prop-section{
  background:#2a2c31;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 10px 25px rgba(0,0,0,.22);
}

/* header section */
body.editor-layout .editor-sidebar-right .prop-section-title,
main.app-main.editor-main .editor-sidebar-right .prop-section-title{
  color:#e9e9f1;
}

/* label/value */
body.editor-layout .editor-sidebar-right .prop-row .prop-label,
main.app-main.editor-main .editor-sidebar-right .prop-row .prop-label{
  color:#a6a8b2;
}

body.editor-layout .editor-sidebar-right .prop-row .prop-value,
main.app-main.editor-main .editor-sidebar-right .prop-row .prop-value{
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.10);
  color:#e9e9f1;
}

/* input di panel kanan */
body.editor-layout .editor-sidebar-right input[type="text"],
body.editor-layout .editor-sidebar-right input[type="number"],
body.editor-layout .editor-sidebar-right textarea,
body.editor-layout .editor-sidebar-right select,
main.app-main.editor-main .editor-sidebar-right input[type="text"],
main.app-main.editor-main .editor-sidebar-right input[type="number"],
main.app-main.editor-main .editor-sidebar-right textarea,
main.app-main.editor-main .editor-sidebar-right select{
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.10);
  color:#e9e9f1;
}

/* =========================================
   TAB STYLE (seperti Inkscape) untuk pilihan
   aktif jika container diberi class: is-tabs
========================================= */
body.editor-layout .editor-sidebar-right .align-buttons.is-tabs,
main.app-main.editor-main .editor-sidebar-right .align-buttons.is-tabs{
  display:flex;
  flex-wrap:nowrap;
  gap:0;
  padding:3px;
  border-radius:12px;
  background:#1b1d22;
  border:1px solid rgba(255,255,255,.10);
  overflow:hidden;
}

body.editor-layout .editor-sidebar-right .align-buttons.is-tabs .btn-toggle,
main.app-main.editor-main .editor-sidebar-right .align-buttons.is-tabs .btn-toggle{
  flex:1 1 0;
  border:0;
  background:transparent;
  color:#a6a8b2;
  border-radius:10px;
  padding:7px 10px;
  min-height:30px;
  font-size:12px;
  font-weight:700;
}

body.editor-layout .editor-sidebar-right .align-buttons.is-tabs .btn-toggle:hover,
main.app-main.editor-main .editor-sidebar-right .align-buttons.is-tabs .btn-toggle:hover{
  background:rgba(255,255,255,.06);
  color:#e9e9f1;
}

body.editor-layout .editor-sidebar-right .align-buttons.is-tabs .btn-toggle.is-active,
main.app-main.editor-main .editor-sidebar-right .align-buttons.is-tabs .btn-toggle.is-active{
  background:#2a2c31;
  color:#e9e9f1;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.12);
}
body.editor-layout .tool-btn {
  border:0;
  background:transparent;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0;
  padding:10px 8px;
  color:#a6a8b2;
  cursor:pointer;
  border-radius:12px;
}
body.editor-layout .tool-btn:hover { background:rgba(255,255,255,.06); color:#e9e9f1; }
body.editor-layout .tool-btn.active {
  background:rgba(108,92,231,.18);
  color:#e9e9f1;
  outline:1px solid rgba(108,92,231,.35);
}
body.editor-layout .tool-btn .tool-label { display:none; }

/* inline icon inside existing buttons (Play/Publish/etc) */
body.editor-layout .vx-inline-ic { display:inline-flex; align-items:center; gap:8px; }
body.editor-layout .vx-icon-only { display:inline-flex; align-items:center; justify-content:center; }
.tool-icon svg{
  width:18px;
  height:18px;
  fill: none;
  display:block;
}

/* =========================================================
   STEP 4 — Right Sidebar: samakan tema dengan header & kiri
   Tempel PALING BAWAH app.css (override)
   ========================================================= */

/* Panel kanan: background sama seperti leftbar (abu gelap) */
body.editor-layout .editor-sidebar-right{
  background:#1f2126;
  border-left:1px solid rgba(255,255,255,0.08);
}

/* wrapper panel di kanan: jangan “kotak” biru lagi */
body.editor-layout .editor-sidebar-right .panel{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  padding:12px;
}

/* Card tiap section */
body.editor-layout .editor-sidebar-right .prop-section{
  background:#2a2c31;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:14px;
  padding:10px;
  margin:0 0 10px 0;
}

/* Judul section */
body.editor-layout .editor-sidebar-right .prop-section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:#e9e9f1;
  font-weight:700;
  font-size:13px;
  letter-spacing:0.2px;
}

/* Row “Status/Info” pill */
body.editor-layout .editor-sidebar-right .prop-row .prop-value{
  background:rgba(0,0,0,0.18);
  border:1px solid rgba(255,255,255,0.10);
  color:#e9e9f1;
}

/* Input/select/textarea: abu gelap, border halus */
body.editor-layout .editor-sidebar-right .prop-group textarea,
body.editor-layout .editor-sidebar-right .prop-group select,
body.editor-layout .editor-sidebar-right .prop-group input[type="number"],
body.editor-layout .editor-sidebar-right .prop-group input[type="text"],
body.editor-layout .editor-sidebar-right .editor-input,
body.editor-layout .editor-sidebar-right .canvas-size-input{
  background:rgba(0,0,0,0.18) !important;
  border:1px solid rgba(255,255,255,0.10) !important;
  color:#e9e9f1 !important;
  border-radius:12px !important;
}

/* Placeholder */
body.editor-layout .editor-sidebar-right input::placeholder,
body.editor-layout .editor-sidebar-right textarea::placeholder{
  color:rgba(233,233,241,0.45);
}

/* Toggle buttons (pills) — versi netral */
body.editor-layout .editor-sidebar-right .btn-toggle{
  background:rgba(0,0,0,0.18);
  border:1px solid rgba(255,255,255,0.10);
  color:#e9e9f1;
}

/* Active toggle: sama vibe dengan tombol aktif di kiri */
body.editor-layout .editor-sidebar-right .btn-toggle.is-active{
  background:rgba(108,92,231,0.18) !important;
  border-color:transparent !important;
  outline:1px solid rgba(108,92,231,0.35);
  color:#e9e9f1 !important;
  font-weight:700;
}

/* ===== Tabs style (seperti contoh Inkscape) ===== */
/* Untuk grup yang memang “pilihan 2-3 opsi” (kalau kamu sudah pakai .is-tabs) */
body.editor-layout .editor-sidebar-right .align-buttons.is-tabs{
  gap:0 !important;
  border:1px solid rgba(255,255,255,0.10);
  border-radius:12px;
  overflow:hidden;
  background:rgba(0,0,0,0.18);
}

body.editor-layout .editor-sidebar-right .align-buttons.is-tabs .btn-toggle{
  flex:1 1 0;
  border:0 !important;
  border-right:1px solid rgba(255,255,255,0.10) !important;
  border-radius:0 !important;
  background:transparent !important;
  padding:7px 10px !important;
  min-height:30px;
}

body.editor-layout .editor-sidebar-right .align-buttons.is-tabs .btn-toggle:last-child{
  border-right:0 !important;
}

body.editor-layout .editor-sidebar-right .align-buttons.is-tabs .btn-toggle.is-active{
  outline:none !important;
  background:rgba(108,92,231,0.18) !important;
}

/* Kalau kamu pakai vx-tabs (hasil step tab sebelumnya), samakan style-nya */
body.editor-layout .editor-sidebar-right .vx-tabs{
  display:flex;
  gap:0;
  border:1px solid rgba(255,255,255,0.10);
  border-radius:12px;
  overflow:hidden;
  background:rgba(0,0,0,0.18);
}

body.editor-layout .editor-sidebar-right .vx-tab{
  flex:1 1 0;
  padding:7px 10px;
  border:0;
  border-right:1px solid rgba(255,255,255,0.10);
  background:transparent;
  color:rgba(233,233,241,0.70);
  font-size:12px;
  cursor:pointer;
}

body.editor-layout .editor-sidebar-right .vx-tab:last-child{
  border-right:0;
}

body.editor-layout .editor-sidebar-right .vx-tab.is-active{
  background:rgba(108,92,231,0.18);
  color:#e9e9f1;
  font-weight:700;
}

/* Scrollbar panel kanan (biar rapi) */
body.editor-layout .editor-sidebar-right *::-webkit-scrollbar{
  width:10px;
}
body.editor-layout .editor-sidebar-right *::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,0.12);
  border-radius:999px;
  border:2px solid rgba(0,0,0,0.18);
}
body.editor-layout .editor-sidebar-right *::-webkit-scrollbar-track{
  background:rgba(0,0,0,0.12);
}
/* ============================
   MENUBAR PINDAH KE KIRI
============================ */
body.editor-layout .vx-left{
  flex: 1 1 auto;
  min-width: 0;
}

body.editor-layout .vx-title{
  min-width: 0;
}

body.editor-layout .vx-title-main{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 520px);
}

/* menubar fleksibel: kalau kepanjangan, bisa scroll horizontal */
body.editor-layout .vx-menubar{
  display:flex;
  align-items:center;
  gap: 6px;
  margin-left: 10px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
body.editor-layout .vx-menubar::-webkit-scrollbar{ height: 8px; }
body.editor-layout .vx-menubar::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
}

/* dropdown wrapper */
body.editor-layout .vx-menu{ position: relative; }

body.editor-layout .vx-menu-btn.is-open,
body.editor-layout .vx-menu.is-open .vx-menu-btn{
  background: rgba(255,255,255,0.08);
  color: #e9e9f1;
}

/* dropdown */
body.editor-layout .vx-dropdown{
  position:absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  padding: 6px;
  border-radius: 14px;
  background: #2a2c31;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 20px 45px rgba(0,0,0,0.45);
  display:none;
  z-index: 80;
}

body.editor-layout .vx-menu.is-open .vx-dropdown{ display:block; }

body.editor-layout .vx-dd-item{
  width:100%;
  border:0;
  background: transparent;
  color:#e9e9f1;
  padding: 9px 10px;
  border-radius: 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  cursor:pointer;
  font-size: 12.5px;
}

body.editor-layout .vx-dd-item:hover{
  background: rgba(255,255,255,0.06);
}

body.editor-layout .vx-dd-item:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

body.editor-layout .vx-kbd{
  font-size: 11px;
  color: rgba(233,233,241,0.55);
}

body.editor-layout .vx-dd-sep{
  height:1px;
  margin: 6px 6px;
  background: rgba(255,255,255,0.10);
  border-radius:999px;
}

/* =========================
   VX MENUBAR DROPDOWN POPUP
========================= */
body.editor-layout .vx-menu-btn.is-open{
  background: rgba(255,255,255,.08);
  color:#e9e9f1;
}

/* floating popup */
body.editor-layout .vx-menu-pop{
  position: fixed;
  min-width: 240px;
  max-width: 320px;
  padding: 6px;
  border-radius: 14px;
  background: #2a2c31;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 20px 45px rgba(0,0,0,0.45);
  z-index: 9999;
  display: none;
}
body.editor-layout .vx-menu-pop.is-open{ display:block; }

body.editor-layout .vx-menu-pop .vx-dd-item{
  width:100%;
  border:0;
  background: transparent;
  color:#e9e9f1;
  padding: 9px 10px;
  border-radius: 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  cursor:pointer;
  font-size: 12.5px;
  text-align:left;
}

body.editor-layout .vx-menu-pop .vx-dd-item:hover{
  background: rgba(255,255,255,0.06);
}

body.editor-layout .vx-menu-pop .vx-dd-item[disabled]{
  opacity: 0.45;
  cursor: not-allowed;
}

body.editor-layout .vx-menu-pop .vx-dd-sep{
  height:1px;
  margin: 6px 6px;
  background: rgba(255,255,255,0.10);
  border-radius:999px;
}

body.editor-layout .vx-menu-pop .vx-kbd{
  font-size: 11px;
  color: rgba(233,233,241,0.55);
  white-space: nowrap;
}

/* =========================
   MENUBAR: Submenu support
========================= */
body.editor-layout .vx-menu-pop .vx-dd-item.has-sub{
  padding-right: 12px;
}
body.editor-layout .vx-menu-pop .vx-submark{
  margin-left:auto;
  color: rgba(233,233,241,0.55);
}

/* popup submenu (kanan) */
body.editor-layout .vx-menu-pop.vx-menu-pop-sub{
  min-width: 220px;
}
/* ===== Modal: header/footer tetap, body scroll (viewport pendek aman) ===== */
.editor-modal-backdrop{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;            /* biar tidak mepet tepi */
  z-index: 9999;
}

/* kotak modal */
.editor-modal{
  max-height: calc(100vh - 28px);   /* 14px top + 14px bottom */
  display: flex;
  flex-direction: column;
  overflow: hidden;                 /* penting: biar body scroll di dalam */
  border-radius: 14px;
}

/* header/footer jangan ikut scroll */
.editor-modal-header,
.editor-modal-footer{
  flex: 0 0 auto;
}

/* body yang scroll */
.editor-modal-body{
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px; /* sedikit ruang bawah */
}

/* optional: supaya input tidak "ketutup" saat scroll di iOS */
.editor-modal-body .prop-group:last-child{
  margin-bottom: 12px;
}
