/* ==========================================================================
   TerraCelest Universal Navigation Stylesheet
   Path: /css/navigation.css
   ========================================================================== */

/* 1. TOPBAR STYLES */
.tc-topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: calc(var(--topbar-h) + var(--safe-t));
  padding-top: var(--safe-t);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.tc-topbar-inner {
  height: var(--topbar-h);
  max-width: var(--content-max-w);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tc-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--navy);
  text-decoration: none;
}

.tc-brand-link img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.tc-back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.15s ease, background 0.15s ease;
}

.tc-back-btn:active {
  transform: scale(0.94);
}

.tc-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-header {
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-header.btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 2px 10px rgba(0, 166, 156, 0.25);
}

.btn-header:active {
  transform: scale(0.96);
}

.tc-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-sub);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.tc-icon-btn:active {
  transform: scale(0.92);
}

/* 2. NATIVE MOBILE BOTTOM NAVIGATION BAR */
.tc-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 90;
  max-width: var(--content-max-w);
  margin: 0 auto;
  box-shadow: 0 -4px 18px rgba(11, 29, 58, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.tc-bottom-tab {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  position: relative;
  transition: color 0.15s ease, transform 0.15s ease;
}

.tc-bottom-tab:active {
  transform: scale(0.94);
}

.tc-tab-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tc-tab-icon-wrap i {
  font-size: 1.25rem;
}

.tc-bottom-tab.active {
  color: var(--primary);
}

.tc-bottom-tab.active i {
  transform: translateY(-1px);
}

/* Badge on Tab Icon */
.tc-nav-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--error);
  color: var(--text-inverse);
  font-size: 0.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--surface);
}

/* 3. SIDE-OUT DRAWER NAVIGATION */
.tc-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(11, 29, 58, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.tc-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.tc-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 340px);
  z-index: 130;
  background: var(--surface);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}

.tc-drawer.open {
  transform: translateX(0);
}

@media (min-width: 640px) {
  .tc-drawer {
    width: min(85vw, 380px);
    max-width: 380px;
  }
}

.tc-drawer-header {
  padding: calc(var(--safe-t) + 16px) 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.tc-drawer-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.tc-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid var(--primary);
}

.tc-user-details {
  min-width: 0;
}

.tc-user-details strong {
  display: block;
  font-size: 0.95rem;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-user-details span {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-drawer-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px 14px;
}

.tc-drawer-group {
  margin-bottom: 16px;
}

.tc-drawer-group-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 12px 8px 6px;
  letter-spacing: 0.05em;
}

.tc-drawer-group.is-collapsible .tc-drawer-group-title{display:flex;align-items:center;justify-content:space-between;cursor:pointer;min-height:44px;user-select:none}.tc-drawer-group.is-collapsible .tc-drawer-group-title::after{content:"\25BE";font-size:.8rem;transition:transform .2s ease;opacity:.55}.tc-drawer-group.is-collapsible.collapsed .tc-drawer-group-title::after{transform:rotate(-90deg)}.tc-drawer-group.is-collapsible.collapsed .tc-drawer-link{display:none}
.tc-drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.tc-drawer-link i {
  width: 20px;
  text-align: center;
  color: var(--primary);
  font-size: 1rem;
}

.tc-drawer-link:hover,
.tc-drawer-link.active {
  background: var(--surface-2);
  color: var(--primary-dark);
}

.tc-drawer-link.danger {
  color: var(--error);
}

.tc-drawer-link.danger i {
  color: var(--error);
}

.tc-drawer-badge {
  margin-left: auto;
  background: var(--primary-faint);
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
}

.tc-drawer-footer {
  padding: 14px 16px calc(var(--safe-b) + 14px);
  border-top: 1px solid var(--border);
}

.btn-block {
  width: 100%;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--navy);
  border: 1px solid var(--border);
  min-height: 44px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* 4. RESPONSIVE DESKTOP LAYOUT */
@media (min-width: 900px) {
  .tc-bottom-nav {
    display: none !important;
  }
}

/* ==========================================================================
   AVATAR BUTTON + FLYOUT
   ========================================================================== */

.tc-avatar-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--primary);
  color: var(--text-inverse);
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 10px rgba(0, 166, 156, 0.28);
}

.tc-avatar-btn:active {
  transform: scale(0.94);
}

.tc-avatar-initial {
  line-height: 1;
  pointer-events: none;
}

.tc-avatar-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22C55E;
  border: 2px solid var(--surface);
  pointer-events: none;
}

.tc-avatar-overlay {
  position: fixed;
  inset: 0;
  z-index: 195;
  background: transparent;
  display: none;
}

.tc-avatar-overlay.open {
  display: block;
}

.tc-avatar-flyout {
  position: fixed;
  top: calc(var(--topbar-h) + var(--safe-t) + 6px);
  right: 12px;
  z-index: 200;
  min-width: 240px;
  max-width: calc(100vw - 24px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(11, 29, 58, 0.22);
  padding: 6px;
  display: none;
  transform-origin: top right;
  animation: tcAvatarIn 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.tc-avatar-flyout.open {
  display: block;
}

@keyframes tcAvatarIn {
  from { opacity: 0; transform: scale(0.94) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.tc-avatar-flyout-head {
  padding: 12px 14px 10px;
}

.tc-avatar-flyout-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tc-avatar-flyout-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.tc-avatar-flyout-sep {
  height: 1px;
  background: var(--border-light);
  margin: 6px 8px;
}

.tc-avatar-flyout-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 14px 4px;
}

.tc-avatar-flyout-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}

.tc-avatar-flyout-item:hover {
  background: var(--surface-2);
  color: var(--primary-dark);
  text-decoration: none;
}

.tc-avatar-flyout-item i {
  width: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tc-avatar-flyout-item:hover i {
  color: var(--primary);
}

.tc-avatar-flyout-danger {
  color: #B42318;
}

.tc-avatar-flyout-danger i {
  color: #B42318;
}

.tc-avatar-flyout-danger:hover {
  background: #FEF3F2;
  color: #7A1A13;
}
/* ==========================================================================
   BOTTOM NAV — NEW (bold centered) + MENU button
   ========================================================================== */

.tc-bottom-nav {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  padding-left: 4px;
  padding-right: 4px;
}

.tc-bottom-tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  padding: 6px 2px 4px;
  transition: color 0.15s ease;
  position: relative;
}

.tc-bottom-tab.active {
  color: var(--primary);
}

.tc-bottom-tab.active .tc-tab-icon-wrap {
  color: var(--primary);
}

.tc-tab-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 1.05rem;
  position: relative;
}

.tc-nav-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: #DC2626;
  color: var(--text-inverse);
  font-size: 0.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tc-bottom-tab-new {
  flex: 1.15 1 0;
  color: var(--primary);
}

.tc-tab-new-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--primary);
  color: var(--text-inverse);
  font-size: 1.3rem;
  margin-top: -14px;
  box-shadow: 0 8px 20px rgba(0, 166, 156, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tc-bottom-tab-new:active .tc-tab-new-icon {
  transform: scale(0.92);
  box-shadow: 0 4px 12px rgba(0, 166, 156, 0.3);
}

.tc-bottom-tab-new span {
  color: var(--primary);
  margin-top: 6px;
  font-weight: 800;
}

html[data-theme="dark"] .tc-bottom-tab-new span {
  color: var(--primary-light);
}
/* Admin topbar page title */
.tc-topbar-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60vw;
}

html[data-theme="dark"] .tc-topbar-title {
  color: var(--text);
}
/* ==========================================================================
   NEW SHEET — bottom flyout from the New button
   ========================================================================== */
.tc-new-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(11, 29, 58, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.tc-new-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.tc-new-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 310;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 10px 16px calc(16px + var(--safe-b));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -12px 40px rgba(11, 29, 58, 0.22);
  max-width: 520px;
  margin: 0 auto;
}
.tc-new-sheet.open {
  transform: translateY(0);
}
.tc-new-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: var(--border);
  margin: 4px auto 14px;
}
.tc-new-sheet-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.015em;
  text-align: center;
  margin-bottom: 16px;
}
.tc-new-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tc-new-sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.tc-new-sheet-item:hover {
  background: var(--surface-hover);
  border-color: var(--border);
  text-decoration: none;
}
.tc-new-sheet-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.tc-new-sheet-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.tc-new-sheet-text strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}
.tc-new-sheet-text em {
  font-size: 0.76rem;
  font-style: normal;
  color: var(--text-muted);
  margin-top: 2px;
}
.tc-new-sheet-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.tc-new-sheet-close {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 12px;
}
.tc-new-sheet-close:hover {
  background: var(--surface-2);
}

html[data-theme="dark"] .tc-new-sheet-item {
  background: var(--surface-2);
}
/* ==========================================================================
   tcDrawerFullscreen — full-screen drawer with search + grid
   Appended to /js/navigation.css — overrides prior .tc-drawer rules
   ========================================================================== */

/* ── Container: full-screen overlay ── */
/* tcDrawerHardened — !important to beat legacy .tc-drawer rules */
.tc-drawer.tc-drawer-fs {
  position: fixed !important;
  inset: 0 !important;
  left: 0 !important; top: 0 !important; right: 0 !important; bottom: 0 !important;
  width: 100% !important; max-width: 100% !important;
  height: 100dvh !important;
  transform: none !important;
  translate: none !important;
  border-radius: 0 !important;
  background: var(--surface, #fff);
  color: var(--text-main, #102A43);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 2147483600;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: none !important;
  animation: tcDrawerIn .34s cubic-bezier(.22,.61,.36,1) both;
}
.tc-drawer.tc-drawer-fs.open { display: flex !important; transform: none !important; translate: none !important; }

/* tcDrawerSlide — slide from left (matches edge-swipe direction) */
@keyframes tcDrawerIn {
  from { opacity: .4; transform: translateX(-100%); }
  to   { opacity: 1;  transform: translateX(0); }
}

/* ── Head — user + search + close ── */
.tc-drawer.tc-drawer-fs .tc-drawer-head {
  flex-shrink: 0;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border-light, #E8EEF2);
  display: grid;
  gap: 12px;
  background: var(--surface, #fff);
}

.tc-drawer.tc-drawer-fs .tc-drawer-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tc-drawer.tc-drawer-fs .tc-drawer-user .tc-user-avatar {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, #19b9a8, #09263e);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
  flex-shrink: 0;
}
.tc-drawer.tc-drawer-fs .tc-drawer-user .tc-user-info {
  flex: 1;
  min-width: 0;
}
.tc-drawer.tc-drawer-fs .tc-drawer-user .tc-user-info strong {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -.2px;
  color: var(--text-main, #102A43);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tc-drawer.tc-drawer-fs .tc-drawer-user .tc-user-info small {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #627D98);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tc-drawer.tc-drawer-fs .tc-drawer-close {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface-2, #E8F5F3);
  border: 0;
  color: var(--text-main, #102A43);
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}

/* ── Search bar ── */
.tc-drawer.tc-drawer-fs .tc-drawer-search {
  position: relative;
}
.tc-drawer.tc-drawer-fs .tc-drawer-search input {
  width: 100%;
  padding: 13px 44px 13px 42px;
  border: 1.5px solid var(--border, #D9E2EC);
  border-radius: 14px;
  background: var(--surface-2, #F2F6F8);
  color: var(--text-main, #102A43);
  font-size: 14px;
  font-family: inherit;
  outline: 0;
  min-height: 48px;
  transition: border-color .15s, background .15s;
}
.tc-drawer.tc-drawer-fs .tc-drawer-search input:focus {
  border-color: var(--primary, #00A69C);
  background: var(--surface, #fff);
}
.tc-drawer.tc-drawer-fs .tc-drawer-search .icon-l {
  position: absolute;
  left: 15px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #627D98);
  font-size: 15px;
  pointer-events: none;
}
.tc-drawer.tc-drawer-fs .tc-drawer-search .clear {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--text-muted, #627D98);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  display: none;
}
.tc-drawer.tc-drawer-fs .tc-drawer-search.has-value .clear { display: block; }

/* ── Body + grid ── */
.tc-drawer.tc-drawer-fs .tc-drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px 24px;
  background: var(--bg, #F5F8FA);
}

.tc-drawer.tc-drawer-fs .tc-drawer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}
@media (min-width: 640px) {
  .tc-drawer.tc-drawer-fs .tc-drawer-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (min-width: 900px) {
  .tc-drawer.tc-drawer-fs .tc-drawer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .tc-drawer.tc-drawer-fs { max-width: 1100px; margin: 0 auto; }
}

/* ── Category card ── */
.tc-drawer.tc-drawer-fs .tc-drawer-cat {
  background: var(--surface, #fff);
  border: 1px solid var(--border-light, #E8EEF2);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.tc-drawer.tc-drawer-fs .tc-drawer-cat.open {
  border-color: var(--primary, #00A69C);
  box-shadow: 0 6px 20px rgba(0,166,156,.10);
}
.tc-drawer.tc-drawer-fs .tc-drawer-cat.hidden { display: none; }

.tc-drawer.tc-drawer-fs .tc-drawer-cat-head {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: background .12s;
}
.tc-drawer.tc-drawer-fs .tc-drawer-cat-head:hover { background: var(--surface-2, #F2F6F8); }
.tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-head { border-bottom: 1px solid var(--border-light, #E8EEF2); }

.tc-drawer.tc-drawer-fs .tc-drawer-cat-head .ic {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--primary-faint, rgba(0,166,156,.08));
  color: var(--primary, #00A69C);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.tc-drawer.tc-drawer-fs .tc-drawer-cat-head .meta {
  flex: 1; min-width: 0;
}
.tc-drawer.tc-drawer-fs .tc-drawer-cat-head .meta b {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.2px;
  color: var(--text-main, #102A43);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tc-drawer.tc-drawer-fs .tc-drawer-cat-head .meta small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted, #627D98);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tc-drawer.tc-drawer-fs .tc-drawer-cat-head .cnt {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--surface-2, #F2F6F8);
  color: var(--text-muted, #627D98);
  flex-shrink: 0;
  letter-spacing: .04em;
}
.tc-drawer.tc-drawer-fs .tc-drawer-cat-head .chev {
  font-size: 12px;
  color: var(--text-muted, #627D98);
  transition: transform .22s ease;
  flex-shrink: 0;
}
.tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-head .chev {
  transform: rotate(90deg);
}

/* ── Category body ── */
.tc-drawer.tc-drawer-fs .tc-drawer-cat-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s cubic-bezier(.22,.61,.36,1);
}
.tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body {
  max-height: 2000px;
  overflow-y: auto;
}

/* ── Sub-category (3-level) ── */
.tc-drawer.tc-drawer-fs .tc-drawer-sub {
  border-top: 1px solid var(--border-light, #E8EEF2);
}
.tc-drawer.tc-drawer-fs .tc-drawer-sub:first-child { border-top: 0; }
.tc-drawer.tc-drawer-fs .tc-drawer-sub-head {
  padding: 10px 16px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted, #627D98);
  cursor: pointer;
}
.tc-drawer.tc-drawer-fs .tc-drawer-sub-head .chev {
  font-size: 10px;
  transition: transform .2s ease;
}
.tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-head .chev {
  transform: rotate(90deg);
}
.tc-drawer.tc-drawer-fs .tc-drawer-sub-body { display: none; }
.tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body { display: block; }

/* ── Leaf items ── */
.tc-drawer.tc-drawer-fs .tc-drawer-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
  color: var(--text-main, #102A43);
  text-decoration: none;
  cursor: pointer;
  border-top: 1px solid var(--border-light, #E8EEF2);
  transition: background .12s;
}
.tc-drawer.tc-drawer-fs .tc-drawer-item:first-child { border-top: 0; }
.tc-drawer.tc-drawer-fs .tc-drawer-item:hover { background: var(--surface-2, #F2F6F8); }
.tc-drawer.tc-drawer-fs .tc-drawer-item.active {
  background: var(--primary-faint, rgba(0,166,156,.08));
}
.tc-drawer.tc-drawer-fs .tc-drawer-item.danger .ic { background: #fef2f2; color: #b91c1c; }
.tc-drawer.tc-drawer-fs .tc-drawer-item.hidden { display: none; }

.tc-drawer.tc-drawer-fs .tc-drawer-item .ic {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--surface-2, #F2F6F8);
  color: var(--primary, #00A69C);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.tc-drawer.tc-drawer-fs .tc-drawer-item.active .ic {
  background: var(--primary, #00A69C);
  color: #fff;
}
.tc-drawer.tc-drawer-fs .tc-drawer-item .txt { min-width: 0; }
.tc-drawer.tc-drawer-fs .tc-drawer-item .txt b {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -.1px;
  color: var(--text-main, #102A43);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tc-drawer.tc-drawer-fs .tc-drawer-item .txt small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted, #627D98);
  margin-top: 2px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tc-drawer.tc-drawer-fs .tc-drawer-item .arrow {
  font-size: 11px;
  color: var(--border, #D9E2EC);
}
.tc-drawer.tc-drawer-fs .tc-drawer-item .badge {
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--primary, #00A69C);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

/* ── Search highlight ── */
.tc-drawer.tc-drawer-fs mark {
  background: rgba(255, 215, 110, .55);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 800;
}

/* ── Empty state ── */
.tc-drawer.tc-drawer-fs .tc-drawer-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-muted, #627D98);
  font-size: 13px;
  line-height: 1.5;
  display: none;
}
.tc-drawer.tc-drawer-fs .tc-drawer-empty.show { display: block; }
.tc-drawer.tc-drawer-fs .tc-drawer-empty i {
  display: block;
  font-size: 40px;
  opacity: .3;
  margin-bottom: 14px;
}

/* ── Footer ── */
.tc-drawer.tc-drawer-fs .tc-drawer-foot {
  flex-shrink: 0;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-light, #E8EEF2);
  background: var(--surface, #fff);
  display: flex;
  gap: 8px;
}
.tc-drawer.tc-drawer-fs .tc-drawer-foot button {
  flex: 1;
  padding: 12px;
  border-radius: 11px;
  border: 1px solid var(--border-light, #E8EEF2);
  background: var(--surface-2, #F2F6F8);
  color: var(--text-main, #102A43);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ── Dark mode ── */
html[data-theme="dark"] .tc-drawer.tc-drawer-fs { background: var(--surface, #161B22); }
html[data-theme="dark"] .tc-drawer.tc-drawer-fs .tc-drawer-head,
html[data-theme="dark"] .tc-drawer.tc-drawer-fs .tc-drawer-foot { background: var(--surface, #161B22); border-color: var(--border, #2A3441); }
html[data-theme="dark"] .tc-drawer.tc-drawer-fs .tc-drawer-body { background: var(--bg, #0F1419); }
html[data-theme="dark"] .tc-drawer.tc-drawer-fs .tc-drawer-cat { background: var(--surface, #161B22); border-color: var(--border, #2A3441); }
html[data-theme="dark"] .tc-drawer.tc-drawer-fs .tc-drawer-cat-head:hover { background: var(--surface-2, #1C232D); }
html[data-theme="dark"] .tc-drawer.tc-drawer-fs .tc-drawer-item:hover { background: var(--surface-2, #1C232D); }
html[data-theme="dark"] .tc-drawer.tc-drawer-fs .tc-drawer-search input { background: var(--surface-2, #1C232D); color: var(--text-main, #E6EDF3); border-color: var(--border, #2A3441); }
html[data-theme="dark"] .tc-drawer.tc-drawer-fs .tc-drawer-search input:focus { background: var(--surface, #161B22); }
html[data-theme="dark"] .tc-drawer.tc-drawer-fs mark { background: rgba(255, 215, 110, .35); }

/* === DEMX DRAWER HIERARCHY v1 === */
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat { background:#FFF; border:1px solid #E4EAF0; border-radius:14px; margin-bottom:10px; overflow:hidden; box-shadow:0 1px 2px rgba(15,23,42,.04); }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat-head { background:linear-gradient(90deg,rgba(0,229,255,.10) 0%,rgba(0,229,255,0) 60%); border-left:3px solid #00B8CC; padding:14px 16px; color:#0F172A; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat-head .meta b { font-size:.96rem; font-weight:700; letter-spacing:-.01em; color:#0F172A; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat-head .meta small { font-size:.74rem; font-weight:500; color:#64748B; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat-head .ic { width:36px; height:36px; border-radius:10px; background:rgba(0,184,204,.12); color:#0E7490; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat-body { background:#FBFDFE; padding:4px 0 8px; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub { margin:0; padding:0; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub-head,
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub-head > * { font-size:.68rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:#7C8896; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub-head { padding:12px 16px 6px 20px; background:transparent; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-item { padding:12px 14px 12px 24px; border-top:1px solid #EDF1F5; background:transparent; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub-body .tc-drawer-item { padding-left:32px; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-item:first-child { border-top:0; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-item .txt b { font-size:.88rem; font-weight:600; color:#1E293B; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-item .txt small { font-size:.74rem; font-weight:400; color:#64748B; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-item .ic { width:32px; height:32px; border-radius:8px; background:#F1F5F9; color:#475569; font-size:.85rem; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-item:hover { background:#F4F8FB; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-item.active { background:linear-gradient(90deg,rgba(0,229,255,.14) 0%,rgba(0,229,255,.02) 100%); border-left:3px solid #00B8CC; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-item.active .ic { background:rgba(0,184,204,.18); color:#0E7490; }

html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-cat { background:#131A23; border:1px solid #232C38; box-shadow:0 1px 2px rgba(0,0,0,.3); }
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-cat-head { background:linear-gradient(90deg,rgba(34,211,238,.10) 0%,rgba(34,211,238,0) 60%); border-left:3px solid #22D3EE; }
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-cat-head .meta b { color:#E2E8F0; }
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-cat-head .meta small { color:#94A3B8; }
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-cat-head .ic { background:rgba(34,211,238,.15); color:#67E8F9; }
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-cat-body { background:#0F1620; }
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-sub-head,
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-sub-head > * { color:#64748B; }
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-item { border-top:1px solid #1E2732; }
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-item .txt b { color:#E2E8F0; }
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-item .txt small { color:#94A3B8; }
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-item .ic { background:#1C2532; color:#94A3B8; }
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-item:hover { background:#1A222D; }
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-item.active { background:linear-gradient(90deg,rgba(34,211,238,.16) 0%,rgba(34,211,238,.02) 100%); border-left:3px solid #22D3EE; }
html[data-theme="dark"] body .tc-drawer.tc-drawer-fs .tc-drawer-item.active .ic { background:rgba(34,211,238,.2); color:#67E8F9; }

/* === DEMX DRAWER ACCORDION ANIMATIONS v1 === */
@keyframes demxDrawerSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Category body: smooth accordion open --- */
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat-body {
  display: block !important;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body {
  max-height: 5000px;
}

/* --- Category items: staggered slide-in --- */
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > * {
  animation: demxDrawerSlideIn 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(1)   { animation-delay: 0.04s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(2)   { animation-delay: 0.11s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(3)   { animation-delay: 0.18s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(4)   { animation-delay: 0.25s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(5)   { animation-delay: 0.32s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(6)   { animation-delay: 0.39s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(7)   { animation-delay: 0.46s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(8)   { animation-delay: 0.53s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(9)   { animation-delay: 0.60s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(10)  { animation-delay: 0.67s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(11)  { animation-delay: 0.74s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(12)  { animation-delay: 0.81s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(13)  { animation-delay: 0.88s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(14)  { animation-delay: 0.95s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(n+15) { animation-delay: 1.02s; }

/* --- Subgroup body: smooth accordion open --- */
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub-body {
  display: block !important;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body {
  max-height: 3000px;
}

/* --- Subgroup items: tighter stagger --- */
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > * {
  animation: demxDrawerSlideIn 0.28s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(1)   { animation-delay: 0.03s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(2)   { animation-delay: 0.09s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(3)   { animation-delay: 0.15s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(4)   { animation-delay: 0.21s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(5)   { animation-delay: 0.27s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(6)   { animation-delay: 0.33s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(7)   { animation-delay: 0.39s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(8)   { animation-delay: 0.45s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(9)   { animation-delay: 0.51s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(n+10) { animation-delay: 0.57s; }

/* --- Respect prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  html body .tc-drawer.tc-drawer-fs .tc-drawer-cat-body,
  html body .tc-drawer.tc-drawer-fs .tc-drawer-sub-body { transition: none; }
  html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *,
  html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* === DEMX DRAWER CASCADE v2 (SLOWER) === */
@keyframes demxDrawerSlideInV2 {
  from { opacity: 0; transform: translateY(-14px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0)     scale(1); }
}

/* Category body — slower accordion */
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat-body {
  transition: max-height 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > * {
  animation: demxDrawerSlideInV2 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(1)   { animation-delay: 0.06s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(2)   { animation-delay: 0.18s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(3)   { animation-delay: 0.30s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(4)   { animation-delay: 0.42s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(5)   { animation-delay: 0.54s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(6)   { animation-delay: 0.66s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(7)   { animation-delay: 0.78s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(8)   { animation-delay: 0.90s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(9)   { animation-delay: 1.02s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(10)  { animation-delay: 1.14s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(11)  { animation-delay: 1.26s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(12)  { animation-delay: 1.38s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(13)  { animation-delay: 1.50s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(14)  { animation-delay: 1.62s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *:nth-child(n+15) { animation-delay: 1.74s; }

/* Subgroup body — slower accordion */
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub-body {
  transition: max-height 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > * {
  animation: demxDrawerSlideInV2 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(1)   { animation-delay: 0.05s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(2)   { animation-delay: 0.15s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(3)   { animation-delay: 0.25s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(4)   { animation-delay: 0.35s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(5)   { animation-delay: 0.45s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(6)   { animation-delay: 0.55s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(7)   { animation-delay: 0.65s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(8)   { animation-delay: 0.75s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(9)   { animation-delay: 0.85s; }
html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > *:nth-child(n+10) { animation-delay: 0.95s; }

/* Reduced-motion still respected */
@media (prefers-reduced-motion: reduce) {
  html body .tc-drawer.tc-drawer-fs .tc-drawer-cat-body,
  html body .tc-drawer.tc-drawer-fs .tc-drawer-sub-body { transition: none; }
  html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.open .tc-drawer-cat-body > *,
  html body .tc-drawer.tc-drawer-fs .tc-drawer-sub.open .tc-drawer-sub-body > * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}


/* ==========================================================================
   SAMSUNG ONE UI CARD ISLANDS (NON-ACCORDION)
   ========================================================================== */

/* ── Group Wrapper & Section Header ── */
.tc-oneui-group-wrap {
  margin-bottom: 18px !important;
}
.tc-oneui-group-wrap.hidden {
  display: none !important;
}

.tc-oneui-grouplabel {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: #8B95A1 !important;
  padding: 0 16px 8px 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.tc-oneui-grouplabel span {
  font-size: 0.72rem !important;
  font-weight: 400 !important;
  color: #556271 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.tc-oneui-sublabel {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #00A69C !important;
  padding: 10px 18px 4px 18px !important;
  background: rgba(0, 166, 156, 0.04) !important;
}

/* ── One UI Rounded Card Island ── */
html body .tc-drawer.tc-drawer-fs .tc-drawer-cat.tc-oneui-card {
  background: #161B22 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 22px !important;
  margin: 0 !important;
  overflow: hidden !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
  display: block !important;
  max-height: none !important;
}

/* ── Item Rows inside Card ── */
html body .tc-drawer.tc-drawer-fs .tc-drawer-item {
  padding: 14px 18px !important;
  display: flex !important;
  align-items: center !important;
  position: relative !important;
  background: transparent !important;
  border-top: none !important;
  text-decoration: none !important;
  transition: background 0.15s ease !important;
}
html body .tc-drawer.tc-drawer-fs .tc-drawer-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}
html body .tc-drawer.tc-drawer-fs .tc-drawer-item:active {
  background: rgba(0, 166, 156, 0.12) !important;
}

/* Inset divider between list items */
html body .tc-drawer.tc-drawer-fs .tc-drawer-item:not(:last-child)::after {
  content: "" !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 68px !important;
  right: 18px !important;
  height: 1px !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

/* Icon Badge */
html body .tc-drawer.tc-drawer-fs .tc-drawer-item .ic {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(0, 166, 156, 0.14) !important;
  color: #00A69C !important;
  font-size: 0.92rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-right: 14px !important;
  flex-shrink: 0 !important;
}

/* Text Stack */
html body .tc-drawer.tc-drawer-fs .tc-drawer-item .txt {
  flex: 1 !important;
  min-width: 0 !important;
}
html body .tc-drawer.tc-drawer-fs .tc-drawer-item .txt b {
  font-size: 0.94rem !important;
  font-weight: 600 !important;
  color: #FFFFFF !important;
  letter-spacing: -0.01em !important;
}
html body .tc-drawer.tc-drawer-fs .tc-drawer-item .txt small {
  font-size: 0.76rem !important;
  color: #8B95A1 !important;
  margin-top: 2px !important;
  line-height: 1.25 !important;
}
