export function styles() { return ` * { margin: 0; padding: 0; box-sizing: border-box; } /* The embedded webview flickers between arrow and pointer on hover for interactive controls (links, buttons, selects, checkboxes), which is more confusing than helpful. Force a stable arrow so nothing flashes; hover color/underline still signal what is clickable. */ a, button, select, summary, label, input[type="checkbox"], input[type="radio"] { cursor: default; } body { font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif); background: var(--background-color-default, #0d1117); color: var(--text-color-default, #e6edf3); padding: 20px; box-sizing: border-box; min-height: 100vh; display: flex; flex-direction: column; } .page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; } .page-header h1 { font-size: var(--text-title-large, 22px); font-weight: var(--font-weight-semibold, 600); display: inline-flex; align-items: center; gap: 8px; line-height: 1; } .page-header h1 .sentry-logo { height: 0.92em; width: auto; flex: 0 0 auto; display: block; } /* Sentry brand mark: matches the wordmark text color so it inverts with the host theme (the app themes via CSS variables, not prefers-color-scheme). */ .page-header h1 .sentry-logo path { fill: currentColor; } .refresh-btn { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px solid var(--border-color-default, #30363d); color: var(--text-color-default, #e6edf3); border-radius: 6px; padding: 4px 12px; font-size: var(--text-small, 13px); font-weight: var(--font-weight-semibold, 600); } .refresh-icon { font-size: 15px; line-height: 1; } .refresh-btn:hover { border-color: var(--color-focus-outline, #58a6ff); } .title-mode-bar { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; padding: 8px 12px; border: 1px solid var(--border-color-default, #30363d); border-radius: 8px; background: var(--color-canvas-subtle, rgba(110, 118, 129, 0.08)); } .switch-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--text-small, 13px); font-weight: var(--font-weight-semibold, 600); color: var(--text-color-default, #e6edf3); } .switch { position: relative; display: inline-flex; } .switch-input { position: absolute; opacity: 0; width: 36px; height: 20px; margin: 0; cursor: pointer; } .switch-slider { width: 36px; height: 20px; border-radius: 999px; background: var(--border-color-default, #30363d); transition: background 0.15s ease; position: relative; flex: none; } .switch-slider::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s ease; } .switch-input:checked + .switch-slider { background: var(--color-focus-outline, #58a6ff); } .switch-input:checked + .switch-slider::after { transform: translateX(16px); } .switch-input:focus-visible + .switch-slider { outline: 2px solid var(--color-focus-outline, #58a6ff); outline-offset: 2px; } .title-mode-hint { font-size: var(--text-small, 12px); color: var(--text-color-muted, #8b949e); } .header-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; } .control-divider { width: 1px; align-self: stretch; min-height: 20px; background: var(--border-color-default, #30363d); } .scope-switchers { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; } .project-switcher { display: flex; align-items: center; gap: 6px; } .project-switcher-label { font-size: var(--text-small, 12px); color: var(--text-color-muted, #8b949e); } .project-select { background: var(--background-color-default, #0d1117); border: 1px solid var(--border-color-default, #30363d); color: var(--text-color-default, #e6edf3); border-radius: 6px; padding: 4px 8px; font-size: var(--text-small, 13px); min-width: 0; max-width: 220px; flex: 0 1 auto; } .project-select:hover { border-color: var(--color-focus-outline, #58a6ff); } .org-switcher-select { cursor: pointer; } .period-switcher { display: flex; align-items: center; gap: 6px; } .period-switcher-label { font-size: var(--text-small, 12px); color: var(--text-color-muted, #8b949e); } .period-select { background: var(--background-color-default, #0d1117); border: 1px solid var(--border-color-default, #30363d); color: var(--text-color-default, #e6edf3); border-radius: 6px; padding: 4px 8px; font-size: var(--text-small, 13px); cursor: pointer; } .period-select:hover { border-color: var(--color-focus-outline, #58a6ff); } .project-fetch-btn { background: var(--color-accent-emphasis, #1f6feb); border: 1px solid var(--color-accent-emphasis, #1f6feb); color: var(--color-fg-on-emphasis, #ffffff); border-radius: 6px; padding: 4px 12px; font-size: var(--text-small, 13px); font-weight: var(--font-weight-semibold, 600); cursor: pointer; transition: opacity 0.15s; } .project-fetch-btn:hover { opacity: 0.85; } /* Project autocomplete (a text input + a filtered suggestion menu). A native does not repaint in this webview, and a chrome so dropdowns match the height and padding of sibling text inputs, then draw our own caret. */ .org-select, select.settings-input, .settings-select { -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%238b949e' stroke-width='1.5'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 12px 12px; } .org-select { padding-right: 30px; } select.settings-input, .settings-select { padding-right: 26px; } .save-settings-btn { margin-top: 8px; border: 1px solid var(--color-focus-outline, #58a6ff); background: none; color: var(--color-focus-outline, #58a6ff); border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: var(--font-weight-semibold, 600); transition: background 0.15s; } .save-settings-btn:hover:not(:disabled) { background: rgba(88, 166, 255, 0.12); } /* ---- Connection preflight: Sentry setup gate + GitHub warning banner ---- */ .sentry-gate { display: none; } body.sentry-gated .sentry-gate { display: block; } /* When Sentry isn't connected, hide the normal chrome and show only the gate. */ body.sentry-gated .header-controls, body.sentry-gated .org-picker, body.sentry-gated .setup-instructions, body.sentry-gated .setup-scan, body.sentry-gated #work-settings, body.sentry-gated .page-description, body.sentry-gated .page-subtitle, body.sentry-gated #work-toolbar, body.sentry-gated #categories, body.sentry-gated #empty-state { display: none !important; } .sentry-gate { margin: 8px 0 4px; } .gate-card { border: 1px solid var(--border-color-attention, rgba(210, 153, 34, 0.4)); border-left: 3px solid var(--text-color-attention, #d29922); border-radius: 8px; background: var(--background-color-attention, rgba(210, 153, 34, 0.1)); padding: 16px 18px; max-width: 560px; } .gate-icon { font-size: 22px; line-height: 1; } .gate-card h2 { font-size: 16px; font-weight: var(--font-weight-semibold, 600); margin: 8px 0 6px; } .gate-lead { font-size: 13px; line-height: 1.5; color: var(--text-color-default, #e6edf3); margin: 0 0 8px; } .gate-steps { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--text-color-muted, #8b949e); } .gate-steps code { font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace); font-size: 11.5px; background: rgba(110, 118, 129, 0.15); padding: 1px 5px; border-radius: 4px; } .gate-error { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--danger-color, #f85149); background: rgba(248, 81, 73, 0.1); border: 1px solid rgba(248, 81, 73, 0.35); border-radius: 6px; padding: 8px 10px; text-align: left; } .toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--border-color-default, #1f2937); border: 1px solid var(--border-color-default, #30363d); color: var(--text-color-default, #e6edf3); padding: 10px 20px; border-radius: 8px; font-size: 13px; z-index: 1000; } ` }