/* Shared visual layer, intentionally loaded after page-specific styles. */
:root {
  --blue: #2864e8;
  --blue-soft: #edf3ff;
  --header: 64px;
}
.workspace-shell {
  --sidebar: 200px;
  --ink: #26364e;
  --muted: #64748b;
  --line: #e5eaf2;
  background: #f5f7fb;
  -webkit-font-smoothing: antialiased;
}
.workspace-shell .app-header {height: var(--header); gap: 28px; padding: 0 26px 0 22px;}
.brand-symbol {width: 34px; height: 36px; border-radius: 10px 10px 10px 3px;}
.brand-name {font-size: 19px;}
.workspace-shell .workspace-name {font-size: 13px; color: #718096; font-weight: 400;}
.workspace-current {color: #334761; margin-left: 16px;}
.workspace-current::before {content: '/'; color: #b6c0d0; margin-right: 16px;}
.workspace-shell .identity {gap: 16px;}
.workspace-shell .role-label {background: #f2f5fa; padding: 4px 9px; border-radius: 5px; color: #64748b;}
.workspace-shell .user-avatar {width: 30px; height: 30px; font-size: 12px;}
.workspace-shell .app-sidebar {border-color: var(--line);}
.workspace-shell .workspace-nav {padding: 16px 12px; gap: 3px; scrollbar-width: thin;}
.workspace-shell .nav-group-label {font-size: 11px; color: #718096; padding: 17px 12px 6px;}
.workspace-shell .nav-group-label:first-child {padding-top: 0;}
.workspace-shell .workspace-nav a {min-height: 40px; padding: 9px 12px; gap: 12px; border-radius: 7px; font-size: 13px; color: #53627a;}
.workspace-shell .workspace-nav a.active {background: #eaf1ff; color: #235bd4; font-weight: 650;}
.workspace-shell .workspace-nav a.active::before {left: -12px; top: 10px; bottom: 10px;}
.workspace-shell .workspace-nav svg {width: 18px; height: 18px;}
.workspace-shell .sidebar-footer {padding: 18px 24px; font-size: 12px; color: #748198;}
.workspace-shell main {padding: 28px; max-width: 2000px;}
.workspace-shell .page-heading {margin-bottom: 24px; gap: 20px;}
.workspace-shell .page-heading h1 {font-size: 26px; font-weight: 650; letter-spacing: -.6px; margin: 3px 0 8px; color: #233450;}
.workspace-shell .page-heading p {font-size: 13px; line-height: 1.8; color: #66758c;}
.workspace-shell .eyebrow {font-size: 11px; color: #6b7c95; letter-spacing: .5px;}
.workspace-shell .page-heading > div:first-child {min-width: 0;}
.workspace-shell .page-heading :is(h1,p) {overflow-wrap: anywhere;}
.workspace-shell .panel {border-radius: 12px; border-color: var(--line); box-shadow: 0 2px 4px #263f6503;}
.workspace-shell .section-heading h2 {font-size: 16px; color: #2a3c58;}
.workspace-shell .section-heading .fine {font-size: 12px; line-height: 1.75;}
.workspace-shell :is(button,.button) {font-size: 13px; border-radius: 7px;}
.workspace-shell .page-heading :is(button,.button) {height: 38px; font-size: 13px; padding: 0 16px;}
.workspace-shell .primary {background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 2px 3px #2864e817;}
.workspace-shell .primary:hover:not(:disabled) {background: #1d55cc; border-color: #1d55cc;}
.workspace-shell .secondary {color: #52647e; border-color: #dce3ef;}
.workspace-shell .secondary:hover:not(:disabled) {color: #235bd4; background: #f6f9ff; border-color: #b9cced;}
.workspace-shell :is(button,.button):disabled {opacity: .5; box-shadow: none;}
.workspace-shell input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),
.workspace-shell select, .workspace-shell textarea {border-radius: 7px; font-size: 13px; border-color: #dce3ed;}
.workspace-shell :is(input,textarea)::placeholder {color: #8491a5;}
.workspace-shell :is(input,select,textarea):focus {outline: 3px solid #2864e819; border-color: #7fa3ef;}
.workspace-shell :is(a,button,summary,.table-wrap):focus-visible {outline: 3px solid #83aaff; outline-offset: 3px;}
.workspace-shell .stats {gap: 16px; margin-bottom: 22px;}
.workspace-shell .stats article {align-items: center; justify-content: space-between; gap: 12px; padding: 17px 22px; border-radius: 10px; min-height: 86px;}
.workspace-shell .stats span {font-size: 12px; color: #64748b;}
.workspace-shell .stats strong {font-size: 30px; line-height: 1.25; font-weight: 650; letter-spacing: -.7px; color: #283b59;}
.workspace-shell .stats article:first-child {border-color: #dce7fc; background: #fdfefe;}
.workspace-shell .stats article:first-child strong {color: #2864e8;}
.workspace-shell .notice {border-radius: 8px; font-size: 13px;}
.workspace-shell .badge {border-radius: 5px; font-size: 12px;}
.workspace-shell th {color: #60718b; font-size: 12px; font-weight: 550; background: #f5f7fb;}
.workspace-shell td {font-size: 13px;}
.workspace-shell .table-wrap {border-radius: 8px; scrollbar-color: #bac8de #f5f7fb; scrollbar-width: auto;}
.workspace-shell .table-wrap::-webkit-scrollbar {height: 9px;}
.workspace-shell .table-wrap::-webkit-scrollbar-thumb {background: #bdcbe0; border: 2px solid #f5f7fb; border-radius: 8px;}
.workspace-shell .table-wrap::-webkit-scrollbar-track {background: #f5f7fb;}
.workspace-shell .pagination {font-size: 12px; color: #65758c;}
.workspace-shell .empty {padding: 52px 24px; color: #66758c;}
.workspace-shell .empty h3 {font-size: 15px; color: #465a77; font-weight: 600;}
.workspace-shell .library-layout {grid-template-columns: 172px minmax(0,1fr); gap: 18px;}
.workspace-shell .book-directory {top: 84px; padding: 18px 10px;}
.workspace-shell .book-directory h2 {padding: 0 8px; margin-bottom: 15px;}
.workspace-shell .book-directory > summary {padding: 0 8px; color: #536c90; list-style-position: inside;}
.workspace-shell .book-directory > summary h2 {display: inline; padding: 0; font-size: 14px;}
.workspace-shell .book-directory > summary .fine {display: none;}
.workspace-shell .book-directory[open] > summary {margin-bottom: 15px;}
.workspace-shell .book-directory > .fine {font-size: 11px; color: #748198; line-height: 1.85;}
.workspace-shell .book-link {font-size: 12px; border-radius: 6px; padding: 9px;}
.workspace-shell .book-link.selected {color: #235bd4; background: #edf3ff;}
.workspace-shell .book-list {max-height: calc(100vh - 470px); min-height: 80px;}
.workspace-shell .library-content > .panel {padding: 20px;}
.workspace-shell .library-content .section-heading {padding-bottom: 13px; margin-bottom: 14px;}
.workspace-shell .library-filters.separated-search {gap: 12px; padding-bottom: 8px; margin-bottom: 14px;}
.workspace-shell :is(.library-filters,.demand-filters,.account-filters,.book-picker) > label {font-size: 12px; color: #586a83;}
.workspace-shell :is(.library-filters,.demand-filters,.account-filters,.book-picker) :is(input:not([type=checkbox]),select,.date-range-trigger,button,.button) {font-size: 13px;}
.workspace-shell .library-filters.separated-search > button {min-width: 0; width: 100%; white-space: nowrap;}
.workspace-shell .library-bulk-actions {display: flex; flex-wrap: wrap; justify-content: flex-start; padding: 10px 12px; gap: 8px 12px; border: 0; background: #f5f8fd; border-radius: 7px;}
.workspace-shell .library-bulk-actions .fine {flex: 1 1 260px; font-size: 11px;}
.workspace-shell .library-bulk-actions .danger-button {margin-left: 0;}
.workspace-shell #bulk-operation-message:empty {display: none;}
.workspace-shell .library-content .asset-table {min-width: 1110px;}
.workspace-shell .library-content .asset-table :is(th,td) {font-size: 13px; padding: 12px 10px;}
.workspace-shell .library-content .asset-table th {font-size: 12px; background: #f5f7fb;}
.workspace-shell .library-content .asset-table th:nth-child(2),
.workspace-shell .library-content .asset-table .book-cell {width: 130px; min-width: 130px;}
.workspace-shell .library-content .asset-table th:nth-child(4) {width: 90px;}
.workspace-shell .library-content .asset-table th:nth-child(5),
.workspace-shell .library-content .asset-table .platform-cell {width: 196px; min-width: 196px;}
.workspace-shell .library-content .asset-table th:nth-child(7) {width: 112px;}
.workspace-shell .library-content .asset-table .asset-title {font-size: 13px; line-height: 1.7;}
.workspace-shell .library-content .asset-table:not(.cover-table) :is(th,td):last-child {position: sticky; right: 0; z-index: 2; background: #fff; box-shadow: -5px 0 9px -8px #7c8ba8;}
.workspace-shell .library-content .asset-table:not(.cover-table) th:last-child {background: #f5f7fb; z-index: 3;}
.workspace-shell .library-content .asset-table:not(.cover-table) tr:hover td:last-child {background: #f8faff;}
.workspace-shell .library-content .asset-table .asset-actions :is(a,button) {font-size: 12px; padding: 3px 4px;}
.workspace-shell .library-content .pagination + .fine {font-size: 11px; line-height: 1.85;}
.workspace-shell .demand-list-panel {padding: 0;}
.workspace-shell .demand-list-panel > .section-heading {padding: 22px 24px 0;}
.workspace-shell .demand-list-count {background: #f2f5fb; border: 1px solid #e7edf5; padding: 4px 10px; border-radius: 6px; color: #60718b;}
.workspace-shell .demand-filters {background: #fafbfe; margin-top: 18px; padding: 16px 24px; border-top: 1px solid #edf1f7;}
.workspace-shell .demand-bulk-bar {font-size: 12px; gap: 12px;}
.workspace-shell .demand-table td {font-size: 13px; padding: 16px 14px;}
.workspace-shell .demand-table th {font-size: 12px; background: #f5f7fb;}
.workspace-shell .demand-row-actions {gap: 5px;}
.workspace-shell .demand-row-actions a {font-size: 13px;}
.workspace-shell .demand-state {padding: 3px 9px;}
.workspace-shell .demand-state-open {color: #66758b; background: #f3f5f8; border-color: #e5e9ef;}
.workspace-shell .demand-state-claimed {color: #95611b; background: #fff7e8; border-color: #f7e7bf;}
.workspace-shell .demand-state-completed {color: #237755; background: #edf8f2; border-color: #dcefe4;}
.workspace-shell .plan-config-form > .panel {padding: 24px;}
.workspace-shell .plan-config-form .check-label {white-space: normal; align-items: flex-start; line-height: 1.8;}
.workspace-shell .plan-config-form .check-label input {margin-top: 4px;}
.workspace-shell .plan-config-form .panel h2 {padding-bottom: 16px; border-bottom: 1px solid #edf1f6; margin-bottom: 22px;}
.workspace-shell .config-grid {gap: 22px 28px;}
.workspace-shell .config-defaults span {border: 1px solid #e8edf5; background: #f6f8fc; border-radius: 6px; color: #586c87;}
.workspace-shell .config-footer {border-top: 1px solid #edf1f6; margin-top: 18px; padding-top: 18px;}
.workspace-shell .plan-config-form .config-section-heading h2 {border: 0; padding: 0; margin: 0;}
.workspace-shell .draft-actions {border-color: #dce6f8;}
.nav-toggle, .nav-backdrop {display: none;}
.auth-shell {background: #f5f7fb; color: #26364e;}
.auth-shell .auth-card {border-radius: 16px; padding: 38px; box-shadow: 0 12px 45px #29466b0a;}
.auth-shell .auth-card h1 {font-size: 24px;}
.auth-shell .auth-card input {min-height: 42px; border-radius: 7px;}
.auth-shell .auth-card .primary {height: 42px; border-radius: 7px;}
@media (max-width: 1200px) and (min-width: 761px) {
  .workspace-shell {--sidebar: 180px;}
  .workspace-shell main {padding: 24px 20px;}
  .workspace-shell .library-layout {grid-template-columns: 150px minmax(0,1fr); gap: 14px;}
  .workspace-shell .library-filters.separated-search {grid-template-columns: repeat(12,minmax(0,1fr));}
  .workspace-shell .library-filters.separated-search > label:nth-child(-n+3) {grid-column: span 4;}
  .workspace-shell .library-filters.separated-search > :nth-child(4) {grid-column: span 4;}
  .workspace-shell .library-filters.separated-search > :nth-child(5),
  .workspace-shell .library-filters.separated-search > :nth-child(6) {grid-column: span 3;}
  .workspace-shell .library-filters.separated-search > :nth-child(7) {grid-column: span 2;}
}
@media (max-width: 960px) and (min-width: 761px) {
  .workspace-shell .library-layout {grid-template-columns: 1fr;}
  .workspace-shell .book-directory {position: static;}
  .workspace-shell .book-directory > summary .fine {display: inline; margin-left: 12px; font-size: 11px;}
  .workspace-shell .book-list {max-height: 140px;}
  .workspace-shell .demand-filters {grid-template-columns: 1fr 2fr 1fr;}
}
@media (max-width: 760px) {
  :root {--header: 60px;}
  .workspace-shell {--sidebar: 0px;}
  .workspace-shell .app-header {height: var(--header); gap: 12px; padding: 0 14px;}
  .workspace-shell .brand-symbol {width: 28px; height: 30px; font-size: 17px;}
  .workspace-shell .brand-name {font-size: 16px;}
  .workspace-shell .identity {gap: 8px;}
  .workspace-shell .user-avatar {display: none;}
  .workspace-shell.nav-enhanced .nav-toggle {display: inline-flex; min-height: 34px; padding: 5px 9px; font-size: 12px; flex-shrink: 0;}
  .workspace-shell.nav-enhanced .app-sidebar {position: fixed; top: var(--header); bottom: 0; left: 0; width: min(280px,85vw); margin: 0; z-index: 40; display: none; box-shadow: 8px 0 30px #20365712;}
  .workspace-shell.nav-open {overflow: hidden;}
  .workspace-shell.nav-open .app-sidebar {display: flex;}
  .workspace-shell.nav-enhanced .workspace-nav {flex-direction: column; overflow: auto; padding: 16px;}
  .workspace-shell.nav-enhanced .workspace-nav a {min-height: 42px; font-size: 14px;}
  .workspace-shell.nav-enhanced .nav-group-label {display: block; padding-top: 14px;}
  .workspace-shell.nav-enhanced .sidebar-footer {display: flex;}
  .workspace-shell.nav-open .nav-backdrop {display: block; position: fixed; inset: var(--header) 0 0; width: 100%; height: calc(100% - var(--header)); border: 0; border-radius: 0; background: #20324d52; z-index: 35;}
  .workspace-shell.nav-enhanced main {margin-top: var(--header);}
  .workspace-shell main {padding: 22px 14px;}
  .workspace-shell .page-heading {gap: 16px; margin-bottom: 20px;}
  .workspace-shell .page-heading h1 {font-size: 23px;}
  .workspace-shell .page-heading p {font-size: 12px;}
  .workspace-shell .page-heading :is(button,.button) {height: 38px; font-size: 12px;}
  .workspace-shell .stats {gap: 8px; margin-bottom: 16px;}
  .workspace-shell .stats article {padding: 12px; min-height: 86px; gap: 8px; flex-direction: column; align-items: flex-start; justify-content: center;}
  .workspace-shell .stats span {font-size: 11px;}
  .workspace-shell .stats strong {font-size: 21px; margin: 0; overflow-wrap: anywhere;}
  .workspace-shell .library-layout {grid-template-columns: minmax(0,1fr); gap: 14px;}
  .workspace-shell .book-directory {position: static;}
  .workspace-shell .book-list {max-height: 120px;}
  .workspace-shell .panel, .workspace-shell .library-content > .panel, .workspace-shell .plan-config-form > .panel {padding: 16px; border-radius: 10px;}
  .workspace-shell .library-filters.separated-search {grid-template-columns: repeat(2,minmax(0,1fr));}
  .workspace-shell .library-filters.separated-search > :nth-child(n) {grid-column: auto; min-width: 0;}
  .workspace-shell .library-filters.separated-search > label:nth-child(3),
  .workspace-shell .library-filters.separated-search > button {grid-column: 1 / -1;}
  .workspace-shell .demand-list-panel {padding: 0;}
  .workspace-shell .demand-filters {padding: 16px; gap: 12px; margin-top: 16px;}
  .workspace-shell .demand-filters > label:nth-child(3) {grid-column: 1 / -1;}
  .workspace-shell .demand-list-panel > .section-heading {padding: 18px 16px 0; gap: 10px;}
  .workspace-shell .demand-bulk-bar {padding: 12px 16px; gap: 8px;}
  .workspace-shell .config-grid {grid-template-columns: minmax(0,1fr); gap: 18px;}
  .workspace-shell .plan-config-form .config-section-heading {align-items: flex-start;}
  .workspace-shell .plan-config-form .config-select-line button {width: 100%;}
  .workspace-shell .identity .user-link {max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block;}
}
@media (prefers-reduced-motion: reduce) {
  .workspace-shell.nav-enhanced .app-sidebar {transition: none;}
}
