:root {
      --bg:      #040712;
      --surface: #0a0d1e;
      --card:    #0e122a;
      --border:  #182046;
      --accent:  #6366f1;
    }
    body {
      background-color: var(--bg);
      color: #f1f5f9;
      font-family: 'Plus Jakarta Sans', sans-serif;
      overflow: hidden;
      touch-action: manipulation;
    }
    body.h-screen {
      height: 100vh;
      height: 100dvh;
    }
    
    input, textarea, select {
      font-size: 11px !important;
      touch-action: manipulation;
    }

    .CodeMirror {
      height: 100% !important;
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      background: #040712 !important;
    }
    .viewport-container {
      transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      margin: 0 auto;
    }
    .console-log-line {
      font-family: 'JetBrains Mono', monospace;
      font-size: 9.5px;
      padding: 3px 8px;
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .console-log-info { color: #38bdf8; }
    .console-log-warn { color: #fbbf24; }
    .console-log-error { color: #f87171; }
    .typing-dot {
      width: 4px; height: 4px; background: #a5b4fc; border-radius: 50%;
      animation: pulse 1.2s infinite ease-in-out;
    }
    .typing-dot:nth-child(2) { animation-delay: 0.2s; }
    .typing-dot:nth-child(3) { animation-delay: 0.4s; }
    @keyframes pulse { 0%, 100% { transform: scale(0.8); opacity: 0.4; } 50% { transform: scale(1.2); opacity: 1; } }

    header, #ide-sidebar, #open-file-tabs, #preview-panel-container, #console-drawer, #mobile-tabbar { font-size: 9.5px; }
    .btn { padding: 3px 6px; font-size: 9.5px; line-height: 1.1; font-weight: 500; }
    header { padding-top: 3px; padding-bottom: 3px; }
    
    #copilot-chat-history { padding: 6px; gap: 8px; font-size: 9.5px; line-height: 1.4; }
    
    /* Modern Chat Bubbles */
    .chat-bubble-user {
      background: #1a254c;
      border: 1px solid #283668;
      color: #f1f5f9;
      border-radius: 14px 14px 2px 14px;
      padding: 8px 12px;
      font-size: 9.5px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }
    .chat-bubble-assistant {
      background: #0e122a;
      border: 1px solid #182046;
      color: #e2e8f0;
      border-radius: 14px 14px 14px 2px;
      padding: 8px 12px;
      font-size: 9.5px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    #open-file-tabs button { padding: 3px 6px; font-size: 9.5px; }
    .mtab-btn { padding-top: 4px; padding-bottom: 4px; font-weight: 400; }
    .mtab-btn i { font-size: 11px; }
    .mtab-btn span { font-size: 8px; font-weight: 400; }

    @media (max-width: 480px) {
      header, #ide-sidebar, #open-file-tabs, #preview-panel-container, #console-drawer, #mobile-tabbar { font-size: 8.5px; }
      #copilot-chat-history { font-size: 8.5px; padding: 4px; }
      .chat-bubble-user, .chat-bubble-assistant { font-size: 8.5px; padding: 6px 9px; }
      .btn, button { font-weight: 400 !important; }
      h1, h2, h3 { font-weight: 600 !important; }
      .gush-field-label { font-weight: 600; font-size: 8px; }
    }

    #manager-sidebar {
      transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;
    }
    #manager-sidebar.collapsed {
      transform: translateX(-100%);
    }

    @media (min-width: 768px) {
      header, #ide-sidebar, #open-file-tabs, #preview-panel-container, #console-drawer { font-size: 10.5px; }
      .btn { padding: 4px 8px; font-size: 10px; }
      header { padding-top: 4px; padding-bottom: 4px; }
      #copilot-chat-history { padding: 8px; font-size: 10px; }
      .CodeMirror { font-size: 11px; }
      #manager-sidebar.collapsed {
        transform: translateX(0);
        width: 0;
        overflow: hidden;
        padding: 0;
        border: none;
      }
    }

    .gush-modal-card {
      max-height: 90vh;
      max-height: 90dvh;
      overflow-y: auto;
    }
    .gush-field-label { font-size: 8.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: #94a3b8; display: block; margin-bottom: 3px; }
    .gush-field-input { width: 100%; background: #040712; border: 1px solid #182046; padding: 5px 7px; color: #fff; border-radius: 6px; outline: none; }
    .gush-field-input:focus { border-color: #6366f1; }
    .gush-deploy-tab { flex: 1; padding: 5px 4px; font-size: 9.5px; font-weight: 500; border-radius: 6px; border: 1px solid #182046; color: #94a3b8; text-align: center; cursor: pointer; }
    .gush-deploy-tab.active { color: #a5b4fc; border-color: #6366f1; background: rgba(99,102,241,0.12); }

    /* Custom Context Menu */
    #tree-context-menu {
      position: fixed;
      z-index: 100;
      width: 180px;
      background: #0e122a;
      border: 1px solid #182046;
      border-radius: 8px;
      box-shadow: 0 10px 25px rgba(0,0,0,0.5);
      padding: 3px 0;
      font-size: 9.5px;
      display: none;
    }
    #tree-context-menu button {
      width: 100%;
      text-align: left;
      padding: 4px 8px;
      color: #cbd5e1;
      display: flex;
      align-items: center;
      gap: 6px;
      font-weight: 400;
    }
    #tree-context-menu button:hover {
      background: #182046;
      color: #fff;
    }

    .diff-added { background-color: rgba(16, 185, 129, 0.15); color: #34d399; }
    .diff-removed { background-color: rgba(244, 63, 94, 0.15); color: #f87171; }
    .diff-mod { background-color: rgba(245, 158, 11, 0.15); color: #fbbf24; }
    .scrollbar-none::-webkit-scrollbar { display: none; }
    .scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }

/* GCodex compact chat workspace — full-width messages, settings in one small icon. */
.gc-chat-surface {min-width:0!important}
.gc-chat-top{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;min-height:35px;padding:4px 9px;background:#070d1e;border-bottom:1px solid #20314f}
.gc-chat-top strong{font-size:12px;color:#c7d2ff;font-weight:650;white-space:nowrap}
.gc-chat-actions{display:flex;align-items:center;gap:6px}
.gc-chat-actions>button,.gc-chat-options>summary{display:inline-grid;place-items:center;width:30px;height:30px;border:1px solid #273653;border-radius:8px;color:#dce9fe;cursor:pointer;background:#182641;font-size:13px}
.gc-chat-options{position:relative}
.gc-chat-options>summary{list-style:none}
.gc-chat-options>summary::-webkit-details-marker{display:none}
.gc-chat-settings{position:absolute;z-index:500;right:0;top:36px;width:min(275px,83vw);max-height:min(62vh,590px);overflow:auto;display:flex;flex-direction:column;gap:6px;padding:11px;border:1px solid #3b5278;border-radius:12px;box-shadow:0 15px 35px #000b;background:#111d32;color:#e4edff;font-size:12px}
.gc-chat-settings label{font-size:11px;color:#b8c5e1}
.gc-chat-settings select{min-height:36px;width:100%;padding:5px 8px;border-radius:7px;background:#0c1930;border:1px solid #324c71;color:white;font-size:13px!important}
.gc-chat-settings button{min-height:34px;text-align:left;padding:6px 9px;background:#152a41;color:#d8e9fa;border:1px solid #30445e;border-radius:8px}
.gc-chat-settings button.gc-danger{color:#feb2b2}
.gc-chat-settings .gc-check{display:flex;align-items:center;gap:9px}
.gc-chat-settings .gc-check input{width:17px;height:17px}
.gc-chat-settings #gcodex-model-chooser{padding-top:7px;margin-top:4px;border-top:1px solid #2b415c}
.gc-chat-settings #gcodex-model-chooser p{margin:0;font-size:10px}
.gc-chat-settings p{color:#a6b6d3;font-size:10px;line-height:1.4}
#copilot-chat-history{padding:5px!important;gap:7px!important;min-width:0;line-height:1.55!important;user-select:text;-webkit-user-select:text}
#copilot-chat-history>div{max-width:100%;min-width:0}
#copilot-chat-history .chat-bubble-assistant{width:100%;max-width:100%!important;margin:0;border-radius:10px;padding:7px 9px!important;font-size:13px!important;box-shadow:none}
#copilot-chat-history .chat-bubble-user{max-width:94%!important;font-size:13px!important;border-radius:11px;padding:7px 10px!important;box-shadow:none}
#copilot-chat-history .copilot-text-block{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
#copilot-chat-history button{font-size:11px}
.gc-chat-composer{display:flex;gap:6px;align-items:end;flex:none;border-top:1px solid #283656;background:#090f20;padding:6px;min-width:0}
.gc-chat-input{display:block;flex:1;min-width:0;height:48px;max-height:110px;overflow-y:auto;resize:none;line-height:1.35;font-size:16px!important;padding:8px 10px;background:#0c1730;border:1px solid #2e4268;border-radius:10px;color:#fff;outline:0}
.gc-send-button{display:grid;place-items:center;flex:0 0 37px;width:37px;height:37px;background:#514ed5;border:0;color:white;border-radius:9px;margin-bottom:2px}
.gc-code-tools{gap:3px;flex-wrap:wrap;justify-content:flex-end}
.gc-code-tools>button{padding:4px 6px;border-radius:5px;font-size:10px;line-height:1.2;white-space:nowrap;background:#1e2f4e;color:#dcecff;border:1px solid #2b3b5d}
.gc-command-tools{display:flex;gap:5px;flex-wrap:wrap}
.gc-command-tools>button{padding:4px 6px;border-radius:5px;background:#193450;color:#c9edff}
.gc-markdown{font-size:inherit;line-height:1.56;overflow-wrap:anywhere;user-select:text;-webkit-user-select:text}
.gc-markdown p{margin:0 0 7px;white-space:pre-wrap}
.gc-markdown p:last-child{margin-bottom:0}
.gc-markdown h1,.gc-markdown h2,.gc-markdown h3,.gc-markdown h4{margin:12px 0 6px;font-size:1.04em;font-weight:750;color:#e6f0ff;line-height:1.35}
.gc-markdown h1{font-size:1.25em}.gc-markdown h2{font-size:1.17em}
.gc-markdown ul,.gc-markdown ol{list-style:revert;margin:5px 0 9px 20px;padding:0}
.gc-markdown li{margin:4px 0}
.gc-markdown blockquote{border-left:2px solid #7187bb;padding:5px 10px;margin:5px 0;color:#b8c8e6;background:#101d35}
.gc-markdown a{color:#81c6ff;text-decoration:underline;overflow-wrap:anywhere}
.gc-markdown code{padding:1px 4px;background:#192840;border-radius:4px;color:#a7f4df;font:0.9em ui-monospace,Menlo,monospace}
.gc-markdown hr{border-color:#3a4e6a;margin:10px 0}
.gc-md-code{margin:7px 0 11px;border:1px solid #355174;border-radius:8px;overflow:hidden;max-width:100%}
.gc-md-code-head{display:flex;justify-content:space-between;align-items:center;background:#14243e;color:#b4c8e2;padding:3px 9px;font-size:11px}
.gc-md-code-head button{background:#244569;color:#fff;border-radius:5px;padding:4px 9px}
.gc-md-code pre{white-space:pre;overflow-x:auto;background:#081322;color:#dcfff0;padding:10px;margin:0;font:12px/1.6 ui-monospace,Menlo,Consolas,monospace}
.gc-md-code code{background:transparent;padding:0;color:inherit}
.gc-audit-modal{position:fixed;z-index:2147483499;inset:0;background:#000b;display:grid;place-items:center;padding:10px}
.gc-audit-modal[hidden]{display:none!important}
.gc-audit-card{width:min(720px,100%);max-height:85dvh;overflow:auto;border:1px solid #365577;border-radius:12px;background:#0e192b;color:#edf6ff;padding:12px}
.gc-audit-card header{position:static;display:flex;justify-content:space-between;align-items:center;padding:7px;background:transparent;border:0}
.gc-audit-card button{padding:6px 10px;border-radius:6px;background:#23405b}
.gc-audit-card pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;user-select:text;padding:12px;background:#081525;max-height:65vh;overflow:auto}
.gc-audit-card p{font-size:11px;color:#a6bad4}
@media(max-width:600px){
 .gc-chat-top{padding:3px 6px}.gc-chat-top strong{font-size:11px}
 #copilot-chat-history{padding:4px!important;gap:6px!important}
 #copilot-chat-history .chat-bubble-assistant{padding:6px!important;font-size:12.5px!important}
 #copilot-chat-history .chat-bubble-user{padding:6px 8px!important;font-size:12.5px!important}
 #copilot-chat-history .copilot-text-block{font-size:12.5px}
 .gc-chat-composer{padding:5px;gap:5px}.gc-chat-input{font-size:16px!important}
 .gc-code-tools>button{padding:3px 5px;font-size:10px}
 .gc-code-tools>button span{display:none}
}
.gc-code-reply{background:#101c2e;border-top:1px solid #253858}
.gc-code-reply summary{cursor:pointer;padding:6px 9px;color:#93badd;font-size:11px;list-style-position:inside}
#copilot-chat-history [id^="block-preview-"]{max-height:52vh;font-size:11.5px;line-height:1.5;user-select:text}
#copilot-chat-history [id^="block-reply-input-"]{font-size:16px!important}
