/* ==========================================================================
   HNTD DIGITAL TOOLS & UTILITIES STUDIO (2026 Modern Design System)
   - Thiết kế chuẩn 5 Studio Chuyên Sâu Xử Lý Thật 100%
   - Cân bằng đối xứng hoàn hảo (3 thẻ hàng trên, 2 thẻ căn giữa hàng dưới)
   - Giao diện lẻ 1 mục hiển thị cực đẹp (Single Category Showcase Dashboard)
   - Tối ưu 100% Dark Mode & Mobile Responsive
   ========================================================================== */

.tools-page-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* ================= 1. COMPACT TOOLBAR ================= */
.tools-compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding: 0.25rem 0;
  flex-wrap: wrap;
}

.tools-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tools-compact-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary, #0f172a);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.tools-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  max-width: 620px;
  justify-content: flex-end;
}

.tools-search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-glass, rgba(203, 213, 225, 0.85));
  border-radius: var(--radius-sm, 8px);
  padding: 0.45rem 0.95rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 440px;
  transition: all 0.2s ease;
}

.tools-search-bar:focus-within {
  border-color: var(--accent-primary, #2563eb);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

[data-theme="dark"] .tools-search-bar {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
}

.tools-search-icon {
  font-size: 1.2rem;
  color: var(--text-muted, #94a3b8);
  margin-right: 0.75rem;
}

.tools-search-input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary, #0f172a);
  outline: none;
}

.tools-search-input::placeholder {
  color: var(--text-muted, #94a3b8);
}

/* View Mode Switcher */
.tools-view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(148, 163, 184, 0.12);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  user-select: none;
}

[data-theme="dark"] .tools-view-mode-toggle {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tools-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted, #64748b);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tools-view-btn.active {
  background: var(--bg-card, #ffffff);
  color: var(--text-primary, #0f172a);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .tools-view-btn.active {
  background: #334155;
  color: #f8fafc;
}

/* ================= 2. QUICK ACTIONS BAR (3 Balanced Highlight Cards) ================= */
.tools-quick-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.tools-quick-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.15rem 1.35rem;
  border-radius: 16px;
  background: var(--bg-card, #ffffff);
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.tools-quick-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #2563eb;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tools-quick-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
  border-color: rgba(37, 99, 235, 0.3);
}

.tools-quick-card:hover::before {
  opacity: 1;
}

[data-theme="dark"] .tools-quick-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
}

.tools-quick-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.tools-quick-info {
  flex: 1;
}

.tools-quick-title {
  font-size: 0.98rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--text-primary, #0f172a);
}

.tools-quick-desc {
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
}

.tools-quick-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  white-space: nowrap;
}

/* ================= 3. CATEGORY PILL FILTER ================= */
.tools-pills-wrap {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.75rem;
  scrollbar-width: thin;
}

.tools-pills-wrap::-webkit-scrollbar {
  height: 4px;
}

.tools-pills-wrap::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}

.tools-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  background: var(--bg-card, #ffffff);
  color: var(--text-secondary, #475569);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

[data-theme="dark"] .tools-pill-btn {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.tools-pill-btn:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.tools-pill-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.tools-pill-count {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  color: inherit;
}

.tools-pill-btn.active .tools-pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ================= 4. BALANCED 5-STUDIO GRID LAYOUT ================= */
/* 5 Chuyên mục cốt lõi: Hàng trên 3 thẻ, Hàng dưới 2 thẻ căn giữa đối xứng */
.tools-columns-layout {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.35rem;
  transition: all 0.3s ease;
}

@media (min-width: 1080px) {
  .tools-columns-layout:not(.single-category-view) .tools-category-col {
    flex: 0 0 calc(33.333% - 1rem);
    max-width: 440px;
    min-width: 320px;
  }
}

@media (min-width: 680px) and (max-width: 1079px) {
  .tools-columns-layout:not(.single-category-view) .tools-category-col {
    flex: 0 0 calc(50% - 0.75rem);
    max-width: 460px;
  }
}

@media (max-width: 679px) {
  .tools-columns-layout:not(.single-category-view) .tools-category-col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Chế độ danh sách phẳng (Flat List Mode) */
.tools-columns-layout.flat-list-mode {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.tools-columns-layout.flat-list-mode .tools-category-col {
  flex: none;
  max-width: none;
}

/* ================= 5. CATEGORY COLUMN CARD ================= */
.tools-category-col {
  background: var(--bg-card, #ffffff);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 20px;
  padding: 1.45rem 1.25rem 1.25rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .tools-category-col {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
}

.tools-category-col:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07);
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.3);
}

.tools-col-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 0.95rem;
  border-bottom: 1.5px solid rgba(226, 232, 240, 0.7);
}

[data-theme="dark"] .tools-col-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.tools-col-icon {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tools-col-header-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tools-col-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-primary, #0f172a);
}

.tools-col-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  margin-top: 1px;
}

.tools-col-count {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted, #64748b);
}

.tools-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}


/* ================= 6. INDIVIDUAL TOOL CARD ================= */
.tool-item-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary, #1e293b);
  background: rgba(248, 250, 252, 0.6);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1px solid rgba(226, 232, 240, 0.7);
  position: relative;
}

.tool-item-card:hover {
  background: #ffffff;
  border-color: #2563eb;
  transform: translateX(3px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

[data-theme="dark"] .tool-item-card {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}

[data-theme="dark"] .tool-item-card:hover {
  background: #334155;
  border-color: rgba(59, 130, 246, 0.4);
}

.tool-icon-box {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.tool-item-card:hover .tool-icon-box {
  transform: scale(1.08);
}

/* Tông màu pastel tinh tế */
.theme-blue   { background: #e0f2fe; color: #0284c7; }
.theme-pink   { background: #ffe4e6; color: #e11d48; }
.theme-cyan   { background: #cffafe; color: #0891b2; }
.theme-purple { background: #f3e8ff; color: #9333ea; }
.theme-green  { background: #dcfce7; color: #16a34a; }

[data-theme="dark"] .theme-blue   { background: rgba(2, 132, 199, 0.25); color: #7dd3fc; }
[data-theme="dark"] .theme-pink   { background: rgba(225, 29, 72, 0.25); color: #fda4af; }
[data-theme="dark"] .theme-cyan   { background: rgba(8, 145, 178, 0.25); color: #67e8f9; }
[data-theme="dark"] .theme-purple { background: rgba(147, 51, 234, 0.25); color: #d8b4fe; }
[data-theme="dark"] .theme-green  { background: rgba(22, 163, 74, 0.25); color: #86efac; }

.tool-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.tool-name {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  color: inherit;
}

.tool-subtext {
  font-size: 0.74rem;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-status-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.tool-status-pill.ready {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

[data-theme="dark"] .tool-status-pill.ready {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* ================= 7. SINGLE CATEGORY SHOWCASE DASHBOARD (LẺ 1 MỤC HIỂN THỊ CỰC ĐẸP) ================= */
.tools-columns-layout.single-category-view {
  display: flex;
  justify-content: center;
  width: 100%;
}

.tools-columns-layout.single-category-view .tools-category-col {
  width: 100%;
  max-width: 1080px;
  background: var(--bg-card, #ffffff);
  border: 1.5px solid rgba(37, 99, 235, 0.25);
  border-radius: 24px;
  padding: 2.25rem;
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.08);
}

[data-theme="dark"] .tools-columns-layout.single-category-view .tools-category-col {
  background: #1e293b;
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.tools-columns-layout.single-category-view .tools-col-header {
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.tools-columns-layout.single-category-view .tools-col-icon {
  font-size: 2.2rem;
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.tools-columns-layout.single-category-view .tools-col-title {
  font-size: 1.5rem;
}

.tools-columns-layout.single-category-view .tools-col-subtitle {
  font-size: 0.88rem;
  margin-top: 3px;
}

.tools-columns-layout.single-category-view .tools-item-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}

.tools-columns-layout.single-category-view .tool-item-card {
  padding: 1rem 1.15rem;
  border-radius: 16px;
}

.tools-columns-layout.single-category-view .tool-icon-box {
  width: 46px;
  height: 46px;
  min-width: 46px;
  font-size: 1.4rem;
}

.tools-columns-layout.single-category-view .tool-name {
  font-size: 0.98rem;
}

.tools-columns-layout.single-category-view .tool-subtext {
  font-size: 0.78rem;
  white-space: normal;
}

.tools-single-back-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1.25rem;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .tools-single-back-bar {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.tools-single-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tools-single-back-btn:hover {
  background: #1d4ed8;
  transform: translateX(-2px);
}

/* ================= 8. CLIENT-SIDE TOOL MODALS (INTERACTIVE WORKSPACES) ================= */
.tool-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.tool-modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.tool-modal-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  width: 100%;
  max-width: 580px;
  padding: 1.85rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transform: translateY(20px) scale(0.97);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  max-height: 92vh;
  overflow-y: auto;
}

[data-theme="dark"] .tool-modal-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
}

.tool-modal-backdrop.show .tool-modal-card {
  transform: translateY(0) scale(1);
}

.tool-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.95rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

[data-theme="dark"] .tool-modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.tool-modal-title {
  font-size: 1.2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-primary);
}

.tool-modal-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.tool-modal-close-btn {
  background: rgba(148, 163, 184, 0.15);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.tool-modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Modal Form elements */
.tool-form-group {
  margin-bottom: 1.15rem;
}

.tool-form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: var(--text-secondary);
}

.tool-form-input,
.tool-form-textarea,
.tool-form-select {
  width: 100%;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  background: rgba(248, 250, 252, 0.8);
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

[data-theme="dark"] .tool-form-input,
[data-theme="dark"] .tool-form-textarea,
[data-theme="dark"] .tool-form-select {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.tool-form-input:focus,
.tool-form-textarea:focus,
.tool-form-select:focus {
  border-color: #2563eb;
  background: var(--bg-card, #ffffff);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .tool-form-input:focus,
[data-theme="dark"] .tool-form-textarea:focus,
[data-theme="dark"] .tool-form-select:focus {
  background: #1e293b;
}

.tool-btn-primary {
  width: 100%;
  padding: 0.8rem 1.35rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tool-btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.tool-dropzone {
  border: 2px dashed rgba(37, 99, 235, 0.35);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(37, 99, 235, 0.03);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tool-dropzone:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: #2563eb;
}

.tool-dropzone-icon {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.tool-dropzone-text {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.tool-dropzone-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* File list inside interactive modals */
.tool-interactive-file-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 180px;
  overflow-y: auto;
}

.tool-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.85);
  font-size: 0.82rem;
}

[data-theme="dark"] .tool-file-item {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(255, 255, 255, 0.08);
}

.tool-file-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 0.5rem;
}

.tool-file-size {
  color: var(--text-muted);
  font-size: 0.74rem;
  margin-right: 0.75rem;
}

.tool-file-del {
  background: transparent;
  border: none;
  color: #ef4444;
  font-weight: 800;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.tool-file-del:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Speech Pulse Animation */
.speech-pulse-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(147, 51, 234, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.speech-pulse-circle.recording {
  background: rgba(239, 68, 68, 0.2);
  animation: speechPulse 1.5s infinite;
}

@keyframes speechPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Empty Search State */
.tools-empty-state {
  display: none;
  text-align: center;
  padding: 4rem 1.5rem;
  width: 100%;
}

.tools-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.tools-empty-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.tools-empty-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 440px;
  margin: 0 auto 1.5rem;
}

/* Toast */
.tool-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 10000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.tool-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.tool-toast.success { border-left: 4px solid #10b981; }
.tool-toast.error   { border-left: 4px solid #ef4444; }

@media (max-width: 768px) {
  .tools-compact-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .tools-header-right {
    max-width: 100%;
    flex-wrap: wrap;
  }
  .tools-search-bar {
    max-width: 100%;
    flex: 1;
    min-width: 200px;
  }
}

