    :root {
      --color-app-bg: #F5F5F5;
      --color-panel-bg: #FFFFFF;
      --color-input-bg: #EEEEEE;
      --color-primary-text: #1F2937;
      --color-secondary-text: #4B5563;
      --color-accent: #F97316;
      --color-highlight: #E5E7EB;
    }

    .dark {
      --color-app-bg: #0A0A0A;
      --color-panel-bg: #101010;
      --color-input-bg: #222222;
      --color-primary-text: #F0F0F0;
      --color-secondary-text: #9CA3AF;
      --color-accent: #F97316;
      --color-highlight: #333333;
    }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--color-app-bg);
      color: var(--color-primary-text);
      margin: 0;
    }

    /* Layout */
    .app-layout {
      display: grid;
      grid-template-columns: 0 1fr;
      min-height: 100vh;
      transition: grid-template-columns 0.3s ease;
    }

    .app-layout.sidebar-expanded {
      grid-template-columns: 240px 1fr;
    }

    /* Sidebar */
    .sidebar {
      background: var(--color-app-bg);
      border-right: 1px solid var(--color-highlight);
      display: flex;
      flex-direction: column;
      padding: 1rem 0.75rem 0;
      gap: 0.5rem;
      height: 100vh;
      overflow: hidden;
      transition: transform 0.3s ease, opacity 0.3s ease;
      z-index: 40;
      transform: translateX(-100%);
      opacity: 0;
      pointer-events: none;
    }

    .sidebar-expanded .sidebar {
      transform: translateX(0);
      opacity: 1;
      pointer-events: auto;
    }

    /* Scrollable nav area */
    .sidebar-scroll {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      scrollbar-width: thin;
      scrollbar-color: var(--color-highlight) transparent;
    }

    .sidebar-scroll::-webkit-scrollbar {
      width: 4px;
    }

    .sidebar-scroll::-webkit-scrollbar-track {
      background: transparent;
    }

    .sidebar-scroll::-webkit-scrollbar-thumb {
      background: var(--color-highlight);
      border-radius: 4px;
    }

    /* Fixed footer */
    .sidebar-footer {
      padding: 0.5rem 0 1rem;
      border-top: none;
      margin-top: 0.5rem;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }

    /* User */
    .sidebar-user {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.5rem 0.75rem;
      margin-bottom: 0.5rem;
    }

    .sidebar-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: var(--color-highlight);
      display: grid;
      place-items: center;
      color: var(--color-secondary-text);
      font-weight: 600;
      font-size: 0.875rem;
      position: relative;
      overflow: hidden;
    }

    .sidebar-username {
      font-size: 0.9rem;
      font-weight: 500;
      color: var(--color-primary-text);
      flex: 1;
    }

    .sidebar-user-info {
      display: flex;
      flex-direction: column;
      flex: 1;
      min-width: 0;
    }

    .beta-badge {
      display: none;
      font-size: 0.65rem;
      font-weight: 600;
      color: #3B82F6;
      background: rgba(59, 130, 246, 0.1);
      padding: 0.125rem 0.375rem;
      border-radius: 9999px;
      width: fit-content;
      margin-top: 0.125rem;
    }

    .beta-badge.show {
      display: inline-block;
    }

    /* Profile Dropdown */
    .sidebar-user {
      position: relative;
    }

    .profile-trigger {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex: 1;
      cursor: pointer;
      padding: 0.25rem;
      margin: -0.25rem;
      border-radius: 0.5rem;
      transition: background 0.15s;
    }

    .profile-trigger:hover {
      background: var(--color-highlight);
    }

    .profile-dropdown {
      position: absolute;
      top: calc(100% + 0.5rem);
      left: 0;
      right: 0;
      background: var(--color-panel-bg);
      border: 1px solid var(--color-highlight);
      border-radius: 0.75rem;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
      z-index: 1000;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-8px);
      transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
      overflow: hidden;
    }

    .profile-dropdown.show {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    .profile-dropdown-header {
      padding: 1rem;
      border-bottom: 1px solid var(--color-highlight);
    }

    .profile-dropdown-name {
      font-weight: 600;
      color: var(--color-primary-text);
      font-size: 0.95rem;
    }

    .profile-dropdown-menu {
      padding: 0.5rem;
      display: flex;
      flex-direction: column;
      gap: 0;
    }

    .profile-dropdown-item {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.625rem 0.5rem;
      border-radius: 0.5rem;
      color: var(--color-primary-text);
      font-size: 0.875rem;
      cursor: pointer;
      transition: background 0.15s;
      border: none;
      background: none;
      width: 100%;
      text-align: left;
    }

    .profile-dropdown-item:hover {
      background: var(--color-highlight);
    }

    .profile-dropdown-item svg {
      width: 18px;
      height: 18px;
      flex-shrink: 0;
      color: var(--color-secondary-text);
    }

    .profile-dropdown-item.danger {
      color: #EF4444;
    }

    .profile-dropdown-item.danger svg {}

    .subscription-tag {
      margin-left: auto;
      font-size: 0.65rem;
      font-weight: 600;
      padding: 0.2rem 0.5rem;
      border-radius: 5px;
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }

    .subscription-tag.free {
      background: var(--color-highlight);
      color: var(--color-secondary-text);
    }

    .subscription-tag.premium {
      background: linear-gradient(135deg, #fef3c7, #fde68a);
      color: #b45309;
      font-weight: 600;
      border: 1px solid rgba(180, 83, 9, 0.1);
    }

    .profile-dropdown-item.danger svg {
      color: #EF4444;
    }

    .profile-dropdown-divider {
      height: 0;
      border: none;
      border-top: 1px solid var(--color-highlight);
      margin: 0.5rem 0;
      flex-shrink: 0;
    }

    .sidebar-close-btn {
      width: 24px;
      height: 24px;
      background: transparent;
      border: none;
      cursor: pointer;
      color: var(--color-secondary-text);
      opacity: 0.6;
      padding: 0;
    }

    .sidebar-close-btn:hover {
      opacity: 1;
    }

    .sidebar-close-btn svg {
      width: 20px;
      height: 20px;
    }

    /* Wave */
    .sidebar-wave {
      height: 12px;
      background-repeat: repeat-x;
      background-position: center;
      background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 40 12'><path d='M0 6 Q 5 0 10 6 T 20 6 T 30 6 T 40 6' fill='none' stroke='%23555' stroke-width='1.5' stroke-linecap='round' opacity='0.3'/></svg>");
    }

    /* Nav */
    .sidebar-nav {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.6rem 0.75rem;
      border-radius: 8px;
      color: var(--color-secondary-text);
      text-decoration: none;
      transition: all 0.2s ease;
      cursor: pointer;
    }

    .nav-item:hover {
      background: var(--color-input-bg);
      color: var(--color-primary-text);
    }

    .nav-item.active {
      color: var(--color-primary-text);
      background: var(--color-highlight);
      font-weight: 600;
    }

    .nav-item svg {
      width: 20px;
      height: 20px;
      min-width: 20px;
    }

    .nav-item-text {
      font-size: 0.875rem;
      font-weight: 500;
    }

    .sidebar-divider {
      height: 1px;
      background: var(--color-highlight);
      margin: 0.75rem 0.5rem;
    }

    /* Section Labels */
    .nav-section-label {
      font-size: 0.7rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--color-secondary-text);
      opacity: 0.6;
      padding: 0.75rem 0.75rem 0.25rem;
      margin-top: 0.5rem;
    }

    /* Nav Group (expandable) */
    .nav-group {}

    .nav-group-header {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.75rem;
      border-radius: 12px;
      color: var(--color-secondary-text);
      text-decoration: none;
      transition: all 0.2s ease;
      cursor: pointer;
    }

    .nav-group-header:hover {
      background: var(--color-input-bg);
      color: var(--color-primary-text);
    }

    .nav-group-header.active {
      color: var(--color-primary-text);
      background: var(--color-highlight);
      font-weight: 600;
    }

    .nav-group-header svg {
      width: 22px;
      height: 22px;
      min-width: 22px;
    }

    .nav-group-header .nav-item-text {
      flex: 1;
    }

    .nav-group-header .expand-icon {
      width: 16px;
      height: 16px;
      min-width: 16px;
      transition: transform 0.2s ease;
    }

    .nav-group.expanded .nav-group-header .expand-icon {
      transform: rotate(90deg);
    }

    .nav-submenu {
      display: none;
      flex-direction: column;
      gap: 0.125rem;
      padding-left: 1rem;
      margin-top: 0.25rem;
    }

    .nav-group.expanded .nav-submenu {
      display: flex;
    }

    .nav-submenu .nav-item {
      padding: 0.5rem 0.75rem;
      font-size: 0.8rem;
    }

    .nav-submenu .nav-item svg {
      width: 18px;
      height: 18px;
      min-width: 18px;
    }

    /* Open button */
    .sidebar-open-btn {
      position: fixed;
      top: 2.1rem;
      left: 1.2rem;
      width: 24px;
      height: 24px;
      background: transparent;
      border: none;
      cursor: pointer;
      z-index: 50;
      padding: 0;
    }

    .sidebar-open-btn svg {
      width: 20px;
      height: 20px;
      opacity: 0.6;
      color: var(--color-primary-text);
    }

    .sidebar-open-btn:hover svg {
      opacity: 1;
    }

    .sidebar-expanded .sidebar-open-btn {
      opacity: 0;
      pointer-events: none;
    }

    /* Main */
    .main-content {
      position: relative;
      overflow-y: auto;
      height: 100vh;
    }

    /* HTMX loading indicator */
    .htmx-request .loading-indicator {
      opacity: 1;
    }

    .loading-indicator {
      opacity: 0;
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 100;
      transition: opacity 0.2s;
      pointer-events: none;
    }

    /* Settings Floating Panel */
    .settings-overlay {
      position: fixed;
      inset: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .settings-overlay.hidden {
      display: none;
    }

    .settings-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(2px);
    }

    .settings-panel {
      position: relative;
      width: 90%;
      max-width: 800px;
      height: 600px;
      max-height: 85vh;
      background: var(--color-panel-bg);
      border-radius: 16px;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .settings-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1rem 1.5rem;
      border-bottom: 1px solid var(--color-highlight);
      flex-shrink: 0;
    }

    .settings-close-btn {
      padding: 0.5rem;
      border-radius: 8px;
      color: var(--color-secondary-text);
      transition: all 0.15s;
      background: transparent;
      border: none;
      cursor: pointer;
    }

    .settings-close-btn:hover {
      background: var(--color-highlight);
      color: var(--color-primary-text);
    }

    /* Horizontal Tabs Layout */
    .settings-body {
      display: flex;
      flex-direction: column;
      flex: 1;
      overflow: hidden;
    }

    .settings-sidebar {
      width: 100%;
      background: var(--color-panel-bg);
      padding: 0.75rem 1.5rem;
      border-right: none;
      border-bottom: 1px solid var(--color-highlight);
      display: flex;
      flex-direction: row;
      gap: 0.5rem;
      flex-shrink: 0;
      overflow-x: auto;
      align-items: center;
      justify-content: center;
    }

    .settings-tab {
      text-align: center;
      padding: 0.375rem 0.75rem;
      border-radius: 6px;
      font-size: 0.875rem;
      color: var(--color-secondary-text);
      background: transparent;
      border: none;
      cursor: pointer;
      transition: all 0.15s;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      white-space: nowrap;
      margin-bottom: 0;
    }

    .settings-tab svg {
      width: 16px;
      height: 16px;
      opacity: 0.7;
    }

    .settings-tab:hover {
      background: var(--color-input-bg);
      color: var(--color-primary-text);
    }

    .settings-tab.active {
      background: var(--color-highlight);
      color: var(--color-primary-text);
      font-weight: 600;
      box-shadow: none;
    }

    .settings-tab.active svg {
      opacity: 1;
      color: var(--color-accent);
    }

    .settings-main {
      flex: 1;
      padding: 2rem;
      overflow-y: auto;
    }

    .settings-page {
      display: none;
      animation: fadeIn 0.15s ease-out;
    }

    .settings-page.active {
      display: block;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(2px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Keep existing utils */
    .settings-section {
      margin-bottom: 2rem;
    }

    .settings-section:last-child {
      margin-bottom: 0;
    }

    .settings-section-title {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--color-primary-text);
      margin-bottom: 1rem;
    }

    .settings-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.75rem 0;
      border-bottom: 1px solid var(--color-highlight);
    }

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

    .settings-label {
      font-size: 0.875rem;
      color: var(--color-primary-text);
    }

    .settings-desc {
      font-size: 0.75rem;
      color: var(--color-secondary-text);
      margin-top: 0.125rem;
    }

    .settings-toggle-group {
      display: flex;
      gap: 0.25rem;
      background: var(--color-input-bg);
      padding: 0.25rem;
      border-radius: 8px;
    }

    .settings-toggle-btn {
      padding: 0.375rem 0.75rem;
      font-size: 0.8rem;
      font-weight: 500;
      border-radius: 6px;
      border: none;
      cursor: pointer;
      transition: all 0.15s;
      background: transparent;
      color: var(--color-secondary-text);
    }

    .settings-toggle-btn:hover {
      color: var(--color-primary-text);
    }

    .settings-toggle-btn.active {
      background: var(--color-accent);
      color: white;
    }

    .settings-kbd {
      padding: 0.25rem 0.5rem;
      font-size: 0.75rem;
      font-family: monospace;
      background: var(--color-input-bg);
      border-radius: 4px;
      color: var(--color-secondary-text);
    }

    /* Feedback Button */
    .feedback-btn {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.6rem 0.75rem;
      border-radius: 8px;
      color: var(--color-secondary-text);
      background: transparent;
      border: none;
      cursor: pointer;
      transition: all 0.2s ease;
      width: 100%;
      text-align: left;
      font-size: 0.875rem;
      font-weight: 500;
      font-family: inherit;
    }

    .feedback-btn:hover {
      background: var(--color-input-bg);
      color: var(--color-primary-text);
    }

    .feedback-btn svg {
      width: 20px;
      height: 20px;
      min-width: 20px;
    }

    /* Feedback Modal */
    .feedback-overlay {
      position: fixed;
      inset: 0;
      z-index: 200;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.2s, visibility 0.2s;
    }

    .feedback-overlay.show {
      opacity: 1;
      visibility: visible;
    }

    .feedback-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(4px);
    }

    .feedback-modal {
      position: relative;
      width: 90%;
      max-width: 480px;
      background: var(--color-panel-bg);
      border-radius: 16px;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
      overflow: hidden;
      transform: translateY(20px) scale(0.95);
      transition: transform 0.25s ease;
    }

    .feedback-overlay.show .feedback-modal {
      transform: translateY(0) scale(1);
    }

    .feedback-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1.25rem 1.5rem;
      border-bottom: 1px solid var(--color-highlight);
    }

    .feedback-header h3 {
      font-size: 1.125rem;
      font-weight: 600;
      color: var(--color-primary-text);
      margin: 0;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .feedback-header h3 svg {
      width: 22px;
      height: 22px;
      color: var(--color-primary-text);
    }

    .feedback-close-btn {
      padding: 0.5rem;
      border-radius: 8px;
      color: var(--color-secondary-text);
      background: transparent;
      border: none;
      cursor: pointer;
      transition: all 0.15s;
    }

    .feedback-close-btn:hover {
      background: var(--color-highlight);
      color: var(--color-primary-text);
    }

    .feedback-body {
      padding: 1.5rem;
    }

    .feedback-type-selector {
      display: flex;
      background: var(--color-input-bg);
      border-radius: 10px;
      padding: 4px;
      margin-bottom: 1.25rem;
      gap: 0;
      position: relative;
    }

    /* Sliding indicator */
    .feedback-slider {
      position: absolute;
      top: 4px;
      bottom: 4px;
      left: 4px;
      width: calc(33.333% - 2.67px);
      background: #DBEAFE;
      border-radius: 7px;
      transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
      z-index: 0;
    }

    .dark .feedback-slider {
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    /* Slider positions */
    .feedback-slider[data-position="0"] {
      transform: translateX(0);
      background: #DBEAFE;
    }

    .feedback-slider[data-position="1"] {
      transform: translateX(100%);
      background: #FEE2E2;
    }

    .feedback-slider[data-position="2"] {
      transform: translateX(200%);
      background: #EDE9FE;
    }

    .dark .feedback-slider[data-position="0"] {
      background: #1E3A5F;
    }

    .dark .feedback-slider[data-position="1"] {
      background: #5C1F1F;
    }

    .dark .feedback-slider[data-position="2"] {
      background: #3B2E5A;
    }

    .feedback-type-btn {
      flex: 1;
      padding: 0.5rem 0.75rem;
      border-radius: 7px;
      border: none;
      background: transparent;
      color: var(--color-secondary-text);
      font-size: 0.8rem;
      font-weight: 500;
      cursor: pointer;
      transition: color 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.375rem;
      position: relative;
      z-index: 1;
    }

    .feedback-type-btn:hover {
      color: var(--color-primary-text);
    }

    /* Active text colors */
    .feedback-type-btn[data-type="feature"].active {
      color: #1E40AF;
    }

    .feedback-type-btn[data-type="bug"].active {
      color: #B91C1C;
    }

    .feedback-type-btn[data-type="other"].active {
      color: #6D28D9;
    }

    .dark .feedback-type-btn[data-type="feature"].active {
      color: #93C5FD;
    }

    .dark .feedback-type-btn[data-type="bug"].active {
      color: #FCA5A5;
    }

    .dark .feedback-type-btn[data-type="other"].active {
      color: #C4B5FD;
    }

    .feedback-type-btn svg {
      width: 14px;
      height: 14px;
    }

    .feedback-textarea {
      width: 100%;
      min-height: 140px;
      padding: 1rem;
      border-radius: 12px;
      border: 1px solid var(--color-highlight);
      background: var(--color-input-bg);
      color: var(--color-primary-text);
      font-size: 0.9rem;
      font-family: inherit;
      resize: vertical;
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .feedback-textarea::placeholder {
      color: var(--color-secondary-text);
      opacity: 0.6;
    }

    .feedback-textarea:focus {
      outline: none;
      border-color: var(--color-primary-text);
      box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.15);
    }

    .feedback-footer {
      padding: 1rem 1.5rem 1.5rem;
      display: flex;
      gap: 0.75rem;
      justify-content: flex-end;
    }

    .feedback-cancel-btn {
      padding: 0.625rem 1.25rem;
      border-radius: 8px;
      border: 1px solid var(--color-highlight);
      background: transparent;
      color: var(--color-primary-text);
      font-size: 0.875rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s;
    }

    .feedback-cancel-btn:hover {
      background: var(--color-highlight);
    }

    .feedback-submit-btn {
      padding: 0.625rem 1.5rem;
      border-radius: 8px;
      border: none;
      background: var(--color-primary-text);
      color: var(--color-app-bg);
      font-size: 0.875rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .feedback-submit-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    .feedback-submit-btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }

    .feedback-submit-btn .spinner {
      width: 16px;
      height: 16px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-top-color: white;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }

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

    .feedback-success {
      text-align: center;
      padding: 2rem 1.5rem;
    }

    .feedback-success-icon {
      width: 64px;
      height: 64px;
      background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 1rem;
    }

    .feedback-success-icon svg {
      width: 32px;
      height: 32px;
      color: white;
    }

    .feedback-success h4 {
      font-size: 1.125rem;
      font-weight: 600;
      color: var(--color-primary-text);
      margin: 0 0 0.5rem;
    }

    .feedback-success p {
      color: var(--color-secondary-text);
      font-size: 0.875rem;
      margin: 0;
    }

    /* Slow Transition Style for Flashbang Prevention */
    /* Slow Transition Style for Flashbang Prevention */
    .slow-transition,
    .slow-transition body,
    .slow-transition * {
        transition-property: background-color, border-color, color;
        transition-duration: 0.8s; /* Slow transition */
        transition-timing-function: ease-in-out;
    }

    /* Restore Snap/Fast Transitions for Layout elements */
    .slow-transition .app-layout {
        transition: grid-template-columns 0.3s ease, background-color 0.8s ease !important;
    }

    .slow-transition .sidebar {
        transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.8s ease, border-color 0.8s ease !important;
    }
