/* ============================================================
   Office Tools — Shared Stylesheet
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg:           #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card:      #ffffff;
  --border:       #e2e8f0;
  --text:         #1e293b;
  --text-muted:   #64748b;
  --text-light:   #94a3b8;
  --primary:      #6366f1;
  --primary-h:    #4f46e5;
  --primary-dim:  #eef2ff;
  --success:      #10b981;
  --success-dim:  #d1fae5;
  --danger:       #ef4444;
  --danger-dim:   #fee2e2;
  --warning:      #f59e0b;
  --warning-dim:  #fef3c7;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:    0 4px 12px rgba(0,0,0,.08);
  --transition:   .18s ease;
  --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg:           #0f172a;
  --bg-secondary: #1e293b;
  --bg-card:      #1e293b;
  --border:       #334155;
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --text-light:   #64748b;
  --primary-dim:  #1e1b4b;
  --success-dim:  #064e3b;
  --danger-dim:   #450a0a;
  --warning-dim:  #451a03;
  --shadow:       0 1px 3px rgba(0,0,0,.3);
  --shadow-md:    0 4px 12px rgba(0,0,0,.4);
}

[data-theme="matrix"] {
  --bg:           #000000;
  --bg-secondary: #020d02;
  --bg-card:      #020d02;
  --border:       #0a3d0a;
  --text:         #00ff41;
  --text-muted:   #00aa2b;
  --text-light:   #005c17;
  --primary:      #00ff41;
  --primary-h:    #00cc33;
  --primary-dim:  #001400;
  --success:      #00ff41;
  --success-dim:  #001a00;
  --danger:       #ff0040;
  --danger-dim:   #1a0008;
  --warning:      #ffe000;
  --warning-dim:  #1a1400;
  --shadow:       0 1px 3px rgba(0,255,65,.1);
  --shadow-md:    0 4px 20px rgba(0,255,65,.15);
  --font:         'Courier New', Courier, monospace;
}

/* Matrix: scanline overlay on body */
[data-theme="matrix"] body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 65, .015) 2px,
    rgba(0, 255, 65, .015) 4px
  );
}

/* Matrix: glowing text on headings */
[data-theme="matrix"] h1,
[data-theme="matrix"] .tool-card-name,
[data-theme="matrix"] .header-logo {
  text-shadow: 0 0 8px rgba(0,255,65,.7), 0 0 20px rgba(0,255,65,.3);
}

/* Matrix: glowing border on cards */
[data-theme="matrix"] .card,
[data-theme="matrix"] .tool-card {
  border-color: #0a3d0a;
  box-shadow: 0 0 12px rgba(0,255,65,.08);
}
[data-theme="matrix"] .tool-card:hover {
  border-color: #00ff41;
  box-shadow: 0 0 20px rgba(0,255,65,.3);
}

/* Matrix: primary button glow */
[data-theme="matrix"] .btn-primary {
  background: #00ff41;
  color: #000;
  border-color: #00ff41;
  box-shadow: 0 0 12px rgba(0,255,65,.4);
}
[data-theme="matrix"] .btn-primary:hover {
  background: #00cc33;
  box-shadow: 0 0 20px rgba(0,255,65,.6);
}

/* Matrix: input glow on focus */
[data-theme="matrix"] input:focus,
[data-theme="matrix"] textarea:focus,
[data-theme="matrix"] select:focus {
  border-color: #00ff41;
  box-shadow: 0 0 0 3px rgba(0,255,65,.15);
}

/* Matrix: header border */
[data-theme="matrix"] .site-header {
  border-bottom-color: #0a3d0a;
  box-shadow: 0 1px 16px rgba(0,255,65,.15);
}

/* Matrix: stats value color */
[data-theme="matrix"] .stat-card .stat-value,
[data-theme="matrix"] .live-ts,
[data-theme="matrix"] .big-result .num {
  color: #00ff41;
  text-shadow: 0 0 10px rgba(0,255,65,.5);
}

/* Matrix: hero title span */
[data-theme="matrix"] .hero h1 span { color: #00ff41; text-shadow: 0 0 16px rgba(0,255,65,.8); }

/* Matrix: search border */
[data-theme="matrix"] .search-wrap input:focus { border-color: #00ff41; }

/* Matrix: badge override */
[data-theme="matrix"] .badge-primary { background: #001400; color: #00ff41; border: 1px solid #0a3d0a; }

/* ---------- Anime / Japanese Cartoon theme ---------- */
[data-theme="anime"] {
  --bg:           #fff0f5;
  --bg-secondary: #ffe4ef;
  --bg-card:      #ffffff;
  --border:       #f9a8d4;
  --text:         #4a1942;
  --text-muted:   #9d4e8a;
  --text-light:   #c084b0;
  --primary:      #e91e8c;
  --primary-h:    #c8157b;
  --primary-dim:  #fce7f3;
  --success:      #22c55e;
  --success-dim:  #dcfce7;
  --danger:       #ef4444;
  --danger-dim:   #fee2e2;
  --warning:      #f59e0b;
  --warning-dim:  #fef3c7;
  --radius:       16px;
  --radius-lg:    24px;
  --shadow:       0 2px 8px rgba(233,30,140,.10);
  --shadow-md:    0 6px 20px rgba(233,30,140,.15);
  --font:         'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* Anime: sakura petal decoration on body */
[data-theme="anime"] body::before {
  content: '🌸';
  position: fixed;
  top: 12px;
  right: 16px;
  font-size: 1.4rem;
  pointer-events: none;
  z-index: 9999;
  opacity: .55;
  animation: petals 4s ease-in-out infinite alternate;
}

@keyframes petals {
  from { transform: rotate(-8deg) scale(1);   opacity: .45; }
  to   { transform: rotate( 8deg) scale(1.1); opacity: .65; }
}

/* Anime: pastel gradient header */
[data-theme="anime"] .site-header {
  background: linear-gradient(135deg, #fce7f3 0%, #ede9fe 100%);
  border-bottom-color: #f9a8d4;
  box-shadow: 0 2px 12px rgba(233,30,140,.12);
}

/* Anime: glowing pink headings */
[data-theme="anime"] h1,
[data-theme="anime"] .tool-card-name,
[data-theme="anime"] .header-logo {
  background: linear-gradient(90deg, #e91e8c, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Anime: rounded pastel cards */
[data-theme="anime"] .card,
[data-theme="anime"] .tool-card {
  border-color: #f9a8d4;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(233,30,140,.08);
}
[data-theme="anime"] .tool-card:hover {
  border-color: #e91e8c;
  box-shadow: 0 8px 28px rgba(233,30,140,.20);
  transform: translateY(-2px);
}

/* Anime: primary button — bubblegum pink */
[data-theme="anime"] .btn-primary {
  background: linear-gradient(135deg, #e91e8c, #a855f7);
  color: #fff;
  border-color: transparent;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(233,30,140,.30);
}
[data-theme="anime"] .btn-primary:hover {
  background: linear-gradient(135deg, #c8157b, #9333ea);
  box-shadow: 0 6px 20px rgba(233,30,140,.45);
}

/* Anime: input focus glow */
[data-theme="anime"] input:focus,
[data-theme="anime"] textarea:focus,
[data-theme="anime"] select:focus {
  border-color: #e91e8c;
  box-shadow: 0 0 0 3px rgba(233,30,140,.15);
}

/* Anime: stat value color */
[data-theme="anime"] .stat-card .stat-value,
[data-theme="anime"] .live-ts,
[data-theme="anime"] .big-result .num {
  color: #e91e8c;
}

/* Anime: hero accent */
[data-theme="anime"] .hero h1 span { color: #e91e8c; }

/* Anime: badge */
[data-theme="anime"] .badge-primary { background: #fce7f3; color: #e91e8c; border: 1px solid #f9a8d4; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Site Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.header-logo:hover { text-decoration: none; color: var(--primary); }
.header-logo .logo-icon { font-size: 1.3rem; }

.header-tool-name {
  flex: 1;
  font-size: .95rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Header: logo left (flex:1) — search centred — actions right (flex:1) */
.header-logo    { flex: 1; }
.header-search-wrap {
  flex: 0 0 auto;
  width: 300px;
  position: relative;
}
.header-search-wrap input {
  width: 100%;
  padding: .38rem 2rem .38rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--bg-secondary);
  color: var(--text);
  font-size: .85rem;
  outline: none;
  transition: border-color var(--transition);
}
.header-search-wrap input:focus { border-color: var(--primary); }
.header-search-wrap input::placeholder { color: var(--text-muted); }
.header-search-icon {
  position: absolute;
  right: .65rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}
@media (max-width: 520px) {
  .header-search-wrap { width: 120px; }
}

.header-actions { display: flex; align-items: center; gap: .5rem; flex: 1; justify-content: flex-end; }

/* ---------- Theme Toggle ---------- */
.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: .35rem .75rem;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
  display: flex;
  align-items: center;
  gap: .35rem;
}
.theme-toggle:hover { background: var(--border); }

/* ---------- Hub Hero ---------- */
.hero {
  text-align: center;
  padding: 2rem 1.5rem 1.5rem;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: .5rem;
}
.hero h1 span { color: var(--primary); }
.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

/* ---------- Search Bar ---------- */
.search-wrap {
  max-width: 460px;
  margin: 0 auto;
  position: relative;
}
.search-wrap input {
  width: 100%;
  padding: .7rem 2.8rem .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--bg-card);
  color: var(--text);
  font-size: .95rem;
  outline: none;
  transition: border-color var(--transition);
}
.search-wrap input:focus { border-color: var(--primary); }
.search-wrap .search-icon {
  position: absolute;
  right: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* ---------- Hub Grid ---------- */
.hub-main { padding: 0 1.5rem 3rem; max-width: 1200px; margin: 0 auto; }

.category-section { margin-top: 2rem; }
.category-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.tool-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.tool-card.coming-soon {
  opacity: .5;
  cursor: default;
  pointer-events: none;
}

.tool-card-icon { font-size: 1.8rem; line-height: 1; }
.tool-card-name { font-weight: 700; font-size: .97rem; }
.tool-card-desc { font-size: .82rem; color: var(--text-muted); line-height: 1.4; flex: 1; }
.tool-card-badge {
  align-self: flex-start;
  font-size: .7rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 50px;
  background: var(--warning-dim);
  color: var(--warning);
}

/* ---------- Tool Page Layout ---------- */
.tool-main {
  padding: 2rem 1.5rem 4rem;
  max-width: 860px;
  margin: 0 auto;
}

.tool-header {
  margin-bottom: 1.75rem;
}
.tool-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.tool-header p {
  color: var(--text-muted);
  margin-top: .35rem;
  font-size: .95rem;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 1rem; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: .25rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: .25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.tab-btn {
  flex: 1;
  padding: .5rem .75rem;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------- Form Controls ---------- */
label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .4rem;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: .92rem;
  outline: none;
  transition: border-color var(--transition);
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; min-height: 120px; }

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

input[type="checkbox"] {
  accent-color: var(--primary);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
  cursor: pointer;
}
.checkbox-row label { margin: 0; cursor: pointer; font-weight: 400; color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .6rem 1.2rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-h); border-color: var(--primary-h); }

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--border); }

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

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover { background: #dc2626; }

.btn-sm { padding: .35rem .75rem; font-size: .82rem; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1rem; }
.btn-full { width: 100%; }

.btn-group {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* ---------- Result / Output Box ---------- */
.result-box {
  position: relative;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 3rem .75rem .85rem;
  font-family: 'Courier New', monospace;
  font-size: .9rem;
  word-break: break-all;
  min-height: 2.5rem;
  color: var(--text);
}
.result-box.large { min-height: 100px; white-space: pre-wrap; }
.result-box.mono { font-size: .85rem; }

.copy-btn {
  position: absolute;
  top: .5rem;
  right: .5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .2rem .5rem;
  font-size: .75rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.copy-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.copy-btn.copied { background: var(--success); color: #fff; border-color: var(--success); }

/* ---------- Stats / Info Grid ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.stat-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}
.stat-card .stat-label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .6rem;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 700;
}
.badge-success { background: var(--success-dim); color: var(--success); }
.badge-danger  { background: var(--danger-dim);  color: var(--danger); }
.badge-warning { background: var(--warning-dim); color: var(--warning); }
.badge-primary { background: var(--primary-dim); color: var(--primary); }

/* ---------- Alert ---------- */
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius);
  font-size: .88rem;
  margin-top: 1rem;
}
.alert-info    { background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(99,102,241,.2); }
.alert-success { background: var(--success-dim); color: var(--success); border: 1px solid rgba(16,185,129,.2); }
.alert-danger  { background: var(--danger-dim);  color: var(--danger);  border: 1px solid rgba(239,68,68,.2); }

/* ---------- Divider ---------- */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ---------- Strength Meter ---------- */
.strength-bar {
  height: 6px;
  border-radius: 50px;
  background: var(--border);
  margin-top: .5rem;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  border-radius: 50px;
  transition: width .3s ease, background .3s ease;
  width: 0%;
}

/* ---------- Scrollable List ---------- */
.scroll-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.scroll-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .85rem;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
  font-family: 'Courier New', monospace;
}
.scroll-list-item:last-child { border-bottom: none; }
.scroll-list-item:hover { background: var(--bg-secondary); }

/* ---------- Timer Circle ---------- */
.timer-ring { display: flex; justify-content: center; margin: 1rem 0; }
.timer-ring svg { transform: rotate(-90deg); }
.timer-ring circle { transition: stroke-dashoffset .5s ease; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .site-header { padding: .65rem 1rem; }
  .hero { padding: 1.5rem 1rem 1.25rem; }
  .hub-main { padding: 0 1rem 2rem; }
  .cat-filter { padding: .5rem 1rem; top: 48px; }
  .tool-main { padding: 1.25rem 1rem 3rem; }
  .card { padding: 1rem; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ---------- Utility ---------- */
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.hidden { display: none !important; }
.mono { font-family: 'Courier New', monospace; }
.flex { display: flex; align-items: center; gap: .5rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ---------- Tool Sidebar (permanent left panel) ---------- */
.ot-sidebar {
  position: fixed;
  top: 53px; left: 0;
  width: 220px;
  height: calc(100vh - 53px);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 99;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.has-sidebar .tool-main {
  margin-left: 220px;
}

@media (max-width: 768px) {
  .ot-sidebar { display: none; }
  body.has-sidebar .tool-main { margin-left: 0; }
}

.ot-sidebar-head {
  padding: .8rem 1rem .6rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.ot-sidebar-head strong { font-size: .95rem; flex: 1; }

.ot-sidebar-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  padding: .15rem .35rem;
  border-radius: 6px;
  line-height: 1;
}
.ot-sidebar-close:hover { background: var(--bg-secondary); color: var(--text); }

.ot-sidebar-search {
  padding: .55rem .8rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ot-sidebar-search input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .85rem;
  padding: .42rem .75rem;
  outline: none;
  transition: border-color var(--transition);
}
.ot-sidebar-search input::placeholder { color: var(--text-muted); }
.ot-sidebar-search input:focus { border-color: var(--primary); }

.ot-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: .35rem 0;
}
.ot-sidebar-cat {
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  padding: .65rem 1rem .2rem;
}
.ot-sidebar-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .38rem 1rem;
  font-size: .84rem;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}
.ot-sidebar-item:hover,
.ot-sidebar-item.focused { background: var(--bg-secondary); }
.ot-sidebar-item.current {
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-dim);
}
.ot-sidebar-item .si-icon { font-size: .95rem; flex-shrink: 0; }
.ot-sidebar-item .si-name { flex: 1; }

