.toolbox-body { --tools-nav-height: 88px; padding-top: var(--tools-nav-height); }
.toolbox-page {
    background: #f7f9fc;
    color: #0b1a33;
}
.toolbox-page [hidden] { display: none !important; }
.toolbox-page .tools-toast { position: fixed; top: calc(var(--tools-nav-height) + 16px); left: 50%; transform: translateX(-50%); z-index: 1080; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 10px; background: #243449; color: #fff; box-shadow: 0 6px 24px rgba(11, 26, 51, .18); font-size: .9rem; text-align: center; overflow-wrap: anywhere; pointer-events: none; }
.toolbox-page button,
.toolbox-page input { font: inherit; }
.toolbox-page button { cursor: pointer; }
.toolbox-page button:focus-visible,
.toolbox-page a:focus-visible,
.toolbox-page input:focus-visible { outline: 3px solid #8ec7ff; outline-offset: 3px; }

.toolbox-page .tools-toolbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; margin-bottom: 24px; }
.toolbox-page .favorite-filter-btn { grid-column: 3; grid-row: 1; justify-self: end; margin-left: 12px; border: 1px solid #f3cc72; border-radius: 999px; padding: .38rem .9rem; color: #9a6100; background: #fff8e7; font-size: .85rem; font-weight: 600; white-space: nowrap; transition: all .2s ease; }
.toolbox-page .favorite-filter-btn:hover,
.toolbox-page .favorite-filter-btn.active { color: #9a6100; border-color: #e8af3f; background: #fff0c9; box-shadow: 0 3px 10px rgba(154, 97, 0, .12); }
.toolbox-page .tool-search {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    margin: 0;
    padding: 4px 10px 4px 16px;
    background: #fff;
    border: 1px solid #dce6f2;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(25, 68, 115, .04);
}
.toolbox-page .tool-search > i { color: #90a0b5; }
.toolbox-page .tool-search input { min-width: 0; flex: 1; padding: 0; border: 0; background: transparent; color: #243449; line-height: 28px; }
.toolbox-page .tool-search input:focus { outline: none; box-shadow: none; }
.toolbox-page .tool-search input::placeholder { color: #94a0b1; }
.toolbox-page .tool-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.toolbox-page .tool-search-clear { display: grid; place-items: center; flex-shrink: 0; height: 30px; padding: 0 10px; border: 0; border-radius: 999px; background: #f1f5f9; color: #69798d; font-size: .8rem; line-height: 1; }
.toolbox-page .tool-search-clear:hover { background: #eff6ff; color: #006acd; }

.toolbox-page .tools-layout { display: grid; grid-template-columns: 246px minmax(0, 1fr); height: calc(100vh - var(--tools-nav-height)); height: calc(100dvh - var(--tools-nav-height)); min-height: 240px; overflow: hidden; }
.toolbox-page .tool-sidebar { min-height: 0; overflow-y: auto; padding: 20px 12px; border-right: 1px solid #e4eaf3; background: #fff; }
.toolbox-page .category-select { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 0; border-radius: 8px; background: transparent; color: #59697d; text-align: left; text-decoration: none; font-size: .9rem; transition: color .15s, background .15s; }
.toolbox-page .category-select > i { flex: 0 0 18px; text-align: center; font-size: 1rem; }
.toolbox-page .category-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toolbox-page .category-count { flex-shrink: 0; color: #94a1b1; font-size: .75rem; font-variant-numeric: tabular-nums; }
.toolbox-page .category-select:hover { background: #f4f8fd; color: #006acd; }
.toolbox-page .category-select.active { background: #eaf3fe; color: #006acd; font-weight: 600; }
.toolbox-page .category-select.active .category-count { color: #006acd; }
.toolbox-page .favorite-filter > i { color: #d6a13b; }
.toolbox-page .category-groups { margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf0f5; }
.toolbox-page .category-group + .category-group { margin-top: 4px; }
.toolbox-page .category-parent { min-width: 0; font-weight: 600; }
.toolbox-page .category-toggle:hover { background: #eaf3fe; color: #006acd; }
.toolbox-page .category-toggle .category-chevron { flex: 0 0 12px; font-size: .7rem; transform: rotate(-90deg); transition: transform .15s; }
.toolbox-page .category-toggle[aria-expanded="true"] .category-chevron { transform: rotate(0); }
.toolbox-page .category-children { margin: 4px 12px 8px 20px; padding-left: 12px; border-left: 1px solid #e4eaf3; }
.toolbox-page .category-child { padding: 10px 12px; font-size: .84rem; }
.toolbox-page .category-child + .category-child { margin-top: 2px; }
.toolbox-page .category-empty { padding: 10px; color: #8a98a8; font-size: .8rem; }

.toolbox-page .tools-content { min-width: 0; min-height: 0; padding: 28px; overflow-y: auto; }
.toolbox-page .tools-content,
.toolbox-page .tool-sidebar { scrollbar-width: none; -ms-overflow-style: none; }
.toolbox-page .tools-content::-webkit-scrollbar,
.toolbox-page .tool-sidebar::-webkit-scrollbar { display: none; }
.toolbox-page .tool-workspace { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.toolbox-page #toolFrame { width: 100%; flex: 1; min-height: 200px; border: 0; border-radius: 12px; background: #fff; }
.toolbox-page .tools-content.calculator-workspace { padding-bottom: 0; }
.toolbox-page .calculator-workspace #toolFrame { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.toolbox-page .tool-frame-status { color: #69798d; font-size: .85rem; }
.toolbox-page .tools-content-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 58px; margin: 0 0 18px; }
.toolbox-page .tools-title-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.toolbox-page .tools-content-heading h2 { margin: 0; font-size: 1.2rem; font-weight: 650; }
.toolbox-page .tools-content-heading p { margin: 0; color: #8b98a9; font-size: .8rem; }
.toolbox-page .reset-filters { flex-shrink: 0; padding: 7px 10px; border: 1px solid #dce6f2; border-radius: 7px; background: #fff; color: #60758f; font-size: .8rem; }
.toolbox-page .reset-filters:hover { color: #006acd; border-color: #a2c9f0; }
.toolbox-page .tool-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.toolbox-page .tool-item { position: relative; display: flex; align-items: stretch; gap: 10px; min-width: 0; height: 76px; box-sizing: border-box; padding: 12px; border: 1px solid #e5ebf3; border-radius: 12px; background: #fff; transition: transform .2s, box-shadow .2s, border-color .2s; }
.toolbox-page .tool-item:hover { transform: translateY(-3px); border-color: #bfd7ef; box-shadow: 0 8px 22px rgba(18, 61, 107, .07); }
.toolbox-page .tool-link { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; border-radius: 8px; text-align: left; text-decoration: none; color: inherit; }
.toolbox-page .tool-icon { position: relative; display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; background: #eff6ff; color: #006acd; font-size: 1.35rem; }
.toolbox-page .tool-info { flex: 1; min-width: 0; }
.toolbox-page .tool-info,
.toolbox-page .tool-meta { display: grid; grid-template-rows: 28px 16px; row-gap: 2px; align-content: center; }
.toolbox-page .tool-name { align-self: center; margin: 0; font-size: .85rem; font-weight: 600; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbox-page .tool-desc { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8a97a8; font-size: calc(.65rem + 1px); line-height: 16px; }
.toolbox-page .tool-meta { flex: 0 0 auto; justify-items: end; }
.toolbox-page .tool-usage { color: #98a5b5; font-size: calc(.65rem + 1px); line-height: 16px; text-align: right; white-space: nowrap; }
.toolbox-page .tool-favorite { display: grid; align-items: center; justify-items: end; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: #fff; color: #adb8c7; font-size: .85rem; }
.toolbox-page .tool-favorite:hover,
.toolbox-page .tool-favorite.is-favorited { color: #d49a20; background: #fff7e5; }
.toolbox-page .tool-favorite:disabled { opacity: .5; cursor: wait; }
.toolbox-page .tool-price { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #fff7e5; pointer-events: none; }
.toolbox-page .tool-price img { width: 13px; height: 13px; object-fit: contain; }
.toolbox-page .tools-empty { padding: 90px 20px; border: 1px dashed #d8e2ef; border-radius: 12px; background: #fff; text-align: center; }
.toolbox-page .tools-empty > i { display: block; margin-bottom: 18px; color: #aec7e2; font-size: 2.6rem; }
.toolbox-page .tools-empty h3 { font-size: 1.05rem; }
.toolbox-page .tools-empty p { margin: 12px 0 0; color: #8a98a8; font-size: .85rem; }

@media (max-width: 1799.98px) {
    .toolbox-page .tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1399.98px) {
    .toolbox-page .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1199.98px) {
    .toolbox-page .tools-layout { grid-template-columns: 220px minmax(0, 1fr); }
    .toolbox-page .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .toolbox-page .tools-layout { grid-template-columns: 200px minmax(0, 1fr); }
    .toolbox-page .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .toolbox-page .tools-layout { grid-template-columns: 150px minmax(0, 1fr); }
    .toolbox-page .tool-sidebar { padding: 12px 6px; }
    .toolbox-page .category-select { gap: 6px; padding: 10px 6px; font-size: .8rem; }
    .toolbox-page .category-children { margin-left: 8px; margin-right: 0; padding-left: 6px; }
    .toolbox-page .tools-content { padding: 16px 12px; }
    .toolbox-page .tool-grid { grid-template-columns: minmax(0, 1fr); }
    .toolbox-page .tools-content-heading { margin-bottom: 14px; }
    .toolbox-page .tools-toolbar { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
    .toolbox-page .tool-search { grid-column: 1; }
    .toolbox-page .favorite-filter-btn { grid-column: 1; grid-row: 2; margin-left: 0; }
    .toolbox-page .tool-search { width: 100%; gap: 8px; padding-left: 12px; }
    .toolbox-page .tool-search input { font-size: .85rem; }
}
@media (max-width: 375px) {
    .toolbox-page .tool-grid { gap: 10px; }
    .toolbox-page .tool-item { gap: 6px; padding: 8px; }
    .toolbox-page .tool-link { gap: 6px; }
    .toolbox-page .tool-icon { flex-basis: 30px; width: 30px; height: 30px; font-size: 1.1rem; }
    .toolbox-page .tool-name { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
    .toolbox-page *, .toolbox-page *::before, .toolbox-page *::after { transition: none !important; }
}
