/* Original full-featured workbench, refined with the main site's palette. */
:root { --brand:#6699cc; --brand-dark:#4d86ba; --brand-deep:#37517e; --bg-page:#f4f7fb; --line:#e1e8f0; --line-light:#edf1f6; --radius:7px; --card-shadow:0 2px 12px rgba(39,71,111,.025); --font:'Microsoft YaHei','PingFang SC',-apple-system,sans-serif; }
body { background:var(--bg-page); }
.auth-loading > :not(#workbench-auth-state) { display:none !important; }
#workbench-auth-state { min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; padding:32px; text-align:center; color:#7e8fa3; }
#workbench-auth-state h2 { font-size:21px; }
.sidebar { background:#fff; border-right:1px solid #e0e8f1; box-shadow:none; }
.sidebar-brand { border-bottom:1px solid #edf1f5; }
.sidebar-brand .brand-mark { background:#e9f2fb; color:#6699cc; box-shadow:none; border-radius:10px; }
.sidebar-brand strong { color:#37517e; }
.sidebar-brand small { color:#99aabc; letter-spacing:1px; }
.sidebar-nav { padding:20px 12px; }
.sidebar-nav a { border-radius:7px; margin-bottom:5px; color:#7b8da3; padding:12px 16px; font-size:13px; }
.sidebar-nav a:hover { color:#5487b4; background:#f3f7fb; }
.sidebar-nav a.active { background:#eaf3fc; color:#4b84b3; }
.sidebar-nav a.active::before { display:none; }
.sidebar-nav a svg { opacity:.7; width:18px; height:18px; }
.sidebar-section { color:#a8b4c3; }
.sidebar-footer { border-top:1px solid #edf1f5; }
.sidebar-user strong { color:#536d87; }
.sidebar-user small { color:#a0adbc; }
.sidebar-user .avatar { background:#e7f0f9; color:#6394bd; }
.sidebar-logout { display:block; text-align:center; color:#7f95ad; text-decoration:none; border-color:#e6edf4; }
.sidebar-logout:hover { color:#4b82ae; background:#f2f7fb; text-decoration:none; }
.hero { background:transparent; padding:32px 0 24px !important; }
.hero::after { display:none; }
.hero h1 { color:#37517e; font-size:25px; margin-bottom:5px; }
.hero .hero-sub { color:#8899ad; font-size:13px; }
.hero .hero-actions { margin-top:18px; }
.hero .btn-outline-light { color:#6b85a0; border-color:#d6e1ec; background:#fff; }
.btn-accent { background:#6699cc; color:#fff; border-color:#6699cc; }
.btn-accent:hover:not(:disabled) { background:#5085b7; color:#fff; }
.workbench-page-title { padding:28px 0 24px; }
.workbench-page-title .container { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.workbench-page-title h1 { margin:0 0 6px; font-size:24px; color:#37517e; }
.workbench-page-title p { margin:0; color:#8d9bad; font-size:13px; }
.card { border:1px solid #e2e9f1; border-radius:10px; box-shadow:var(--card-shadow); overflow:hidden; margin-bottom:22px; }
.card-header { background:#fff; padding:18px 23px; border-bottom:1px solid #edf1f6; }
.card-header h2 { font-size:16px; color:#49637f; }
.card-body { padding:24px; }
.btn { border-radius:6px; font-size:13px; font-weight:500; }
.btn-primary { background:#6699cc; border-color:#6699cc; }
.btn-secondary { background:#fff; color:#6a7f96; border-color:#dce5ee; }
.stat-card { background:#fff; border:1px solid #e2e9f1; box-shadow:none; border-radius:9px; }
.stat-card .stat-value { color:#6389ad; }
.task-card { border:1px solid #e6ecf3; box-shadow:none; border-radius:8px; }
.task-card:hover { transform:none; border-color:#adc9e1; box-shadow:none; }
.task-card .task-title { font-size:15px; color:#48637f; }
.task-card .task-meta { color:#8494a7; }
.form-label { color:#536c86; font-size:13px; }
input[type=text],input[type=password],input[type=email],input[type=time],select,textarea { border-radius:6px; background:#fbfcfe; border-color:#dfe7f0; font-size:13px; }
input[readonly] { background:#f2f6fa; color:#8293a6; }
.form-hint { color:#93a0af; font-size:12px; line-height:1.8; }
.table thead th { background:#f5f8fc; color:#8192a6; font-size:12px; font-weight:500; }
.table tbody td { padding-top:15px; padding-bottom:15px; border-color:#edf1f5; }
.badge { border-radius:5px; font-weight:500; }
.site-footer { color:#9aabba; background:transparent; }
.journal-picker { border-radius:7px; }
@media(max-width:768px) { .workbench-page-title { padding:24px 0 18px; } .workbench-page-title .container { flex-wrap:wrap; } .hero h1 { font-size:22px; } .card-body { padding:18px; } }

.hero h1 { text-shadow: none; }

/* Unified weekly workspace */
.workspace-main { padding-top: 34px; padding-bottom: 40px; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.workspace-eyebrow { color: #91a6bc; letter-spacing: 2px; font-size: 10px; margin: 0 0 9px; }
.workspace-heading h1 { color: #37517e; font-size: 27px; margin: 0 0 7px; }
.workspace-heading #welcome-sub { color: #8295aa; font-size: 13px; margin: 0; }
.workspace-actions { display: flex; gap: 10px; flex-shrink: 0; }
.workspace-stats { margin-bottom: 26px; }
.workspace-stats .stat-value { font-size: 29px; }
.workspace-stats .workspace-date { font-size: 20px; line-height: 1.9; }
.workspace-list-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0 23px; border-bottom: 1px solid #e9eff5; }
.workspace-tabs { display: flex; gap: 27px; }
.workspace-tabs button { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 20px 0 17px; font: 500 14px/1.5 var(--font); color: #90a0b0; cursor: pointer; }
.workspace-tabs button.active { color: #4f82af; border-bottom-color: #6699cc; }
.workspace-tabs button:focus-visible, .workspace-title-link:focus-visible { outline: 2px solid #6699cc; outline-offset: 4px; }
.workspace-filter { display: flex; align-items: center; gap: 12px; padding: 19px 23px; color: #91a0af; font-size: 12px; flex-wrap: wrap; }
.workspace-filter label { color: #678098; }
.workspace-filter select, .workspace-filter input { width: 230px; max-width: 100%; font: inherit; border: 1px solid #dfe7f0; border-radius: 6px; padding: 8px 11px; background: #fbfcfe; color: #62798e; }
.workspace-table { margin-bottom: 0; }
.workspace-table th:first-child, .workspace-table td:first-child { padding-left: 23px; }
.workspace-table th:last-child, .workspace-table td:last-child { padding-right: 23px; }
.workspace-table td { font-size: 12px; color: #7d90a4; }
.workspace-title-link { padding: 0; border: 0; background: none; color: #496e91; font: 500 14px/1.6 var(--font); text-align: left; cursor: pointer; }
.workspace-title-link:hover { color: #315e88; text-decoration: underline; }
.workspace-row-meta { display: block; font-size: 11px; color: #9aa8b6; margin-top: 5px; max-width: 350px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.workspace-danger { color: #c26767; }
.workspace-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 16px 23px; color: #91a0af; font-size: 12px; }
.workspace-pagination:empty { display: none; }
.workspace-message { margin: 16px 23px 23px; }
body.workspace-modal-open { overflow: hidden; }
.workspace-modal-backdrop { position: fixed; inset: 0; z-index: 2000; background: rgba(33,52,76,.44); display: flex; align-items: center; justify-content: center; padding: 28px; }
.workspace-dialog { width: 1120px; max-width: 100%; max-height: 92vh; height: auto; background: #f6f8fb; border-radius: 12px; box-shadow: 0 24px 90px rgba(25,47,74,.22); display: flex; flex-direction: column; overflow: hidden; outline: none; }
.workspace-dialog-header { display: flex; flex-shrink: 0; align-items: flex-start; justify-content: space-between; gap: 20px; background: #fff; padding: 22px 26px; border-bottom: 1px solid #e5ecf3; }
.workspace-dialog-header h2 { font-size: 18px; margin: 0 0 5px; color: #496782; }
.workspace-dialog-hint { margin: 0; font-size: 12px; color: #91a0af; }
.workspace-dialog-body { padding: 24px 26px; overflow-y: auto; }
.workspace-frame-body { padding: 0; overflow: hidden; }
.workspace-frame { display: block; border: 0; width: 100%; height: min(74vh, 840px); background: #f6f8fb; }
.workspace-template-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; padding-top: 20px; }
.workspace-template { display: flex; flex-direction: column; padding: 21px; border: 1px solid #e0e8f1; border-radius: 9px; background: #fff; }
.workspace-template .badge { align-self: flex-start; }
.workspace-template h3 { font-size: 15px; color: #4c6c88; margin: 12px 0 10px; }
.workspace-template p { font-size: 12px; color: #8c9cad; line-height: 1.85; }
.workspace-template small { display: block; color: #9aabba; font-size: 11px; margin: 0 0 18px; overflow-wrap: anywhere; }
.workspace-template .btn { align-self: flex-start; margin-top: auto; }
.workspace-dialog input[type=search] { width: 100%; border: 1px solid #dfe7f0; border-radius: 6px; padding: 11px 13px; background: #fff; font: 13px var(--font); }
body.embedded-page { padding: 0 !important; margin: 0; background: #f6f8fb; }
.embedded-page #nav-placeholder, .embedded-page #page-head-placeholder, .embedded-page .site-footer { display: none; }
.embedded-page main.container, .embedded-page main.container-narrow { width: 100%; max-width: 100% !important; padding: 22px 24px !important; }
.embedded-page .card { margin-bottom: 17px; }
.embedded-page .form-group:last-child { margin-bottom: 0; }
@media(max-width: 1000px) { .workspace-template-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width: 768px) {
    .workspace-main { padding-top: 25px; }
    .workspace-heading { align-items: flex-start; flex-direction: column; gap: 17px; }
    .workspace-heading h1 { font-size: 24px; }
    .workspace-actions { width: 100%; }
    .workspace-actions .btn { flex: 1; }
    .workspace-list-toolbar { padding: 0 18px; }
    .workspace-filter { padding: 16px 18px; }
    .workspace-filter > span:last-child { font-size: 11px; }
    .workspace-modal-backdrop { padding: 10px; }
    .workspace-dialog { max-height: calc(100dvh - 20px); }
    .workspace-dialog-header { padding: 18px; }
    .workspace-dialog-body { padding: 18px; }
    .workspace-frame-body { padding: 0; }
    .workspace-frame { height: 78vh; height: 78dvh; }
    .workspace-template-grid { grid-template-columns: 1fr; }
    .workspace-row-meta { max-width: 220px; }
    .embedded-page main.container, .embedded-page main.container-narrow { padding: 16px 12px !important; }
    .embedded-page #sidebar { width: 100% !important; }
    .embedded-page main > .flex > .card { min-width: 0 !important; width: 100%; }
}
@media(prefers-reduced-motion: reduce) { .workspace-dialog, .workspace-modal-backdrop { animation: none; } }
