@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

/* ==========================================================================
   Paperplane PDF  -  Enterprise Next-Gen Design System
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Color Palette */
  --bg-app: #f4f6f3;
  --bg-panel: #ffffff;
  --bg-panel-alt: #fafbfa;
  --border-light: #e4eae4;
  --border-subtle: #d3ded4;
  --text-main: #142023;
  --text-muted: #5e6f72;
  --text-dim: #8fa0a3;

  /* Brand Accents */
  --accent: #ff4b26;
  --accent-hover: #e03816;
  --accent-glow: rgba(255, 75, 38, 0.25);
  --accent-subtle: #fff1ed;

  /* Sidebar Dark Theme */
  --sidebar-bg: #121a1c;
  --sidebar-panel: #1b2629;
  --sidebar-hover: #233134;
  --sidebar-border: #26363a;
  --sidebar-text: #eef3f1;
  --sidebar-muted: #8ca3a0;

  /* Studio / PDF Viewport */
  --studio-bg: #1c2628;
  --studio-panel: #233134;
  --studio-border: #2f4044;
  --studio-page-shadow: 0 16px 45px rgba(0, 0, 0, 0.35);

  /* Status Colors */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --error: #ef4444;
  --error-bg: #fef2f2;

  /* Elevation */
  --shadow-sm: 0 2px 8px rgba(20, 32, 35, 0.04);
  --shadow-md: 0 8px 24px rgba(20, 32, 35, 0.08);
  --shadow-lg: 0 20px 48px rgba(20, 32, 35, 0.12);
  --shadow-modal: 0 25px 60px -15px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar-width: 270px;
  --sidebar-collapsed-width: 76px;
}

/* Theme Customizations (Dark Mode, Light Mode, Sharp Contrast) */
body.dark-mode, body.high-contrast {
  --bg-app: #0d1416;
  --bg-panel: #141e21;
  --bg-panel-alt: #1a2528;
  --border-light: #28393d;
  --border-subtle: #33484c;
  --text-main: #f0f5f4;
  --text-muted: #a3b8b6;
  --text-dim: #708684;
  --accent-subtle: #2b1d19;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning-bg: rgba(245, 158, 11, 0.15);
  --error-bg: rgba(239, 68, 68, 0.15);
}

body.light-mode {
  --bg-app: #f4f6f3;
  --bg-panel: #ffffff;
  --bg-panel-alt: #f8faf9;
  --border-light: #e2eae4;
  --border-subtle: #cbd7cf;
  --text-main: #142023;
  --text-muted: #5e6f72;
  --text-dim: #8fa0a3;
  --accent-subtle: #fff1ed;
}

body.sharp-contrast {
  --border-light: #475569 !important;
  --border-subtle: #64748b !important;
}

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

[hidden] {
  display: none !important;
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
}

/* ==========================================================================
   App Shell Layout: Fixed Left Sidebar + Main Dynamic Workspace
   ========================================================================== */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.3s var(--ease-spring);
}

.app-shell.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed-width) 1fr;
}

/* --------------------------------------------------------------------------
   Sidebar (Fixed & Sticky)
   -------------------------------------------------------------------------- */

.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-border);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow: hidden;
  user-select: none;
}

.sidebar-header {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff7a59 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 4px 14px var(--accent-glow);
  flex-shrink: 0;
}

.brand-dot {
  color: var(--accent);
}

.collapse-btn {
  background: transparent;
  border: 1px solid var(--sidebar-border);
  color: var(--sidebar-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}

.collapse-btn:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-search-box {
  padding: 14px 16px 8px;
}

.sidebar-search-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sidebar-panel);
  border: 1px solid var(--sidebar-border);
  color: var(--sidebar-muted);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-search-btn:hover {
  background: var(--sidebar-hover);
  border-color: #3b5054;
  color: #fff;
}

.sidebar-search-btn kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.sidebar-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 14px;
}

.sidebar-scroll-area::-webkit-scrollbar {
  width: 4px;
}
.sidebar-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.nav-group-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sidebar-muted);
  padding: 14px 10px 6px;
}

.nav-category-tab {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #c9d6d3;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s var(--ease-spring);
  position: relative;
}

.nav-category-tab:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-category-tab.active {
  background: var(--sidebar-panel);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-cat-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  color: #ff856b;
}

.nav-cat-badge {
  margin-left: auto;
  font-size: 11px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 7px;
  border-radius: 12px;
  color: var(--sidebar-muted);
}

/* Tool Sub-List in Sidebar */
.sidebar-tool-list {
  margin-top: 4px;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-tool-item {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #a4b7b4;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-tool-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-tool-item.active {
  color: var(--accent);
  font-weight: 700;
  background: rgba(255, 75, 38, 0.08);
}

/* --------------------------------------------------------------------------
   STICKY BOTTOM-LEFT PROFILE COMPONENT (Permanently Pinned)
   -------------------------------------------------------------------------- */

.sidebar-sticky-footer {
  margin-top: auto;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  padding: 14px;
  background: rgba(10, 15, 17, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10;
}

/* Quota Tracker inside Sticky Footer */
.quota-container {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quota-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: #9cb1ae;
}

.quota-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.quota-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  border-radius: 10px;
  transition: width 0.3s ease, background 0.3s ease;
}

.quota-progress-fill.warn {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.quota-progress-fill.full {
  background: #ef4444;
}

.quota-progress-fill.pro {
  background: linear-gradient(90deg, #f59e0b, #10b981);
}

/* Sidebar Upgrade Banner Button */
.sidebar-upgrade-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 75, 38, 0.45);
  background: linear-gradient(135deg, rgba(255, 75, 38, 0.16) 0%, rgba(255, 122, 89, 0.25) 100%);
  color: #ff856b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-upgrade-btn:hover {
  background: linear-gradient(135deg, rgba(255, 75, 38, 0.3) 0%, rgba(255, 122, 89, 0.4) 100%);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 9px;
  background: var(--sidebar-panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.18s ease;
}

.profile-card:hover {
  background: var(--sidebar-hover);
  border-color: #3b5054;
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0284c7;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
}

.profile-avatar.status-online::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--sidebar-panel);
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.profile-badge {
  font-size: 10.5px;
  color: var(--sidebar-muted);
  display: block;
}

/* Privacy Mode Toggle inside Sticky Footer */
.footer-privacy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 7px;
}

.footer-privacy-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: #b7c7c4;
}

.footer-privacy-label span {
  font-size: 13px;
}

.toggle-switch-sm {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.toggle-switch-sm input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider-sm {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #3b5054;
  transition: 0.2s;
  border-radius: 18px;
}

.toggle-slider-sm:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

input:checked + .toggle-slider-sm {
  background-color: var(--accent);
}

input:checked + .toggle-slider-sm:before {
  transform: translateX(14px);
}

.profile-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.profile-card-row .profile-card {
  flex: 1;
  min-width: 0;
}

.sidebar-settings-gear-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--sidebar-panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #b7c7c4;
  font-size: 17px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.sidebar-settings-gear-btn:hover {
  background: var(--sidebar-hover);
  color: #fff;
  border-color: #4b6267;
  transform: rotate(45deg);
}

/* Collapsed Sidebar Styles */
.app-shell.sidebar-collapsed .brand span:not(.brand-mark),
.app-shell.sidebar-collapsed .nav-group-title,
.app-shell.sidebar-collapsed .nav-category-tab span:not(.nav-cat-icon),
.app-shell.sidebar-collapsed .sidebar-tool-list,
.app-shell.sidebar-collapsed .sidebar-search-btn kbd,
.app-shell.sidebar-collapsed .sidebar-search-btn span,
.app-shell.sidebar-collapsed .profile-info,
.app-shell.sidebar-collapsed .quota-container,
.app-shell.sidebar-collapsed .sidebar-upgrade-btn,
.app-shell.sidebar-collapsed .footer-privacy-label {
  display: none !important;
}

.app-shell.sidebar-collapsed .sidebar-header {
  padding: 12px 6px;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand {
  margin: 0;
  justify-content: center;
}

.app-shell.sidebar-collapsed .sidebar-search-btn {
  justify-content: center;
  padding: 9px;
}

.app-shell.sidebar-collapsed .nav-category-tab {
  justify-content: center;
  padding: 12px;
}

.app-shell.sidebar-collapsed .footer-privacy-row {
  justify-content: center;
  padding: 6px 4px;
}

.app-shell.sidebar-collapsed .toggle-switch-sm {
  margin: 0 auto;
}

.app-shell.sidebar-collapsed .profile-card {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 4px;
}

/* ==========================================================================
   Main Dynamic Workspace & App Shell Body
   ========================================================================== */

.main-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
}

.main-area.studio-active {
  overflow: hidden !important;
}

/* --------------------------------------------------------------------------
   Top Action Bar
   -------------------------------------------------------------------------- */

.topbar {
  height: 64px;
  padding: 0 28px;
  background: rgba(18, 26, 28, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

body.dark-mode .topbar,
body:not(.light-mode) .topbar {
  background: rgba(18, 26, 28, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.light-mode .topbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: #dfe7e1;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  min-width: 0;
  white-space: nowrap;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--border-subtle);
}

.topbar-upgrade-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 75, 38, 0.4);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--accent-glow);
  transition: all 0.18s ease;
}

.topbar-upgrade-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--accent-glow);
  background: linear-gradient(135deg, #ff5c38 0%, #ff8a6b 100%);
}

.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #9cb1b0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb-trail span,
.breadcrumb-trail b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.light-mode .breadcrumb-trail {
  color: #4b5e61;
}

.breadcrumb-trail .crumb-sep {
  color: #586f6d;
  font-size: 11px;
}

body.light-mode .breadcrumb-trail .crumb-sep {
  color: #8fa0a3;
}

.breadcrumb-trail b {
  color: #ffffff;
  font-weight: 700;
}

body.light-mode .breadcrumb-trail b {
  color: #111a1c;
}

/* Workspace View Mode Switcher Pills */
.workspace-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 3px;
  flex-shrink: 0;
}

body.light-mode .workspace-tabs {
  background: #eef2ec;
  border: 1px solid #d5dfd7;
}

.tab-pill {
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #a0b5b3;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

body.light-mode .tab-pill {
  color: #4b6063;
}

.tab-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

body.light-mode .tab-pill:hover {
  color: #111a1c;
  background: rgba(0, 0, 0, 0.04);
}

.tab-pill.active {
  background: #243438;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

body.light-mode .tab-pill.active {
  background: #ffffff;
  color: #111a1c;
  border-color: #cbd7cf;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-auth-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-topbar-signin,
.btn-topbar-register,
.topbar-user-pill {
  min-height: 34px;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.btn-topbar-signin {
  color: var(--text-main);
  background: transparent;
  border: 1px solid var(--border-light);
}

.btn-topbar-register {
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-topbar-signin:hover,
.btn-topbar-register:hover,
.topbar-user-pill:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.topbar-user-pill {
  color: var(--text-main);
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
}

.user-avatar-sm {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #ff7a59);
  font-size: 10px;
  font-weight: 800;
}

.engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

body.light-mode .engine-pill {
  background: #ecfdf5;
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.35);
}

.engine-pill.wasm {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border-color: rgba(37, 99, 235, 0.3);
}

body.light-mode .engine-pill.wasm {
  background: #eff6ff;
  color: #1e40af;
  border-color: rgba(37, 99, 235, 0.35);
}

.engine-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.topbar-action-btn {
  background: #1b2629;
  border: 1px solid #2d3e42;
  color: #e4edf0;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

body.light-mode .topbar-action-btn {
  background: #ffffff;
  border: 1px solid #d1ddd5;
  color: #1a282b;
}

.topbar-action-btn:hover {
  border-color: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
}

body.light-mode .topbar-action-btn:hover {
  border-color: var(--accent);
  color: #111a1c;
}


.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-panel);
  color: var(--text-main);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background: var(--bg-panel-alt);
  border-color: var(--border-subtle);
}

/* ==========================================================================
   DYNAMIC WORKSPACE VIEWS
   ========================================================================== */

.dynamic-workspace {
  flex: 1;
  padding: 28px 36px 60px;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   VIEW 1: Tool Action Desk
   -------------------------------------------------------------------------- */

.tool-desk-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: fadeIn 0.25s var(--ease-spring);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tool Header Card */
.tool-hero-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.tool-hero-title-group h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.tool-hero-title-group {
  min-width: 0;
}

.tool-hero-title-group p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 650px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.tool-category-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  display: inline-block;
}

/* Dropzone */
.dropzone {
  background: var(--bg-panel);
  border: 2px dashed var(--border-subtle);
  border-radius: 16px;
  padding: 44px 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  position: relative;
}

.dropzone:hover, .dropzone.over {
  border-color: var(--accent);
  background: #fffafa;
  transform: scale(1.003);
}

body.high-contrast .dropzone:hover,
body.high-contrast .dropzone.over {
  background: rgba(255, 75, 38, 0.04);
}

.drop-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 24px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  transition: transform 0.2s ease;
}

.dropzone:hover .drop-icon-circle {
  transform: translateY(-3px);
}

.dropzone h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.dropzone p {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 8px;
}

.dropzone .browse-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  background: transparent;
  border: none;
}

.dropzone small {
  color: var(--text-dim);
  font-size: 12px;
}

/* File Queue Cards */
.file-queue {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.file-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.file-row-card:hover {
  border-color: var(--border-subtle);
}

.file-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-row-icon {
  font-size: 20px;
}

.file-row-name {
  font-weight: 700;
  font-size: 13.5px;
}

.file-row-size {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 6px;
}

.file-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.delete-file-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.15s ease;
}

.delete-file-btn:hover {
  color: var(--error);
  background: var(--error-bg);
}

/* Options Box */
.options-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.option-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.option-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.option-field input,
.option-field select {
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-panel-alt);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.option-field input:focus,
.option-field select:focus {
  border-color: var(--accent);
  background: var(--bg-panel-alt);
}

/* Explicit native control colors prevent Chromium/Windows dark-mode
   inversion from producing white text on white dropdowns. */
select,
.option-field select,
.form-field-edit-row select,
.editor-select {
  background-color: var(--bg-panel-alt);
  color: var(--text-main) !important;
  border: 1px solid var(--border-light);
  color-scheme: light;
}

select option,
.option-field select option,
.form-field-edit-row select option,
.editor-select option,
option {
  background-color: #ffffff !important;
  color: #142023 !important;
}

body.dark-mode select,
body.dark-mode .option-field select,
body.dark-mode .form-field-edit-row select,
body.dark-mode .editor-select {
  color-scheme: dark;
}

body.dark-mode select option,
body.dark-mode .option-field select option,
body.dark-mode .form-field-edit-row select option,
body.dark-mode .editor-select option,
body.dark-mode .modal-card select option,
body.dark-mode .page-modal-card select option {
  background-color: #1f2937 !important;
  color: #f9fafb !important;
}

.option-field input::placeholder,
.option-field textarea::placeholder,
.editor-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: #8fa0a3 !important;
  opacity: 1;
}

.option-field-wide { grid-column: 1 / -1; }

.option-engine-badge {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--accent-subtle);
  color: var(--text-main);
}

.option-engine-badge strong,
.option-engine-badge small { display: block; }
.option-engine-badge strong { font-size: 12px; }
.option-engine-badge small { color: var(--text-muted); font-size: 11px; margin-top: 3px; }
.engine-badge-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-bg); }

/* Primary Action Bar */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}

.btn-primary-action {
  background: linear-gradient(135deg, var(--accent) 0%, #ff6842 100%);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px var(--accent-glow);
  transition: all 0.2s var(--ease-spring);
}

.btn-primary-action:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 75, 38, 0.35);
}

.btn-primary-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.secure-assurance {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   Multi-Stage Animated Progress Loader
   -------------------------------------------------------------------------- */

.progress-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-top: 14px;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.progress-header strong {
  font-size: 15px;
  font-weight: 700;
}

.progress-header span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
}

.progress-track {
  height: 8px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, #ff8b6e 100%);
  border-radius: 8px;
  transition: width 0.3s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-dim);
}

.progress-step.done {
  color: var(--success);
  font-weight: 600;
}

.progress-step.active {
  color: var(--accent);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Result Output Banner
   -------------------------------------------------------------------------- */

.result-card {
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: fadeIn 0.3s var(--ease-spring);
}

.result-card.error {
  background: var(--error-bg);
  border-color: rgba(239, 68, 68, 0.25);
}

.result-info strong {
  font-size: 17px;
  color: var(--text-main);
  display: block;
  margin-bottom: 4px;
}

.result-info small {
  color: var(--text-muted);
  font-size: 13px;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-download {
  background: var(--success);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-download:hover {
  background: #0ea371;
  transform: translateY(-1px);
}

.ai-result-card {
  display: block;
  background: var(--bg-panel);
  border-color: rgba(236, 72, 153, 0.28);
}

.ai-result-card .result-info { margin-bottom: 16px; }
.result-content { width: 100%; margin-bottom: 16px; }
.ai-result-answer,
.ai-result-markdown,
.ai-markdown-output {
  color: var(--text-main);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.ai-result-answer h2,
.ai-result-answer h3,
.ai-result-answer h4,
.ai-result-markdown h2,
.ai-result-markdown h3,
.ai-result-markdown h4,
.ai-markdown-output h2,
.ai-markdown-output h3,
.ai-markdown-output h4 {
  margin: 10px 0 6px;
  color: var(--text-main);
}

.ai-result-answer p,
.ai-result-markdown p,
.ai-markdown-output p { margin: 0 0 8px; }
.ai-result-answer ul,
.ai-result-markdown ul,
.ai-markdown-output ul { margin: 6px 0 10px 20px; }
.ai-result-answer code,
.ai-result-markdown code,
.ai-markdown-output code { color: var(--accent); font-family: var(--font-mono); }
.ai-result-citations,
.ai-result-actions,
.chat-citation-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.ai-result-citations strong { font-size: 12px; color: var(--text-muted); }
.ai-citation-tag,
.chat-citation-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-subtle);
  border: 1px solid rgba(236, 72, 153, 0.25);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 700;
}
.ai-citation-tag.muted { color: var(--text-muted); }
.ai-result-card .ai-open-studio-result-btn { margin-top: 16px; padding: 10px 16px; font-size: 12px; }
.ai-result-card .btn-download { margin-top: 6px; }
.chat-markdown { margin-top: 6px; }
.ai-markdown-output {
  font-size: 12.5px;
  min-height: 140px;
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 14px;
  background: var(--bg-panel-alt);
}

/* --------------------------------------------------------------------------
   VIEW 2: Next-Level In-App PDF Studio (Viewer & Editor)
   -------------------------------------------------------------------------- */

.pdf-studio {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: var(--studio-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--studio-border);
  height: calc(100vh - 100px);
  min-height: 520px;
  position: relative;
}

/* Studio Left Thumbnail Sidebar */
.studio-thumbnails-bar {
  background: #172023;
  border-right: 1px solid var(--studio-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.studio-thumbnails-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.studio-thumbnails-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.thumb-card {
  background: #233134;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.thumb-card:hover {
  border-color: #435b60;
}

.thumb-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.thumb-card img,
.thumb-card canvas {
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.thumb-card-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  color: #a4b7b4;
  font-size: 11px;
  font-weight: 600;
}

.thumb-actions {
  display: flex;
  gap: 4px;
}

.thumb-action-btn {
  background: transparent;
  border: none;
  color: #a4b7b4;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 11px;
}

.thumb-action-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Studio Center Viewport */
.studio-main-viewport {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: var(--studio-bg);
  position: relative;
  overflow: hidden;
}

/* Studio Toolbar - Accessible, Non-clipping & Responsive 2-Tier Modern Ribbon */
.studio-toolbar {
  display: flex;
  flex-direction: column;
  background: #192426;
  border-bottom: 1px solid var(--studio-border);
  padding: 0;
  user-select: none;
  z-index: 100;
  flex-shrink: 0;
}

.studio-primary-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 14px;
  background: #192426;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.studio-primary-ribbon::-webkit-scrollbar {
  display: none;
}

.studio-sub-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 3px 14px;
  background: #141c1e;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.studio-sub-ribbon::-webkit-scrollbar {
  display: none;
}

.studio-sub-ribbon[hidden] {
  display: none !important;
}

.studio-mode-switcher {
  display: inline-flex;
  align-items: center;
  background: #0d1416;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.studio-mode-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.studio-mode-btn:hover {
  color: #ffffff;
}

.studio-mode-btn.active {
  background: var(--accent);
  color: #ffffff;
}

.studio-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.studio-dropdown-trigger {
  gap: 6px;
}

.studio-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1000;
  min-width: 210px;
  background: #192426;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.studio-dropdown-menu[hidden] {
  display: none !important;
}

.studio-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #e2e8f0;
  background: transparent;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}

.studio-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.studio-dropdown-item svg {
  flex-shrink: 0;
  color: var(--accent);
}

.studio-tool-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.studio-tool-btn {
  background: #243437;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.studio-tool-btn:hover {
  background: #31464a;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.studio-tool-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 2px 10px var(--accent-glow);
}

.studio-clear-btn:hover {
  background: #7f1d1d !important;
  border-color: #ef4444 !important;
  color: #fee2e2 !important;
}

.studio-save-btn {
  min-height: 36px;
  padding: 6px 14px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.studio-page-badge {
  color: #ffffff;
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 5px 8px;
  background: #111a1c;
  border: 1px solid var(--studio-border);
  border-radius: 6px;
}

.studio-divider {
  width: 1px;
  height: 22px;
  background: var(--studio-border);
  margin: 0 4px;
}

.zoom-select {
  background: #172023;
  border: 1px solid var(--studio-border);
  color: #fff;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  outline: none;
  min-height: 36px;
}

/* Responsive button text collapsing: on screens <= 1440px or browser zoom */
@media (max-width: 1440px) {
  .studio-tool-btn .tool-btn-text {
    display: none;
  }
  .studio-tool-btn {
    padding: 6px 8px;
    min-width: 36px;
    justify-content: center;
  }
}

/* Dedicated Contextual Page Selection Panel */
.organizer-selection-panel {
  background: #1b2628;
  border-bottom: 1px solid var(--studio-border);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  min-height: 44px;
  max-height: 48px;
  flex-shrink: 0;
}

.organizer-selection-panel::-webkit-scrollbar {
  display: none;
}

.selection-panel-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.selection-count-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.selection-quick-tools {
  display: flex;
  gap: 5px;
}

.batch-subtle-btn {
  background: #253639;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.batch-subtle-btn:hover {
  background: #33484c;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.selection-action-clusters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.action-cluster {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #141d1f;
  border: 1px solid var(--studio-border);
  border-radius: 6px;
  padding: 3px 6px;
}

.cluster-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-right: 4px;
  padding-right: 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.cluster-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #e2e8f0;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.12s ease;
}

.cluster-btn:hover {
  background: #28393d;
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.cluster-btn-danger:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

/* Studio Canvas Display Area - High DPI & Smooth Independent Bi-Directional Scrolling */
.studio-canvas-area {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 24px 16px;
  background: #141b1d;
  position: relative;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-render-wrapper {
  margin: 0 auto;
  width: fit-content;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  background: #ffffff;
  transition: transform 0.15s ease;
  user-select: none;
}

.pdf-page-canvas {
  display: block;
  border-radius: 4px;
}

.pdf-annotation-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pdf-draw-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* --------------------------------------------------------------------------
   VIEW 3: AI Document Intelligence Studio
   -------------------------------------------------------------------------- */

.ai-studio-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: calc(100vh - 130px);
  position: relative;
}

.ai-studio-topbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-upload-strip {
  background: var(--bg-panel);
  border: 1.5px dashed var(--border-light);
  border-radius: 8px;
  padding: 14px 18px;
  transition: border-color 0.15s ease;
  cursor: pointer;
}

.ai-upload-strip:hover {
  border-color: var(--accent);
}

.ai-upload-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-main);
}

.ai-upload-content svg {
  color: var(--accent);
  flex-shrink: 0;
}

.ai-active-doc-strip {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-doc-info-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-doc-info-group svg {
  color: var(--accent);
  flex-shrink: 0;
}

.ai-doc-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-doc-details strong {
  font-size: 13.5px;
  color: var(--text-main);
}

.ai-doc-meta-text {
  font-size: 11.5px;
  color: var(--text-muted);
}

.ai-doc-status-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.ai-doc-actions {
  display: flex;
  gap: 8px;
}

.ai-engine-notice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 4px;
}

.ai-engine-info {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-engine-pill {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
}

.ai-test-conn-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
}

.ai-test-conn-btn:hover {
  color: var(--text-main);
}

.ai-studio-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  flex: 1;
  min-height: 520px;
}

@media (max-width: 900px) {
  .ai-studio-container {
    grid-template-columns: 1fr !important;
  }
}

/* Extraction Modal Styles */
.extraction-modal-card {
  max-width: 820px;
  width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.extraction-modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: var(--bg-panel);
}

.extraction-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.extraction-badge-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.extraction-type-badge {
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.extraction-status-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.extraction-modal-header h3 {
  font-size: 17.5px;
  font-weight: 700;
  margin: 4px 0 0 0;
  color: var(--text-main);
}

.extraction-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.extraction-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.extraction-close-btn:hover {
  color: var(--text-main);
}

.extraction-tabs {
  display: flex;
  padding: 0 22px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-panel-alt);
  gap: 8px;
}

.extraction-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.extraction-tab-btn:hover {
  color: var(--text-main);
}

.extraction-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.extraction-tab-content {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.extraction-warning-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  font-size: 12.5px;
  color: #b45309;
}

.extraction-warning-box svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.extraction-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.extraction-field-card {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.extraction-field-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.extraction-field-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-word;
}

.extraction-field-value.null-val {
  color: #9ca3af;
  font-weight: normal;
  font-style: italic;
}

.extraction-field-value.highlight-val {
  color: #059669;
  font-size: 14.5px;
}

.extraction-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.extraction-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.extraction-section-header h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.extraction-count-badge {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--text-muted);
}

.extraction-table-wrap {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  overflow-x: auto;
  max-height: 200px;
}

.extraction-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.extraction-table th {
  background: var(--bg-panel-alt);
  padding: 8px 12px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
}

.extraction-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
}

.extraction-table tr:last-child td {
  border-bottom: none;
}

.extraction-empty-state {
  text-align: center;
  padding: 14px;
  font-size: 12px;
  color: var(--text-muted);
  border: 1px dashed var(--border-light);
  border-radius: 6px;
  background: var(--bg-panel-alt);
}

.extraction-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.extraction-meta-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.extraction-meta-col label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.extraction-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}

.extraction-pill {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 3px 8px;
  color: var(--text-main);
}

.extraction-json-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.extraction-json-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

.extraction-json-pre {
  background: #0f172a;
  color: #f1f5f9;
  padding: 14px;
  border-radius: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  line-height: 1.5;
  overflow: auto;
  max-height: 360px;
  margin: 0;
  border: 1px solid #1e293b;
}

.extraction-modal-footer {
  padding: 12px 22px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
}

.extraction-footer-left {
  display: flex;
  gap: 8px;
}

.ai-chat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  flex: 1;
  min-height: 500px;
  position: relative;
}

.ai-chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 250px;
  max-height: 520px;
}

.chat-bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
}

.chat-bubble.user {
  margin-left: auto;
  background: var(--accent) !important;
  color: #ffffff !important;
  border-bottom-right-radius: 3px;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.chat-bubble.ai {
  margin-right: auto;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 3px;
}

.chat-citation-tag {
  display: inline-block;
  font-size: 11px;
  font-family: var(--font-mono);
  background: var(--accent-subtle);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  margin-top: 6px;
  cursor: pointer;
}

.ai-chat-form {
  padding: 14px 18px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  background: var(--bg-panel);
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin-top: auto;
}

.ai-chat-input {
  flex: 1;
  background: var(--bg-panel-alt) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 9px;
  padding: 12px 16px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.ai-chat-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-glow) !important;
}

.ai-chat-input::placeholder {
  color: var(--text-dim) !important;
}

.modal-header-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  color: var(--accent);
}

.modal-header-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.btn-cancel {
  background: var(--bg-panel-alt) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-subtle) !important;
  padding: 10px 20px !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  font-family: var(--font-sans) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}

.btn-cancel:hover {
  background: var(--bg-app) !important;
  border-color: var(--text-dim) !important;
  color: var(--text-main) !important;
  transform: translateY(-1px) !important;
}

body.dark-mode .btn-cancel {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}

body.dark-mode .btn-cancel:hover {
  background: #374151 !important;
  border-color: #4b5563 !important;
}

.modal-close {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  flex: 0 0 32px !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  display: grid !important;
  place-items: center !important;
  font-size: 16px !important;
  line-height: 1 !important;
  transition: all 0.15s ease !important;
  padding: 0 !important;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
  color: var(--error) !important;
  transform: rotate(90deg) scale(1.05) !important;
}

.modal-close svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* --------------------------------------------------------------------------
   Command Palette / All-Tools Directory Modal (Ctrl+K)
   -------------------------------------------------------------------------- */

.command-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  animation: fadeIn 0.15s ease;
}

.command-modal {
  --bg-panel: #111827;
  --bg-panel-alt: #1f2937;
  --border-light: rgba(255, 255, 255, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.18);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --accent-subtle: rgba(255, 75, 38, 0.12);

  width: 90%;
  max-width: 680px;
  background: #111827 !important;
  color: #f9fafb !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 18px !important;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.command-search-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.command-search-header input {
  flex: 1;
  border: none;
  font-size: 17px;
  font-weight: 600;
  outline: none;
  background: transparent;
  color: #f9fafb !important;
}

.command-results-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
}

.command-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 8px 12px 4px;
}

.command-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.1s ease;
  color: #f9fafb;
}

.command-item:hover, .command-item.focused {
  background: rgba(255, 75, 38, 0.15);
}

.command-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.command-item-left strong {
  font-size: 13.5px;
  color: #f9fafb;
}

.command-item-left small {
  color: #9ca3af;
  font-size: 12px;
}

.command-item-badge {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: #6b7280;
}

.command-backdrop[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  --bg-panel: #111827;
  --bg-panel-alt: #1f2937;
  --border-light: rgba(255, 255, 255, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.18);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --accent-subtle: rgba(255, 75, 38, 0.12);

  width: 100%;
  max-width: 480px;
  background: #111827 !important;
  color: #f9fafb !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 18px !important;
  padding: 30px;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  animation: modalPop 0.22s var(--ease-spring);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2,
.modal-header h3,
.modal-card h2,
.modal-card h3,
.modal-card h4,
.modal-card strong {
  color: #f9fafb !important;
}

.modal-card p {
  color: #9ca3af;
}

.close-modal-btn {
  background: transparent;
  border: none;
  font-size: 19px;
  color: #9ca3af !important;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  line-height: 1;
  transition: all 0.15s ease;
}

.close-modal-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

.modal-card label,
.modal-card .option-field label {
  color: #d1d5db !important;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  display: block;
}

.modal-card input[type="text"],
.modal-card input[type="email"],
.modal-card input[type="password"],
.modal-card input[type="url"],
.settings-modal-card input {
  background: #1f2937 !important;
  border: 1px solid #374151 !important;
  color: #f9fafb !important;
  border-radius: 8px;
  padding: 10px 14px;
}

.modal-card input::placeholder,
.settings-modal-card input::placeholder {
  color: #6b7280 !important;
}

.modal-card input:focus,
.settings-modal-card input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-glow) !important;
  outline: none;
}

.modal-card .file-row-card {
  background: #1f2937 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f9fafb !important;
}

.modal-card .file-row-card strong {
  color: #f9fafb !important;
}

.modal-card .file-row-card code {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #93c5fd !important;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  margin-bottom: 18px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 13.5px;
  color: #9ca3af !important;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.auth-tab-btn.active {
  color: var(--accent) !important;
  border-bottom-color: var(--accent) !important;
}

.auth-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Toast Notification / Tooltip Feedback */
/* Toast Notification / Tooltip Feedback */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-main);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 250;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUpToast 0.25s var(--ease-spring);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.toast-notice.toast-success {
  background: #064e3b;
  border-color: #059669;
  color: #ecfdf5;
}

.toast-notice.toast-error {
  background: #7f1d1d;
  border-color: #dc2626;
  color: #fef2f2;
}

.toast-notice.toast-warning {
  background: #78350f;
  border-color: #d97706;
  color: #fffbeb;
}

.toast-notice.toast-info {
  background: #1e293b;
  border-color: #3b82f6;
  color: #f8fafc;
}

@keyframes slideUpToast {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   Comprehensive Settings Modal (Tabbed Layout)
   ========================================================================== */

.settings-modal-card {
  max-width: 840px !important;
  width: 95%;
  min-height: 560px !important;
  padding: 32px 36px !important;
  display: flex;
  flex-direction: column;
}

.settings-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  margin-bottom: 24px;
  padding-bottom: 8px;
  overflow-x: auto;
}

.settings-tab-btn {
  background: transparent;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: #9ca3af !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.settings-tab-btn:hover {
  color: #f9fafb !important;
  background: rgba(255, 255, 255, 0.06);
}

.settings-tab-btn.active {
  color: var(--accent) !important;
  border-bottom-color: var(--accent) !important;
  background: rgba(255, 75, 38, 0.12) !important;
}

.settings-pane {
  animation: fadeIn 0.18s ease;
}

.settings-pane[hidden] {
  display: none !important;
}

.settings-card-item {
  background: #1f2937 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px;
  padding: 22px 26px;
  color: #f3f4f6 !important;
}

.settings-user-info-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-signout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-signout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

/* Theme picker cards */
.theme-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.theme-choice-card {
  background: var(--bg-panel-alt);
  border: 2px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.theme-choice-card:hover {
  border-color: #4b6267;
  transform: translateY(-1px);
}

.theme-choice-card.active {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.theme-choice-card strong {
  font-size: 13.5px;
  color: #f9fafb !important;
}

.theme-choice-card small {
  font-size: 11.5px;
  color: #9ca3af !important;
  line-height: 1.4;
}

.theme-swatch {
  font-size: 22px;
  margin-bottom: 2px;
}

/* Billing summary inside settings */
.billing-status-summary {
  background: #1f2937 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px;
  padding: 22px 26px;
}

.quota-progress-track {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* API info banner callout */
.api-info-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1) !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
  margin-bottom: 16px;
}

.api-info-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.api-info-text {
  font-size: 12.5px;
  color: var(--text-main);
  line-height: 1.55;
}

.api-info-text code {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 75, 38, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11.5px;
}

/* Enterprise settings dashboard: pinned rail + independently scrolling
   content viewport. These rules intentionally override the legacy compact
   tab strip above. */
.settings-modal-card {
  width: min(94vw, 1020px) !important;
  flex: 0 0 min(94vw, 1020px);
  max-width: none !important;
  height: 78vh;
  min-height: 580px;
  max-height: 820px;
  min-width: 0;
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.settings-modal-card > .modal-header {
  flex: 0 0 auto;
  padding: 24px 30px;
  margin: 0;
  border-bottom: 1px solid var(--border-light);
}

.settings-layout {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.settings-modal-card .settings-tabs {
  flex: 0 0 240px;
  width: 240px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 22px 14px;
  margin: 0;
  border: 0 !important;
  border-right: 1px solid var(--border-light) !important;
  overflow-y: auto;
}

.settings-modal-card .settings-tab-btn {
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  border-bottom: 0;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  color: var(--text-muted) !important;
}

.settings-modal-card .settings-tab-btn > span:first-child {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: currentColor;
  font-size: 13px;
}

.settings-modal-card .settings-tab-btn > span:first-child svg {
  width: 15px;
  height: 15px;
  max-width: 15px;
  max-height: 15px;
  display: block;
  flex: 0 0 15px;
}

.settings-modal-card .settings-tab-btn > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.settings-modal-card .settings-tab-btn strong {
  color: currentColor !important;
  font-size: 12px;
  line-height: 1.25;
}

.settings-modal-card .settings-tab-btn small {
  color: var(--text-dim);
  font-size: 10.5px;
  line-height: 1.25;
}

.settings-modal-card .settings-tab-btn:hover {
  background: var(--bg-panel-alt);
  border-color: var(--border-light);
  color: var(--text-main) !important;
}

.settings-modal-card .settings-tab-btn.active {
  color: var(--accent) !important;
  background: var(--accent-subtle) !important;
  border-color: rgba(255, 75, 38, 0.24) !important;
}

.settings-modal-card .settings-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 28px 32px 24px;
  overflow-y: auto;
}

.settings-modal-card .settings-pane {
  max-width: 700px;
  margin: 0 auto;
}

.settings-modal-card .settings-card-item,
.settings-modal-card .billing-status-summary,
.settings-modal-card .api-info-callout {
  background: var(--bg-panel-alt) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-main) !important;
  box-shadow: none;
}

.settings-modal-card .settings-card-item { padding: 22px 24px; margin-bottom: 16px; }
.settings-modal-card .settings-card-item h4 { color: var(--text-main) !important; margin: 0 0 8px; font-size: 15px; }
.settings-modal-card .settings-card-item p { color: var(--text-muted) !important; }
.settings-modal-card input,
.settings-modal-card select,
.settings-modal-card textarea {
  background: var(--bg-panel-alt) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-main) !important;
}
.settings-modal-card input::placeholder { color: var(--text-dim) !important; }
.settings-modal-card .settings-user-info-row h4 { color: var(--text-main) !important; }
.settings-modal-card .settings-clean-footer { border-color: var(--border-light) !important; }
.settings-eyebrow { display: block; color: var(--accent); font: 700 10px var(--font-mono); letter-spacing: .08em; margin-bottom: 8px; }
.settings-privacy-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; margin-top: 16px; border-top: 1px solid var(--border-light); }
.settings-privacy-toggle-row strong, .settings-privacy-toggle-row small { display: block; }
.settings-privacy-toggle-row strong { font-size: 13px; color: var(--text-main); }
.settings-privacy-toggle-row small { color: var(--text-muted); font-size: 11.5px; line-height: 1.45; margin-top: 4px; }

body.light-mode .settings-modal-card {
  background: #ffffff !important;
  border: 1px solid #e2eae4 !important;
  color: #142023 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15) !important;
}
body.light-mode .settings-modal-card .settings-card-item,
body.light-mode .settings-modal-card .billing-status-summary {
  background: #f8faf9 !important;
  border-color: #e4eae4 !important;
  color: #142023 !important;
}
body.light-mode .settings-modal-card input,
body.light-mode .settings-modal-card select,
body.light-mode .settings-modal-card textarea {
  background: #f8faf9 !important;
  border-color: #d1ddd5 !important;
  color: #142023 !important;
}
body.light-mode .settings-modal-card h3,
body.light-mode .settings-modal-card h4,
body.light-mode .settings-modal-card strong { color: #142023 !important; }
body.light-mode .settings-modal-card p { color: #5e6f72 !important; }

body.dark-mode .settings-modal-card {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}
body.dark-mode .settings-modal-card .settings-card-item,
body.dark-mode .settings-modal-card .billing-status-summary {
  background: #1f2937 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f9fafb !important;
}

/* Google Social Auth & Password Toggle */
.btn-google-auth,
.btn-google-social {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 16px;
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.18s ease;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.1);
  margin-bottom: 14px;
}

.btn-google-auth:hover,
.btn-google-social:hover {
  background: #f8fafc;
  border-color: #bdc1c6;
  box-shadow: 0 2px 6px rgba(60, 64, 67, 0.15);
  transform: translateY(-1px);
}

body.dark-mode .btn-google-auth,
body.dark-mode .btn-google-social {
  background: #1e2630;
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .btn-google-auth:hover,
body.dark-mode .btn-google-social:hover {
  background: #26313f;
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-google-social .google-icon,
.btn-google-auth .google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0 16px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-light);
}

.auth-divider span {
  padding: 0 12px;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 42px !important;
}

.password-toggle-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 17px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.password-toggle-btn:hover {
  color: var(--text-main);
}

.auth-otp-input {
  width: 100%;
  text-align: center;
  font-family: var(--font-mono, monospace);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--bg-panel-alt);
  color: var(--text-main);
  border: 1.5px solid var(--border-light);
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.auth-otp-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}

.otp-resend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Multi-Tier Pricing Modal Grid (₹250 Pro vs ₹750 Developer)
   ========================================================================== */

.pricing-modal-card {
  max-width: 840px !important;
  width: 95%;
  padding: 32px 36px !important;
}

.pricing-tiers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 760px) {
  .pricing-tiers-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-tier-card {
  background: #1f2937 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.2s ease;
}

.pricing-tier-card:hover {
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.pricing-tier-card.popular {
  border-color: var(--accent) !important;
  background: linear-gradient(180deg, rgba(255, 75, 38, 0.12) 0%, #1f2937 100%) !important;
  box-shadow: 0 6px 20px rgba(255, 75, 38, 0.15);
}

.pricing-tier-card.developer {
  border-color: #3b82f6 !important;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.12) 0%, #1f2937 100%) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.15);
}

.tier-popular-tag {
  position: absolute;
  top: -11px;
  right: 20px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff7a59 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.tier-developer-tag {
  position: absolute;
  top: -11px;
  right: 20px;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.tier-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.tier-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #f9fafb !important;
}

.tier-subtitle {
  font-size: 12px;
  color: #9ca3af !important;
}

.tier-price-box {
  margin: 12px 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.tier-price-main {
  display: flex;
  align-items: baseline;
  gap: 0;
}

.tier-price-val {
  font-size: 38px;
  font-weight: 800;
  color: #f9fafb !important;
  line-height: 1;
}

body.light-mode .tier-price-val {
  color: #111827 !important;
}

body.light-mode .tier-price-period,
body.light-mode .tier-price-alt,
body.light-mode .tier-subtitle {
  color: #4b5563 !important;
}

body.light-mode .tier-price-box {
  border-bottom: 1px solid #e5e7eb !important;
}

.tier-price-period {
  font-size: 13.5px;
  font-weight: 600;
  color: #9ca3af !important;
}

.tier-price-alt {
  display: inline-block;
  margin-top: 5px;
  font-size: 12px;
  color: #9ca3af !important;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08) !important;
  padding: 3px 8px;
  border-radius: 5px;
}

.tier-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 20px;
  flex: 1;
}

.tier-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #e5e7eb !important;
}

.tier-features-list li strong {
  color: #f9fafb !important;
}

.tier-features-list li span {
  color: var(--success);
  font-weight: 800;
  font-size: 13.5px;
  flex-shrink: 0;
}

.tier-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.tier-subscribe-btn {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 13.5px;
  font-weight: 800;
}

.tier-subscribe-btn.dev-theme {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.tier-subscribe-btn.dev-theme:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-demo-upgrade {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-main) !important;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.btn-demo-upgrade:hover,
.btn-secondary-action:hover {
  background: var(--bg-app) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  transform: translateY(-1px);
}

.btn-secondary-action {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-main) !important;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

body.dark-mode .btn-demo-upgrade,
body.dark-mode .btn-secondary-action {
  background: #1f2937;
  border-color: #374151 !important;
  color: #f9fafb !important;
}

.cashfree-trust-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 11.5px;
  color: #9ca3af !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.payment-method-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 3px 7px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
  font-weight: 700;
}

.cashfree-trust-note {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 4px;
}

/* Actionable Error Dialog */
.error-dialog-card {
  max-width: 440px;
  text-align: center;
  padding: 32px 28px;
}

.error-dialog-icon {
  font-size: 44px;
  margin-bottom: 12px;
  line-height: 1;
}

.error-dialog-card h3 {
  font-size: 18.5px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-main);
}

.error-dialog-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 22px;
}

.error-dialog-actions {
  display: flex;
  gap: 10px;
}

/* Mobile Backdrop Overlay */
.mobile-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 18, 20, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 45;
}

.mobile-backdrop[hidden] {
  display: none !important;
}

/* Responsive Rules */
@media (max-width: 900px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 100% !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
  }
  .main-area {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
  }
  .dynamic-workspace {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .home-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 16px 12px 64px !important;
  }
  .full-page-view {
    padding: 20px 14px !important;
    margin-bottom: 16px !important;
  }
  .waitlist-form-row,
  .waitlist-input-group {
    flex-direction: column !important;
    width: 100% !important;
  }
  .waitlist-select {
    flex: 1 1 auto !important;
    width: 100% !important;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .sidebar {
    position: fixed;
    left: -290px;
    top: 0;
    bottom: 0;
    width: 290px;
    height: 100vh;
    transition: left 0.3s var(--ease-spring);
    z-index: 50;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  }
  .sidebar.mobile-open {
    left: 0;
  }
  .topbar {
    padding: 0 16px;
  }
  .topbar-upgrade-pill span:not(:first-child) {
    display: none;
  }
  .topbar-upgrade-pill {
    padding: 6px 10px;
  }
  .pdf-studio {
    grid-template-columns: 1fr;
  }
  .studio-thumbnails-bar {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Legal Center Modal & Documents (Privacy Policy & Terms of Service)
   -------------------------------------------------------------------------- */
.legal-modal-card {
  max-width: 780px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.legal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
  flex-shrink: 0;
}

.legal-tab-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.legal-tab-btn:hover {
  color: var(--text-main);
}

.legal-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.legal-scroll-body {
  overflow-y: auto;
  padding-right: 12px;
  flex: 1;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-main);
}

.legal-scroll-body h3 {
  font-size: 16px;
  margin: 16px 0 8px 0;
  color: var(--text-main);
}

.legal-scroll-body p {
  margin-bottom: 12px;
  color: var(--text-muted);
}

.legal-scroll-body ul {
  margin: 0 0 14px 20px;
  color: var(--text-muted);
}

.legal-scroll-body li {
  margin-bottom: 6px;
}

.legal-highlight-box {
  background: var(--bg-panel-alt);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.auth-legal-notice {
  font-size: 11.5px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 14px;
  line-height: 1.45;
}

.auth-legal-notice a,
.settings-legal-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-legal-notice a:hover,
.settings-legal-footer a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Dedicated Full-Screen Workspace Views (Legal & API Documentation)
   ========================================================================== */

.full-page-view {
  background: var(--bg-panel);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 32px 40px;
  min-height: calc(100vh - 160px);
  animation: fadeIn 0.22s var(--ease-spring);
  margin-bottom: 24px;
}

.view-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 26px;
}

.btn-back-workspace {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-back-workspace:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateX(-3px);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.view-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.view-header-title h2 {
  font-size: 21px;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
}

.view-header-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  letter-spacing: 0.04em;
}

.view-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-spec-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s ease;
}

.btn-spec-link.swagger-link {
  background: rgba(255, 75, 38, 0.12);
  color: var(--accent);
  border: 1px solid rgba(255, 75, 38, 0.3);
}

.btn-spec-link.swagger-link:hover {
  background: var(--accent);
  color: #fff;
}

.btn-spec-link.redoc-link {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-spec-link.redoc-link:hover {
  background: #3b82f6;
  color: #fff;
}

/* Legal View Navigation Tabs */
.legal-view-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-panel-alt);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

.legal-view-tab-btn {
  padding: 8px 18px;
  border-radius: 7px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.legal-view-tab-btn.active {
  background: var(--bg-panel);
  color: var(--accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Legal Hero Banner */
.legal-hero-banner {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 26px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  margin-bottom: 28px;
}

.legal-hero-icon {
  font-size: 28px;
  line-height: 1;
}

.legal-hero-banner h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
  color: var(--text-main);
  font-weight: 800;
}

.legal-hero-banner p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Legal Article Typography */
.legal-article section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.legal-article section:last-child {
  border-bottom: none;
}

.legal-article h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 12px 0;
}

.legal-article p {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.7;
  margin: 0 0 12px 0;
}

.legal-article ul {
  margin: 0 0 14px 20px;
  padding: 0;
}

.legal-article li {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 8px;
}

.legal-article code {
  font-family: var(--font-mono);
  background: rgba(255, 75, 38, 0.1);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
}

/* API Docs Dedicated Workspace Styles */
.api-docs-hero-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 24px;
}

.api-docs-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .api-docs-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.api-meta-item {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 18px;
}

.meta-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.meta-val {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.api-code-workbench-card {
  background: #0b1114;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
}

.api-code-workbench-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #141e21;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.full-api-tab {
  background: transparent;
  border: none;
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: #8fa0a3;
  cursor: pointer;
  transition: all 0.15s ease;
}

.full-api-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.full-api-tab.active {
  color: #fff;
  background: var(--accent);
}

.btn-copy-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #eef3f1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.api-code-wrapper {
  position: relative;
  background: #0b1114;
}

.api-code-block {
  margin: 0;
  padding: 20px;
  max-height: 380px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #d1e2e0;
}

.api-code-block code {
  font-family: inherit;
  white-space: pre;
}

.endpoints-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.endpoints-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.endpoints-table th {
  background: var(--bg-panel-alt);
  padding: 14px 18px;
  font-weight: 800;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.endpoints-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
}

.endpoints-table tr:last-child td {
  border-bottom: none;
}

.http-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.http-badge.post {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.http-badge.get {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

/* ==========================================================================
   Global Application Footer
   ========================================================================== */

.app-global-footer {
  margin-top: auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border-top: 1px solid var(--border-light);
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--bg-panel);
  border-radius: 12px 12px 0 0;
}

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

.footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-sep {
  color: var(--text-dim);
  user-select: none;
}

.footer-link-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.footer-link-btn:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ==========================================================================
   PHASE 2: PROFESSIONAL PDF EDITOR STYLES
   ========================================================================== */

/* Unsaved Changes Indicator */
.editor-unsaved-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.unsaved-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  animation: editorPulse 1.6s infinite ease-in-out;
}

@keyframes editorPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* Style Controls in Toolbar */
.editor-style-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-color-input {
  width: 28px;
  height: 28px;
  padding: 1px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  outline: none;
}

.editor-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.editor-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.editor-stroke-select {
  height: 28px;
  background: var(--surface-secondary, #1f2937);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-main, #f3f4f6);
  padding: 0 6px;
  font-size: 11.5px;
  cursor: pointer;
}

/* Floating Text Overlay Panel */
.editor-floating-panel {
  position: fixed;
  top: 130px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow: hidden;
  animation: editorFadeInDown 0.18s ease-out;
}

@keyframes editorFadeInDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.editor-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #1f2937;
}

.editor-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #f3f4f6;
}

.editor-panel-close-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.editor-panel-close-btn:hover {
  color: #f3f4f6;
}

.editor-panel-notice {
  padding: 8px 16px;
  background: rgba(59, 130, 246, 0.1);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  font-size: 11px;
  color: #93c5fd;
  line-height: 1.4;
}

.editor-panel-body {
  padding: 14px 16px;
}

.editor-textarea {
  width: 100%;
  box-sizing: border-box;
  background: #0d1416;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #f3f4f6;
  padding: 10px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

.editor-textarea:focus {
  border-color: var(--accent);
}

.editor-panel-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  align-items: flex-end;
}

.editor-control-col label {
  display: block;
  font-size: 10.5px;
  color: #9ca3af;
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.editor-color-swatch {
  width: 36px;
  height: 32px;
  padding: 2px;
  border: 1px solid #374151;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.editor-select {
  height: 32px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-main);
  padding: 0 8px;
  font-size: 12px;
}

body.light-mode .editor-select {
  background: #ffffff !important;
  border-color: #d1d5db !important;
  color: #111827 !important;
}

body.light-mode .editor-select option {
  background-color: #ffffff !important;
  color: #111827 !important;
}

body.dark-mode .editor-select,
body:not(.light-mode) .editor-select {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}

body.dark-mode .editor-select option,
body:not(.light-mode) .editor-select option {
  background-color: #1f2937 !important;
  color: #f9fafb !important;
}

.editor-toggle-group {
  display: flex;
  gap: 4px;
}

.editor-toggle-btn {
  width: 32px;
  height: 32px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 6px;
  color: #e5e7eb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.editor-toggle-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.editor-panel-footer {
  padding: 12px 16px;
  border-top: 1px solid #1f2937;
}

/* Signature Mark Modal */
.editor-sig-modal-card {
  max-width: 600px;
  width: 90%;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 14px;
  padding: 22px;
}

.editor-sig-tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0 12px;
  border-bottom: 1px solid #1f2937;
  padding-bottom: 8px;
}

.editor-sig-tab-btn {
  background: none;
  border: none;
  color: #9ca3af;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.editor-sig-tab-btn.active {
  background: rgba(255, 75, 38, 0.15);
  color: #ff4b26;
}

.editor-sig-canvas {
  width: 100%;
  height: 180px;
  background: #ffffff;
  border: 2px dashed #4b5563;
  border-radius: 8px;
  cursor: crosshair;
  touch-action: none;
}

.sig-canvas-hint {
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  margin-top: 8px;
}

.editor-sig-input {
  width: 100%;
  box-sizing: border-box;
  background: #0d1416;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #f3f4f6;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
}

.editor-sig-input:focus {
  border-color: var(--accent);
}

.sig-type-preview {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #111827;
  font-family: 'Brush Script MT', cursive, sans-serif;
  font-size: 40px;
  border-radius: 8px;
  margin-top: 14px;
  border: 1px solid #e5e7eb;
}

.editor-sig-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

/* Document Stamp Picker */
.editor-stamp-card {
  max-width: 500px;
  width: 90%;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 14px;
  padding: 22px;
}

.editor-stamps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.stamp-preset-btn {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 14px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.stamp-preset-btn:hover {
  transform: translateY(-2px);
  border-color: #6b7280;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.stamp-badge {
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 19px;
  letter-spacing: 2.5px;
  padding: 5px 12px;
  border: 2.5px solid currentColor;
  border-radius: 4px;
  transform: rotate(-3deg);
  display: inline-block;
}

.stamp-approved .stamp-badge { color: #10b981; }
.stamp-rejected .stamp-badge { color: #ef4444; }
.stamp-draft .stamp-badge { color: #f59e0b; }
.stamp-confidential .stamp-badge { color: #dc2626; }
.stamp-reviewed .stamp-badge { color: #3b82f6; }

.editor-custom-stamp-box {
  background: #0d1416;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 14px;
  margin-top: 8px;
}

.editor-custom-stamp-box input {
  flex: 1;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 6px;
  color: #f3f4f6;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
}

/* =============================================================================
   PHASE 3: PROFESSIONAL PAGE MANAGEMENT ENGINE & ORGANIZER STYLES
   ============================================================================= */

/* Organizer Header Controls */
.organizer-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.organizer-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.org-head-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.org-head-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Floating Multi-Page Batch Toolbar */
.organizer-batch-bar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.35);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 50;
  animation: slideDownBatch 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

@keyframes slideDownBatch {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.batch-bar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.batch-count {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  white-space: nowrap;
}

.batch-bar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.batch-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.batch-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #38bdf8;
}

.batch-btn.batch-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.batch-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}

.batch-close-btn:hover {
  color: #f1f5f9;
}

/* Sub-navigation inside Organizer */
.organizer-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 10px;
}

.organizer-subnav-left,
.organizer-subnav-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.org-sub-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.org-sub-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.org-layout-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.org-layout-btn.active,
.org-layout-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Grid & Strip Containers */
.organizer-grid {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.organizer-grid.grid-mode {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* Organizer Thumb Card */
.organizer-thumb-card {
  background: #1e293b;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  user-select: none;
}

.organizer-thumb-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.organizer-thumb-card.active {
  border-color: var(--accent, #ff4b26);
  box-shadow: 0 0 14px rgba(255, 75, 38, 0.35);
}

.organizer-thumb-card.selected {
  border-color: #38bdf8;
  background: #172554;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

.organizer-thumb-card.dragging {
  opacity: 0.4;
  border-style: dashed;
  border-color: #38bdf8;
}

/* Card Header: Grip, Checkbox, Page Number */
.thumb-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 0 2px;
}

.thumb-grip,
.organizer-drag-handle {
  color: #64748b;
  font-size: 13px;
  cursor: grab;
  padding: 0 2px;
  transition: color 0.15s;
}

.thumb-grip:hover,
.organizer-drag-handle:hover {
  color: #38bdf8;
}

.thumb-checkbox-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.thumb-checkbox {
  cursor: pointer;
  width: 14px;
  height: 14px;
  accent-color: #38bdf8;
}

.thumb-page-num {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  margin-left: auto;
}

/* Preview Canvas / Image Wrap */
.thumb-preview-wrap {
  width: 100%;
  min-height: 110px;
  border-radius: 4px;
  overflow: hidden;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.thumb-rendered-img,
.thumb-rendered-canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
}

.thumb-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 11px;
}

.thumb-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: thumbSpin 0.7s linear infinite;
}

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

/* Card Footer: Metadata & Quick Hover Actions */
.thumb-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 0 2px;
}

.thumb-meta-text {
  font-size: 10px;
  color: #64748b;
  font-family: monospace;
}

.thumb-quick-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0.3;
  transition: opacity 0.15s;
}

.organizer-thumb-card:hover .thumb-quick-actions {
  opacity: 1;
}

.thumb-mini-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  border-radius: 3px;
  padding: 2px 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.thumb-mini-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.btn-del-quick:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
}

/* Drag Drop Indicators */
.organizer-drop-indicator {
  position: absolute;
  pointer-events: none;
  z-index: 100;
  transition: all 0.1s ease;
}

.organizer-drop-indicator.horizontal-indicator {
  height: 3px;
  background: #38bdf8;
  border-radius: 2px;
  box-shadow: 0 0 10px #38bdf8;
}

.organizer-drop-indicator.vertical-indicator {
  width: 3px;
  background: #38bdf8;
  border-radius: 2px;
  box-shadow: 0 0 10px #38bdf8;
}

/* Context Menu */
.page-context-menu {
  position: fixed;
  z-index: 99999;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
  min-width: 210px;
  backdrop-filter: blur(12px);
  animation: fadeInCtx 0.15s ease-out;
}

@keyframes fadeInCtx {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.ctx-item {
  background: transparent;
  border: none;
  color: #e2e8f0;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctx-item:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.ctx-item.ctx-danger {
  color: #f87171;
}

.ctx-item.ctx-danger:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.ctx-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

/* Interactive Canvas Crop Overlay */
.studio-crop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  pointer-events: auto;
  user-select: none;
}

.crop-box {
  position: absolute;
  border: 2px dashed #38bdf8;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
  cursor: move;
  z-index: 101;
}

.crop-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border: 2px solid #0284c7;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  z-index: 102;
}

.handle-nw { top: -5px; left: -5px; cursor: nwse-resize; }
.handle-n  { top: -5px; left: calc(50% - 5px); cursor: ns-resize; }
.handle-ne { top: -5px; right: -5px; cursor: nesw-resize; }
.handle-e  { top: calc(50% - 5px); right: -5px; cursor: ew-resize; }
.handle-se { bottom: -5px; right: -5px; cursor: nwse-resize; }
.handle-s  { bottom: -5px; left: calc(50% - 5px); cursor: ns-resize; }
.handle-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.handle-w  { top: calc(50% - 5px); left: -5px; cursor: ew-resize; }

.crop-dimension-pill {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.crop-floating-toolbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 200;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.crop-tool-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.crop-scope-select {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #cbd5e1;
}

.crop-scope-select label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Phase 3 Modals (Resize, Split, Import) */
.page-modal-card {
  max-width: 520px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.import-modal-card {
  max-width: 680px;
}

.form-group-row {
  margin-bottom: 14px;
}

.form-group-row label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.toggle-pill-group,
.radio-pill-group {
  display: flex;
  gap: 8px;
}

.toggle-pill-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.toggle-pill-btn.active,
.toggle-pill-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #38bdf8;
}

.radio-pill-group label {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Split Mode Card Choices */
.split-mode-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.split-mode-card {
  background: #1e293b;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.15s;
}

.split-mode-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
}

.split-mode-card.active {
  border-color: #38bdf8;
  background: #172554;
}

.split-mode-info {
  flex: 1;
}

.split-mode-info strong {
  display: block;
  color: #f1f5f9;
  font-size: 13px;
}

/* Import Dropzone & Preview Grid */
.import-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
  background: rgba(255, 255, 255, 0.02);
}

.import-dropzone:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.05);
}

.import-thumb-item {
  background: #1e293b;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.import-thumb-item.selected {
  border-color: #38bdf8;
  background: #172554;
}

.import-thumb-item input[type="checkbox"] {
  position: absolute;
  top: 6px;
  left: 6px;
  cursor: pointer;
  accent-color: #38bdf8;
}

.import-thumb-item canvas {
  width: 100%;
  height: auto;
  border-radius: 3px;
  background: #fff;
}

.import-thumb-item span {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
}

/* =============================================================================
   Phase 4: Compression, Repair & OCR Engine Styles
   ============================================================================= */

.compress-modal-card,
.ocr-modal-card,
.repair-modal-card {
  max-width: 540px;
  background: #0d1416;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.compress-analysis-box {
  background: rgba(35, 49, 52, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
}

.compress-presets-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

#ocr-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
  transition: width 0.3s ease;
}

#repair-report-box {
  background: rgba(35, 49, 52, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
}

/* =============================================================================
   Phase 5: Professional Conversion Center Engine Styles
   ============================================================================= */

.convert-modal-card {
  max-width: 640px;
  background: #0e1518;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
}

.convert-direction-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.convert-dir-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.convert-dir-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.convert-dir-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.convert-format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding: 2px 2px 8px 2px;
}

.format-card {
  background: rgba(23, 33, 36, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.format-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(35, 49, 52, 0.8);
  transform: translateY(-1px);
}

.format-card.selected {
  border-color: #38bdf8;
  background: rgba(37, 99, 235, 0.18);
  box-shadow: 0 0 0 1px #38bdf8, 0 4px 12px rgba(56, 189, 248, 0.2);
}

.format-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.format-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.format-icon {
  font-size: 18px;
}

.format-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-full {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-limited {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-unavail {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.format-name {
  font-size: 11px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.format-desc {
  font-size: 9.5px;
  color: #94a3b8;
  line-height: 1.2;
}

/* =============================================================================
   Phase 6: PDF Forms, Signing & Security Engine Styles
   ============================================================================= */

.forms-modal-card {
  max-width: 620px;
  background: #0e1518;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
}

.sign-modal-card {
  max-width: 580px;
  background: #0e1518;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
}

.security-modal-card {
  max-width: 600px;
  background: #0e1518;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
}

.form-field-edit-row {
  transition: all 0.15s ease;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--studio-border);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
}

.form-field-edit-row:hover {
  background: rgba(35, 49, 52, 0.85);
  border-color: rgba(56, 189, 248, 0.4);
}

.form-field-edit-row input[type="text"],
.form-field-edit-row select {
  width: 100%;
  background: #172023;
  border: 1px solid var(--studio-border);
  color: #f1f5f9;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s;
}

.form-field-edit-row input[type="text"]:focus,
.form-field-edit-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Signature Verification Badges */
.badge-valid {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.badge-tampered {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.badge-invalid {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

/* Security Audit styling */
.sec-audit-box {
  background: rgba(35, 49, 52, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
}

.sec-audit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sec-audit-item:last-child {
  border-bottom: none;
}

/* ==========================================================================
   Phase C  -  Simplified Home Page & iLovePDF-Style Tool Directory
   ========================================================================== */

.home-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 36px 32px 72px 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  animation: fadeInHome 0.25s ease-out;
}

@keyframes fadeInHome {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px 20px 16px;
  gap: 16px;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 75, 38, 0.1);
  color: var(--accent);
  border: 1px solid rgba(255, 75, 38, 0.25);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.home-hero-badge .badge-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

.home-hero-title {
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-main);
  max-width: 840px;
  line-height: 1.15;
}

.home-hero-subtitle {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-muted);
  max-width: 660px;
  line-height: 1.55;
}

.home-search-bar {
  width: 100%;
  max-width: 600px;
  margin-top: 10px;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-panel);
  border: 2px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.search-icon-svg {
  color: var(--text-dim);
  flex-shrink: 0;
}

.search-input-wrapper input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-family: var(--font-sans);
  color: var(--text-main);
  width: 100%;
  margin-left: 10px;
}

.search-input-wrapper input::placeholder {
  color: var(--text-dim);
}

.search-clear-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
}

.search-clear-btn:hover {
  color: var(--text-main);
}

.home-filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.filter-pill {
  border: 1px solid var(--border-light);
  background: var(--bg-panel);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.filter-pill:hover {
  border-color: var(--text-dim);
  color: var(--text-main);
}

.filter-pill.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 3px 12px var(--accent-glow);
}

.home-search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.home-search-meta .link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
}

.home-tools-catalog {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.home-cat-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.home-cat-title-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.home-cat-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.home-cat-count {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
}

.home-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.home-tool-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.home-tool-card:hover, .home-tool-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-subtle);
}

.home-tool-card:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.home-tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.home-tool-body {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex-grow: 1;
}

.home-tool-title {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-main);
  margin-bottom: 6px;
}

.home-tool-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 16px;
  flex-grow: 1;
}

.home-tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.home-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.home-status-badge.ready {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.home-status-badge.prereq {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.home-tool-arrow {
  color: var(--text-dim);
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.18s, color 0.18s;
}

.home-tool-card:hover .home-tool-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.home-no-results {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-panel);
  border: 1px dashed var(--border-light);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.no-results-icon {
  font-size: 36px;
}

.tool-desk-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 16px 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 18px;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-back-home:hover {
  background: var(--bg-panel-alt);
  border-color: var(--border-subtle);
  transform: translateX(-2px);
}

.tool-desk-breadcrumb {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   SEO education surface (server-rendered on every public tool URL)
   -------------------------------------------------------------------------- */
.seo-content {
  width: 100%;
  margin: 8px auto 0;
  border-top: 1px solid var(--border-light);
  background: linear-gradient(180deg, transparent 0%, rgba(255, 75, 38, 0.025) 100%);
}

.seo-content-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 0 56px;
}

.seo-eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.seo-content h2 {
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 14px;
}

.seo-content h3 {
  font-size: 16px;
  line-height: 1.25;
  margin-bottom: 8px;
}

.seo-lede {
  max-width: 760px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 28px;
}

.seo-howto-grid,
.seo-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.seo-howto-step,
.seo-proof-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.seo-howto-step > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-subtle);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.seo-howto-step p,
.seo-proof-card p,
.seo-faq-item p {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.seo-comparison {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 28px;
  overflow-x: auto;
}

.seo-comparison-table {
  min-width: 620px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
}

.seo-comparison-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 13px;
}

.seo-comparison-row:first-child { border-top: 0; }
.seo-comparison-head { background: var(--bg-panel-alt); color: var(--text-main); font-weight: 700; }
.seo-comparison-row strong { color: var(--success); }

.seo-faq {
  margin-bottom: 26px;
}

.seo-faq-item {
  border-top: 1px solid var(--border-light);
  padding: 14px 0;
}

.seo-faq-item:last-child { border-bottom: 1px solid var(--border-light); }

.seo-faq-item summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  list-style-position: inside;
  padding: 4px 0;
}

.seo-faq-item p { padding: 10px 24px 0; }

.seo-related {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.seo-related-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(255, 75, 38, 0.25);
  border-radius: 999px;
  padding: 8px 12px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.seo-related-link:hover,
.seo-related-link:focus-visible {
  background: var(--accent-subtle);
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .home-container {
    padding: 20px 16px 48px 16px;
    gap: 24px;
  }
  .home-hero {
    padding: 16px 8px;
  }
  .home-cat-grid {
    grid-template-columns: 1fr;
  }
  .home-filter-pills {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
}

/* Touch-first layout overrides.  The drawer is the primary navigation on
   narrow screens; tool cards become a horizontally swipeable rail. */
@media (max-width: 900px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 100% !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
  }

  .main-area {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
  }

  .sidebar {
    touch-action: pan-y;
    overscroll-behavior: contain;
  }

  .mobile-menu-btn,
  .collapse-btn,
  .sidebar-search-btn,
  .sidebar-settings-gear-btn,
  .topbar .icon-btn,
  .topbar-action-btn,
  .tab-pill,
  .btn-primary-action,
  .btn-back-home,
  .nav-category-tab,
  .sidebar-tool-item,
  .filter-pill,
  .browse-link {
    min-height: 48px;
  }

  .collapse-btn,
  .sidebar-settings-gear-btn { min-width: 48px; }

  .topbar {
    min-height: 64px;
    height: auto;
    gap: 10px;
  }

  .topbar-left,
  .topbar-right {
    min-width: 0;
  }

  .breadcrumb-trail {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .workspace-tabs {
    display: none;
  }

  .dynamic-workspace {
    padding: 20px 16px 42px;
  }

  .tool-hero-card {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }

  .tool-hero-actions { width: 100%; }
  .tool-hero-actions .topbar-action-btn { width: 100%; justify-content: center; }

  .action-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary-action { justify-content: center; }
  .secure-assurance { justify-content: center; text-align: center; }

  .home-cat-grid {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 2px 2px 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .home-tool-card {
    flex: 0 0 min(82vw, 310px);
    scroll-snap-align: start;
  }

  .seo-content-inner { padding: 36px 0 42px; }
  .seo-howto-grid,
  .seo-proof-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .topbar {
    padding: 8px 12px;
    justify-content: flex-start;
  }
  .topbar-left {
    flex: 1;
    min-width: 0;
  }
  .topbar-right { display: none !important; }
  .breadcrumb-trail { gap: 5px; font-size: 12px; }
  .dynamic-workspace { padding-inline: 12px; min-width: 0; }
  .tool-desk-nav-bar .tool-desk-breadcrumb { display: none; }
  .tool-hero-card,
  .dropzone,
  .options-panel,
  .action-bar,
  .result-card {
    width: 100%;
    min-width: 0;
  }
  .tool-hero-card { overflow: hidden; }
  .tool-hero-title-group { width: 100%; }
  .home-container { padding-inline: 0; }
  .dropzone { padding: 34px 12px; }
  .dropzone p {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .dropzone .browse-link {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .dropzone h3 { font-size: 16px; }
  .seo-content-inner { padding-inline: 2px; }
  .seo-comparison { padding: 16px; margin-inline: 0; }
}

@media (max-width: 600px) {
  .topbar-right { display: none !important; }
  .tool-desk-nav-bar .tool-desk-breadcrumb { display: none; }
  .tool-hero-card,
  .dropzone,
  .options-panel,
  .action-bar,
  .result-card { min-width: 0; width: 100%; }
  .tool-hero-title-group { width: 100%; }
}

/* Keep the primary workspace focused on document processing. Account,
   quota, billing, and developer controls remain available from Settings. */
.sidebar .quota-container,
.sidebar .sidebar-upgrade-btn,
.footer-link-developers,
.footer-link-api-docs {
  display: none;
}

@media (max-width: 760px) {
  .settings-modal-card {
    width: 96vw !important;
    height: 88vh;
    min-height: 0;
  }
  .settings-layout { flex-direction: column; overflow: auto; }
  .settings-modal-card .settings-tabs {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: 12px;
    border-right: 0 !important;
    border-bottom: 1px solid var(--border-light) !important;
  }
  .settings-modal-card .settings-tab-btn { min-width: 190px; min-height: 54px; }
  .settings-modal-card .settings-content { padding: 20px 16px; overflow: visible; }
  .settings-modal-card > .modal-header { padding: 18px 20px; }
  .settings-privacy-toggle-row { align-items: flex-start; }
}

@media (max-width: 600px) {
  .topbar-right { display: flex !important; gap: 6px; }
  .topbar-upgrade-pill,
  #topbar-cloud-btn { display: none !important; }
  .topbar-auth-group { gap: 4px; }
  .btn-topbar-signin,
  .btn-topbar-register,
  .topbar-user-pill { min-height: 40px; padding: 6px 8px; font-size: 10.5px; }
  .topbar-user-pill #topbar-username { display: none; }
  .topbar-right .icon-btn { min-height: 40px; min-width: 40px; }
}

/* --------------------------------------------------------------------------
   Unified modal theme contract
   All modal families must follow the active workspace theme. These rules are
   intentionally last so legacy engine-specific selectors cannot reintroduce
   pitch-black panels or low-contrast controls in Light Paper mode.
   -------------------------------------------------------------------------- */
body.light-mode .modal-card,
body.light-mode .page-modal-card,
body.light-mode .command-modal {
  --bg-panel: #ffffff;
  --bg-panel-alt: #f8faf9;
  --border-light: #e2eae4;
  --border-subtle: #d1ddd5;
  --text-main: #142023;
  --text-muted: #5e6f72;
  --text-dim: #8fa0a3;
  --accent-subtle: #fff1ed;
  background: #ffffff !important;
  border: 1px solid #e2eae4 !important;
  color: #142023 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15) !important;
}

body.light-mode .modal-header h2,
body.light-mode .modal-header h3,
body.light-mode .modal-card h2,
body.light-mode .modal-card h3,
body.light-mode .modal-card h4,
body.light-mode .modal-card h5,
body.light-mode .modal-card strong,
body.light-mode .command-modal strong {
  color: #142023 !important;
}

body.light-mode .modal-card p,
body.light-mode .modal-card small,
body.light-mode .modal-card label,
body.light-mode .command-modal small,
body.light-mode .command-group-title {
  color: #5e6f72 !important;
}

body.light-mode .modal-card input,
body.light-mode .modal-card select,
body.light-mode .modal-card textarea,
body.light-mode .page-modal-card input,
body.light-mode .page-modal-card select,
body.light-mode .page-modal-card textarea,
body.light-mode .command-modal input {
  background: #f8faf9 !important;
  border: 1px solid #d1ddd5 !important;
  color: #142023 !important;
}

body.light-mode .modal-card input::placeholder,
body.light-mode .modal-card textarea::placeholder,
body.light-mode .command-modal input::placeholder {
  color: #8fa0a3 !important;
}

body.light-mode .modal-card .file-row-card,
body.light-mode .pricing-tier-card,
body.light-mode .split-mode-card,
body.light-mode .import-thumb-item,
body.light-mode .format-card,
body.light-mode .form-field-edit-row {
  background: #f8faf9 !important;
  border-color: #e2eae4 !important;
  color: #142023 !important;
}

body.light-mode .pricing-tier-card.popular,
body.light-mode .pricing-tier-card.developer {
  background: #f8faf9 !important;
}

body.light-mode .split-mode-card *,
body.light-mode .format-card *,
body.light-mode .form-field-edit-row * {
  color: #142023;
}

body.light-mode .pricing-tier-card h3,
body.light-mode .pricing-tier-card h4,
body.light-mode .pricing-tier-card p,
body.light-mode .pricing-tier-card li,
body.light-mode .pricing-tier-card li strong,
body.light-mode .pricing-tier-card .tier-features-list li {
  color: #142023 !important;
}

body.light-mode .pricing-tier-card .tier-subscribe-btn,
body.light-mode .pricing-tier-card .tier-subscribe-btn * {
  color: #ffffff !important;
}

body.light-mode .format-desc,
body.light-mode .format-name,
body.light-mode .split-mode-info strong,
body.light-mode .command-item,
body.light-mode .command-item-left strong {
  color: #142023 !important;
}

body.light-mode .command-search-header,
body.light-mode .extraction-modal-header,
body.light-mode .modal-footer,
body.light-mode .modal-body,
body.light-mode .editor-sig-tabs {
  border-color: #e2eae4 !important;
}

body.light-mode .command-item {
  color: #142023 !important;
}

body.light-mode .command-item:hover,
body.light-mode .command-item.focused {
  background: #fff1ed !important;
}

body.light-mode .compress-analysis-box,
body.light-mode .import-preview-area,
body.light-mode .sec-status-hero,
body.light-mode #ocr-progress-box,
body.light-mode #repair-report-box,
body.light-mode .modal-card [style*="background: rgba(35, 49, 52"],
body.light-mode .modal-card [style*="background: rgba(30, 41, 59"] {
  background: #f4f6f3 !important;
  border-color: #e2eae4 !important;
  color: #142023 !important;
}

body.light-mode .modal-card [style*="color: #fff"],
body.light-mode .modal-card [style*="color:#fff"],
body.light-mode .modal-card [style*="color: #f9fafb"],
body.light-mode .modal-card [style*="color:#f9fafb"] {
  color: #142023 !important;
}

body.dark-mode .modal-card,
body.dark-mode .page-modal-card,
body.dark-mode .command-modal {
  --bg-panel: #111827;
  --bg-panel-alt: #1f2937;
  --border-light: #374151;
  --border-subtle: #4b5563;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  background: #111827 !important;
  color: #f9fafb !important;
}

body.dark-mode .command-modal input,
body.dark-mode .modal-card input,
body.dark-mode .modal-card select,
body.dark-mode .modal-card textarea {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}

body.dark-mode .pricing-tier-card,
body.dark-mode .split-mode-card,
body.dark-mode .import-thumb-item,
body.dark-mode .format-card,
body.dark-mode .form-field-edit-row {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}

body.dark-mode .compress-analysis-box,
body.dark-mode .import-preview-area,
body.dark-mode .sec-status-hero,
body.dark-mode #ocr-progress-box,
body.dark-mode #repair-report-box {
  background: #172023 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}

/* =============================================================================
   Phase 6 Fix: Field Dimension Grid
   ============================================================================= */

.field-dimension-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.dimension-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dimension-cell small {
  color: var(--text-muted);
  font-size: 11px;
}

.dimension-input {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 6px 8px !important;
}

/* =============================================================================
   VIEW 6: Dedicated Native Desktop & Mobile Apps Hub
   ============================================================================= */

.download-full-view {
  background: var(--bg-app);
  color: var(--text-main);
  padding-bottom: 60px;
}

.download-badge-fast {
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
}

.download-content-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.download-hero-banner {
  background: linear-gradient(135deg, rgba(255, 75, 38, 0.08), rgba(20, 32, 35, 0.6));
  border: 1px solid rgba(255, 75, 38, 0.2);
  border-radius: 12px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.download-hero-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: rgba(255, 75, 38, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.download-hero-text h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 6px 0;
}

.download-hero-text p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.waitlist-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.waitlist-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.waitlist-card-header h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--text-main);
}

.waitlist-card-header p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 6px 0 0 0;
  display: block;
  overflow: visible;
}

.waitlist-stats-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 75, 38, 0.1);
  border: 1px solid rgba(255, 75, 38, 0.2);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.waitlist-form-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.waitlist-input-group {
  display: flex;
  gap: 10px;
  flex: 1;
  align-items: stretch;
}

.waitlist-select {
  flex: 0 0 250px;
  height: 44px !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
  padding: 0 14px !important;
  font-size: 13.5px !important;
  line-height: 42px !important;
  border-radius: 8px !important;
  background-color: var(--bg-panel-alt, #1f2937) !important;
  color: var(--text-main, #f9fafb) !important;
  border: 1px solid var(--border-light, #374151) !important;
  outline: none;
}

.waitlist-select option {
  padding: 10px 14px !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  min-height: 36px !important;
}

.waitlist-email-input {
  flex: 1;
  height: 44px !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
  padding: 0 16px !important;
  font-size: 13.5px !important;
  line-height: 42px !important;
  border-radius: 8px !important;
  background-color: var(--bg-panel-alt, #1f2937) !important;
  color: var(--text-main, #f9fafb) !important;
  border: 1px solid var(--border-light, #374151) !important;
  outline: none;
  transition: border-color 0.15s ease;
}

.waitlist-email-input:focus,
.waitlist-select:focus {
  border-color: var(--accent) !important;
}

body:not(.dark-mode) .waitlist-select,
body:not(.dark-mode) .waitlist-email-input {
  background-color: #ffffff !important;
  color: #142023 !important;
  border-color: #d1d5db !important;
}

.waitlist-submit-btn {
  height: 44px !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
  padding: 0 22px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
}

.waitlist-success-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  padding: 16px 20px;
}

.waitlist-success-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.waitlist-success-banner strong {
  font-size: 14px;
  color: #059669;
  display: block;
  margin-bottom: 4px;
}

.waitlist-success-banner p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

.platform-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.platform-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
}

.platform-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 75, 38, 0.35);
  box-shadow: var(--shadow-md);
}

.platform-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.win-icon { background: rgba(0, 164, 239, 0.12); color: #00a4ef; }
.mac-icon { background: rgba(160, 160, 160, 0.15); color: var(--text-main); }
.linux-icon { background: rgba(233, 84, 32, 0.12); color: #e95420; }
.android-icon { background: rgba(61, 220, 132, 0.12); color: #3ddc84; }
.ios-icon { background: rgba(10, 132, 255, 0.12); color: #0a84ff; }

.platform-card-header h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px 0;
  color: var(--text-main);
}

.platform-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.platform-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.platform-features li {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-features li::before {
  content: '✓';
  color: #10b981;
  font-weight: 700;
  font-size: 11px;
}

.platform-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

.platform-status-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.platform-status-tag.ready {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.platform-status-tag.testing {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.btn-platform-join {
  font-size: 11.5px;
  padding: 4px 10px;
}

/* --------------------------------------------------------------------------
   Mobile Workspace Bottom Navigation Bar
   -------------------------------------------------------------------------- */
.mobile-workspace-bar {
  display: none;
}

@media (max-width: 900px) {
  .mobile-workspace-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: rgba(18, 26, 28, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  body.light-mode .mobile-workspace-bar {
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #dfe7e1;
  }

  .mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    gap: 4px;
    cursor: pointer;
    padding: 6px 12px;
    transition: color 0.15s ease;
  }

  .mobile-nav-btn svg {
    transition: transform 0.15s ease;
  }

  .mobile-nav-btn.active {
    color: var(--accent);
    font-weight: 700;
  }

  .mobile-nav-btn.active svg {
    transform: translateY(-2px);
  }

  .dynamic-workspace,
  .main-content {
    padding-bottom: 74px !important;
  }
}




