    /* ---------------------------------------------------------
       SMARTWAYZE TOP NAV (OUTSIDE BUILDER)
    --------------------------------------------------------- */
    .topnav {
      width: 100%;
      height: 110px; /* FIXED HEIGHT */
      background: #ffffff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 20px;
      box-sizing: border-box;
      border-bottom: 1px solid #ddd;
    }

    .topnav img {
      display: block;
    }

    /* ---------------------------------------------------------
       THEME VARIABLES (Dark is default)
    --------------------------------------------------------- */
    :root {
      --bg: #0f172a;
      --bg-alt: #020617;
      --panel: #020617;
      --border: #1e293b;
      --accent: #38bdf8;
      --accent-soft: rgba(56,189,248,0.15);
      --text: #e5e7eb;
      --muted: #9ca3af;
      --radius: 8px;
      --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
      --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    body.light {
      --bg: #f8fafc;
      --bg-alt: #ffffff;
      --panel: #ffffff;
      --border: #cbd5e1;
      --accent: #0ea5e9;
      --accent-soft: rgba(14,165,233,0.15);
      --text: #0f172a;
      --muted: #475569;
    }

    body {
      margin: 0;
      background: var(--bg);
      color: var(--text);
      font-family: var(--font-sans);
      overflow: hidden;
    }

    /* ---------------------------------------------------------
       APP SHELL (STARTS BELOW TOPNAV)
    --------------------------------------------------------- */
    .app-shell {
      position: fixed;
      top: 110px; /* MATCH TOPNAV HEIGHT */
      left: 0;
      right: 0;
      bottom: 0;
      display: flex;
      flex-direction: column;
      background: var(--bg);
    }

    /* ---------------------------------------------------------
       HEADER
    --------------------------------------------------------- */
    header {
      padding: 10px 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: var(--bg-alt);
      border-bottom: 1px solid var(--border);
    }

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

    .btn {
      padding: 6px 12px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--bg-alt);
      color: var(--text);
      cursor: pointer;
      font-size: 12px;
    }

    .btn-primary {
      background: var(--accent);
      color: #0f172a;
      border-color: var(--accent);
      font-weight: bold;
    }

    .btn.active {
      background: var(--accent-soft);
      border-color: var(--accent);
    }

    .input-inline {
      padding: 6px 10px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--bg-alt);
      color: var(--text);
      font-size: 12px;
    }

    /* ---------------------------------------------------------
       MAIN LAYOUT
    --------------------------------------------------------- */
    .layout {
      flex: 1;
      display: grid;
      grid-template-columns: 1.2fr 1fr;
      height: calc(100vh - 110px - 60px);
    }

    .panel {
      display: flex;
      flex-direction: column;
      border-right: 1px solid var(--border);
      background: var(--panel);
    }

    .panel-header {
      padding: 8px 12px;
      border-bottom: 1px solid var(--border);
      font-size: 12px;
      font-weight: bold;
    }

    .editor-area {
      flex: 1;
      display: none;
    }

    .editor-area.active {
      display: block;
    }

    textarea {
      width: 100%;
      height: 100%;
      border: none;
      outline: none;
      resize: none;
      padding: 12px;
      background: var(--bg-alt);
      color: var(--text);
      font-family: var(--font-mono);
      font-size: 13px;
    }

    iframe {
      width: 100%;
      height: 100%;
      border: none;
      background: white;
    }
