/* ---------------------------------------------------------------------------
 * lookwhatidid — Shell SPA styles
 *
 * Modern dark theme, tech-oriented SaaS aesthetic.
 * System fonts, responsive layout, no build step.
 * --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
 * Custom properties
 * --------------------------------------------------------------------------- */

:root {
  --bg:          #0d1117;
  --bg-surface:  #161b22;
  --bg-raised:   #1c2333;
  --bg-hover:    #252d3a;
  --accent:      #58a6ff;
  --accent-hover:#79c0ff;
  --accent-dim:  rgba(88, 166, 255, 0.12);
  --danger:      #f85149;
  --danger-dim:  rgba(248, 81, 73, 0.12);
  --green:       #3fb950;
  --text:        #e6edf3;
  --text-muted:  #7d8590;
  --text-subtle: #484f58;
  --border:      #30363d;
  --border-light:#444c56;
  --radius:      6px;
  --radius-lg:   10px;
  --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:   'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --toolbar-h:   52px;
  --source-w:    260px;
  --shadow-md:   0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg:   0 16px 48px rgba(0, 0, 0, 0.45);
}

/* ---------------------------------------------------------------------------
 * Reset & base
 * --------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  border-radius: var(--radius);
  padding: 0.4rem 0.75rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------------------
 * Utility
 * --------------------------------------------------------------------------- */

.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------------------
 * Landing page
 * --------------------------------------------------------------------------- */

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
  position: relative;
}

.landing__nav {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  display: flex;
  gap: 1rem;
  z-index: 10;
}

.landing__nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.landing__nav-link:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.landing__title {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  font-family: var(--font-mono);
}

.landing__subtitle {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.7;
}

.landing__agent-hint {
  font-size: 0.9rem;
  color: var(--text-subtle);
}

.landing__skill-link {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.2rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(88, 166, 255, 0.25);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  user-select: all;
}
.landing__skill-link:hover {
  background: rgba(88, 166, 255, 0.2);
  border-color: var(--accent);
}

/* Trust signals */

.landing__trust {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.landing__trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--green);
}

.landing__trust-item svg {
  flex-shrink: 0;
}

.landing__trust-detail {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
  max-width: 480px;
  line-height: 1.6;
}

.landing__docs-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.landing__docs-link:hover {
  color: var(--accent-hover);
}

/* Drop zone */

.dropzone {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-top: 2.5rem;
  padding: 3rem 2rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover,
.dropzone--active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.dropzone__label {
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.dropzone__icon {
  display: block;
  margin: 0 auto 0.75rem;
  font-size: 2.25rem;
  opacity: 0.5;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* File list */

.file-list {
  width: 100%;
  max-width: 520px;
  margin-top: 1.25rem;
  list-style: none;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.file-list li:last-child {
  border-bottom: none;
}

.file-list__size {
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: 1rem;
}

/* CTA button */

.btn-primary {
  margin-top: 1.5rem;
  padding: 0.65rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

/* Status message on landing */

.landing__status {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.4em;
}

/* ---------------------------------------------------------------------------
 * Toolbar (project view)
 * --------------------------------------------------------------------------- */

.toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: var(--toolbar-h);
  padding: 0 0.75rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.toolbar__brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.toolbar__logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.toolbar__project-id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  padding: 0.2rem 0.5rem;
  background: var(--bg-raised);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.toolbar__spacer {
  flex: 1;
}

.toolbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}
.toolbar__btn:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.toolbar__btn svg {
  flex-shrink: 0;
}

.toolbar__btn--accent {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.toolbar__btn--accent:hover:not(:disabled) {
  background: rgba(88, 166, 255, 0.2);
  border-color: var(--accent-hover);
  color: var(--accent-hover);
}

/* ---------------------------------------------------------------------------
 * Share split-button
 * --------------------------------------------------------------------------- */

.share-split {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.share-split__main {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius) 0 0 var(--radius);
}
.share-split__main:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.share-split__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.4rem;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #fff;
}
.share-split__chevron:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  border-left-color: rgba(255, 255, 255, 0.25);
}

.share-split__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 200px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 120;
  list-style: none;
  padding: 0.25rem;
  animation: dropdown-in 0.12s ease-out;
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.share-split__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text);
  background: none;
  border-radius: 4px;
  text-align: left;
}
.share-split__item:hover {
  background: var(--bg-hover);
}

.share-split__item--danger {
  color: var(--danger);
}
.share-split__item--danger:hover {
  background: var(--danger-dim);
}

.share-split__divider {
  height: 1px;
  margin: 0.25rem 0.5rem;
  background: var(--border);
}

/* ---------------------------------------------------------------------------
 * Project view layout
 * --------------------------------------------------------------------------- */

.project-view {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.project-view__main {
  flex: 1;
  margin-top: var(--toolbar-h);
  display: flex;
  position: relative;
  overflow: hidden;
}

.project-view__preview {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.project-view__iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

/* Loading overlay */

.project-view__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.9rem;
  z-index: 10;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 0.6rem;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------------------------
 * Source tree panel (left sidebar)
 * --------------------------------------------------------------------------- */

.source-panel {
  width: var(--source-w);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(calc(-1 * var(--source-w)));
  width: 0;
  opacity: 0;
  transition: width 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.source-panel--open {
  width: var(--source-w);
  opacity: 1;
  transform: translateX(0);
}

.source-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.source-panel__header h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.source-panel__close {
  background: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 0.15rem 0.35rem;
  line-height: 1;
}
.source-panel__close:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.source-panel__refresh {
  background: none;
  color: var(--text-muted);
  padding: 0.2rem;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.source-panel__refresh:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.source-panel__tree {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 0.35rem 0;
}

.source-panel__file {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.source-panel__file:hover {
  background: var(--bg-hover);
}
.source-panel__file--active {
  background: var(--accent-dim);
  color: var(--accent);
}

.source-panel__file-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.source-panel__file-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-panel__file-size {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-subtle);
  flex-shrink: 0;
}

.source-panel__store-section {
  border-top: 1px solid var(--border);
}

.source-panel__store-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.source-panel__store-header h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.source-panel__store-empty {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-style: italic;
}

.source-panel__store-value {
  font-size: 0.7rem;
  color: var(--text-subtle);
  margin-left: auto;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
 * Source file viewer (code preview)
 * --------------------------------------------------------------------------- */

.source-viewer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  z-index: 5;
}

.source-viewer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.source-viewer__path {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.source-viewer__close {
  background: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 0.15rem 0.35rem;
  line-height: 1;
}
.source-viewer__close:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.source-viewer__code {
  flex: 1;
  overflow: auto;
  margin: 0;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text);
  tab-size: 2;
  white-space: pre;
  counter-reset: line;
}

.source-viewer__img {
  max-width: 100%;
  max-height: calc(100vh - var(--toolbar-h) - 60px);
  object-fit: contain;
  margin: 24px auto;
  display: block;
  border-radius: var(--radius);
  background: var(--bg-surface);
}

/* ---------------------------------------------------------------------------
 * History panel
 * --------------------------------------------------------------------------- */

.history-panel {
  position: fixed;
  top: var(--toolbar-h);
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 90vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 90;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.2s ease;
}

.history-panel--open {
  transform: translateX(0);
}

.history-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.history-panel__header h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.history-panel__close {
  background: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 0.15rem 0.35rem;
  line-height: 1;
}
.history-panel__close:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.history-panel__list {
  list-style: none;
  padding: 0.35rem 0;
}

.history-panel__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  transition: background 0.1s;
}
.history-panel__item:hover {
  background: var(--bg-hover);
}

.history-panel__item--active {
  background: var(--accent-dim);
  border-left: 2px solid var(--accent);
}

.history-panel__version {
  font-weight: 600;
  font-size: 0.85rem;
}

.history-panel__time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-panel__restore {
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.history-panel__restore:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ---------------------------------------------------------------------------
 * Error state
 * --------------------------------------------------------------------------- */

.error-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}

.error-view__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.error-view__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.error-view__message {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 400px;
}

.error-view__home {
  margin-top: 1.5rem;
  display: inline-block;
  padding: 0.45rem 1.15rem;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
}
.error-view__home:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

/* ---------------------------------------------------------------------------
 * Toast notification
 * --------------------------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  padding: 0.5rem 1.15rem;
  font-size: 0.825rem;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 200;
  pointer-events: none;
}

.toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---------------------------------------------------------------------------
 * Upload overlay (add files in project view)
 * --------------------------------------------------------------------------- */

.upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(4px);
}

.upload-overlay__box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  width: 90%;
  max-width: 480px;
  text-align: center;
}

.upload-overlay__box h3 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.upload-overlay__dropzone {
  position: relative;
  padding: 2rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  color: var(--text-muted);
  transition: border-color 0.2s;
}

.upload-overlay__dropzone:hover,
.upload-overlay__dropzone.dropzone--active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-overlay__dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-overlay__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.upload-overlay__cancel {
  padding: 0.45rem 1.15rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
}
.upload-overlay__cancel:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

/* ---------------------------------------------------------------------------
 * TTL selector (landing page)
 * --------------------------------------------------------------------------- */

.ttl-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.ttl-selector__label {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}
.ttl-selector__options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ttl-selector__btn {
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ttl-selector__btn:hover {
  border-color: var(--accent);
  color: var(--text);
}
.ttl-selector__btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------------------------------------------------------------------------
 * Toolbar encryption badge & tooltip
 * --------------------------------------------------------------------------- */

.toolbar__encryption {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--green);
  flex-shrink: 0;
  cursor: default;
}

.toolbar__encryption-info {
  color: var(--text-subtle);
  cursor: help;
  transition: color 0.15s;
}

.toolbar__encryption:hover .toolbar__encryption-info {
  color: var(--text-muted);
}

.toolbar__encryption-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  padding: 0.75rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 130;
  animation: dropdown-in 0.12s ease-out;
}

.toolbar__encryption:hover .toolbar__encryption-tooltip {
  display: block;
}

.toolbar__encryption-tooltip strong {
  color: var(--green);
}

.toolbar__encryption-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.toolbar__encryption-link:hover {
  color: var(--accent-hover);
}

/* ---------------------------------------------------------------------------
 * Toolbar expiry badge & extend (centered)
 * --------------------------------------------------------------------------- */

.toolbar__center {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.toolbar__expiry {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  white-space: nowrap;
  margin-right: 4px;
}

.toolbar__extend-wrap {
  position: relative;
}

.toolbar__btn--extend {
  font-size: 0.75rem;
  color: var(--accent);
}

.extend-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: dropdown-in 0.12s ease-out;
}
.extend-menu__btn {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 4px;
  text-align: left;
  white-space: nowrap;
}
.extend-menu__btn:hover {
  background: var(--bg-hover);
}

/* ---------------------------------------------------------------------------
 * Scrollbar styling (thin, subtle)
 * --------------------------------------------------------------------------- */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* ---------------------------------------------------------------------------
 * Responsive
 * --------------------------------------------------------------------------- */

@media (max-width: 600px) {
  .toolbar {
    padding: 0 0.5rem;
    gap: 0.3rem;
  }

  .toolbar__project-id {
    max-width: 80px;
    font-size: 0.75rem;
  }

  .toolbar__btn {
    padding: 0.3rem 0.45rem;
    font-size: 0.75rem;
  }

  /* Hide label text, keep icons */
  .toolbar__btn span,
  .share-split__main span {
    display: none;
  }

  /* Hide info icon on mobile; lock alone suffices */
  .toolbar__encryption-info {
    display: none;
  }

  .landing {
    padding: 1.5rem 1rem;
  }

  .dropzone {
    padding: 2rem 1rem;
  }

  .history-panel {
    width: 100%;
    max-width: 100vw;
  }

  .source-panel--open {
    width: 100%;
    position: absolute;
    inset: 0;
    z-index: 20;
  }
}

/* ---------------------------------------------------------------------------
 * My Projects dropdown
 * --------------------------------------------------------------------------- */

.projects-dropdown {
  position: relative;
  display: inline-flex;
}

.projects-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.projects-dropdown__chevron {
  opacity: 0.5;
  flex-shrink: 0;
}

.projects-dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 260px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 120;
  padding: 0.25rem;
  animation: dropdown-in 0.12s ease-out;
}

.projects-dropdown__empty {
  padding: 1rem;
  text-align: center;
  font-size: 0.825rem;
  color: var(--text-subtle);
}

.projects-dropdown__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.825rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.1s;
}

.projects-dropdown__item:hover {
  background: var(--bg-hover);
}

.projects-dropdown__item--active {
  background: var(--accent-dim);
  border-left: 2px solid var(--accent);
}

.projects-dropdown__id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projects-dropdown__item--active .projects-dropdown__id {
  color: var(--accent);
}

.projects-dropdown__badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  flex-shrink: 0;
}

.projects-dropdown__badge--edit {
  color: var(--green);
  background: rgba(63, 185, 80, 0.12);
}

.projects-dropdown__badge--read {
  color: var(--text-subtle);
  background: rgba(72, 79, 88, 0.25);
}

.projects-dropdown__remove {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-subtle);
  background: none;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.1s, color 0.1s, background 0.1s;
}

.projects-dropdown__item:hover .projects-dropdown__remove {
  opacity: 1;
}

.projects-dropdown__remove:hover {
  color: var(--danger);
  background: var(--danger-dim);
}
