    :root {
      --bg-base: #0a0c0e;
      --bg-elevated: #121416;
      --bg-card: #1a1d21;
      --bg-hover: #23272d;
      --bg-active: #2a2f36;

      --border: #2d3139;
      --border-focus: #3d4149;

      --text-primary: #e4e6eb;
      --text-secondary: #a8abb5;
      --text-tertiary: #6e7380;

      --accent: #5b8fc7;
      --accent-hover: #6fa3db;
      --accent-muted: rgba(91, 143, 199, 0.12);

      --success: #4caf50;
      --warning: #ff9800;
      --error: #f44336;

      --radius-sm: 6px;
      --radius-md: 10px;
      --radius-lg: 14px;

      --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
      --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
      --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
    }

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

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
      background: var(--bg-base);
      color: var(--text-primary);
      line-height: 1.6;
      overflow-x: hidden;
    }

    /* ===== BACKGROUND EFFECT ===== */
    .bg-effect {
      position: fixed;
      inset: 0;
      z-index: 0;
      background: radial-gradient(ellipse at 20% 30%, rgba(91, 143, 199, 0.08) 0%, transparent 50%),
                  radial-gradient(ellipse at 80% 70%, rgba(91, 143, 199, 0.06) 0%, transparent 50%);
      pointer-events: none;
    }

    /* ===== HEADER =====  */
    .header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 56px;
      background: rgba(23, 25, 28, 0.85);
      border-bottom: 1px solid rgba(91, 143, 199, 0.15);
      z-index: 100;
      backdrop-filter: blur(20px) saturate(180%);
      -webkit-backdrop-filter: blur(20px) saturate(180%);
    }

    .header-inner {
      max-width: 1600px;
      margin: 0 auto;
      height: 100%;
      padding: 0 24px;
      display: flex;
      align-items: center;
      gap: 24px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 20px;
      font-weight: 700;
      background: linear-gradient(135deg, #5b8fc7 0%, #7ba5d8 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      letter-spacing: -0.3px;
    }

    .brand:hover {
      transform: scale(1.02);
      filter: brightness(1.15);
    }

    .brand-icon {
      width: 42px;
      height: 42px;
      background: linear-gradient(135deg, rgba(91, 143, 199, 0.2) 0%, rgba(91, 143, 199, 0.1) 100%);
      border: 2px solid rgba(91, 143, 199, 0.4);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 0 20px rgba(91, 143, 199, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
      position: relative;
      overflow: hidden;
    }

    .brand-icon svg {
      width: 24px;
      height: 24px;
      fill: none;
      stroke: var(--accent);
      color: var(--accent);
    }

    .brand-icon::before {
      content: '';
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: linear-gradient(45deg, transparent, rgba(91, 143, 199, 0.2), transparent);
      transform: rotate(45deg);
      animation: shine 3s infinite;
    }

    @keyframes shine {
      0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
      50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    }

    /* ===== MAIN NAV ===== */
    .main-nav {
      display: flex;
      align-items: center;
      gap: 2px;
      flex: 1;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 14px;
      border-radius: 8px;
      color: var(--text-secondary);
      text-decoration: none;
      font-size: 14px;
      font-weight: 500;
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      cursor: pointer;
      white-space: nowrap;
      position: relative;
    }

    .nav-item::before {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 2px;
      background: var(--accent);
      transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      border-radius: 2px;
    }

    .nav-item:hover {
      background: rgba(91, 143, 199, 0.08);
      color: var(--text-primary);
    }

    .nav-item:hover::before {
      width: 70%;
    }

    .nav-item.active {
      background: rgba(91, 143, 199, 0.15);
      color: var(--accent);
    }

    .nav-item.active::before {
      width: 70%;
    }

    .nav-item i {
      font-size: 16px;
      width: 20px;
      text-align: center;
    }

    /* ===== HEADER ACTIONS ===== */
    .header-actions {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .icon-btn {
      position: relative;
      width: 40px;
      height: 40px;
      border-radius: var(--radius-sm);
      background: transparent;
      border: none;
      color: var(--text-secondary);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      transition: all 0.2s;
    }

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

    .icon-btn .badge {
      position: absolute;
      top: 4px;
      right: 4px;
      background: var(--error);
      color: white;
      font-size: 10px;
      font-weight: 600;
      min-width: 18px;
      height: 18px;
      border-radius: 9px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 5px;
    }

    .user-chip {
      position: relative;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 12px 6px 6px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 24px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .user-chip:hover {
      background: var(--bg-hover);
      border-color: var(--border-focus);
    }

    .user-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent) 0%, #4a7aa8 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      font-weight: 600;
      color: white;
    }

    .user-name {
      font-size: 14px;
      font-weight: 500;
    }

    /* ===== USER MENU DROPDOWN ===== */
    .user-menu {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      width: 240px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-lg);
      display: none;
      flex-direction: column;
      overflow: hidden;
      z-index: 1000;
      animation: dropdownFade 0.2s ease;
    }

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

    .user-menu.open {
      display: flex;
    }

    .user-menu-header {
      padding: 16px;
      border-bottom: 1px solid var(--border);
      background: var(--bg-elevated);
    }

    .user-menu-name {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
    }

    .user-menu-email {
      font-size: 12px;
      color: var(--text-tertiary);
      margin-top: 2px;
    }

    .user-menu-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      color: var(--text-secondary);
      text-decoration: none;
      font-size: 14px;
      transition: all 0.2s;
      cursor: pointer;
      border: none;
      background: transparent;
      width: 100%;
      text-align: left;
    }

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

    .user-menu-item i {
      width: 20px;
      text-align: center;
      font-size: 16px;
    }

    .user-menu-divider {
      height: 1px;
      background: var(--border);
      margin: 4px 0;
    }

    .user-menu-item.danger {
      color: var(--error);
    }

    .user-menu-item.danger:hover {
      background: rgba(244, 67, 54, 0.1);
      color: var(--error);
    }

    /* ===== NOTIFICATION PANEL ===== */
    .notif-panel {
      position: fixed;
      top: 72px;
      right: 24px;
      width: 380px;
      max-width: calc(100vw - 48px);
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-lg);
      display: none;
      flex-direction: column;
      max-height: 520px;
      overflow: hidden;
      z-index: 1000;
      animation: slideInRight 0.3s ease;
    }
    
    @keyframes slideInRight {
      from {
        opacity: 0;
        transform: translateX(20px);
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    .notif-panel.open {
      display: flex;
    }

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

    .notif-header h3 {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
    }

    .notif-header-actions {
      display: flex;
      gap: 8px;
    }

    .notif-clear {
      font-size: 12px;
      color: var(--accent);
      background: transparent;
      border: none;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 4px;
      transition: all 0.2s;
    }

    .notif-clear:hover {
      background: var(--accent-muted);
    }

    .notif-list {
      flex: 1;
      overflow-y: auto;
    }

    .notif-item {
      position: relative;
      display: flex;
      gap: 12px;
      padding: 16px 16px 16px 24px;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
      transition: all 0.2s;
      text-decoration: none;
      animation: notifSlideIn 0.3s ease forwards;\n      opacity: 0;\n    }\n    \n    @keyframes notifSlideIn {\n      from {\n        opacity: 0;\n        transform: translateX(20px);\n      }\n      to {\n        opacity: 1;\n        transform: translateX(0);\n      }\n    }\n    \n    .notif-item:nth-child(1) { animation-delay: 0.05s; }\n    .notif-item:nth-child(2) { animation-delay: 0.1s; }\n    .notif-item:nth-child(3) { animation-delay: 0.15s; }

    .notif-item:hover {
      background: var(--bg-hover);
    }

    .notif-item.unread {
      background: var(--accent-muted);
    }
    
    .notif-item.unread::before {\n      content: '';\n      position: absolute;\n      left: 8px;\n      top: 50%;\n      transform: translateY(-50%);\n      width: 6px;\n      height: 6px;\n      background: var(--accent);\n      border-radius: 50%;\n    }

    .notif-icon {
      width: 40px;
      height: 40px;
      border-radius: var(--radius-sm);
      background: var(--accent-muted);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--accent);
      font-size: 16px;
      flex-shrink: 0;
    }

    .notif-icon.success {
      background: rgba(76, 175, 80, 0.12);
      color: var(--success);
    }

    .notif-icon.warning {
      background: rgba(255, 152, 0, 0.12);
      color: var(--warning);
    }

    .notif-content {
      flex: 1;
      min-width: 0;
    }

    .notif-title {
      font-size: 14px;
      font-weight: 500;
      color: var(--text-primary);
      margin-bottom: 4px;
    }

    .notif-text {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.4;
    }

    .notif-time {
      font-size: 11px;
      color: var(--text-tertiary);
      margin-top: 4px;
    }

    .notif-empty {
      padding: 48px 24px;
      text-align: center;
      color: var(--text-tertiary);
    }

    .notif-empty i {
      font-size: 48px;
      margin-bottom: 16px;
      opacity: 0.3;
    }

    /* ===== MAIN CONTENT ===== */
    .main-content {
      position: relative;
      margin-top: 56px;
      padding: 32px 24px 100px;
      min-height: calc(100vh - 56px);
      z-index: 1;
    }

    .container {
      max-width: 1400px;
      margin: 0 auto;
    }

    /* ===== PAGE HEADER ===== */
    .page-header {
      margin-bottom: 32px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
      flex-wrap: wrap;
    }

    .page-title {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .page-title h1 {
      font-size: 28px;
      font-weight: 600;
      color: var(--text-primary);
    }

    .page-title .subtitle {
      color: var(--text-tertiary);
      font-size: 14px;
      margin-top: 4px;
    }

    .page-actions {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    /* ===== SEARCH BAR ===== */
    .search-bar {
      position: relative;
      flex: 1;
      max-width: 400px;
    }

    .search-input {
      width: 100%;
      height: 42px;
      padding: 0 16px 0 44px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      color: var(--text-primary);
      font-size: 14px;
      transition: all 0.2s;
    }

    .search-input:focus {
      outline: none;
      border-color: var(--accent);
      background: var(--bg-elevated);
    }

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

    .search-icon {
      position: absolute;
      left: 16px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-tertiary);
      pointer-events: none;
    }

    /* ===== BUTTONS ===== */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 20px;
      border-radius: var(--radius-md);
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      border: none;
      text-decoration: none;
      white-space: nowrap;
    }

    .btn-primary {
      background: var(--accent);
      color: white;
    }

    .btn-primary:hover {
      background: var(--accent-hover);
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(91, 143, 199, 0.4);
    }

    .btn-danger {
      background: var(--error);
      color: white;
    }

    .btn-danger:hover {
      filter: brightness(1.05);
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(244, 67, 54, 0.25);
    }

    .btn-primary:active {
      transform: translateY(0);
    }

    .btn-secondary {
      background: var(--bg-card);
      color: var(--text-primary);
      border: 1px solid var(--border);
    }

    .btn-secondary:hover {
      background: var(--bg-hover);
      border-color: var(--border-focus);
      transform: translateY(-1px);
    }

    .btn-ghost {
      background: transparent;
      color: var(--text-secondary);
    }

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

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

    /* ===== KNOWLEDGE BASE ===== */
    .kb-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
      gap: 20px;
      margin-bottom: 24px;
      transition: all 0.3s ease;
    }

    /* List Layout */
    .kb-grid.list-layout {
      grid-template-columns: 1fr;
      gap: 12px;
    }

    .kb-grid.list-layout .kb-card {
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 20px;
      padding: 16px 20px;
    }

    .kb-grid.list-layout .kb-card:hover {
      transform: translateY(0) translateX(4px);
    }

    .kb-grid.list-layout .kb-card-header {
      margin-bottom: 0;
      order: 1;
      flex-direction: row-reverse;
      gap: 12px;
      width: auto;
    }

    .kb-grid.list-layout .kb-card-icon {
      width: 36px;
      height: 36px;
      font-size: 16px;
    }

    .kb-grid.list-layout .kb-card-title {
      font-size: 15px;
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 250px;
      -webkit-line-clamp: unset;
      -webkit-box-orient: unset;
      display: block;
    }

    .kb-grid.list-layout .kb-card-content {
      order: 2;
      margin-bottom: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      display: block;
      -webkit-line-clamp: unset;
      -webkit-box-orient: unset;
    }

    .kb-grid.list-layout .kb-card-meta {
      order: 3;
      margin-left: auto;
      flex-direction: row;
      align-items: center;
      gap: 16px;
    }

    .kb-grid.list-layout .kb-card-tags {
      margin-bottom: 0;
      gap: 6px;
    }

    .kb-grid.list-layout .tag {
      font-size: 11px;
      padding: 3px 8px;
    }

    /* ===== FILTER CHIPS CONTAINER ===== */
    .filter-chips-container {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .kb-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
    }

    .kb-card:hover {
      transform: translateY(-6px);
      border-color: var(--border-focus);
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    }
      border-color: var(--accent);
      box-shadow: var(--shadow-lg);
      background: var(--bg-hover);
    }

    .kb-card-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 16px;
    }

    .kb-card-title {
      font-size: 18px;
      font-weight: 600;
      color: var(--text-primary);
      line-height: 1.3;
      flex: 1;
    }

    .kb-card-icon {
      width: 40px;
      height: 40px;
      background: var(--accent-muted);
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--accent);
      font-size: 18px;
      flex-shrink: 0;
    }

    .kb-card-content {
      color: var(--text-secondary);
      font-size: 14px;
      line-height: 1.6;
      margin-bottom: 16px;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .kb-card-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      font-size: 12px;
      color: var(--text-tertiary);
    }

    .kb-card-tags {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    .tag {
      padding: 4px 10px;
      background: var(--bg-active);
      border-radius: 12px;
      font-size: 11px;
      color: var(--text-secondary);
      border: 1px solid var(--border);
    }

    .kb-card-date {
      white-space: nowrap;
    }

    .kb-card.hidden {
      display: none;
    }

    .kb-card mark {
      background: rgba(91, 143, 199, 0.3);
      color: var(--text-primary);
      border-radius: 3px;
      padding: 0 2px;
    }

    /* ===== EMPTY STATE ===== */
    .empty-state {
      text-align: center;
      padding: 80px 20px;
      display: none;
    }

    .empty-state.visible {
      display: block;
    }

    .empty-state-icon {
      font-size: 64px;
      color: var(--text-tertiary);
      margin-bottom: 24px;
      opacity: 0.5;
    }

    .empty-state-title {
      font-size: 24px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 12px;
    }

    .empty-state-text {
      font-size: 14px;
      color: var(--text-secondary);
      max-width: 400px;
      margin: 0 auto 24px;
    }

    .empty-state-action {
      display: inline-flex;
      gap: 12px;
    }

    /* ===== FILTER & SORT BAR ===== */
    .filter-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 24px;
      flex-wrap: wrap;
    }

    .filter-chips {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      flex: 1;
    }

    .filter-chip {
      padding: 8px 16px;
      border-radius: 20px;
      border: 1px solid var(--border);
      background: var(--bg-card);
      color: var(--text-secondary);
      font-size: 13px;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .filter-chip:hover {
      background: var(--bg-hover);
      border-color: var(--accent);
      color: var(--text-primary);
    }

    .filter-chip.active {
      background: var(--accent-muted);
      border-color: var(--accent);
      color: var(--accent);
    }

    .filter-chip i {
      font-size: 12px;
    }

    .sort-controls {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .sort-select {
      padding: 8px 32px 8px 12px;
      border-radius: var(--radius-md);
      border: 1px solid var(--border);
      background: var(--bg-card);
      color: var(--text-primary);
      font-size: 13px;
      cursor: pointer;
      transition: all 0.2s ease;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a8abb5' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 10px center;
    }

    .sort-select:hover {
      border-color: var(--accent);
    }

    .sort-select:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-muted);
    }

    .view-toggle {
      width: 36px;
      height: 36px;
      border-radius: var(--radius-md);
      border: 1px solid var(--border);
      background: var(--bg-card);
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .view-toggle:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
    }

    .view-toggle.list-view i::before {
      content: "\f00b"; /* fa-list */
    }

    /* ===== STATS ===== */
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 16px;
      margin-bottom: 32px;
    }

    .stat-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 20px;
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .stat-icon {
      width: 48px;
      height: 48px;
      background: var(--accent-muted);
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      color: var(--accent);
    }

    .stat-content {
      flex: 1;
    }

    .stat-label {
      font-size: 13px;
      color: var(--text-tertiary);
      margin-bottom: 4px;
    }

    .stat-value {
      font-size: 24px;
      font-weight: 600;
      color: var(--text-primary);
    }

    /* ===== DASHBOARD/HOME ===== */
    .welcome-section {
      background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 48px 40px;
      text-align: center;
      margin-bottom: 32px;
    }

    .welcome-icon {
      width: 80px;
      height: 80px;
      margin: 0 auto 24px;
      background: linear-gradient(135deg, var(--accent) 0%, #4a7aa8 100%);
      border-radius: var(--radius-lg);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 40px;
      color: white;
      box-shadow: var(--shadow-md);
    }

    .welcome-title {
      font-size: 32px;
      font-weight: 600;
      margin-bottom: 12px;
      color: var(--text-primary);
    }

    .welcome-text {
      font-size: 16px;
      color: var(--text-secondary);
      max-width: 600px;
      margin: 0 auto 32px;
      line-height: 1.6;
    }

    .quick-actions {
      display: flex;
      gap: 12px;
      justify-content: center;
      flex-wrap: wrap;
    }

    .recent-section {
      margin-bottom: 32px;
    }

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

    .section-title {
      font-size: 20px;
      font-weight: 600;
      color: var(--text-primary);
    }

    .recent-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .recent-item {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 16px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: all 0.2s;
      text-decoration: none;
    }

    .recent-item:hover {
      background: var(--bg-hover);
      border-color: var(--accent);
      transform: translateX(4px);
    }

    .recent-icon {
      width: 40px;
      height: 40px;
      background: var(--accent-muted);
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--accent);
      font-size: 16px;
      flex-shrink: 0;
    }

    .recent-content {
      flex: 1;
      min-width: 0;
    }

    .recent-title {
      font-size: 14px;
      font-weight: 500;
      color: var(--text-primary);
      margin-bottom: 4px;
    }

    .recent-meta {
      font-size: 12px;
      color: var(--text-tertiary);
    }

    .view-hidden {
      display: none;
    }

    /* ===== CHAT WIDGET ===== */
    .chat-widget {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 200;
    }

    .chat-toggle {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent) 0%, #4a7aa8 100%);
      border: none;
      color: white;
      font-size: 24px;
      cursor: pointer;
      box-shadow: var(--shadow-lg);
      transition: all 0.3s;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .chat-toggle:hover {
      transform: scale(1.1);
      box-shadow: 0 12px 32px rgba(91, 143, 199, 0.4);
    }

    .chat-toggle .badge {
      position: absolute;
      top: -4px;
      right: -4px;
      background: var(--error);
      color: white;
      font-size: 12px;
      font-weight: 600;
      min-width: 24px;
      height: 24px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 6px;
      border: 3px solid var(--bg-base);
    }

    .chat-panel {
      position: fixed;
      bottom: 24px;
      right: 24px;
      width: 420px;
      max-width: calc(100vw - 48px);
      height: 600px;
      max-height: calc(100vh - 100px);
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-lg);
      display: none;
      flex-direction: column;
      overflow: hidden;
    }

    .chat-panel.open {
      display: flex;
      animation: slideUp 0.3s ease;
    }

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

    .chat-header {
      padding: 12px;
      background: var(--bg-card);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

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

    .chat-header-icon {
      width: 36px;
      height: 36px;
      background: var(--accent-muted);
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--accent);
      font-size: 16px;
    }

    .chat-header-text h3 {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
    }

    .chat-header-text p {
      font-size: 12px;
      color: var(--text-tertiary);
    }

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

    .chat-actions button {
      width: 38px;
      height: 38px;
      border-radius: 12px;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text-secondary);
      cursor: pointer;
      transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .chat-actions button:hover {
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-primary);
      transform: translateY(-1px);
    }

    .chat-actions button.danger:hover {
      background: rgba(255, 107, 107, 0.15);
      border-color: rgba(255, 107, 107, 0.3);
      color: #ff6b6b;
    }

    .chat-messages {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      scroll-behavior: smooth;
    }

    .chat-message {
      display: flex;
      gap: 10px;
      animation: fadeInMessage 0.4s ease;
      align-items: flex-end;
    }

    @keyframes fadeInMessage {
      from { 
        opacity: 0; 
        transform: translateY(15px) scale(0.95);
      }
      to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
      }
    }

    .chat-message.user {
      flex-direction: row-reverse;
    }
    
    .chat-message-content {
      display: flex;
      flex-direction: column;
      gap: 4px;
      max-width: 82%;
    }

    .chat-bubble {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 10px 12px;
      line-height: 1.45;
      font-size: 13px;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
      word-wrap: break-word;
      position: relative;
      display: flex;
      gap: 10px;
      align-items: flex-start;
      animation: bubbleIn 180ms ease-out;
    }

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

    .chat-message.user .chat-bubble {
      background: linear-gradient(135deg, rgba(91, 143, 199, 0.18) 0%, rgba(74, 122, 168, 0.22) 100%);
      color: rgba(233, 237, 243, 0.95);
      border: 1px solid rgba(91, 143, 199, 0.28);
      border-radius: 14px;
      box-shadow: 0 2px 8px rgba(91, 143, 199, 0.2);
    }

    .chat-message.user .bubble-ico {
      color: rgba(184, 204, 230, 0.9);
    }

    .chat-message.user .bubble-ico {
      color: rgba(184, 204, 230, 0.9);
    }

    .bubble-ico {
      width: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: 1px;
      opacity: 0.85;
      flex-shrink: 0;
    }

    .bubble-msg {
      flex: 1;
      white-space: pre-wrap;
      word-wrap: break-word;
    }

    .bubble-msg code {
      background: rgba(0, 0, 0, 0.3);
      padding: 2px 6px;
      border-radius: 4px;
      font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
      font-size: 12px;
    }

    .bubble-msg pre {
      background: rgba(0, 0, 0, 0.4);
      padding: 12px;
      border-radius: 8px;
      overflow-x: auto;
      margin: 8px 0;
    }

    .bubble-msg pre code {
      background: none;
      padding: 0;
    }

    .bubble-msg strong {
      font-weight: 600;
      color: var(--text-primary);
    }

    .bubble-msg em {
      font-style: italic;
      color: var(--text-secondary);
    }

    .bubble-msg a {
      color: var(--accent);
      text-decoration: underline;
    }

    .message-actions {
      position: absolute;
      top: 8px;
      right: 8px;
      opacity: 0;
      transition: opacity 0.2s ease;
    }

    .chat-bubble:hover .message-actions {
      opacity: 1;
    }

    .message-action-btn {
      width: 28px;
      height: 28px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--bg-elevated);
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
    }

    .message-action-btn:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
      border-color: var(--accent);
    }

    .chat-time {
      font-size: 11px;
      color: var(--text-tertiary);
      padding: 0 4px;
      margin-top: 6px;
      display: block;
    }
    
    .chat-message.user .chat-time {
      text-align: right;
    }

    /* ===== MODAL OVERLAY ===== */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(13, 17, 23, 0.75);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10000;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .modal-overlay.active {
      opacity: 1;
      visibility: visible;
    }

    .modal-content {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 32px;
      max-width: 900px;
      width: 90%;
      max-height: 80vh;
      overflow-y: auto;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
      transform: scale(0.9);
      transition: transform 0.3s ease;
    }

    .modal-overlay.active .modal-content {
      transform: scale(1);
    }

    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 24px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }

    .modal-title {
      font-size: 24px;
      font-weight: 600;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .modal-title i {
      color: var(--accent);
    }

    .modal-close {
      width: 36px;
      height: 36px;
      border-radius: var(--radius-md);
      background: transparent;
      border: none;
      color: var(--text-secondary);
      font-size: 20px;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .modal-close:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
    }

    .modal-body {
      color: var(--text-secondary);
    }

    .shortcuts-grid {
      display: grid;
      gap: 12px;
    }

    .shortcut-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px;
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      transition: all 0.2s ease;
    }

    .shortcut-item:hover {
      background: var(--bg-hover);
      border-color: var(--accent);
    }

    .shortcut-label {
      font-size: 14px;
      color: var(--text-primary);
    }

    .shortcut-keys {
      display: flex;
      gap: 6px;
    }

    .shortcut-key {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 32px;
      height: 28px;
      padding: 0 10px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 6px;
      font-size: 12px;
      font-weight: 600;
      font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
      color: var(--text-primary);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    }

    /* ===== CATEGORY MANAGER ===== */
    .category-manager {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    .category-manager-header {
      display: flex;
      gap: 16px;
      align-items: center;
      flex-wrap: wrap;
    }

    .category-list {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
      gap: 16px;
      max-height: 500px;
      overflow-y: auto;
      padding-right: 8px;
    }

    .category-item {
      display: flex;
      align-items: center;
      gap: 20px;
      padding: 20px;
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      transition: all 0.2s;
    }

    .category-item:hover {
      background: var(--bg-hover);
      border-color: var(--accent);
      transform: translateX(4px);
    }

    .category-icon {
      width: 56px;
      height: 56px;
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      color: white;
      flex-shrink: 0;
      box-shadow: var(--shadow-sm);
    }

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

    .category-name {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 6px;
    }

    .category-meta {
      display: flex;
      gap: 12px;
      align-items: center;
      font-size: 12px;
      color: var(--text-tertiary);
    }

    .category-actions {
      display: flex;
      gap: 8px;
      flex-shrink: 0;
    }

    /* ===== NOTES AREA ===== */
    .notes-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 20px;
    }

    .notes-grid.list-layout {
      grid-template-columns: 1fr;
      gap: 12px;
    }

    .notes-grid.list-layout .note-card {
      padding: 16px 20px;
    }

    .notes-grid.list-layout .note-card:hover {
      transform: translateY(0) translateX(4px);
    }

    .notes-grid.list-layout .note-content {
      -webkit-line-clamp: 2;
    }

    .note-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      cursor: pointer;
    }

    .note-card:hover {
      border-color: var(--accent);
      box-shadow: 0 8px 24px rgba(91, 143, 199, 0.25);
      transform: translateY(-6px);
    }

    .note-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
    }

    .note-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
      line-height: 1.4;
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }

    .note-actions {
      display: flex;
      gap: 4px;
      opacity: 0;
      transition: opacity 0.2s;
    }

    .note-card:hover .note-actions {
      opacity: 1;
    }

    .btn-icon {
      width: 32px;
      height: 32px;
      border-radius: var(--radius-sm);
      background: transparent;
      border: none;
      color: var(--text-secondary);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      transition: all 0.2s;
    }

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

    .note-content {
      flex: 1;
      font-size: 14px;
      line-height: 1.6;
      color: var(--text-secondary);
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 4;
      -webkit-box-orient: vertical;
    }

    .note-card mark {
      background: rgba(255, 152, 0, 0.28);
      color: var(--text-primary);
      border-radius: 3px;
      padding: 0 2px;
    }

    .note-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 10px;
      border-top: 1px solid var(--border);
      font-size: 12px;
      color: var(--text-tertiary);
    }

    .note-date {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .note-chars {
      color: var(--text-tertiary);
    }

    /* AI Drop Zone */
    .ai-drop-zone {
      margin-top: 32px;
      padding: 48px;
      background: linear-gradient(135deg, rgba(91, 143, 199, 0.1) 0%, rgba(91, 143, 199, 0.05) 100%);
      border: 2px dashed var(--accent);
      border-radius: var(--radius-lg);
      text-align: center;
      transition: all 0.3s;
    }

    .ai-drop-zone.drag-over {
      background: linear-gradient(135deg, rgba(91, 143, 199, 0.25) 0%, rgba(91, 143, 199, 0.15) 100%);
      border-color: var(--accent-hover);
      border-width: 3px;
      transform: scale(1.02);
    }

    .ai-drop-zone-content i {
      font-size: 48px;
      color: var(--accent);
      margin-bottom: 16px;
    }

    .ai-drop-zone-content h3 {
      font-size: 20px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 8px;
    }

    .ai-drop-zone-content p {
      font-size: 14px;
      color: var(--text-secondary);
      margin-bottom: 0;
    }

    .ai-drop-zone-count {
      display: inline-block;
      margin-top: 12px;
      padding: 6px 12px;
      background: var(--accent);
      color: white;
      border-radius: var(--radius-sm);
      font-size: 13px;
      font-weight: 600;
    }

    .note-card {
      cursor: move;
    }

    .note-card.dragging {
      opacity: 0.5;
      transform: rotate(5deg);
    }

    .note-card.selected-for-ai {
      border: 2px solid var(--accent);
      box-shadow: 0 0 0 3px rgba(91, 143, 199, 0.2);
    }

    /* AI Preview Modal */
    .ai-preview-content {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    .ai-preview-section {
      padding: 20px;
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
    }

    .ai-preview-section h4 {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-secondary);
      margin-bottom: 12px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .ai-preview-section p {
      font-size: 15px;
      line-height: 1.6;
      color: var(--text-primary);
      margin: 0;
    }

    .ai-preview-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .ai-preview-tag {
      padding: 6px 12px;
      background: var(--accent);
      color: white;
      border-radius: var(--radius-sm);
      font-size: 13px;
      font-weight: 500;
    }

    /* Tasks View */
    .task-filters {
      display: flex;
      gap: 8px;
      margin-bottom: 24px;
      flex-wrap: wrap;
    }

    .task-filter-btn {
      padding: 8px 16px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      color: var(--text-secondary);
      font-size: 14px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .task-filter-btn:hover {
      border-color: var(--border-focus);
      color: var(--text-primary);
    }

    .task-filter-btn.active {
      background: var(--accent);
      border-color: var(--accent);
      color: white;
    }

    .tasks-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .tasks-grid {
      display: grid !important;
      grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
      gap: 20px;
    }

    .tasks-grid .task-item {
      flex-direction: column;
    }

    .tasks-grid .task-content {
      width: 100%;
    }

    .task-item {
      display: flex;
      align-items: flex-start;
      gap: 16px;
      padding: 16px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      transition: all 0.2s;
    }

    .task-item:hover {
      border-color: var(--border-focus);
      transform: translateX(4px);
    }

    .task-checkbox {
      width: 20px;
      height: 20px;
      border: 2px solid var(--border);
      border-radius: 6px;
      cursor: pointer;
      flex-shrink: 0;
      margin-top: 2px;
      transition: all 0.2s;
    }

    .task-checkbox:hover {
      border-color: var(--accent);
    }

    .task-item.completed .task-checkbox {
      background: var(--accent);
      border-color: var(--accent);
      position: relative;
    }

    .task-item.completed .task-checkbox::after {
      content: '✓';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: white;
      font-size: 14px;
      font-weight: bold;
    }

    .task-content {
      flex: 1;
    }

    .task-title {
      font-size: 15px;
      font-weight: 500;
      color: var(--text-primary);
      margin-bottom: 6px;
    }

    .task-item.completed .task-title {
      text-decoration: line-through;
      color: var(--text-tertiary);
    }

    .task-meta {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .task-priority {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 8px;
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-weight: 600;
    }

    .task-priority.high {
      background: rgba(239, 68, 68, 0.1);
      color: #ef4444;
    }

    .task-priority.medium {
      background: rgba(251, 146, 60, 0.1);
      color: #fb923c;
    }

    .task-priority.low {
      background: rgba(34, 197, 94, 0.1);
      color: #22c55e;
    }

    .task-due {
      font-size: 13px;
      color: var(--text-tertiary);
    }

    .task-category {
      padding: 4px 8px;
      background: var(--bg-elevated);
      border-radius: var(--radius-sm);
      font-size: 12px;
      color: var(--text-secondary);
    }

    /* ===== TYPING INDICATOR ===== */
    .typing-indicator {
      display: flex;
      align-items: flex-start;
      animation: fadeIn 0.3s ease;
      max-width: 82%;
    }

    .typing-bubble {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 10px 12px;
      display: inline-flex;
      gap: 6px;
      align-items: center;
    }

    .typing-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: rgba(233, 237, 243, 0.55);
      animation: blink 1.05s infinite ease-in-out;
    }

    .typing-dot:nth-child(2) {
      animation-delay: 0.15s;
    }

    .typing-dot:nth-child(3) {
      animation-delay: 0.30s;
    }

    @keyframes blink {
      0%, 100% {
        opacity: 0.25;
        transform: translateY(0);
      }
      50% {
        opacity: 0.95;
        transform: translateY(-2px);
      }
    }

    .chat-input-wrap {
      padding: 16px;
      background: var(--bg-card);
      border-top: 1px solid var(--border);
    }

    .chat-input-container {
      display: flex;
      gap: 8px;
    }

    .chat-input {
      flex: 1;
      padding: 12px 16px;
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      color: var(--text-primary);
      font-size: 14px;
      resize: none;
      font-family: inherit;
      transition: all 0.2s;
      max-height: 120px;
      line-height: 1.5;
    }

    .chat-input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-muted);
    }
    
    .chat-input::placeholder {
      color: var(--text-tertiary);
    }

    .chat-send {
      width: 44px;
      height: 44px;
      border-radius: var(--radius-md);
      background: var(--accent);
      border: none;
      color: white;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      transition: all 0.2s;
      flex-shrink: 0;
    }

    .chat-send:hover {
      background: var(--accent-hover);
      transform: scale(1.05);
    }

    .chat-send:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
    }
    
    .chat-quick-btn {
      padding: 6px 12px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 16px;
      color: var(--text-secondary);
      font-size: 12px;
      cursor: pointer;
      transition: all 0.2s;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }
    
    .chat-quick-btn:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
      border-color: var(--accent);
      transform: translateY(-1px);
    }
    
    .chat-quick-btn i {
      font-size: 11px;
    }

    /* ===== RESPONSIVE DESIGN ===== */
    @media (max-width: 768px) {
      .header-inner {
        padding: 0 16px;
      }

      .main-content {
        padding-top: 80px;
      }

      .container {
        padding: 16px;
      }

      .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
      }

      .page-actions {
        flex-direction: column;
        gap: 12px;
      }

      .search-bar {
        width: 100%;
      }

      .filter-bar {
        flex-direction: column;
        align-items: stretch;
      }

      .filter-chips {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
      }

      .filter-chip {
        white-space: nowrap;
        flex-shrink: 0;
      }

      .sort-controls {
        justify-content: space-between;
      }

      .kb-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
      }

      .kb-grid.list-layout .kb-card {
        flex-direction: column;
        align-items: stretch;
      }

      .kb-grid.list-layout .kb-card-header {
        flex-direction: row;
        margin-bottom: 12px;
      }

      .kb-grid.list-layout .kb-card-content {
        white-space: normal;
      }

      .stats-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .chat-panel {
        width: 100%;
        right: 0;
        bottom: 0;
        height: 100vh;
        border-radius: 0;
      }

      .chat-widget {
        bottom: 20px;
        right: 20px;
      }

      .chat-toggle {
        width: 56px;
        height: 56px;
      }

      .modal-content {
        width: 95%;
        max-height: 90vh;
        padding: 24px 20px;
      }
    }

    @media (max-width: 480px) {
      .stats-grid {
        grid-template-columns: 1fr;
      }

      .welcome-section {
        padding: 32px 24px;
      }

      .welcome-title {
        font-size: 24px;
      }

      .filter-chip {
        font-size: 12px;
        padding: 6px 12px;
      }

      .kb-card {
        padding: 16px;
      }

      .kb-card-title {
        font-size: 16px;
      }
    }

    /* ===== CODE & SNIPPETS STYLES ===== */
    .sub-nav {
      display: flex;
      gap: 8px;
      margin-bottom: 32px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }

    .sub-nav-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 20px;
      border-radius: var(--radius-md);
      background: transparent;
      border: 1px solid var(--border);
      color: var(--text-secondary);
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
    }

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

    .sub-nav-item.active {
      background: var(--accent-muted);
      color: var(--accent);
      border-color: var(--accent);
    }

    .sub-nav-item i {
      font-size: 16px;
    }

    .sub-view-content {
      display: block;
    }

    .sub-view-hidden {
      display: none;
    }

    /* ===== TICKETS ===== */
    .tickets-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
      gap: 20px;
    }

    .ticket-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 20px;
      transition: all 0.2s;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .ticket-card:hover {
      border-color: var(--accent);
      box-shadow: var(--shadow-md);
      transform: translateY(-2px);
    }

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

    .ticket-status-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 500;
    }

    .ticket-status-badge.new {
      background: rgba(156, 39, 176, 0.15);
      color: #9c27b0;
    }

    .ticket-status-badge.open {
      background: rgba(255, 193, 7, 0.15);
      color: #ffc107;
    }

    .ticket-status-badge.answered {
      background: rgba(33, 150, 243, 0.15);
      color: #2196f3;
    }

    .ticket-status-badge.solved {
      background: rgba(76, 175, 80, 0.15);
      color: #4caf50;
    }

    .ticket-meta {
      display: flex;
      gap: 12px;
      align-items: center;
      font-size: 13px;
      color: var(--text-secondary);
    }

    .ticket-id {
      font-family: 'Fira Code', monospace;
      font-weight: 500;
    }

    .ticket-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
      margin: 0;
      line-height: 1.4;
    }

    .ticket-preview {
      font-size: 14px;
      color: var(--text-secondary);
      margin: 0;
      line-height: 1.6;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .ticket-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 12px;
      border-top: 1px solid var(--border);
    }

    .ticket-participants {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .ticket-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--bg-secondary);
      border: 2px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      color: var(--text-secondary);
    }

    .ticket-avatar.assigned {
      border-color: var(--accent);
      color: var(--accent);
    }

    .ticket-info {
      display: flex;
      align-items: center;
      gap: 16px;
      font-size: 13px;
    }

    .ticket-replies {
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .ticket-saved {
      color: var(--success);
      display: flex;
      align-items: center;
      gap: 6px;
      font-weight: 500;
    }

    .btn-text {
      background: none;
      border: none;
      color: var(--accent);
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 4px;
      transition: all 0.2s;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .btn-text:hover {
      background: var(--accent-muted);
    }

    .snippet-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
      gap: 20px;
    }

    .snippet-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 20px;
      transition: all 0.2s;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    /* CRITICAL: Must be more specific than view classes */
    .easybill-card.filtered-hidden,
    .easybill-card.list-view.filtered-hidden,
    .easybill-card.compact-view.filtered-hidden {
      display: none !important;
    }

    .snippet-card:hover {
      border-color: var(--border-focus);
      box-shadow: var(--shadow-md);
      transform: translateY(-2px);
    }

    /* List view for easybill */
    .easybill-card.list-view {
      flex-direction: row !important;
      align-items: center !important;
      padding: 12px 16px !important;
      gap: 12px !important;
    }

    .easybill-card.list-view .snippet-header {
      flex: 0 0 auto;
      margin-right: 12px;
      gap: 12px;
    }

    .easybill-card.list-view .snippet-icon {
      width: 36px;
      height: 36px;
      font-size: 16px;
    }

    .easybill-card.list-view .snippet-meta {
      display: flex;
      flex-direction: column;
      min-width: 180px;
    }

    .easybill-card.list-view .snippet-title {
      font-size: 14px;
      font-weight: 500;
      margin-bottom: 0;
    }

    .easybill-card.list-view .snippet-tags {
      display: none;
    }

    .easybill-card.list-view .snippet-content {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .easybill-card.list-view .snippet-code {
      margin: 0;
      flex: 0 0 auto;
      min-width: 280px;
      font-size: 13px;
      padding: 6px 10px;
    }

    .easybill-card.list-view .snippet-content p {
      margin: 0;
      flex: 1;
      font-size: 13px;
      color: var(--text-secondary);
    }

    .easybill-card.list-view .snippet-actions {
      flex: 0 0 auto;
      margin-left: auto;
    }

    /* Compact pill view for easybill */
    .easybill-card.compact-view {
      padding: 0 !important;
      border: none !important;
      background: transparent !important;
      display: inline-flex !important;
      width: auto !important;
      min-width: auto !important;
    }

    .easybill-card.compact-view:hover {
      transform: none !important;
      box-shadow: none !important;
    }

    .easybill-card.compact-view .snippet-header,
    .easybill-card.compact-view .snippet-meta,
    .easybill-card.compact-view .snippet-content p,
    .easybill-card.compact-view .snippet-actions {
      display: none !important;
    }

    .easybill-card.compact-view .snippet-content {
      margin: 0;
      padding: 0;
    }

    .easybill-card.compact-view .snippet-code {
      margin: 0;
      padding: 8px 14px;
      font-size: 13px;
      background: var(--bg-secondary);
      border: 1px solid var(--border);
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s;
      font-family: 'Fira Code', 'Courier New', monospace;
      color: var(--text-primary);
      white-space: nowrap;
    }

    .easybill-card.compact-view .snippet-code:hover {
      background: var(--primary);
      color: white;
      border-color: var(--primary);
      transform: translateY(-1px);
      box-shadow: var(--shadow-sm);
    }

    #easybillGrid.compact-grid {
      display: flex !important;
      flex-wrap: wrap !important;
      gap: 8px !important;
      padding: 4px;
    }

    .snippet-header {
      display: flex;
      align-items: flex-start;
      gap: 12px;
    }

    .snippet-icon {
      width: 48px;
      height: 48px;
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      flex-shrink: 0;
    }

    .snippet-icon.email {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
    }

    .snippet-icon.liquid {
      background: linear-gradient(135deg, #95bf47 0%, #5e8e3e 100%);
      color: white;
    }

    .snippet-meta {
      flex: 1;
    }

    .snippet-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 8px;
    }

    .snippet-tags {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    .snippet-content {
      flex: 1;
    }

    .snippet-text,
    .snippet-code {
      font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
      font-size: 13px;
      line-height: 1.6;
      color: var(--text-secondary);
      background: var(--bg-elevated);
      padding: 16px;
      border-radius: var(--radius-md);
      overflow-x: auto;
      white-space: pre-wrap;
      word-wrap: break-word;
      margin: 0;
    }

    .liquid-code {
      color: #a6e22e;
    }

    .snippet-variables {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .variable-tag {
      padding: 4px 10px;
      background: rgba(255, 152, 0, 0.15);
      border: 1px solid rgba(255, 152, 0, 0.3);
      border-radius: var(--radius-sm);
      color: var(--warning);
      font-size: 12px;
      font-family: 'SF Mono', Monaco, monospace;
      font-weight: 500;
    }

    .snippet-actions {
      display: flex;
      gap: 8px;
      padding-top: 8px;
      border-top: 1px solid var(--border);
    }

    .btn-sm {
      padding: 8px 14px;
      font-size: 13px;
      height: auto;
    }

    .tag-fix {
      background: rgba(76, 175, 80, 0.15);
      border: 1px solid rgba(76, 175, 80, 0.3);
      color: var(--success);
    }

    .tag-variable {
      background: rgba(255, 152, 0, 0.15);
      border: 1px solid rgba(255, 152, 0, 0.3);
      color: var(--warning);
    }

    /* Liquid AI Box */
    .liquid-ai-box {
      background: linear-gradient(135deg, rgba(91, 143, 199, 0.1) 0%, rgba(91, 143, 199, 0.05) 100%);
      border: 1px solid var(--accent);
      border-radius: var(--radius-lg);
      padding: 24px;
      margin-bottom: 32px;
    }

    .liquid-ai-header {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 16px;
    }

    .liquid-ai-icon {
      width: 56px;
      height: 56px;
      background: var(--accent);
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      color: white;
    }

    .liquid-ai-header h3 {
      font-size: 18px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 4px;
    }

    .liquid-ai-header p {
      font-size: 13px;
      color: var(--text-secondary);
      margin: 0;
    }

    .liquid-ai-input {
      display: flex;
      gap: 12px;
      align-items: center;
    }

    .liquid-ai-input input {
      flex: 1;
      height: 48px;
      padding: 0 16px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      color: var(--text-primary);
      font-size: 14px;
      outline: none;
      transition: all 0.2s;
    }

    .liquid-ai-input input:focus {
      border-color: var(--accent);
      background: var(--bg-elevated);
    }

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

    .btn-accent:hover {
      background: var(--accent-hover);
    }

    /* ===== LOGIN PAGE ===== */
    .login-page {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      position: relative;
    }

    .login-card {
      width: 100%;
      max-width: 440px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 48px 40px;
      box-shadow: var(--shadow-lg);
      animation: fadeIn 0.5s ease;
    }

    .login-logo {
      width: 64px;
      height: 64px;
      margin: 0 auto 24px;
      background: linear-gradient(135deg, var(--accent) 0%, #4a7aa8 100%);
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 32px;
      color: white;
    }

    .login-title {
      text-align: center;
      margin-bottom: 8px;
      font-size: 24px;
      font-weight: 600;
    }

    .login-subtitle {
      text-align: center;
      color: var(--text-secondary);
      margin-bottom: 32px;
      font-size: 14px;
    }

    .form-group {
      margin-bottom: 20px;
    }

    .form-label {
      display: block;
      margin-bottom: 8px;
      font-size: 14px;
      font-weight: 500;
      color: var(--text-primary);
    }

    .input-wrapper {
      position: relative;
    }

    .input-icon {
      position: absolute;
      left: 16px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-tertiary);
      font-size: 16px;
    }

    .form-input {
      width: 100%;
      height: 48px;
      padding: 0 16px 0 48px;
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      color: var(--text-primary);
      font-size: 14px;
      transition: all 0.2s;
    }

    .form-input:focus {
      outline: none;
      border-color: var(--accent);
      background: var(--bg-base);
    }

    .form-textarea {
      width: 100%;
      min-height: 260px;
      padding: 12px 16px;
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      color: var(--text-primary);
      font-size: 14px;
      line-height: 1.5;
      font-family: inherit;
      resize: vertical;
      transition: all 0.2s;
    }

    .form-textarea:focus {
      outline: none;
      border-color: var(--accent);
      background: var(--bg-base);
      box-shadow: 0 0 0 3px var(--accent-muted);
    }

    .form-textarea::placeholder {
      color: var(--text-tertiary);
    }

    .btn-login {
      width: 100%;
      height: 48px;
      margin-top: 8px;
      background: var(--accent);
      border: none;
      border-radius: var(--radius-md);
      color: white;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }

    .btn-login:hover {
      background: var(--accent-hover);
      transform: translateY(-2px);
      box-shadow: var(--shadow-md);
    }

    /* ===== TOAST NOTIFICATIONS ===== */
    .toast-container {
      position: fixed;
      top: 80px;
      right: 24px;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      gap: 12px;
      pointer-events: none;
      max-width: 380px;
    }

    .toast {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 16px 20px;
      box-shadow: var(--shadow-lg);
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 320px;
      pointer-events: all;
      animation: toastSlide 0.3s ease;
    }

    @keyframes toastSlide {
      from {
        opacity: 0;
        transform: translateX(100px);
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    .toast.success {
      border-color: var(--success);
    }

    .toast.error {
      border-color: var(--error);
    }

    .toast.warning {
      border-color: var(--warning);
    }

    .toast-icon {
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
    }

    .toast.success .toast-icon {
      color: var(--success);
    }

    .toast.error .toast-icon {
      color: var(--error);
    }

    .toast.warning .toast-icon {
      color: var(--warning);
    }

    .toast-message {
      flex: 1;
      font-size: 14px;
      color: var(--text-primary);
    }

    /* ===== SEARCH HIGHLIGHTING ===== */
    mark,
    .highlight {
      background: rgba(255, 152, 0, 0.35);
      color: #ff9800;
      font-weight: 700;
      padding: 2px 5px;
      border-radius: 4px;
      box-shadow: 0 0 12px rgba(255, 152, 0, 0.4);
      animation: highlightPulse 2.5s ease-in-out infinite;
      border-bottom: 2px solid rgba(255, 152, 0, 0.6);
    }

    @keyframes highlightPulse {
      0%, 100% { 
        box-shadow: 0 0 12px rgba(255, 152, 0, 0.4);
        background: rgba(255, 152, 0, 0.35);
      }
      50% { 
        box-shadow: 0 0 20px rgba(255, 152, 0, 0.6);
        background: rgba(255, 152, 0, 0.45);
      }
    }

    /* ===== CUSTOM CONFIRM DIALOG ===== */
    .confirm-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.75);
      backdrop-filter: blur(6px);
      z-index: 10000;
      display: none;
      align-items: center;
      justify-content: center;
      animation: fadeIn 0.2s ease;
    }

    .confirm-overlay.active {
      display: flex;
    }

    .confirm-dialog {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 28px;
      width: 440px;
      max-width: 90vw;
      box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
      animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .confirm-icon {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: rgba(255, 152, 0, 0.15);
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 20px;
      font-size: 24px;
      color: var(--warning);
    }

    .confirm-title {
      font-size: 20px;
      font-weight: 700;
      color: var(--text-primary);
      text-align: center;
      margin-bottom: 12px;
    }

    .confirm-message {
      font-size: 15px;
      color: var(--text-secondary);
      text-align: center;
      line-height: 1.6;
      margin-bottom: 28px;
    }

    .confirm-actions {
      display: flex;
      gap: 12px;
      justify-content: flex-end;
    }

    .confirm-actions .btn {
      flex: 1;
    }

    /* ===== COMMAND PALETTE (SPOTLIGHT-STYLE) ===== */
    .command-palette {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(8px);
      z-index: 9999;
      display: none;
      align-items: flex-start;
      justify-content: center;
      padding-top: 120px;
      animation: fadeIn 0.2s ease;
    }

    .command-palette.active {
      display: flex;
    }

    .command-palette-content {
      width: 640px;
      max-width: 90vw;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 16px;
      box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
      overflow: hidden;
      animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .command-input-wrapper {
      padding: 20px;
      border-bottom: 1px solid var(--border);
    }

    .command-input {
      width: 100%;
      background: transparent;
      border: none;
      color: var(--text-primary);
      font-size: 18px;
      outline: none;
    }

    .command-input::placeholder {
      color: var(--text-tertiary);
    }

    .command-results {
      max-height: 400px;
      overflow-y: auto;
      padding: 8px;
    }

    .command-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.15s;
    }

    .command-item:hover,
    .command-item.selected {
      background: var(--accent-muted);
    }

    .command-item-icon {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      background: var(--accent-muted);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--accent);
      font-size: 16px;
    }

    .command-item-content {
      flex: 1;
    }

    .command-item-title {
      font-size: 14px;
      font-weight: 500;
      color: var(--text-primary);
    }

    .command-item-subtitle {
      font-size: 12px;
      color: var(--text-tertiary);
      margin-top: 2px;
    }

    .command-item-shortcut {
      padding: 4px 8px;
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: 4px;
      font-size: 11px;
      color: var(--text-tertiary);
      font-family: monospace;
    }

    /* ===== LOADING STATES ===== */
    .skeleton {
      background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite;
      border-radius: 4px;
    }

    @keyframes shimmer {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    /* ===== PROGRESS BAR ===== */
    .progress-bar {
      height: 3px;
      background: var(--bg-elevated);
      border-radius: 3px;
      overflow: hidden;
      position: relative;
    }

    .progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--accent), var(--accent-hover));
      transition: width 0.3s ease;
      position: relative;
      overflow: hidden;
    }

    .progress-fill::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
      animation: progressShine 2s infinite;
    }

    @keyframes progressShine {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(100%); }
    }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 768px) {
      .header-inner {
        padding: 0 16px;
      }

      .main-nav {
        display: none;
      }

      .kb-grid {
        grid-template-columns: 1fr;
      }

      .stats-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .page-header {
        flex-direction: column;
        align-items: flex-start;
      }

      .search-bar {
        max-width: 100%;
      }

      .welcome-section {
        padding: 32px 24px;
      }

      .welcome-title {
        font-size: 24px;
      }

      .user-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
      }
      
      .notif-panel {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
      }
      
      .chat-panel {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
      }
    }

    /* ===== SCROLLBAR ===== */
    ::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }

    ::-webkit-scrollbar-track {
      background: var(--bg-elevated);
    }

    ::-webkit-scrollbar-thumb {
      background: var(--border);
      border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: var(--border-focus);
    }

    /* ===== CODE & SNIPPETS STYLES ===== */
    .sub-nav {
      display: flex;
      gap: 8px;
      margin-bottom: 24px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }

    .sub-nav-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 20px;
      background: transparent;
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      color: var(--text-secondary);
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
    }

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

    .sub-nav-item.active {
      background: var(--accent-muted);
      border-color: var(--accent);
      color: var(--accent);
    }

    .sub-view-content {
      display: block;
    }

    .sub-view-content.sub-view-hidden {
      display: none;
    }

    .snippet-grid,
    .snippets-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
      gap: 20px;
    }

    .snippet-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 20px;
      transition: all 0.3s;
    }

    .easybill-card.filtered-hidden,
    .easybill-card.list-view.filtered-hidden,
    .easybill-card.compact-view.filtered-hidden {
      display: none !important;
    }

    .snippet-card:hover {
      border-color: var(--border-focus);
      box-shadow: var(--shadow-md);
      transform: translateY(-2px);
    }

    /* List view for easybill */
    .easybill-card.list-view {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 12px 16px;
      border-radius: var(--radius-md);
    }

    .easybill-card.list-view .snippet-header {
      flex-direction: row;
      gap: 12px;
      margin-bottom: 0;
      flex: 1;
    }

    .easybill-card.list-view .snippet-icon {
      width: 36px;
      height: 36px;
      flex-shrink: 0;
    }

    .easybill-card.list-view .snippet-meta {
      flex: 1;
    }

    .easybill-card.list-view .snippet-title {
      font-size: 14px;
      margin-bottom: 0;
    }

    .easybill-card.list-view .snippet-tags {
      display: none;
    }

    .easybill-card.list-view .snippet-content {
      flex: 2;
      min-width: 0;
    }

    .easybill-card.list-view .snippet-code {
      font-size: 13px;
      padding: 8px 12px;
      margin: 0;
    }

    .easybill-card.list-view .snippet-content p {
      display: none;
    }

    .easybill-card.list-view .snippet-actions {
      flex-shrink: 0;
      margin-top: 0;
    }

    /* Compact pill view for easybill */
    .easybill-card.compact-view {
      display: inline-flex;
      padding: 8px 14px;
      margin: 4px;
      border-radius: 20px;
      background: var(--bg-elevated);
      cursor: pointer;
    }

    .easybill-card.compact-view:hover {
      background: var(--bg-hover);
      border-color: var(--accent);
    }

    .easybill-card.compact-view .snippet-header,
    .easybill-card.compact-view .snippet-meta,
    .easybill-card.compact-view .snippet-content p,
    .easybill-card.compact-view .snippet-actions {
      display: none;
    }

    .easybill-card.compact-view .snippet-content {
      display: flex;
      align-items: center;
    }

    .easybill-card.compact-view .snippet-code {
      all: unset;
      font-family: 'Monaco', 'Courier New', monospace;
      font-size: 13px;
      color: var(--accent);
      white-space: nowrap;
      cursor: pointer;
      user-select: none;
      padding: 0;
      margin: 0;
      background: transparent;
      border: none;
    }

    .easybill-card.compact-view .snippet-code:hover {
      color: var(--accent-hover);
      text-decoration: underline;
    }

    .easybill-card.compact-view .favorite-btn {
      display: inline-flex !important;
      margin-left: 8px;
      padding: 2px 6px !important;
      min-width: auto !important;
    }

    #easybillGrid.compact-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 0;
      align-items: flex-start;
      align-content: flex-start;
    }

    .snippet-header {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 16px;
    }

    .snippet-icon {
      width: 48px;
      height: 48px;
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      color: white;
      background: linear-gradient(135deg, var(--accent) 0%, #4a7aa8 100%);
      flex-shrink: 0;
    }

    .snippet-icon.email {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .snippet-icon.liquid {
      background: linear-gradient(135deg, #95bf47 0%, #76b852 100%);
    }

    .snippet-meta {
      flex: 1;
    }

    .snippet-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 6px;
      line-height: 1.3;
    }

    .snippet-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .snippet-content {
      margin-bottom: 16px;
    }

    .snippet-text,
    .snippet-code {
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 14px;
      font-family: 'Monaco', 'Courier New', monospace;
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.6;
      overflow-x: auto;
      white-space: pre-wrap;
      word-wrap: break-word;
    }

    .liquid-code {
      background: #1e2a1a;
      border-color: #3a4a2a;
      color: #a8d08d;
    }

    .snippet-content p {
      font-size: 13px;
      color: var(--text-tertiary);
      margin-top: 8px;
      line-height: 1.5;
    }

    .snippet-variables,
    .snippet-variables-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 16px;
    }

    .variable-tag {
      display: inline-flex;
      align-items: center;
      padding: 4px 10px;
      background: rgba(91, 143, 199, 0.15);
      border: 1px solid rgba(91, 143, 199, 0.3);
      border-radius: 12px;
      font-size: 12px;
      font-family: 'Monaco', 'Courier New', monospace;
      color: var(--accent);
    }

    .snippet-actions {
      display: flex;
      gap: 8px;
      margin-top: 16px;
    }

    .filter-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .filter-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 14px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 16px;
      font-size: 13px;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
    }

    .filter-chip:hover {
      background: var(--bg-hover);
      border-color: var(--border-focus);
      color: var(--text-primary);
    }

    .filter-chip.active {
      background: var(--accent-muted);
      border-color: var(--accent);
      color: var(--accent);
    }

    .filter-chip i {
      font-size: 12px;
    }

    .tag-fix {
      background: rgba(76, 175, 80, 0.15);
      border-color: rgba(76, 175, 80, 0.3);
      color: var(--success);
    }

    .tag-variable {
      background: rgba(255, 152, 0, 0.15);
      border-color: rgba(255, 152, 0, 0.3);
      color: var(--warning);
    }

    .favorite-btn {
      transition: all 0.2s;
    }

    .favorite-btn.active i {
      color: #ffd700 !important;
    }

    .favorite-btn:hover i {
      transform: scale(1.1);
    }

    /* Multi-Passage Styles */
    .passage-container {
      margin-bottom: 20px;
    }

    .passage-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 10px;
      padding: 8px 12px;
      background: var(--bg-elevated);
      border-radius: var(--radius-sm);
      border-left: 3px solid var(--accent);
    }

    .passage-number {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      background: var(--accent);
      color: white;
      border-radius: 50%;
      font-size: 12px;
      font-weight: 600;
    }

    .passage-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-primary);
    }

    .passage-copy-btn {
      margin-left: auto;
    }

    /* Liquid AI Assistant */
    .liquid-ai-box {
      background: linear-gradient(135deg, rgba(91, 143, 199, 0.1) 0%, rgba(74, 122, 168, 0.05) 100%);
      border: 1px solid rgba(91, 143, 199, 0.2);
      border-radius: var(--radius-lg);
      padding: 20px;
      margin-bottom: 24px;
    }

    .liquid-ai-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 16px;
    }

    .liquid-ai-icon {
      width: 40px;
      height: 40px;
      background: var(--accent);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 18px;
    }

    .liquid-ai-header h3 {
      margin: 0;
      font-size: 16px;
      color: var(--text-primary);
    }

    .liquid-ai-header p {
      margin: 0;
      font-size: 12px;
      color: var(--text-tertiary);
    }

    .liquid-ai-input {
      display: flex;
      gap: 12px;
    }

    .liquid-ai-input input {
      flex: 1;
    }

    .filter-bar {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 20px;
      padding: 16px;
      background: var(--bg-card);
      border-radius: var(--radius-md);
      border: 1px solid var(--border);
      overflow-x: auto;
    }

    .filter-bar .filter-chips {
      flex: 1;
      min-width: 0;
    }
