@import url("/template/shared/status-controls.css?v=20261109-1");

:root {
    --page: #d8e2f7;
    --sidebar-line: rgba(255, 255, 255, .72);
    --text: #20386d;
    --blue: #2f4a9c;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body { min-width: 320px; min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--text); background: var(--page); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.app-shell { display: grid; grid-template-columns: 252px 190px minmax(0, 1fr); min-height: 100vh; }
.primary-sidebar, .secondary-sidebar { min-height: 100vh; border-right: 1px solid var(--sidebar-line); background: rgba(202, 216, 242, .84); }
.primary-sidebar { display: flex; flex-direction: column; padding: 30px 18px 22px; }
.secondary-sidebar { padding: 30px 14px; background: rgba(214, 225, 246, .68); }

.brand { display: flex; align-items: center; gap: 12px; margin: 0 8px 38px; }
.brand-symbol { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border-radius: 15px; background: transparent center / contain no-repeat url('/images/system-logo.png'); font-size: 22px; }
.brand-symbol i { display: none; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { color: #506b9f; font-size: 20px; line-height: 1.1; letter-spacing: .8px; }
.brand-copy small { margin-top: 5px; color: #6f82aa; font-size: 10px; font-weight: 700; letter-spacing: .9px; }
.menu-label, .secondary-label { margin: 0 10px 17px; color: #647ba7; font-size: 11px; font-weight: 800; letter-spacing: 1.7px; }
.primary-nav, .secondary-nav { display: grid; gap: 8px; }
.primary-link { display: flex; min-height: 45px; align-items: center; gap: 13px; padding: 0 16px; border: 1px solid transparent; border-radius: 14px; color: #657ba5; font-size: 15px; font-weight: 700; }
.primary-link i { width: 20px; color: #8fa2c7; text-align: center; font-size: 17px; }
.primary-link:hover { color: var(--blue); background: rgba(255, 255, 255, .32); }
.primary-link.active { color: #263a70; background: rgba(255, 255, 255, .72); border-color: rgba(255, 255, 255, .9); box-shadow: 0 6px 14px rgba(68, 91, 145, .12); }
.primary-link.active i { color: #eea82d; }
.primary-divider { height: 1px; margin: 16px 8px 19px; background: rgba(117, 143, 190, .25); }
.sidebar-library { margin-top: auto; padding: 16px 15px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 15px; background: rgba(255, 255, 255, .28); color: #5c73a4; }
.sidebar-library strong, .sidebar-library span { display: block; }
.sidebar-library strong { color: #2c467d; font-size: 13px; }
.sidebar-library span { margin-top: 5px; font-size: 11px; line-height: 1.65; }
.secondary-label { margin-left: 9px; margin-bottom: 15px; letter-spacing: 0; }
.secondary-nav { gap: 7px; }
.secondary-link { display: flex; min-height: 48px; align-items: center; justify-content: space-between; padding: 0 14px; border-radius: 12px; color: #7184ac; font-size: 14px; font-weight: 700; }
.secondary-link:hover { color: var(--blue); background: rgba(255, 255, 255, .26); }
.secondary-link.active { color: #fff; background: #304b98; box-shadow: 0 9px 17px rgba(41, 65, 137, .25); }
.secondary-link.active i { color: #eab13b; font-size: 8px; }

.main-content { min-width: 0; padding: 0 clamp(24px, 3vw, 44px) 48px; background: var(--page); }
.topbar { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; max-width: 100%; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: var(--status-gap); padding: 12px 0; }
.search-box { display: inline-flex; min-height: 44px; align-items: center; border: 1px solid rgba(255, 255, 255, .75); border-radius: 24px; background: rgba(255, 255, 255, .63); color: #8a9aba; box-shadow: 0 8px 20px rgba(86, 112, 163, .08); font-size: 13px; width: 230px; gap: 9px; padding: 0 13px; cursor: text; }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: #304b83; font: inherit; }
.search-box input::placeholder { color: #8a9aba; opacity: 1; }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }
.search-box:focus-within { border-color: rgba(48, 75, 152, .42); box-shadow: 0 0 0 3px rgba(48, 75, 152, .09), 0 8px 20px rgba(86, 112, 163, .08); }
.search-box kbd { flex: 0 0 auto; padding: 2px 5px; border: 1px solid rgba(116, 137, 176, .2); border-radius: 5px; color: #93a1bd; font-family: inherit; font-size: 10px; line-height: 1.3; }
.search-box i { color: #6d83b0; }

.credits a { color: #376dcc; font-size: 12px; text-decoration: none; font-weight: 700; }
.credits a:hover { color: #174eaa; }
.topbar-divider { width: 1px; height: 27px; background: rgba(105, 130, 178, .35); }

.page-heading { padding-top: 1px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: #7890bb; font-size: 11px; font-weight: 800; letter-spacing: .2px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4bc59a; }
.page-heading h1 { margin: 0; color: #20386d; font-size: clamp(31px, 2.6vw, 38px); line-height: 1.15; letter-spacing: .5px; }
.heading-rule { display: block; width: 78px; height: 3px; margin: 10px 0; border-radius: 3px; background: #e4ae3a; }
.page-subtitle { margin: 0; color: #7489b0; font-size: 14px; }
.workspace-summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 21px 0 25px; }
.summary-item { display: inline-flex; min-height: 42px; align-items: center; gap: 8px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .8); border-radius: 23px; background: rgba(255, 255, 255, .65); color: #3e568b; box-shadow: 0 8px 18px rgba(90, 117, 169, .08); font-size: 13px; }
.summary-item i { color: #e0a836; font-size: 11px; }
.summary-item strong { color: #213b76; }
.section-heading { position: relative; margin-bottom: 14px; }
.section-heading .eyebrow { margin-bottom: 5px; color: #7187af; font-size: 10px; letter-spacing: 1px; }
.section-heading h2 { margin: 0; color: #253e76; font-size: 22px; }
.section-note { position: absolute; right: 0; bottom: 5px; color: #6e83ab; font-size: 12px; font-weight: 700; }
.search-status { margin: -2px 0 13px; color: #526b9c; font-size: 13px; font-weight: 700; }
.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 252px; align-items: stretch; gap: 18px; }
.tools-grid[data-columns="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tools-grid[data-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tools-grid[data-columns="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tools-grid[data-columns="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tool-card[hidden], .workbench-empty[hidden], .search-status[hidden] { display: none !important; }
.tool-card { position: relative; display: flex; min-width: 0; height: 100%; min-height: 0; overflow: hidden; flex-direction: column; padding: 21px 22px 20px; border: 1px solid rgba(255, 255, 255, .72); border-radius: 18px; background: rgba(247, 250, 255, .69); box-shadow: 0 14px 24px rgba(67, 94, 149, .13); }
.tool-card.featured { border-color: rgba(228, 174, 58, .58); box-shadow: 0 18px 30px rgba(57, 80, 133, .2); }
.tool-card.is-disabled { border-color: rgba(137, 151, 176, .3); background: rgba(236, 240, 247, .72); box-shadow: 0 8px 18px rgba(63, 79, 110, .07); }
.tool-card.is-disabled .tool-icon { filter: grayscale(1); opacity: .55; }
.tool-card.is-disabled h3,.tool-card.is-disabled p,.tool-card.is-disabled .tool-location { color: #8792a6; }
.tool-card.is-disabled .tool-tag { border-color: #d4dae4; background: #e8ebf1; color: #7e899c; }
.tool-card.is-disabled .coming-soon { color: #758198; font-weight: 700; }
.favorite { position: absolute; top: 13px; right: 15px; display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .72); color: #8a9aba; font-size: 15px; cursor: pointer; transition: color .15s ease, background .15s ease, transform .15s ease; }
.favorite:hover { color: #d99c23; background: #fff; transform: translateY(-1px); }
.favorite[aria-pressed="true"] { color: #d99c23; }
.favorite:focus-visible { outline: 3px solid rgba(48, 75, 152, .38); outline-offset: 2px; }
.favorite:disabled { cursor: wait; opacity: .55; }
.favorite-message { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; padding: 12px 16px; border: 1px solid #d7b768; border-radius: 12px; background: #fff5d9; color: #705219; }
.favorite-message[hidden] { display: none; }
.favorite-message button { padding: 4px 10px; border: 1px solid currentColor; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
html.theme-dark .favorite-message { border-color: #796134; background: #302b21; color: #eed39b; }
.tool-icon { display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid rgba(70, 186, 207, .38); border-radius: 14px; background: #203b83; color: #63d7e7; box-shadow: 0 8px 15px rgba(48, 74, 145, .18); font-size: 25px; }
.tool-card h3 { display: -webkit-box; min-height: 24px; margin: 13px 0 7px; overflow: hidden; color: #233b73; font-size: 18px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tool-location { display: none; margin-top: 12px; color: #7d8fb2; font-size: 11px; font-weight: 700; }
body.search-active .tool-location { display: block; }
body.search-active .tool-card h3 { margin-top: 5px; }
.tool-card p { display: -webkit-box; margin: 0; overflow: hidden; color: #7186ae; font-size: 13px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.tool-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 17px; }
.tool-tag { display: inline-flex; min-height: 29px; align-items: center; padding: 0 12px; border: 1px solid rgba(225, 173, 61, .35); border-radius: 16px; background: rgba(225, 173, 61, .12); color: #d79e2c; font-size: 11px; font-weight: 800; }
.action-arrow { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; background: #fff; color: #3157ca; box-shadow: 0 8px 15px rgba(66, 91, 149, .16); font-size: 15px; transition: transform .16s ease; }
.featured .action-arrow { background: #203b83; color: #fff; }
.tool-action:hover .action-arrow { transform: translateX(2px); }
.disabled-action { cursor: default; opacity: .62; }
.coming-soon { color: #7489b0; font-size: 11px; }
.module-empty { padding: 0 10px; color: #7184ac; font-size: 13px; }
.workbench-empty { padding: 50px 25px; border: 1px dashed #aabddf; border-radius: 20px; color: #7184ac; text-align: center; }
.workbench-empty > i { font-size: 32px; color: #8fa2c7; }
.workbench-empty h3 { color: #3e568b; font-size: 18px; }
.upcoming-panel { display: flex; min-height: 380px; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; border: 1px solid rgba(255, 255, 255, .7); background: rgba(247, 250, 255, .36); }
.upcoming-icon { display: grid; width: 72px; height: 72px; margin-bottom: 22px; place-items: center; border: 1px solid rgba(80, 110, 178, .16); border-radius: 22px; background: rgba(255, 255, 255, .52); color: #4865a3; font-size: 30px; }
.upcoming-label { color: #8e6a23; font-size: 12px; font-weight: 600; letter-spacing: 3px; }
.upcoming-panel h3 { margin: 12px 0; color: #2c447c; font-size: clamp(28px, 3vw, 40px); font-weight: 700; letter-spacing: 2px; line-height: 1.35; }
.upcoming-panel p { margin: 0; font-size: 14px; line-height: 1.8; }

html.theme-dark {
    --page: #111827;
    --sidebar-line: rgba(148, 163, 184, .16);
    --text: #e4eaf5;
    --blue: #91aaf7;
    color-scheme: dark;
    background: var(--page);
}
html.theme-dark body, html.theme-dark .main-content { color: var(--text); background: var(--page); }
html.theme-dark .primary-sidebar { border-color: var(--sidebar-line); background: #172133; }
html.theme-dark .secondary-sidebar { border-color: var(--sidebar-line); background: #151f31; }
html.theme-dark .brand-copy strong,
html.theme-dark .page-heading h1,
html.theme-dark .section-heading h2,
html.theme-dark .summary-item strong,
html.theme-dark .sidebar-library strong { color: #edf2fd; }
html.theme-dark .brand-copy small, html.theme-dark .menu-label, html.theme-dark .secondary-label,
html.theme-dark .primary-link, html.theme-dark .secondary-link, html.theme-dark .page-subtitle,
html.theme-dark .section-note, html.theme-dark .eyebrow, html.theme-dark .sidebar-library,
html.theme-dark .sidebar-library span, html.theme-dark .search-status { color: #a8b7d2; }
html.theme-dark .primary-link:hover, html.theme-dark .secondary-link:hover { color: #dce6ff; background: #26344d; }
html.theme-dark .primary-link.active { color: #f3f6fd; background: #24334d; border-color: #354763; }
html.theme-dark .secondary-link.active { color: #fff; background: #405bb2; }
html.theme-dark .primary-divider { background: #34445e; }
html.theme-dark .sidebar-library { border-color: #35445d; background: #1c293e; }
html.theme-dark .search-box { border-color: #34435c; background: #1b273b; color: #c0cbe0; box-shadow: none; }
html.theme-dark .search-box input { color: #eff4ff; }
html.theme-dark .search-box input::placeholder,
html.theme-dark .search-box i { color: #9eb1d7; }
html.theme-dark .credits a { color: #c4d2f2; }
html.theme-dark .topbar-divider { background: #35445d; }
html.theme-dark .summary-item { border-color: #34435c; background: #1b273b; color: #d0d9ea; box-shadow: none; }
html.theme-dark .tool-card { border-color: #35445d; background: #1a263a; box-shadow: 0 12px 28px rgba(0, 0, 0, .2); }
html.theme-dark .tool-card.featured { border-color: #9b7933; }
html.theme-dark .tool-card.is-disabled { border-color: #3d4a60; background: #202a3b; box-shadow: 0 8px 18px rgba(0, 0, 0, .14); }
html.theme-dark .tool-card.is-disabled h3,html.theme-dark .tool-card.is-disabled p,html.theme-dark .tool-card.is-disabled .tool-location { color: #8794ab; }
html.theme-dark .tool-card.is-disabled .tool-tag { border-color: #414e63; background: #293447; color: #9aa6b9; }
html.theme-dark .tool-card h3 { color: #edf2fd; }
html.theme-dark .tool-card p, html.theme-dark .tool-location { color: #adbad0; }
html.theme-dark .favorite, html.theme-dark .action-arrow { background: #293750; color: #c6d4f0; }
html.theme-dark .favorite:hover { background: #35445d; color: #f0c25d; }
html.theme-dark .favorite[aria-pressed="true"] { color: #f0c25d; }
html.theme-dark .featured .action-arrow { background: #405bb2; color: #fff; }
html.theme-dark .workbench-empty { border-color: #40516c; color: #b1bfd6; }
html.theme-dark .workbench-empty h3 { color: #e2e9f6; }
html.theme-dark .module-empty { color: #aebbd1; }
html.theme-dark .upcoming-panel { border-color: #29374e; background: #151f30; }
html.theme-dark .upcoming-icon { border-color: #34445f; background: #1d2c44; color: #9db5ed; }
html.theme-dark .upcoming-label { color: #d8b66e; }

@media (max-width: 1500px) {
    .tools-grid[data-columns="5"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1280px) {
    .tools-grid[data-columns="4"], .tools-grid[data-columns="5"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
    .app-shell { grid-template-columns: 220px 170px minmax(0, 1fr); }
    .primary-sidebar { padding-left: 16px; padding-right: 16px; }
    .main-content { padding-right: 24px; padding-left: 24px; }
    .topbar-actions { gap: 7px; }
    .search-box { width: 190px; }
    .tools-grid[data-columns="3"], .tools-grid[data-columns="4"], .tools-grid[data-columns="5"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-card { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 900px) {
    .app-shell { display: block; }
    .primary-sidebar, .secondary-sidebar { min-height: 0; border-right: 0; border-bottom: 1px solid var(--sidebar-line); }
    .primary-sidebar { padding: 18px 16px 12px; }
    .brand { margin-bottom: 18px; }
    .menu-label { display: none; }
    .primary-nav { display: flex; overflow-x: auto; gap: 7px; }
    .primary-link { min-height: 40px; flex: 0 0 auto; padding: 0 13px; border-radius: 12px; font-size: 13px; }
    .primary-divider, .tutorial-link, .sidebar-library { display: none; }
    .secondary-sidebar { padding: 9px 16px; }
    .secondary-label { display: none; }
    .secondary-nav { display: flex; gap: 7px; overflow-x: auto; }
    .secondary-link { min-height: 38px; flex: 0 0 auto; padding: 0 14px; border-radius: 10px; font-size: 13px; }
    .main-content { padding: 0 20px 34px; }
    .topbar { min-height: 76px; }
    .tools-grid { gap: 15px; }
    .tools-grid { grid-auto-rows: 244px; }
}
@media (max-width: 680px) {
    .topbar { min-height: 0; }
    .topbar-actions { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--status-gap); padding: 12px 0; }
    .topbar-spacer, .topbar-divider { display: none; }
    .search-box { width: auto; min-width: 0; grid-column: 1 / -1; }
    .search-box kbd { display: none; }

    .page-heading h1 { font-size: 32px; }
    .page-subtitle { font-size: 14px; }
    .summary-item { width: 100%; justify-content: center; padding: 0 13px; font-size: 12px; }
    .summary-item:nth-child(3) { display: none; }
    .section-note { display: none; }
    .upcoming-panel { min-height: 320px; padding: 36px 20px; }
    .tools-grid, .tools-grid[data-columns="2"], .tools-grid[data-columns="3"], .tools-grid[data-columns="4"], .tools-grid[data-columns="5"] { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 260px; }
}
