/* Dockvi OS: desktop, launcher, dock and a single active workspace. */
.app-shell { display: block; min-height: 100vh; }
.workspace { width: 100%; overflow: visible; }
.topbar { position: sticky; top: 0; z-index: 15; min-height: 68px; height: auto; padding: 13px 24px; gap: 20px; background: #0d1019f5; backdrop-filter: blur(18px); }
.os-brand { flex: none; display: flex; gap: 10px; align-items: center; color: var(--text); background: none; border: 0; padding: 0; }
.os-brand > span { display: grid; place-items: center; width: 35px; height: 35px; color: #101619; background: var(--accent); font: italic 900 24px var(--font-display); clip-path: polygon(0 0,100% 0,100% 76%,76% 100%,0 100%); }
.os-brand strong { font: italic 900 17px var(--font-display); letter-spacing: -.06em; white-space: nowrap; max-width: min(28vw, 270px); overflow: hidden; text-overflow: ellipsis; }
.os-brand em { color: var(--info); font: 16px var(--hud-font); letter-spacing: .1em; margin-left: 4px; }
.os-launcher-button { display: flex; align-items: center; gap: 9px; padding: 8px 11px; background: #5deaf609; border: 1px solid #5deaf638; color: #b3e6ed; font: 16px var(--hud-font); }
.os-launcher-button > span { font-size: 22px; }
.os-launcher-button:hover { border-color: var(--info); background: #5deaf61c; }
kbd { font: 16px var(--hud-font); border: 1px solid #6b829447; border-radius: 3px; padding: 4px 5px; color: #8aa7b9; white-space: nowrap; }
.topbar-actions { margin-left: auto; flex-wrap: nowrap; width: auto; gap: 8px; }
.global-search { order: 0; flex: initial; }
.global-search input { width: 175px; }
.topbar #backup-button { display: none; }
.topbar .motion-label { display: none; }
.topbar .motion-toggle { min-width: 36px; justify-content: center; }
.topbar .quick-inbox { font-size: 0; }
.topbar .reminder-count { position: absolute; top: -6px; right: -5px; display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; font-size: 16px; background: var(--neon-red); color: white; border-radius: 8px; }
.topbar .quick-inbox::after { content: '＋ Inbox'; font-size: 16px; }
.os-session-strip { display: flex; align-items: center; min-height: 49px; gap: 16px; padding: 7px 26px; border-bottom: 1px solid #5deaf61c; background: #090e1680; }
.os-desktop-tab { display: flex; align-items: center; gap: 7px; border: 0; background: transparent; color: #91afbd; padding: 7px 0; font: 16px var(--hud-font); white-space: nowrap; }
.os-desktop-tab[aria-current=page] { color: var(--accent); }
.os-desktop-tab span { font-size: 19px; }
#os-tabs { display: flex; gap: 6px; min-width: 0; overflow-x: auto; padding: 2px 3px 4px; scrollbar-width: thin; }
.os-session { display: flex; align-items: center; border: 1px solid #415c673f; background: #141b2590; flex: none; }
.os-session.active { border-color: #5deaf66c; background: #163039; box-shadow: inset 0 -1px var(--info); }
.os-session > button { display: flex; align-items: center; gap: 6px; color: #adc2c9; background: transparent; border: 0; font: 16px var(--hud-font); padding: 6px 9px; white-space: nowrap; }
.os-session .os-app-icon { font-size: 16px; color: var(--info); }
.os-session .os-close-tab { color: #83949d; font-size: 17px; padding: 2px 8px; min-height: 28px; }
.os-session .os-close-tab:hover { color: #ff94a4; background: #ff465f12; }
#os-open-count { margin-left: auto; color: #718e9d; font: 16px var(--hud-font); white-space: nowrap; }
#os-session-empty { color: #70858f; font-size: 16px; }
.os-window { width: calc(100% - 48px); max-width: 1460px; margin: 24px auto 0; border: 1px solid #557d8c55; background: #09101840; box-shadow: 0 15px 65px #0003; }
.os-windowbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 42px; padding: 0 13px; border-bottom: 1px solid #5deaf623; background: linear-gradient(90deg, #13232cdd, #1c1325cf); }
.os-window-title { display: flex; align-items: center; gap: 9px; min-width: 0; color: #8aa8b6; font: 16px var(--hud-font); }
#os-window-icon { color: var(--info); font-size: 19px; }
#breadcrumb { font-weight: 500; color: #daf6fb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-title-divider { color: #517786; }
.os-window-controls { display: flex; align-items: center; flex: none; }
.os-window-controls button { display: grid; place-items: center; width: 33px; height: 32px; border: 0; background: transparent; color: #87a6b1; font: 20px/1 var(--hud-font); }
.os-window-controls button:hover { background: #5deaf615; color: var(--info); }
.os-window-controls [data-os=close-active]:hover { color: #ff8ca1; background: #ff465f1a; }
.os-window-controls button:disabled { opacity: .25; cursor: default; }
main { max-width: none; padding: 27px 30px 36px; }
#main:focus { outline: none !important; }
.os-desktop-status { display: flex; justify-content: space-between; gap: 12px; max-width: 1460px; margin: 13px auto; padding: 0 26px 128px; color: #7c99a4; font: 16px var(--hud-font); }
.os-desktop-status > span:first-child { display: flex; align-items: center; }

.os-dock { position: fixed; z-index: 20; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: stretch; max-width: calc(100vw - 32px); gap: 5px; padding: 9px 12px 8px; background: linear-gradient(145deg, #152d38ed, #1f122af5); border: 1px solid #80d4e55c; border-top-color: #9aedff88; border-radius: 15px; backdrop-filter: blur(20px); box-shadow: 0 16px 40px #0008, inset 0 1px #b7f7ff18, 0 0 35px #5deaf610; }
.os-dock > button, .os-dock-app { position: relative; flex: none; width: 68px; min-height: 63px; border: 0; background: transparent; color: #a3c4ce; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 4px 3px 8px; transition: transform .2s, color .2s; }
.os-dock button:hover { transform: translateY(-5px); color: white; }
.os-dock .os-app-icon, .os-dock > button > span { display: grid; place-items: center; width: 37px; height: 33px; font-size: 25px; background: linear-gradient(135deg, #5deaf61e, #0b131b80); border: 1px solid #5deaf64c; border-radius: 8px; color: var(--info); box-shadow: inset 0 1px #dcffff12; }
.os-dock-app > span:last-child, .os-dock small { font: 600 16px/1.2 var(--font-body); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-dock .os-dock-launcher > span { background: var(--accent); border-color: var(--accent); color: #10181c; box-shadow: 0 0 20px #f8ef3b20; }
.os-dock .os-dock-home { border-right: 1px solid #5deaf62d; margin-right: 3px; padding-right: 9px; }
#os-dock-apps { display: flex; gap: 3px; min-width: 0; overflow-x: auto; padding: 5px 3px 0; margin-top: -5px; scrollbar-width: thin; }
.os-dock-app.running::after { content: ''; position: absolute; bottom: 0; width: 4px; height: 4px; border-radius: 50%; background: #76b8c9; }
.os-dock-app.active::after { width: 17px; height: 3px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 9px #f8ef3b80; }
.os-dock-app.active .os-app-icon, .os-dock [aria-current=page] > span:first-child { color: var(--accent); border-color: #f8ef3b99; background: #f8ef3b14; }
#toast { bottom: 115px; }

#os-launcher { width: min(920px, calc(100vw - 36px)); max-height: calc(100dvh - 52px); padding: 26px; border: 1px solid #76dbefa6; border-radius: 14px; background: linear-gradient(140deg, #11252bef, #171023fa 65%); backdrop-filter: blur(24px); box-shadow: 0 30px 100px #000b, 0 0 60px #5deaf616; overflow-y: auto; }
#os-launcher::backdrop { background: #02080ec2; backdrop-filter: blur(8px); }
.os-launcher-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.os-launcher-head p { margin: 0 0 8px; color: var(--info); font: 16px var(--hud-font); letter-spacing: .12em; }
.os-launcher-head h2 { margin: 0 0 20px; font: italic 850 35px var(--font-display); }
.os-launcher-head > button { color: #a6c4ce; background: #5deaf610; border: 1px solid #5deaf633; width: 34px; height: 34px; font-size: 22px; }
.os-launcher-search { position: relative; display: flex; align-items: center; gap: 10px; background: #07101c; border: 1px solid #5deaf675; padding: 3px 12px; border-radius: 6px; }
.os-launcher-search > span { font-size: 26px; color: var(--info); }
#os-app-search { flex: 1; height: 44px; min-width: 0; border: 0; box-shadow: none; outline: none !important; background: transparent; padding: 0; font-size: 16px; }
.os-launcher-search:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.os-app-groups { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0; }
.os-app-groups button { border: 1px solid #5deaf624; background: transparent; color: #b0c6d0; border-radius: 4px; padding: 8px 11px; font-size: 16px; }
.os-app-groups button[aria-pressed=true] { background: #5deaf61c; color: var(--info); border-color: var(--info); }
#os-recent { margin: 22px 0 0; }
#os-recent h3, #os-category-section h3, .os-catalog-heading { color: #a8c8d3; font: 16px var(--hud-font); text-transform: uppercase; letter-spacing: .08em; }
#os-recent-apps { display: flex; gap: 7px; flex-wrap: wrap; }
#os-recent-apps button { display: flex; align-items: center; gap: 7px; border: 1px solid #5deaf636; background: #5deaf608; color: #bcdbe1; border-radius: 5px; padding: 9px 11px; font-size: 16px; }
#os-recent-apps .os-app-icon { color: var(--info); }
.os-catalog-heading { display: flex; justify-content: space-between; margin: 23px 0 12px; }
#os-app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.os-app-tile { position: relative; min-width: 0; border: 1px solid #6484943d; background: linear-gradient(140deg, #29415135, #0912198a); border-radius: 6px; transition: border-color .2s, background .2s; }
.os-app-tile:hover { border-color: #7fefff; background: #5deaf614; }
.os-launch-app { width: 100%; min-height: 68px; padding: 10px 46px 10px 12px; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; text-align: left; color: #e0f0f6; }
.os-launch-app .os-app-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid #5deaf65e; border-radius: 7px; color: var(--info); font-size: 24px; background: #5deaf60b; }
.os-launch-app > span:last-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.os-launch-app strong { font-size: 16px; line-height: 1.25; }
.os-launch-app small { color: #9ebac5; font-size: 16px; }
.os-app-pin { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); border: 0; background: transparent; color: #86a4b0; font-size: 20px; width: 36px; height: 36px; padding: 0; }
.os-app-pin.pinned { color: var(--accent); }
.os-app-pin:hover { background: #f8ef3b10; }
#os-category-section { margin-top: 24px; }
#os-category-section h3 { margin: 0 0 12px; }
#os-category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.os-category-card { min-height: 69px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; text-align: left; background: #0a1a258f; color: #e4f4f6; border: 1px solid #5deaf62e; border-radius: 6px; }
.os-category-card:hover { background: #5deaf612; border-color: var(--info); }
.os-category-card > span:first-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.os-category-card strong { font-size: 16px; }
.os-category-card small { font-size: 16px; color: #a2bbc5; line-height: 1.3; }
.os-category-count { flex: none; color: var(--info); font: 16px var(--hud-font); }
#os-app-empty { text-align: center; padding: 28px 0; color: #a5c0cc; font-size: 16px; }
.os-launcher-footer { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid #5deaf62d; margin-top: 20px; padding-top: 15px; color: #87a7b5; font: 16px var(--hud-font); }
#os-launcher [hidden], #os-session-empty[hidden] { display: none; }
.os-focus .topbar, .os-focus .os-session-strip, .os-focus .os-dock, .os-focus .os-desktop-status { display: none; }
.os-focus .os-window { width: 100%; max-width: none; margin: 0; min-height: 100vh; border: 0; }
.os-focus .os-windowbar { position: sticky; top: 0; z-index: 15; }
.os-focus main { padding-bottom: 50px; }
.os-focus [data-os=focus] { color: var(--accent); }

@media (max-width: 1200px) {
  .os-launcher-button kbd { display: none; }
  .topbar { gap: 12px; padding-inline: 18px; }
  .topbar .reminder-button { font-size: 0; }
  .topbar .reminder-button::before { content: '◷'; font-size: 16px; }
}
@media (max-width: 1000px) {
  .os-brand strong { display: none; }
}
@media (max-width: 900px) {
  .topbar #brand-filter { min-width: 130px; width: 130px; }
  .topbar .global-search input { width: 155px; }
  .os-window { width: calc(100% - 30px); margin-top: 16px; }
  main { padding: 20px; }
  #os-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { padding: 10px 12px; min-height: 60px; gap: 10px; flex-wrap: wrap; align-items: center; }
  .topbar .os-brand strong { display: block; font-size: 16px; }
  .os-launcher-button { margin-left: auto; font-size: 16px; padding: 5px 9px; }
  .topbar .topbar-actions { flex: 1 0 100%; width: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
  .topbar .global-search { flex: 1; min-width: 50px; }
  .topbar .global-search input { width: 100%; }
  .topbar #brand-filter { display: none; }
  .topbar .quick-inbox { flex: none; }
  .topbar .quick-inbox::after { content: '＋'; font-size: 19px; }
  .topbar .reminder-button { width: 34px; height: 38px; padding: 6px; }
  .topbar .motion-toggle { min-width: 34px; height: 38px; padding: 6px; }
  .topbar #logout-button { width: 44px; min-width: 44px; min-height: 44px; padding: 0; }
  .topbar-actions > button { min-height: 44px; flex-shrink: 0; }
  .os-session-strip { padding: 7px 12px; min-height: 45px; gap: 10px; }
  #os-open-count, #os-session-empty { display: none; }
  .os-session .os-close-tab { min-height: 32px; }
  .os-window { width: calc(100% - 16px); margin-top: 10px; }
  .os-windowbar { padding: 0 8px; min-height: 38px; }
  #breadcrumb-group, .os-title-divider { display: none; }
  .os-window-title { font-size: 16px; }
  .os-window-controls button { width: 31px; }
  main { padding: 14px 10px 24px; }
  .os-desktop-status { padding: 0 14px 117px; font-size: 16px; }
  .os-desktop-status > span:last-child { display: none; }
  .os-dock { bottom: max(10px, env(safe-area-inset-bottom)); max-width: calc(100vw - 16px); padding: 8px 6px 7px; gap: 1px; border-radius: 13px; }
  .os-dock > button, .os-dock-app { width: 55px; min-height: 58px; }
  .os-dock .os-app-icon, .os-dock > button > span { width: 32px; height: 29px; font-size: 23px; }
  .os-dock-app > span:last-child, .os-dock small { font-size: 16px; }
  .os-dock .os-dock-home { padding-right: 5px; }
  #os-launcher { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); padding: 18px 14px; border-radius: 10px; }
  .os-launcher-head h2 { font-size: 28px; margin-bottom: 15px; }
  #os-app-search { font-size: 16px; }
  .os-app-groups { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; }
  .os-app-groups button { flex: none; }
  #os-app-grid, #os-category-grid { grid-template-columns: 1fr; }
  .os-launch-app { min-height: 61px; padding: 8px 46px 8px 10px; }
  .os-launch-app .os-app-icon { width: 33px; height: 33px; font-size: 21px; }
  .os-app-pin { right: 4px; }
  .os-category-card { min-height: 59px; }
  .os-launcher-footer { font-size: 16px; }
  #main .search-note, #main .button.small { font-size: 16px; }
}
