/* ==========================================================================
   YayaTools — Linear / Raycast Inspired Design System
   Mobile-first (375px → 768px → 1024px → 1440px)
   Minimalist · High-contrast · Professional
   ========================================================================== */

/* ── Design Tokens ──────────────────────────────────────────────────────── */
:root {
  /* Background */
  --bg:              #f8f9fa;
  --bg-glass:        rgba(248, 249, 250, 0.85);
  --surface:         #ffffff;
  --surface-2:       #f4f5f7;
  --surface-3:       #eceef1;
  --surface-active:  #e4e6ea;

  /* Border */
  --border:          #e2e5ea;
  --border-subtle:   #eceef1;
  --border-focus:    #2563eb;

  /* Text */
  --text:            #111827;
  --text-2:          #374151;
  --text-3:          #6b7280;
  --text-4:          #9ca3af;

  /* Brand / Accent — single clean blue */
  --accent:          #2563eb;
  --accent-hover:    #1d4ed8;
  --accent-soft:     rgba(37, 99, 235, 0.08);
  --accent-text:     #1e40af;

  /* Status colors */
  --green:           #16a34a;
  --green-soft:      rgba(22, 163, 74, 0.08);
  --orange:          #ea580c;
  --orange-soft:     rgba(234, 88, 12, 0.08);
  --purple:          #7c3aed;
  --purple-soft:     rgba(124, 58, 237, 0.08);
  --teal:            #0d9488;
  --teal-soft:       rgba(13, 148, 136, 0.08);
  --yellow:          #ca8a04;
  --yellow-soft:     rgba(202, 138, 4, 0.1);
  --red:             #dc2626;

  /* Radius */
  --r-sm:    6px;
  --r-md:    8px;
  --r-lg:    12px;
  --r-xl:    16px;
  --r-pill:  9999px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 28px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 48px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.05);

  /* Spacing units (8px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* Typography — clean integer sizes only */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, Menlo, Consolas, monospace;

  /* Layout */
  --sidebar-w:  240px;
  --max-w:      1280px;
  --header-h:   56px;
  --gutter:     16px;

  /* Transition */
  --t-fast: 0.12s ease;
  --t-base: 0.18s ease;
  --t-slow: 0.25s ease;
}

/* Dark Mode */
[data-theme="dark"] {
  --bg:              #0d0f12;
  --bg-glass:        rgba(13, 15, 18, 0.88);
  --surface:         #161b22;
  --surface-2:       #1e242d;
  --surface-3:       #252c38;
  --surface-active:  #2d3644;

  --border:          rgba(255,255,255,0.08);
  --border-subtle:   rgba(255,255,255,0.04);
  --border-focus:    #3b82f6;

  --text:            #f0f2f5;
  --text-2:          #c9d1db;
  --text-3:          #7a8795;
  --text-4:          #4d5966;

  --accent:          #3b82f6;
  --accent-hover:    #60a5fa;
  --accent-soft:     rgba(59, 130, 246, 0.12);
  --accent-text:     #93c5fd;

  --green-soft:      rgba(22, 163, 74, 0.12);
  --orange-soft:     rgba(234, 88, 12, 0.12);
  --purple-soft:     rgba(124, 58, 237, 0.12);
  --teal-soft:       rgba(13, 148, 136, 0.12);
  --yellow-soft:     rgba(202, 138, 4, 0.12);

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  --shadow-lg: 0 10px 28px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
  --shadow-xl: 0 20px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
}

/* ── Global Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--t-slow), color var(--t-slow);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; }

/* ── Site Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* Brand */
.header-left { flex-shrink: 0; }

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
}

.brand-icon-app {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: transform var(--t-base);
}

.brand-wrapper:hover .brand-icon-app {
  transform: scale(1.05) rotate(-3deg);
}

.brand-text-col { display: flex; flex-direction: column; }

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-4);
  font-weight: 500;
  letter-spacing: 0;
}

/* Search Bar */
.command-search-wrapper {
  flex: 1;
  max-width: 420px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-prefix {
  position: absolute;
  left: 11px;
  font-size: 13px;
  color: var(--text-4);
  pointer-events: none;
  z-index: 1;
}

.command-search-box {
  width: 100%;
  height: 34px;
  padding: 0 56px 0 32px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.command-search-box::placeholder {
  color: var(--text-4);
}

.command-search-box:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.command-kbd {
  position: absolute;
  right: 9px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-4);
  font-weight: 600;
  pointer-events: none;
  background: var(--surface-2);
  border-radius: 5px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  line-height: 1.4;
}

/* Header Actions */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
  margin-left: auto;
}

/* Pill button */
.pill-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
  white-space: nowrap;
}

.pill-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--text-4);
}

/* Icon button */
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--text-4);
}

/* Sidebar toggle — hidden on desktop */
.sidebar-toggle-btn { display: none; }

/* Responsive header */
@media (max-width: 1023px) {
  .sidebar-toggle-btn { display: inline-flex; }
}

@media (max-width: 767px) {
  .header-inner {
    gap: var(--sp-2);
    flex-wrap: nowrap;
  }
  .brand-subtitle { display: none; }
  .brand-icon-app { width: 30px; height: 30px; font-size: 13px; }
  .command-search-wrapper {
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  .command-kbd { display: none; }
  .command-search-box { height: 32px; font-size: 13px; }
}

@media (max-width: 479px) {
  .google-signin-btn .auth-btn-text { display: none; }
  .google-signin-btn { padding: 0 8px; min-width: 32px; }
  .lang-toggle-btn { display: none; }
}

/* ── Auth Area ───────────────────────────────────────────────────────────── */
.auth-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.google-icon-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 3px 10px 3px 3px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--t-fast);
}

.user-profile-pill:hover {
  background: var(--surface-2);
  border-color: var(--text-4);
}

.user-avatar-img {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-fallback {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.user-profile-name {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

/* Dropdown */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  padding: 8px;
  z-index: 2000;
  display: none;
  flex-direction: column;
  gap: 2px;
  animation: menuEnter 0.15s ease;
}

.user-dropdown-menu.show { display: flex; }

@keyframes menuEnter {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-user-header {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.dropdown-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.dropdown-user-email {
  font-size: 11px;
  color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.dropdown-item-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: all var(--t-fast);
}

.dropdown-item-btn:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item-btn.danger:hover { background: rgba(220,38,38,0.08); color: var(--red); }

/* ── App Shell ───────────────────────────────────────────────────────────── */
.app-shell {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: var(--sp-6) var(--gutter) 80px;
  display: flex;
  gap: var(--sp-6);
  flex: 1;
}

@media (min-width: 1024px) {
  .app-shell { gap: var(--sp-8); }
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 9998;
}

.sidebar-backdrop.open { display: block; }

.app-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  position: sticky;
  top: calc(var(--header-h) + 16px);
  height: fit-content;
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.app-sidebar::-webkit-scrollbar { width: 4px; }
.app-sidebar::-webkit-scrollbar-track { background: transparent; }
.app-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Mobile sidebar drawer — slides in from RIGHT (matching right-aligned hamburger) */
.sidebar-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 1023px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    left: auto;
    width: 264px;
    height: 100dvh;
    max-height: 100dvh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    border-right: none;
    padding: var(--sp-5) var(--sp-4);
    z-index: 9999;
    box-shadow: var(--shadow-xl);
    transition: right 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
  }

  .app-sidebar.open {
    right: 0;
    left: auto;
  }
  .sidebar-mobile-header { display: flex; }
}

/* Sidebar sections */
.sidebar-section-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-4);
  padding: 4px 10px;
  margin-bottom: 2px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--r-md);
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
  width: 100%;
  text-align: left;
}

.sidebar-nav-item:hover {
  background: var(--surface-2);
  color: var(--text-2);
}

.sidebar-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-item-left {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* Category icon boxes — single color system, no gradient overload */
.sidebar-icon-box {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-icon-box.icon-home      { background: var(--accent); }
.sidebar-icon-box.icon-all       { background: #6b7280; }
.sidebar-icon-box.icon-fav       { background: var(--yellow); }
.sidebar-icon-box.icon-pdf       { background: #ef4444; }
.sidebar-icon-box.icon-text      { background: var(--orange); }
.sidebar-icon-box.icon-image     { background: var(--purple); }
.sidebar-icon-box.icon-dev       { background: #0ea5e9; }
.sidebar-icon-box.icon-calc      { background: var(--green); }
.sidebar-icon-box.icon-generator { background: var(--teal); }
.sidebar-icon-box.icon-security  { background: #10b981; }
.sidebar-icon-box.icon-network   { background: #6366f1; }
.sidebar-icon-box.icon-yayanote  { background: #10b981; }

.sidebar-count-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-4);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: var(--r-pill);
  min-width: 20px;
  text-align: center;
}

.sidebar-nav-item.active .sidebar-count-badge {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Sidebar privacy card */
.sidebar-footer-card {
  margin-top: var(--sp-2);
  padding: var(--sp-3);
  background: var(--green-soft);
  border: 1px solid rgba(22, 163, 74, 0.15);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-footer-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 5px;
}

.sidebar-footer-desc {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.5;
}

/* ── Main Content Area ───────────────────────────────────────────────────── */
.main-content-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

/* ── Home View ───────────────────────────────────────────────────────────── */
.home-view {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  animation: fadeUp 0.2s ease both;
}

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

/* Hero */
.home-hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-8) var(--sp-6);
  position: relative;
  overflow: hidden;
}

/* Subtle background mesh */
.home-hero-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
}

@media (min-width: 768px) {
  .home-hero-card { padding: var(--sp-10) var(--sp-8); }
}

.home-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-4);
  border: 1px solid rgba(37,99,235,0.12);
}

.home-headline {
  font-size: clamp(26px, 4.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: var(--sp-3);
}

.home-subtext {
  font-size: clamp(14px, 2vw, 16px);
  color: var(--text-3);
  line-height: 1.65;
  max-width: 600px;
  margin-bottom: var(--sp-5);
}

.home-action-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* CTA Buttons */
.cta-btn {
  height: 40px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--t-base);
  user-select: none;
}

.cta-btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37,99,235,0.3), 0 4px 16px rgba(37,99,235,0.2);
}

.cta-btn.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(37,99,235,0.3), 0 8px 24px rgba(37,99,235,0.25);
}

.cta-btn.secondary {
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.cta-btn.secondary:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--text-4);
}

/* Home Section Header */
.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.home-section-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}

.home-section-title i {
  font-size: 16px;
  color: var(--accent);
}

.home-view-all-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: opacity var(--t-fast);
}

.home-view-all-link:hover { opacity: 0.75; }

/* Value Pillars */
.home-pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

@media (min-width: 480px) {
  .home-pillars-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .home-pillars-grid { grid-template-columns: repeat(4, 1fr); }
}

.home-pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

.home-pillar-card:hover {
  border-color: var(--text-4);
  box-shadow: var(--shadow-sm);
}

.pillar-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.pillar-icon-box.p-green  { background: var(--green); }
.pillar-icon-box.p-blue   { background: var(--accent); }
.pillar-icon-box.p-orange { background: var(--orange); }
.pillar-icon-box.p-purple { background: var(--purple); }

.pillar-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.3;
}

.pillar-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.6;
}

/* ── Gallery Section ─────────────────────────────────────────────────────── */
.gallery-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5);
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.gallery-heading {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.gallery-subhead {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ── Tools Grid ──────────────────────────────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: var(--sp-3);
}

@media (min-width: 768px) {
  .tools-grid { gap: var(--sp-4); }
}

/* ── Tool Card ───────────────────────────────────────────────────────────── */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  cursor: pointer;
  position: relative;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
  user-select: none;
}

.tool-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-soft);
  transform: translateY(-2px);
}

.tool-card:active { transform: translateY(0); }

.tool-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-2);
}

/* Tool icon — clean solid color, no gradient */
.tool-icon-squircle {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  transition: transform var(--t-base);
}

.tool-card:hover .tool-icon-squircle {
  transform: scale(1.06) rotate(-4deg);
}

/* Category icon colors */
.tool-icon-squircle.cat-pdf       { background: #ef4444; }
.tool-icon-squircle.cat-text      { background: var(--orange); }
.tool-icon-squircle.cat-image     { background: var(--purple); }
.tool-icon-squircle.cat-dev       { background: #0ea5e9; }
.tool-icon-squircle.cat-calc      { background: var(--green); }
.tool-icon-squircle.cat-generator { background: var(--teal); }
.tool-icon-squircle.cat-security  { background: #10b981; }
.tool-icon-squircle.cat-network   { background: #6366f1; }

.tool-head-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.star-btn {
  background: transparent;
  border: none;
  color: var(--text-4);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--r-sm);
  line-height: 1;
  transition: all var(--t-fast);
}

.star-btn:hover { color: var(--yellow); transform: scale(1.15); }
.star-btn.active { color: var(--yellow); }

.tool-badge-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-4);
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.tool-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.3;
}

.tool-description {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.55;
  flex: 1;
}

/* ── Tool Workspace ──────────────────────────────────────────────────────── */
.tool-workspace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-5) var(--sp-5);
  margin-bottom: var(--sp-6);
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.2s ease both;
}

@media (min-width: 768px) {
  .tool-workspace { padding: var(--sp-8) var(--sp-8); }
}

/* Workspace Nav */
.workspace-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.back-gallery-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
  font-family: var(--font-sans);
}

.back-gallery-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--text-4);
}

.kbd-hint {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
  font-weight: 700;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* Workspace header */
.workspace-header-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
}

@media (max-width: 580px) {
  .workspace-header-card {
    flex-direction: column;
    gap: var(--sp-3);
  }
}

.workspace-icon-squircle {
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}

.workspace-icon-squircle.cat-pdf       { background: #ef4444; }
.workspace-icon-squircle.cat-text      { background: var(--orange); }
.workspace-icon-squircle.cat-image     { background: var(--purple); }
.workspace-icon-squircle.cat-dev       { background: #0ea5e9; }
.workspace-icon-squircle.cat-calc      { background: var(--green); }
.workspace-icon-squircle.cat-generator { background: var(--teal); }
.workspace-icon-squircle.cat-security  { background: #10b981; }
.workspace-icon-squircle.cat-network   { background: #6366f1; }

.workspace-header-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.workspace-title-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.workspace-heading {
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
  line-height: 1.15;
}

.workspace-subheading {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.6;
  max-width: 640px;
}

/* ── Workspace Forms & Inputs ───────────────────────────────────────────── */
.io-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
}

@media (min-width: 640px) {
  .io-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-5);
  }
}

.panel-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-4);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-textarea {
  width: 100%;
  min-height: 160px;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.custom-textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Input & select */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="search"]),
select {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  outline: none;
  width: 100%;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="search"]):focus,
select:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Action row */
.action-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-4);
}

/* Buttons */
.btn-action {
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--t-fast);
  user-select: none;
  white-space: nowrap;
}

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

.btn-action.primary:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-action.secondary {
  background: var(--surface-2);
  color: var(--text-2);
  border-color: var(--border);
}

.btn-action.secondary:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--text-4);
}

.btn-action.accent {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

.btn-action.accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.btn-action.danger {
  background: rgba(220,38,38,0.08);
  color: var(--red);
  border-color: rgba(220,38,38,0.2);
}

.btn-action.danger:hover { background: rgba(220,38,38,0.14); }

/* Metrics strip */
.metrics-strip {
  display: flex;
  align-items: center;
  gap: 10px 16px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: var(--sp-4);
  width: 100%;
}

.metric-cell {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 110px;
  word-break: break-word;
}

.metric-cell strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

/* ── Responsive Workspace Grids & Tabs ──────────────────────────────────── */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
  width: 100%;
}

@media (min-width: 580px) {
  .form-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
  width: 100%;
}

@media (min-width: 580px) {
  .form-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

.tool-tab-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  width: 100%;
}

.tool-tab-row .btn-action {
  flex: 1 1 auto;
  min-width: 120px;
  text-align: center;
  justify-content: center;
  font-size: 12px;
  padding: 8px 12px;
  white-space: normal;
  line-height: 1.3;
}

#workspaceBody {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

#workspaceBody input,
#workspaceBody select,
#workspaceBody textarea {
  max-width: 100%;
}

/* ── Processing Overlay & Progress Spinner ───────────────────────────────── */
.processing-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--surface-2);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  margin: 16px 0;
  gap: 12px;
  text-align: center;
}

.processing-spinner {
  width: 38px;
  height: 38px;
  border: 3.5px solid var(--border-subtle);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: yayaSpin 0.75s linear infinite;
}

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

.progress-track {
  width: 100%;
  max-width: 280px;
  height: 8px;
  background: var(--surface-3);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: 4px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-pill);
  transition: width 0.2s ease;
}

/* ── Toast Notifications ─────────────────────────────────────────────────── */
.toast-shelf {
  position: fixed;
  bottom: 24px;
  right: var(--gutter);
  left: var(--gutter);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-2);
  pointer-events: none;
}

@media (min-width: 600px) {
  .toast-shelf { left: auto; max-width: 340px; }
}

.toast-msg {
  background: var(--text);
  color: var(--bg);
  padding: 9px 14px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  animation: toastIn 0.2s ease;
  pointer-events: auto;
  max-width: 100%;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: var(--sp-10) var(--gutter) var(--sp-8);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}

@media (min-width: 640px) {
  .footer-top {
    grid-template-columns: 1.5fr auto;
    align-items: flex-start;
  }
}

.footer-brand-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-width: 380px;
}

.footer-brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.footer-brand-name i { color: var(--accent); }

.footer-brand-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.65;
}

.footer-nav-groups {
  display: flex;
  gap: var(--sp-8);
  flex-wrap: wrap;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 110px;
}

.footer-nav-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text);
  margin-bottom: 4px;
}

.footer-nav-col a {
  color: var(--text-3);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--t-fast);
}

.footer-nav-col a:hover { color: var(--accent); }

.footer-disclaimer-box {
  padding: 12px 16px;
  background: var(--green-soft);
  border-radius: var(--r-lg);
  border: 1px solid rgba(22,163,74,0.15);
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: flex-start;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--sp-4);
  font-size: 12px;
  color: var(--text-4);
}

@media (min-width: 560px) {
  .footer-bottom { flex-direction: row; align-items: center; }
}

/* ── Policy Pages ────────────────────────────────────────────────────────── */
.policy-container {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: var(--sp-8) var(--gutter) 80px;
  flex: 1;
}

.policy-header {
  margin-bottom: var(--sp-8);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.policy-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-text);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-3);
}

.policy-title {
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: var(--sp-2);
}

.policy-updated {
  font-size: 13px;
  color: var(--text-3);
}

.policy-body,
.policy-content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.policy-section-title,
.policy-content h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-1);
}

.policy-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-1);
}

.policy-body p,
.policy-body li,
.policy-content p,
.policy-content li {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}

.policy-body ul, .policy-body ol,
.policy-content ul, .policy-content ol {
  padding-left: var(--sp-5);
}

.policy-body li,
.policy-content li { margin-bottom: var(--sp-2); }

.policy-body a,
.policy-content a {
  color: var(--accent);
  text-decoration: underline;
}

.policy-card-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-top: var(--sp-2);
}

.apple-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: all var(--t-fast);
}

.apple-pill-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--accent);
}

/* ── Utility / Misc ──────────────────────────────────────────────────────── */
.badge-new {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--accent);
  padding: 2px 7px;
  border-radius: var(--r-pill);
}

.badge-hot {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--orange);
  padding: 2px 7px;
  border-radius: var(--r-pill);
}

.empty-state {
  text-align: center;
  padding: var(--sp-12) var(--sp-6);
  color: var(--text-3);
}

.empty-state i {
  font-size: 32px;
  margin-bottom: var(--sp-4);
  color: var(--text-4);
  display: block;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: var(--sp-2);
}

.empty-state p {
  font-size: 13px;
  line-height: 1.6;
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: var(--sp-4) 0;
}

/* Code block */
.code-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  overflow-x: auto;
  line-height: 1.6;
  white-space: pre;
}

/* Checkbox */
.custom-checkbox {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
  user-select: none;
}

.custom-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* Range */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--border);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37,99,235,0.3);
  transition: transform var(--t-fast);
}

input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* Color input */
input[type="color"] {
  -webkit-appearance: none;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  border: 2px solid var(--border);
  padding: 2px;
  cursor: pointer;
  background: transparent;
}

input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border-radius: 6px; border: none; }

/* QR specific */
#qrOutput canvas,
#qrOutput img {
  max-width: 100%;
  border-radius: var(--r-md);
}

/* Responsive final utilities */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Scrollbar */
:root {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* Search highlight */
.search-highlight {
  background: var(--yellow-soft);
  color: var(--yellow);
  border-radius: 3px;
  padding: 0 2px;
}

/* Focus visible global */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── Modern Tool UI Components ─────────────────────────────────────────── */
.file-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: 32px 20px;
  text-align: center;
  background: var(--surface);
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.dropzone-icon {
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 4px;
}

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

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

.slider-control-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.slider-header strong {
  color: var(--text);
  font-family: var(--font-mono);
}

input[type="range"] {
  accent-color: var(--accent);
  cursor: pointer;
  width: 100%;
}

.data-table-mini {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table-mini th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table-mini td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
}

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

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.palette-card {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--t-fast);
}

.palette-card:hover {
  transform: translateY(-2px);
}

.palette-color-fill {
  height: 64px;
  width: 100%;
}

.palette-hex {
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  font-family: var(--font-mono);
  background: var(--surface);
  color: var(--text);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
}

.status-badge.success { background: var(--green-soft); color: var(--green); }
.status-badge.warning { background: var(--yellow-soft); color: var(--yellow); }
.status-badge.danger  { background: var(--red-soft); color: var(--red); }
.status-badge.info    { background: var(--accent-soft); color: var(--accent); }

/* ── Yaya Ecosystem Styles ──────────────────────────────────────────────── */
.sidebar-nav-item.ecosystem-link {
  text-decoration: none;
  min-height: 42px;
  height: auto;
  padding: 8px 10px;
}

.ecosystem-text-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ecosystem-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.ecosystem-tagline {
  font-size: 10.5px;
  color: var(--text-3);
  line-height: 1.2;
}

.ecosystem-ext-icon {
  font-size: 10px;
  color: var(--text-4);
  margin-left: auto;
}

.sidebar-nav-item.ecosystem-link:hover .ecosystem-ext-icon {
  color: var(--text-2);
}

/* Home Ecosystem Card */
.home-ecosystem-card {
  margin-top: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.home-ecosystem-header {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.home-ecosystem-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-ecosystem-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.ecosystem-apps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}

.ecosystem-app-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  flex-wrap: wrap;
  transition: border-color var(--t-fast), transform var(--t-fast);
}

.ecosystem-app-box:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.ecosystem-app-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.ecosystem-app-info {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ecosystem-app-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ecosystem-app-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.ecosystem-app-pill {
  font-size: 11px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
  padding: 2px 8px;
  border-radius: var(--r-pill);
}

.ecosystem-app-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.4;
}

/* ── Mobile Viewport Hardening (Under 600px) ────────────────────────────── */
@media (max-width: 600px) {
  .workspace-title-row {
    gap: 6px;
  }

  .workspace-heading {
    font-size: 19px;
    word-break: break-word;
  }

  .workspace-subheading {
    font-size: 13px;
    word-break: break-word;
  }

  .tool-tab-row {
    flex-direction: column;
  }

  .tool-tab-row .btn-action {
    width: 100%;
    text-align: center;
  }

  .metric-cell {
    min-width: 100%;
  }

  .action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .action-row .btn-action {
    width: 100%;
    justify-content: center;
  }
}



