/* Vigely workspace — shared rhythm, readable panels and a continuous navy shell.
   Presentation only. Public landing, authentication, portals and modals excluded. */
#app .workspace-screen {
  --workspace-width: 1120px;
  --workspace-radius: 10px;
}
#app[data-view="settings"] .workspace-screen { --workspace-width: 760px; }
#app[data-view="assistant"] .workspace-screen { --workspace-width: 900px; }
#app:is([data-view="home"],[data-view="agenda"],[data-view="finance"],[data-view="accounting"]) .workspace-screen { --workspace-width: 1320px; }
#app .workspace-screen > :not(.topbar):not(.bottom-nav):not(.statusbar):not(.fab):not(.dashboard-head) {
  width: 100%;
  max-width: var(--workspace-width);
  min-width: 0;
}
/* Every non-dashboard header shares the approved sidebar colour. */
#app .workspace-screen > .topbar {
  box-sizing: border-box;
  width: calc(100% + 32px);
  max-width: none;
  margin: 0 -16px 24px;
  padding: 18px 16px 24px;
  background: var(--vigely-dashboard-shell,#121b29);
  color: #fff;
  gap: 16px;
  align-items: center;
}
#app .workspace-screen > .topbar > div:first-child { min-width: 0; }
#app .workspace-screen > .topbar h1 { color: #fff; line-height: 1.2; font-size: 28px; }
#app .workspace-screen > .topbar p { color: #d0d5dd; font-size: 13px; line-height: 1.6; }
#app .workspace-screen > .topbar .top-actions { flex-shrink: 0; }
#app .workspace-screen > .topbar .icon-btn { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); color: #fff; }
#app .workspace-screen > .statusbar { margin-inline: -16px; padding-inline: 16px; width: calc(100% + 32px); color: #fff; background: #121b29; }
/* Cards retain their actual state colours and hierarchy. */
#app .workspace-screen :is(.list-card,.mail-card,.mailbox-card,.mail-toolbar,.document-list-tools,.agenda-calendar,.agenda-overview,.billing-overview,.billing-foot,.finance-panel,.accounting-panel,.empty) {
  border-radius: var(--workspace-radius);
  box-shadow: none;
}
#app .workspace-screen .assistant-chat:not(.voice-mode) { margin-inline: 0; border-radius: var(--workspace-radius); box-shadow: none; }
#app .workspace-screen > .search { max-width: var(--workspace-width); margin-bottom: 16px; min-height: 46px; }
#app .workspace-screen > .list { gap: 14px; }
#app .workspace-screen > .section-title { margin-top: 24px; }
#app .workspace-screen :is(.document-list-tools,.mail-toolbar) { gap: 16px; }
#app .workspace-screen :is(.document-list-tools span,.mail-toolbar p,.finance-panel-intro,.accounting-panel-intro) { font-size: 12px; line-height: 1.65; }
#app .workspace-screen .document-list-tools button { font-size: 12px; min-height: 42px; }
#app .workspace-screen :is(.note,.support-trust) { font-size: 12px; line-height: 1.7; }
#app .workspace-screen > .directory-check {
  margin: 16px 0;
  padding: 18px;
  border-radius: var(--workspace-radius);
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
#app .workspace-screen > .directory-check > div { min-width: 0; }
#app .workspace-screen > .directory-check > div:last-child { justify-content: flex-start; gap: 12px 18px; }
#app .workspace-screen > .directory-check strong { font-size: 13px; }
#app .workspace-screen > .directory-check :is(p,small,button,a) { font-size: 12px; line-height: 1.6; }
#app .workspace-screen > .directory-check button { min-height: 42px; box-shadow: none; }
#app .workspace-screen .empty { padding: 24px; line-height: 1.65; }
#app .workspace-screen .empty p { font-size: 12px; }
/* Consistent narrow desktop list tiles, rather than cramped thirds. */
@media(min-width:900px) {
  #app .workspace-screen > .topbar {
    width: calc(100% + 96px);
    margin: -38px -48px 26px;
    padding: 34px 48px 28px;
  }
  #app .workspace-screen > .topbar h1 { font-size: 34px; }
  #app .workspace-screen .bottom-nav { background: #121b29; border-right: 0; }
  #app .workspace-screen > .list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #app .workspace-screen > .tabs { margin-bottom: 18px; }
}
@media(min-width:1320px) {
  #app .workspace-screen > .topbar {
    width: calc(100% + 138px);
    margin-left: -74px;
    margin-right: -64px;
    padding-left: 74px;
    padding-right: 64px;
  }
}
@media(max-width:899px) {
  #app .workspace-screen { padding-bottom: calc(118px + env(safe-area-inset-bottom,0px)); }
  #app .workspace-screen > .list { grid-template-columns: 1fr; }
  #app .workspace-screen > .topbar .top-actions { gap: 6px; }
  #app .workspace-screen > .topbar :is(.avatar,.icon-btn) { width: 40px; height: 40px; }
}
@media(max-width:480px) {
  #app .workspace-screen > .topbar { gap: 10px; }
  #app .workspace-screen > .topbar h1 { font-size: 25px; overflow-wrap: anywhere; }
  #app .workspace-screen > .topbar p { font-size: 12px; }
  #app .workspace-screen > .directory-check > div:last-child { flex-direction: column; align-items: stretch; }
  #app .workspace-screen > .directory-check a { white-space: normal; }
  #app .workspace-screen .document-list-tools { flex-direction: column; align-items: stretch; }
}
/* The dashboard question form must not force horizontal scroll on small desktops. */
#app .workspace-screen .dashboard-ask form { min-width: 0; }
#app .workspace-screen .dashboard-ask form input { min-width: 0; width: 100%; }
/* Readable secondary information and compact empty conversation. */
#app .workspace-screen .list-card :is(p,small) { font-size: 12px; line-height: 1.6; }
#app .workspace-screen .pricing-grid li { font-size: 12px; line-height: 1.6; }
#app .workspace-screen .chat-messages { min-height: 140px; }
#app .workspace-screen :is(.btn:not(.secondary):not(.ghost),.chat-compose button,.directory-check button) { background: #b95405; color: #fff; }
#app .workspace-screen :is(.btn:not(.secondary):not(.ghost),.chat-compose button,.directory-check button):hover { background: #9e4605; }
#app .workspace-screen input::placeholder,#app .workspace-screen textarea::placeholder { color: #667085; opacity: 1; }
.dark #app .workspace-screen input::placeholder,.dark #app .workspace-screen textarea::placeholder { color: #aebdce; }
@media(max-width:899px) {
  #app .workspace-screen .bottom-nav { scrollbar-width: thin; scrollbar-color: #98a2b3 transparent; }
  #app .workspace-screen .bottom-nav::-webkit-scrollbar { display: block; height: 3px; }
  #app .workspace-screen .bottom-nav::-webkit-scrollbar-thumb { background: #98a2b3; border-radius: 3px; }
}
@media(max-width:480px) {
  #app .workspace-screen .chat-compose { grid-template-columns: 44px minmax(0,1fr) 44px; gap: 6px; align-items: center; }
  #app .workspace-screen .chat-compose button { width: 44px; height: 44px; }
  #app .workspace-screen .chat-compose textarea { min-width: 0; height: 88px; min-height: 88px; padding: 10px 8px; font-size: 14px; line-height: 21px; overflow: auto; }
}
@media(min-width:900px) and (max-width:1100px) {
  #app .workspace-screen .dashboard-ask { grid-template-columns: minmax(0,1fr); }
}
