:root {
    --bg: #0b0f19;
    --surface: rgba(17, 24, 39, 0.45);
    --surface-glass: rgba(17, 24, 39, 0.45);
    --border: rgba(255,255,255,0.08);
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent-1: #22c55e;
    --accent-2: #3b82f6;
    --shadow: 0 10px 40px rgba(0,0,0,.35);
    --dock-w: 58px;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; }
  body {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: var(--base-font-size, 14px);
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    display: flex;
  }

  /* DOCK */
  nav.dock {
    width: var(--dock-w);
    min-width: var(--dock-w);
    height: 100vh;
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0 10px;
    gap: 8px;
    z-index: 20;
    box-shadow: var(--shadow);
  }
  #dock-apps {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 4px 0;
    scroll-behavior: smooth;
  }
  .dock-brand svg { width: 20px; height: 20px; fill: currentColor; pointer-events: none; display: block; }
  .dock-brand:hover {
    background: rgba(255,255,255,0.06);
    transform: translateY(-2px);
    color: var(--text);
  }
  .dock-scroll {
    flex: 1 1 auto;
    overflow-y: visible;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    scroll-behavior: smooth;
    min-height: 0;
    padding: 4px 0;
  }
  .dock-item {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid; place-items: center;
    cursor: pointer; position: relative;
    transition: transform .2s ease, background .2s ease;
    color: var(--muted);
    padding: 0; border: 0; background: transparent;
  }
  .dock-item svg { width: 20px; height: 20px; fill: currentColor; pointer-events: none; display: block; }
  .dock-item:hover {
    background: rgba(255,255,255,0.06);
    transform: translateY(-2px);
    color: var(--text);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.15);
  }
  .dock-item.active {
    background: rgba(59,130,246,0.18);
    color: var(--accent-2);
    box-shadow: inset 0 0 0 1px rgba(59,130,246,0.35);
  }
  .dock-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1.5px solid #0b0f19;
    pointer-events: none;
  }
  .dock-add {
    margin-top: auto;
    width: 36px; height: 36px;
    border-radius: 12px;
    border: 1px dashed rgba(255,255,255,0.25);
    color: var(--muted);
    display: grid; place-items: center;
    cursor: pointer;
    transition: all .2s ease;
    font-size: 18px;
    background: transparent;
  }
  .dock-add:hover {
    border-color: var(--accent-2);
    color: var(--accent-2);
    background: rgba(59,130,246,0.08);
  }
  .dock-item[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #11111b;
    color: var(--text);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid var(--border);
    pointer-events: none;
    z-index: 30;
  }

  /* TOPBAR */
  main.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }
  .content-body {
    flex: 1;
    display: flex;
    min-height: 0;
    position: relative;
  }
  .topbar {
    height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 10;
  }
  .topbar .left-group,
  .topbar .right-group { display: flex; align-items: center; gap: 10px; }
  .search-container {
    position: relative;
    display: flex;
    align-items: center;
  }
  .topbar .search input {
    width: 420px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 12px;
    outline: none;
    font-size: 13px;
    transition: background 0.2s ease, border-color 0.2s ease;
  }
  .topbar .search input:focus {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
  }
  .search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 100;
  }
  .search-dropdown.active { display: flex; }
  .search-dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    color: var(--text);
    font-size: 13px;
    transition: background 0.1s ease;
  }
  .search-dropdown-item:hover { background: rgba(255,255,255,0.1); }
  .google-badge {
    display: inline-flex; align-items: center; justify-content: center;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    padding: 0 14px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
    gap: 8px;
    cursor: pointer;
    transition: box-shadow .2s ease, transform .2s ease;
  }
  .google-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  }
  .topbar button.icon-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
  }
  .notif-panel {
    position: absolute;
    top: 56px; right: 16px;
    width: 320px; max-height: 400px;
    background: var(--surface-glass);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: none; flex-direction: column;
    z-index: 1000; overflow: hidden;
  }
  .notif-panel.active { display: flex; }
  .notif-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(0,0,0,0.2);
  }
  .notif-header h4 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }
  .notif-header button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 12px; }
  .notif-header button:hover { text-decoration: underline; }
  .notif-list {
    flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px;
  }
  .notif-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }
  .notif-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    padding: 10px 12px; border-radius: 12px;
    animation: fadeIn .2s ease;
  }
  .notif-item.unread { background: rgba(122,162,255,0.1); border-color: rgba(122,162,255,0.3); }
  .notif-item strong { display: block; font-size: 13px; color: var(--text); margin-bottom: 4px; }
  .notif-item span { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
  
  .font-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
  }
  .font-btn {
    width: 26px; height: 26px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    display: grid; place-items: center;
  }
  .font-btn:hover { background: rgba(255,255,255,0.14); }
  .user-controls {
    margin-left: 4px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
  }
  .user-controls:hover {
    background: rgba(255,255,255,0.1);
  }

  /* Exclusive sign-in screen: never a translucent modal over protected UI. */
  .login-overlay {
    position: fixed;
    inset: 0;
    padding: 24px;
    overflow-y: auto;
    background: #0b0f19;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2147483647;
  }
  .login-overlay.open {
    display: flex;
  }
  .login-card {
    background: #111827;
    border: 1px solid var(--border);
    padding: 36px;
    border-radius: 20px;
    width: min(420px, 92vw);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    box-shadow: var(--shadow);
  }
  .login-brand {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 28px;
    border-radius: 13px;
    color: #04130a;
    background: var(--accent-1);
    font-weight: 900;
    letter-spacing: -1px;
  }
  .login-eyebrow {
    margin-bottom: 8px;
    color: var(--accent-1);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
  }
  .login-card h1 {
    margin-bottom: 9px;
    color: var(--text);
    font-size: clamp(24px, 6vw, 30px);
    letter-spacing: -.04em;
  }
  .login-description {
    margin-bottom: 26px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
  }
  .login-form {
    display: grid;
    gap: 16px;
  }
  .login-field {
    display: grid;
    gap: 7px;
  }
  .login-field label {
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
  }
  .login-field input {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 10px;
    outline: none;
    color: var(--text);
    background: #0b0f19;
    font: inherit;
  }
  .login-field input:focus-visible {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(34,197,94,.16);
  }
  .login-submit,
  .login-reset {
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  .login-submit {
    margin-top: 4px;
    color: #04130a;
    background: var(--accent-1);
  }
  .login-reset {
    color: #a7f3d0;
    background: transparent;
  }
  .login-submit:hover:not(:disabled) { background: #4ade80; }
  .login-reset:hover:not(:disabled) { background: rgba(255,255,255,.05); }
  .login-submit:disabled,
  .login-reset:disabled {
    cursor: not-allowed;
    opacity: .48;
  }
  .login-error:not([hidden]) {
    margin-top: 14px;
    padding: 10px 12px;
    border: 1px solid rgba(248,113,113,.3);
    border-radius: 9px;
    color: #fecaca;
    background: rgba(127,29,29,.2);
    font-size: 12px;
  }
  .login-status {
    min-height: 18px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
  }
  .login-status[data-state="error"] { color: #fecaca; }

  @media (max-width: 480px) {
    .login-overlay { padding: 14px; align-items: center; }
    .login-card {
      width: 100%;
      max-height: calc(100dvh - 28px);
      padding: 26px 22px;
      border-radius: 16px;
    }
    .login-brand { margin-bottom: 22px; }
  }

  /* DESKTOP / WIDGETS */
  .desktop {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    position: relative;
    background:
      radial-gradient(1200px 800px at 10% -10%, #0f172a, transparent 60%),
      radial-gradient(900px 600px at 90% 0%, #0b1020, transparent 60%),
      var(--bg);
  }
  .desktop::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0); pointer-events: none; }
  .bg-overlay {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.7) 100%);
    pointer-events: none; z-index: 0;
  }
  .bg-wallpaper {
    position: absolute; inset: 0;
    background-image: url('https://images.unsplash.com/photo-1506744626753-dfbd806c630e?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; background-position: center; background-repeat: no-repeat;
    z-index: 0; pointer-events: none;
    transition: filter 2s ease;
  }
  .widget-grid {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
  }
  @keyframes widgetEnter {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  .widget {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%), var(--surface-glass);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px;
    position: relative;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.05);
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: grab;
    user-select: none;
    animation: widgetEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .widget:active { cursor: grabbing; }
  .widget.dragging { opacity: 0.85; transform: scale(1.03); box-shadow: 0 14px 40px rgba(0,0,0,.5); z-index: 10; }
  .widget:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,.4); }
  .widget .close-widget {
    position: absolute; top: 8px; right: 8px;
    width: 24px; height: 24px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer; font-size: 12px;
    display: grid; place-items: center;
  }
  .widget .close-widget:hover { background: rgba(255,255,255,0.12); color: var(--text); }
  .widget .widget-title {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
  }
  .widget .widget-value {
    font-size: 24px;
    font-weight: 600;
    margin-top: auto;
  }
  .widget .widget-quote {
    font-size: 14px;
    font-style: italic;
    color: var(--text);
    line-height: 1.45;
  }
  .widget .widget-quote-author {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
  }
  .widget .widget-sub {
    font-size: 12px;
    color: var(--muted);
  }
  .widget textarea,
  .widget input[type="text"] {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    padding: 8px 10px;
    outline: none; font: inherit; font-size: 13px;
    resize: none; width: 100%;
  }

  /* APP VIEW */
  .view {
    flex: 1;
    border-radius: 0;
    background: var(--surface-glass);
    border: 1px solid var(--border);
    box-shadow: none;
    backdrop-filter: blur(12px);
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    display: none;
  }
  .view.active { display: block; }
  .view iframe { width: 100%; height: 100%; border: 0; }
  
  /* App cobre toda a área do home quando aberto */
  body.app-open .desktop { display: none !important; }
  .app-open .view { display: block !important; position: absolute; inset: 0; z-index: 5; }

  .modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(6px);
    z-index: 50;
  }
  .modal.open { display: flex; }
  .modal .panel {
    background: var(--surface-glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    width: 380px; max-width: 92vw;
    display: flex; flex-direction: column; gap: 12px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  }
  .modal label { font-size: 13px; color: var(--muted); font-weight: 500; }
  .modal input,
  .modal select {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
  }
  .modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
  .modal .actions button {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.22);
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    transition: transform .08s ease, background .15s ease, border-color .15s ease;
  }
  .modal .actions button:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.35);
  }
  .modal .actions button.primary {
    background: var(--accent-2);
    color: #111;
    border-color: transparent;
    font-weight: 600;
  }
  .modal .actions button.primary:hover {
    background: #2563eb;
    border-color: transparent;
  }
  .icon-grid {
    display: grid; grid-template-columns: repeat(6, 1fr);
    gap: 8px; max-height: 180px; overflow: auto; padding: 4px;
  }
  .icon-grid button {
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 8px; font-size: 22px;
    cursor: pointer; transition: all .15s ease;
  }
  .icon-grid button:hover { background: rgba(255,255,255,0.08); }
  .icon-grid button.selected {
    background: rgba(59,130,246,0.18);
    border-color: rgba(59,130,246,0.4);
  }
  .icon-grid button[data-icon="curriculo"] { }

  @media (max-width: 768px) {
    .layout { flex-direction: column-reverse; }
    .dock {
      width: 100vw;
      height: 64px;
      flex-direction: row;
      border-right: none;
      border-top: 1px solid var(--border);
      padding: 0 16px;
      overflow-x: auto;
      overflow-y: hidden;
      justify-content: flex-start;
      z-index: 100;
    }
    .dock::-webkit-scrollbar { display: none; }
    .dock-brand, .dock-add, .dock-item {
      width: 40px; height: 40px;
      min-width: 40px;
      margin-bottom: 0;
      margin-right: 12px;
    }
    .dock-add { margin-left: auto; margin-right: 0; }
    #dock-apps {
      flex-direction: row;
      flex: 1;
      justify-content: flex-start;
      margin-bottom: 0;
    }
    main.content {
      height: calc(100vh - 64px);
    }
    
    .topbar {
      padding: 0 8px;
      gap: 6px;
    }
    .topbar .search input { width: 120px; }
    .google-badge span { display: none; }
    .google-badge { padding: 0 10px; gap: 0; }
    .clock, .font-controls { display: none !important; }
    .user-controls { padding: 8px; font-size: 12px; }

    .widget-grid {
      grid-template-columns: 1fr;
      padding: 16px;
    }
    
    #ai-chat-widget {
      width: 100%;
      height: 85vh;
      bottom: 64px;
      right: 0;
      border-radius: 20px 20px 0 0;
      border-left: none;
      border-right: none;
      border-bottom: none;
    }
    .fab-container {
      bottom: 80px;
      right: 16px;
    }
    
    .modal .panel {
      padding: 16px;
      width: 90vw;
    }
    .icon-grid {
      grid-template-columns: repeat(4, 1fr);
    }
  }
  button.icon-btn.active-toggle { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.22); }

  /* AI WIDGET */
  #ai-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    height: 500px;
    background: var(--surface-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    pointer-events: none;
  }
  #ai-chat-widget.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .ai-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    border-radius: 20px 20px 0 0;
  }
  .ai-header h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
  .ai-header button { background: none; border: none; color: var(--muted); cursor: pointer; }
  .ai-header button:hover { color: var(--text); }
  .ai-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .msg-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    max-width: 85%;
    line-height: 1.5;
  }
  .msg-bot { background: rgba(255,255,255,0.06); align-self: flex-start; border-bottom-left-radius: 4px; }
  .msg-user { background: var(--accent-2); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
  .ai-input-area {
    padding: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 0 0 20px 20px;
  }
  .ai-input-area input {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 12px;
    outline: none;
  }
  .ai-input-area button {
    background: var(--accent-2);
    border: none;
    color: white;
    padding: 0 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
  }
  .ai-input-area button:hover { background: #2563eb; }
  .ai-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: var(--accent-2);
    color: white;
    border: none;
    box-shadow: 0 8px 24px rgba(59,130,246,0.4);
    cursor: pointer;
    z-index: 999;
    display: grid;
    place-items: center;
    transition: transform 0.2s ease;
  }
  .ai-fab:hover { transform: scale(1.08); }
  .ai-fab svg { width: 26px; height: 26px; fill: currentColor; }
  
  /* OMNI SEARCH */
  #omni-search-modal {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
    display: none; align-items: flex-start; justify-content: center;
    padding-top: 15vh; opacity: 0; transition: opacity 0.2s;
  }
  #omni-search-modal.visible { opacity: 1; }
  .omni-search-box {
    background: var(--surface-glass); border: 1px solid var(--border);
    border-radius: 16px; width: 600px; max-width: 90vw;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5); overflow: hidden;
    display: flex; flex-direction: column;
  }
  .omni-search-input {
    width: 100%; background: transparent; border: none;
    padding: 20px 24px; font-size: 20px; color: var(--text);
    outline: none; border-bottom: 1px solid var(--border);
  }
  .omni-search-results { max-height: 400px; overflow-y: auto; }
  .omni-result-item {
    padding: 12px 24px; display: flex; align-items: center; gap: 12px;
    cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.03);
  }
  .omni-result-item:hover, .omni-result-item.selected { background: rgba(255,255,255,0.08); }
  .omni-result-icon { font-size: 20px; }
  .omni-result-details { display: flex; flex-direction: column; }
  .omni-result-title { font-weight: 500; font-size: 14px; }
  .omni-result-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
  
  /* WORKSPACE TABS */
  #tabs-bar {
    display: none; background: rgba(0,0,0,0.3); border-bottom: 1px solid var(--border);
    padding: 0 8px; gap: 4px; overflow-x: auto;
  }
  .app-open #tabs-bar { display: flex; }
  .ws-tab {
    display: flex; align-items: center; gap: 8px; padding: 8px 14px;
    background: transparent; color: var(--muted); border: none;
    border-radius: 8px 8px 0 0; cursor: pointer; font-size: 12px; font-weight: 500;
    max-width: 180px; min-width: 100px;
    border: 1px solid transparent; border-bottom: none;
    transition: all 0.2s;
  }
  .ws-tab:hover { background: rgba(255,255,255,0.05); color: var(--text); }
  .ws-tab.active {
    background: var(--surface); color: var(--text);
    border-color: var(--border); box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  }
  .ws-tab-icon { width: 14px; height: 14px; display: grid; place-items: center; }
  .ws-tab-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
  .ws-tab-close {
    width: 18px; height: 18px; border-radius: 4px; border: none; background: transparent;
    color: var(--muted); font-size: 14px; display: grid; place-items: center; cursor: pointer;
    line-height: 1; padding: 0;
  }
  .ws-tab-close:hover { background: rgba(255,0,0,0.2); color: #fff; }
  #app-view { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; height: 100%; }
  #iframes-container { flex: 1; position: relative; min-height: 0; width: 100%; height: 100%; }
  .app-iframe { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; border: none; display: none; }
  .app-iframe.active { display: block; }
