/* Shared chrome for reader, editor, library, account and administration screens. */
:root { --ate-blue:#012596; --ate-line:#e2e8f1; --ate-text:#26364d; --ate-muted:#65738a; --ate-surface:#f4f6fa; }
.ate-menu-toggle .ate-sidebar-home { display:block; color:inherit; }
.body--light :is(.layout-tags,.layout-search,.layout-profile,.layout-inbox) { background:var(--ate-surface) !important; color:var(--ate-text); }
:is(.layout-tags,.layout-search,.layout-profile,.layout-inbox)::before,
:is(.layout-tags,.layout-search,.layout-profile,.layout-inbox)::after { display:none !important; }
.body--light :is(.layout-tags-card,.layout-search-card,.layout-profile-card,.layout-inbox-card) { background:#fff; border:1px solid var(--ate-line); box-shadow:0 2px 8px #1f365608; border-radius:10px; margin:0 auto 28px; width:calc(100% - 48px); max-width:1440px; min-height:calc(100vh - 190px); }
.body--light :is(.layout-tags-sd,.layout-search-sd,.layout-profile-sd,.layout-inbox-sd) { background:#f7f8fa; border-color:var(--ate-line); box-shadow:none; }
.body--light :is(.layout-tags,.layout-search,.layout-profile,.layout-inbox) .w-page { background:#fff; border-color:var(--ate-line); }
.body--light :is(.layout-tags,.layout-search) .section-header { color:var(--ate-blue); background:#fff; border-color:var(--ate-line); min-height:48px; display:flex; align-items:center; }
.body--light :is(.layout-tags-match,.layout-tags-toolbar) { background:#f7f8fa !important; background-image:none !important; border-color:var(--ate-line); }
.body--light .layout-tags-empty { color:var(--ate-muted); padding:5rem 2rem; }
.body--light :is(.layout-profile-sd,.layout-inbox-sd) .w-list .w-item.is-active { color:var(--ate-blue); background:#e8edf9; }
.body--light :is(.layout-profile-sd,.layout-inbox-sd) .w-list .w-item.is-active :is(.w-icon,iconify-icon) { color:var(--ate-blue); }
.body--light .layout-profile .actions-bar { background:#f7f8fa; border-top:1px solid var(--ate-line); }
.layout-profile .actions-bar::before,.layout-profile .actions-bar::after { display:none; }
.body--light :is(.layout-tags,.layout-search,.layout-profile,.layout-inbox) .site-footer { background:#f7f8fa !important; color:#65738a !important; }
.ate-section-heading { display:flex; align-items:center; gap:18px; flex-wrap:wrap; width:calc(100% - 48px); max-width:1440px; margin:24px auto 18px; min-height:32px; }
.ate-section-heading a { display:inline-flex; align-items:center; gap:8px; border:1px solid var(--ate-line); border-radius:7px; padding:7px 11px; color:var(--ate-blue); background:#fff; text-decoration:none; font-size:13px; }
.ate-section-heading a:hover { background:#eaf0fc; }
.ate-section-heading a:focus-visible { outline:2px solid var(--ate-blue); outline-offset:3px; }
.ate-section-heading strong { font-size:21px; font-weight:600; color:var(--ate-text); }
.ate-section-heading ~ .layout-tags-card .layout-tags-back,
.ate-section-heading ~ .layout-search-card .layout-search-back { display:none; }
.main-overlay>.w-dialog-backdrop { background:#14223866; backdrop-filter:blur(3px); }
.body--light .main-overlay>.w-dialog-viewport>.w-dialog-panel { background:#fff; border:1px solid var(--ate-line); border-radius:12px; box-shadow:0 20px 60px #13274730; }
.main-overlay .card-header,.w-dialog .card-header { background:var(--ate-blue) !important; background-image:none !important; color:white; border:0; min-height:60px; }
.main-overlay .card-header .w-btn { border-radius:6px; }
.main-overlay .card-header .w-btn.bg-primary { border:1px solid #ffffff55; }
.main-overlay :is(.glossary-search,.fileman-search) { background:#ffffff14 !important; color:#f0f4ff !important; border:1px solid #ffffff55; border-radius:7px; }
.main-overlay :is(.glossary-search,.fileman-search) input { color:#fff !important; }
.main-overlay :is(.glossary-search,.fileman-search) input::placeholder { color:#dbe4ff !important; opacity:1; }
.main-overlay :is(.glossary-search,.fileman-search):focus-within { background:#fff !important; color:var(--ate-text) !important; }
.main-overlay :is(.glossary-search,.fileman-search):focus-within input { color:var(--ate-text) !important; }
.main-overlay :is(.glossary-search,.fileman-search):focus-within input::placeholder { color:var(--ate-muted) !important; }
.main-overlay .card-header .w-btn { box-shadow:none; background-image:none; }
.body--light :is(.glossary-sidebar-tools,.fileman-left,.fileman-path) { background:#f7f8fa !important; border-color:var(--ate-line); }
.body--light :is(.glossary-sidebar,.fileman-right) { background:#f7f8fa; border-color:var(--ate-line); }
.body--light :is(.glossary-main,.fileman-center,.fileman-toolbar) { background:#fff; }
.body--light .glossary-term-active { color:var(--ate-blue); background:#e8edf9; }
.body--light .glossary-empty { color:var(--ate-muted); }
.body--light :is(.glossary-definition a,.glossary-link) { color:var(--ate-blue); }
.body--light .page-actions.is-editor { background:var(--ate-blue) !important; }
.body--light .page-actions-mode { color:#d3dfff !important; }
.body--light .editor-markdown-toolbar { background:var(--ate-blue) !important; border-left-color:var(--ate-blue) !important; }
.body--light .editor-markdown-mid { border-right-color:var(--ate-blue); }
.body--light .editor-markdown-preview-toolbar { background:#f0f3f9; color:var(--ate-muted); background-image:none; padding-right:1rem; border-bottom:1px solid var(--ate-line); }
.body--light .editor-markdown-preview-label { color:var(--ate-muted); }
.body--light .editor-contents-toolbar { background:#f0f3f9 !important; color:var(--ate-muted) !important; background-image:none !important; border-bottom:1px solid var(--ate-line); }
.body--light .editor-contents-label { color:var(--ate-muted) !important; }
.body--light .welcome { background:#f4f6fa; border:0; color:var(--ate-text); }
.welcome-bg { display:none; }
.welcome-content { width:min(90%,700px); }
.welcome-logo>img { width:250px; height:auto; max-height:70px; object-fit:contain; margin-bottom:36px; }
.welcome-title { font-size:32px; line-height:1.3; font-weight:600; }
.welcome-subtitle { font-size:16px; line-height:1.6; font-weight:400; color:var(--ate-muted); text-align:center; max-width:600px; }
.welcome-actions { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:28px; }
.welcome-actions>.w-btn { margin:0; box-shadow:none; border-radius:7px; }
@media(max-width:899.98px) {
  .ate-section-heading { width:calc(100% - 28px); margin:16px auto 14px; gap:12px; }
  .ate-section-heading strong { font-size:18px; }
  .body--light :is(.layout-tags-card,.layout-search-card,.layout-profile-card,.layout-inbox-card) { width:calc(100% - 28px); margin-bottom:16px; }
  .welcome-title { font-size:26px; }
}
@media(max-width:599.98px) {
  .main-overlay>.w-dialog-viewport { padding:0; }
  .main-overlay>.w-dialog-viewport>.w-dialog-panel { border-radius:0 !important; }
  .ate-section-heading { gap:10px; }
  .body--light :is(.layout-tags-card,.layout-search-card,.layout-profile-card,.layout-inbox-card) { min-height:calc(100vh - 180px); }
}
@media print { .ate-section-heading { display:none !important; } }
