/* Seven Hills OS 7.7 — shared screen surfaces. Document/print styles stay separate. */
.sheet-validation-popup { position:fixed; z-index:30000; width:min(350px,calc(100vw - 16px)); max-height:calc(100vh - 16px); overflow:auto; box-sizing:border-box; padding:14px; border:1px solid var(--ui-border); border-radius:10px; background:var(--ui-raised); color:var(--ui-text); box-shadow:0 12px 40px #0005; font:13px/1.4 "Segoe UI",sans-serif; }
.sheet-validation-popup strong { display:block; margin-bottom:10px; }
.sheet-validation-popup input[type=text],.sheet-validation-popup textarea { box-sizing:border-box; width:100%; border:1px solid var(--ui-border); border-radius:5px; padding:9px; background:var(--ui-input); color:var(--ui-text); font:inherit; }
.sheet-validation-popup textarea { resize:vertical; min-height:110px; margin-bottom:8px; }
.sheet-validation-popup p { color:var(--ui-muted); margin:8px 0; }
.sheet-validation-options { max-height:208px; overflow:auto; padding:6px 0; }
.sheet-validation-options button { display:block; width:100%; border:0; background:transparent; color:inherit; padding:8px 10px; text-align:left; border-radius:4px; font:inherit; overflow-wrap:anywhere; }
.sheet-validation-options button[aria-selected=true] { background:color-mix(in srgb,#107c41 18%,transparent); }
.sheet-validation-options button:hover,.sheet-validation-options button.is-current { background:var(--ui-hover); outline:1px solid #107c41; outline-offset:-1px; }
.sheet-validation-actions { display:flex; gap:6px; flex-wrap:wrap; padding-top:10px; border-top:1px solid var(--ui-border); margin-top:6px; }
.sheet-validation-actions button { flex:1; font:inherit; padding:8px; border:1px solid var(--ui-border); background:var(--ui-input); color:var(--ui-text); border-radius:5px; cursor:pointer; }
.sheet-validation-actions button:first-child { background:#107c41; color:#fff; border-color:#107c41; }
.sheet-validation-popup label { display:flex; gap:4px; font-size:12px; align-items:center; }
@media print { .sheet-validation-popup { display:none!important; } }
@media screen {
  #desktop .word-style-gallery { min-width:320px; width:360px; max-width:360px; overflow-x:auto; }
  #desktop .word-style-gallery button { flex:none; min-width:106px; max-width:150px; background:#fff!important; color:#17201f!important; }
  #desktop .word-style-gallery button b { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:130px; }
  #desktop #wordFontSize { width:72px; min-width:72px; height:29px; padding:3px 6px; background:var(--ui-input); color:var(--ui-text); border:1px solid var(--ui-border); border-radius:4px; }
}
@media screen {
  :root { --ui-bg:#202829; --ui-raised:#283234; --ui-input:#172022; --ui-text:#edf3f3; --ui-muted:#a0b0b2; --ui-border:rgba(186,212,214,.15); --ui-hover:rgba(187,220,224,.09); }
  html[data-os-theme="light"] { --ui-bg:#f7f9fa; --ui-raised:#fff; --ui-input:#fff; --ui-text:#202d32; --ui-muted:#607078; --ui-border:#d9e1e5; --ui-hover:#e8eff2; }
  button,input,select,textarea { font-family:Commissioner,"Segoe UI",sans-serif; }
  button { -webkit-tap-highlight-color:transparent; }
  button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible { outline:2px solid var(--accent,#1ab1c3); outline-offset:3px; }
  button:disabled { opacity:.42; cursor:default; }
  #desktop { overflow:clip!important; }
  [hidden] { display:none!important; }
  .ui-icon { width:20px; height:20px; display:inline-block; flex:none; vertical-align:middle; pointer-events:none; }
  #desktop .window.is-minimized { display:none!important; }
  #desktop .window { border:1px solid var(--ui-border)!important; border-radius:12px; box-shadow:0 24px 76px #0006,0 2px 8px #0002!important; color:var(--ui-text)!important; }
  #desktop .window.is-maximized { border-radius:0; box-shadow:none!important; }
  #desktop #spreadsheetWindow.is-maximized { bottom:var(--taskbar-height)!important; }
  #desktop #spreadsheetWindow .window-titlebar { flex:0 0 36px; }
  #desktop .window-titlebar { min-height:36px; height:36px!important; background:var(--ui-bg)!important; color:var(--ui-text); border-bottom:1px solid var(--ui-border)!important; }
  #desktop .window-brand { gap:10px; min-width:0; font-size:12px; font-weight:500; }
  #desktop .window-brand>span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .window-actions { align-self:stretch; }
  .window-actions button { width:44px!important; min-height:34px; position:relative; font-size:0!important; border:0!important; border-radius:0!important; }
  .window-actions button::after { content:""; display:block; width:11px; height:11px; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); background:currentColor; mask:var(--control) center/contain no-repeat; }
  .window-actions [data-minimize] { --control:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath stroke='black' d='M1 6h10'/%3E%3C/svg%3E"); }
  .window-actions [data-maximize] { --control:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='black' d='M1.5 1.5h9v9h-9z'/%3E%3C/svg%3E"); }
  .is-maximized .window-actions [data-maximize] { --control:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='black' d='M.5 3.5h8v8h-8zM3.5 3V.5h8v8H9'/%3E%3C/svg%3E"); }
  .window-actions [data-close] { --control:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath stroke='black' d='m1 1 10 10M1 11 11 1'/%3E%3C/svg%3E"); }
  #desktop .window-actions [data-close]:hover { background:#c42b35!important; color:white!important; }
  #loginScreen .login-input { height:48px; border:1px solid #ffffff3a!important; border-bottom:2px solid #9baead!important; border-radius:8px!important; background:#f8fcfc!important; box-shadow:0 4px 16px #0002; overflow:hidden; }
  #loginScreen .login-input:focus-within { border-bottom-color:#36cee0!important; box-shadow:0 0 0 3px #28c8da25,0 5px 20px #0003; }
  #loginScreen .login-input input { color:#1d3138!important; font-size:15px!important; padding:0 16px; height:100%; letter-spacing:.015em; background:transparent!important; }
  #loginScreen .login-input input::placeholder { color:#687d84; opacity:1; }
  #loginScreen .eye-button { position:static!important; align-self:stretch; width:48px!important; height:auto!important; flex:0 0 48px; display:grid; place-items:center; color:#43616b!important; background:transparent!important; border:0!important; border-radius:0!important; padding:0!important; transform:none!important; }
  #loginScreen .eye-button:hover { background:#dcecef!important; }
  #loginScreen .eye-button::before,#loginScreen .eye-button::after { content:none!important; }
  .eye-button svg { width:22px; height:22px; }
  .eye-button .eye-slash { display:none; }
  .eye-button[aria-pressed="true"] .eye-slash { display:block; }
  #loginScreen #loginButton { min-height:40px; min-width:132px; border-radius:8px; font-size:14px; font-weight:600; color:#03282f; background:linear-gradient(135deg,#58dfeb,#22b7ce); box-shadow:0 4px 20px #04b0bf26; }
  #loginScreen .login-name { font-size:25px; letter-spacing:-.025em; }
  #loginScreen .account-choice { border-radius:10px; min-height:58px; border-color:transparent; backdrop-filter:blur(16px); }
  #loginScreen .account-choice.is-active { background:#b9e7ed17; border-color:#c4eef32e; }
  #desktop .taskbar { height:62px; padding:5px 12px; background:color-mix(in srgb,var(--ui-bg) 90%,transparent)!important; border-top:1px solid var(--ui-border)!important; backdrop-filter:blur(32px) saturate(140%); }
  .task-center { gap:5px; }
  .task-center>button { border-radius:9px!important; }
  .taskbar .tray-shell { height:44px; border:0!important; background:transparent!important; gap:3px; }
  .taskbar .tray-shell button { border-radius:7px; }
  .taskbar .tray-shell .glyph { font-size:18px!important; }
  #desktop .command-bar { min-height:54px; gap:5px; padding:8px 16px; background:var(--ui-bg)!important; }
  #desktop .command-bar button { min-height:34px; font-size:12px; border-radius:6px; gap:8px; }
  #desktop .explorer-nav { padding:14px 10px; background:var(--ui-bg)!important; }
  #desktop .explorer-nav button { min-height:42px; font-size:13px; gap:13px; margin-bottom:3px; border-radius:7px; }
  #desktop .file-surface { background:var(--ui-input)!important; }
  #desktop .file-card { border-radius:9px; padding:15px 8px 11px; }
  #desktop .file-card>span { font-size:12px; line-height:1.4; }
  #desktop .details-pane { background:var(--ui-bg)!important; padding:22px 18px; }
  #desktop .details-pane button { min-height:36px; border-radius:7px; font-size:12px; }
  #desktop .detail-visual { background:var(--ui-raised)!important; border-color:var(--ui-border)!important; }
  .context-menu { min-width:240px; padding:6px!important; border:1px solid var(--ui-border)!important; border-radius:10px!important; background:var(--ui-bg)!important; color:var(--ui-text)!important; backdrop-filter:blur(20px); }
  .context-menu button { min-height:35px; border-radius:5px; font-size:12px; color:inherit!important; }
  .context-menu button:hover { background:var(--ui-hover)!important; }
  #wordWindow { --office-accent:#428fe6; --office-tint:#235b98; }
  #spreadsheetWindow { --office-accent:#33b985; --office-tint:#146b49; }
  #presentationWindow { --office-accent:#ef8965; --office-tint:#a94325; }
  #pdfWindow { --office-accent:#ed6b73; --office-tint:#a93543; }
  #desktop .office-app-window { grid-template-rows:36px 58px 36px auto minmax(0,1fr) 30px; background:var(--ui-bg)!important; }
  #desktop #pdfWindow { grid-template-rows:36px 54px minmax(0,1fr) 30px; }
  #desktop .office-appbar,#desktop .spreadsheet-appbar { min-height:58px; padding:8px 16px; gap:12px; background:color-mix(in srgb,var(--office-tint) 22%,var(--ui-bg))!important; border-color:var(--ui-border)!important; }
  .office-file-title b,.spreadsheet-file b { font-size:14px!important; font-weight:600; }
  #desktop .office-file-title small,#desktop .spreadsheet-file small { font-size:11px; color:var(--ui-muted); }
  .office-file-mark { width:34px; height:36px; border-radius:6px; }
  .office-quick button,.spreadsheet-quick button { min-height:32px!important; padding:0 10px!important; border-radius:6px!important; font-size:11px!important; display:inline-flex; align-items:center; justify-content:center; gap:6px; white-space:nowrap; }
  #desktop .office-quick button,#desktop .spreadsheet-quick button,#desktop .office-command-search,#desktop .spreadsheet-search { background:var(--ui-input)!important; color:var(--ui-text)!important; border:1px solid var(--ui-border)!important; }
  #desktop .office-quick .office-primary-action { background:var(--office-tint)!important; color:white!important; border-color:transparent!important; }
  .office-command-search input { font-size:12px; }
  #desktop .office-ribbon input[type=number] { height:28px; padding:4px 7px; border:1px solid var(--ui-border); border-radius:5px; background:var(--ui-input); color:var(--ui-text); }
  #desktop .spreadsheet-mark { background:linear-gradient(145deg,#25a366,#107c41); font-size:23px; width:36px; height:36px; border-radius:6px; }
  .office-ribbon,.spreadsheet-ribbon { scrollbar-color:var(--ui-muted) var(--ui-raised); scrollbar-width:thin; }
  #desktop[data-theme="light"] .office-appbar,#desktop[data-theme="light"] .spreadsheet-appbar { background:color-mix(in srgb,var(--office-accent) 8%,var(--ui-bg))!important; }
  #desktop[data-theme="light"] .office-ribbon,#desktop[data-theme="light"] .spreadsheet-ribbon { background:var(--ui-raised)!important; }
  #desktop[data-theme="light"] .office-ribbon button,#desktop[data-theme="light"] .ribbon-group button { background:transparent!important; border-color:transparent!important; }
  #desktop[data-theme="light"] .office-ribbon button:hover,#desktop[data-theme="light"] .ribbon-group button:hover { background:var(--ui-hover)!important; border-color:var(--ui-border)!important; }
  #desktop[data-theme="light"] .office-ribbon button.is-on,#desktop[data-theme="light"] .ribbon-group button.is-on { background:color-mix(in srgb,var(--office-accent) 18%,white)!important; border-color:color-mix(in srgb,var(--office-accent) 48%,white)!important; }
  #desktop .task-search,#desktop .task-search .glyph { color:var(--ui-text)!important; }
  #desktop .office-ribbon-tabs,#desktop .spreadsheet-ribbon-tabs { height:36px; padding:0 12px; gap:4px; background:var(--ui-bg)!important; border-color:var(--ui-border)!important; }
  #desktop .office-ribbon-tabs button,#desktop .spreadsheet-ribbon-tabs button { height:35px; padding:0 13px; font-size:12px; color:var(--ui-muted); background:transparent!important; position:relative; border:0; }
  #desktop .office-ribbon-tabs button.is-active,#desktop .spreadsheet-ribbon-tabs button.is-active { color:var(--ui-text); font-weight:600; }
  .office-ribbon-tabs button.is-active::after,.spreadsheet-ribbon-tabs button.is-active::after { content:""; position:absolute; bottom:0; height:3px; border-radius:3px; left:12px; right:12px; background:var(--office-accent,var(--accent)); }
  #desktop .office-ribbon-tabs button:hover,#desktop .spreadsheet-ribbon-tabs button:hover { background:var(--ui-hover)!important; border-radius:5px 5px 0 0; }
  #desktop .office-ribbon,#desktop .spreadsheet-ribbon { background:var(--ui-raised)!important; color:var(--ui-text); border-color:var(--ui-border)!important; padding:8px 10px 5px; min-height:105px; }
  #desktop .office-ribbon-group,#desktop .ribbon-group { padding:0 10px; gap:5px; border-color:var(--ui-border); }
  #desktop .office-ribbon-group>small,#desktop .ribbon-group>small { font-size:10px!important; line-height:16px; color:var(--ui-muted); }
  #desktop .office-ribbon button,#desktop .ribbon-group button { min-height:28px; font-size:11px!important; line-height:1.25; border-radius:5px; background:transparent!important; color:var(--ui-text)!important; border-color:transparent!important; }
  #desktop .office-ribbon select,#desktop .ribbon-group select,#desktop .ribbon-group input { min-height:28px; font-size:12px!important; border:1px solid var(--ui-border)!important; border-radius:5px; background:var(--ui-input)!important; color:var(--ui-text)!important; }
  #desktop .office-ribbon select option,#desktop .ribbon-group select option { background:var(--ui-input); color:var(--ui-text); }
  #desktop .office-ribbon button:hover,#desktop .ribbon-group button:hover { background:var(--ui-hover)!important; border-color:var(--ui-border)!important; }
  #desktop .office-ribbon button.is-on,#desktop .ribbon-group button.is-on,#desktop .office-ribbon .is-active[data-word-style] { background:color-mix(in srgb,var(--office-accent) 17%,transparent)!important; border-color:color-mix(in srgb,var(--office-accent) 45%,transparent)!important; }
  .office-ribbon .ribbon-big { min-height:62px; }
  .office-ribbon .ribbon-big>b { font-size:11px; font-weight:500; }
  .office-ribbon .ribbon-big>.ui-label { font-size:11px; color:var(--ui-text); }
  #desktop .spreadsheet-ribbon .ribbon-big>.ui-label { font-size:11px; color:var(--ui-text); }
  #desktop .spreadsheet-ribbon button:has(.ui-icon):not(.ribbon-big) { display:inline-flex; align-items:center; gap:6px; }
  .spreadsheet-ribbon .ui-icon { width:16px; height:16px; }
  .spreadsheet-ribbon .ribbon-big .ui-icon { width:24px; height:24px; }
  .office-ribbon button:has(.ui-icon):not(.ribbon-big) { display:inline-flex; gap:6px; align-items:center; }
  .office-ribbon .ui-icon { width:16px; height:16px; }
  .ribbon-help { font-size:12px; max-width:460px; color:var(--ui-muted); margin:auto 10px; line-height:1.7; }
  .office-ribbon .ribbon-big .ui-icon { width:25px; height:25px; }
  .word-font-group { min-width:256px; }
  .word-style-gallery { min-width:340px; gap:5px; }
  #desktop .word-style-gallery button { min-width:78px; padding:8px; border:1px solid var(--ui-border)!important; background:var(--ui-input)!important; }
  .word-style-gallery button b { font:500 15px Georgia,serif; }
  .word-style-gallery button span { color:var(--ui-muted); font-size:9px; }
  #desktop .word-style-gallery { padding-bottom:19px; }
  #desktop .word-style-gallery>small { bottom:0; }
  .word-page { width:var(--page-width,210mm)!important; min-height:var(--page-height,297mm)!important; font-size:11pt!important; zoom:var(--word-zoom,1); box-shadow:0 3px 14px #0003,0 0 0 1px #0001; }
  #desktop .word-workspace,#desktop .pdf-workspace { background:color-mix(in srgb,var(--ui-bg) 88%,#70858d)!important; }
  .word-pages { padding-top:26px; gap:26px; }
  #desktop .office-statusbar,#desktop .spreadsheet-footer { background:var(--ui-bg)!important; color:var(--ui-muted)!important; border-color:var(--ui-border)!important; font-size:11px; }
  #desktop .presentation-ribbon:not(.is-active) { display:none; }
  #desktop .presentation-workspace { background:color-mix(in srgb,var(--ui-bg) 88%,#70858d); grid-template-columns:180px minmax(0,1fr); }
  #desktop .presentation-thumbnails,#desktop .presentation-notes { background:var(--ui-bg); color:var(--ui-muted); border-color:var(--ui-border); }
  .presentation-stage-shell { grid-template-rows:minmax(0,1fr) auto; }
  .presentation-stage { min-width:0; min-height:0; padding:24px; display:flex; align-items:safe center; justify-content:safe center; }
  .presentation-canvas { flex-shrink:0; width:calc(960px * var(--presentation-zoom,1)); aspect-ratio:var(--slide-ratio,1.77778); container-type:inline-size; }
  .presentation-shape { display:block; font-size:calc(var(--shape-size,18) * var(--slide-font-factor,.139) * 1cqw)!important; line-height:1.2; }
  .presentation-thumbnail .presentation-canvas { width:128px; height:auto; }
  .presentation-thumbnail .presentation-shape { padding:0; }
  .presentation-notes { min-height:44px; padding:10px 16px; font-size:11px; }
  .presentation-notes b { display:inline; margin-right:12px; color:var(--ui-muted); }
  .presentation-theme-gallery button { min-width:120px; }
  .presentation-theme-gallery button i { height:42px; }
  .presentation-stage.is-slideshow { position:fixed; inset:0; z-index:9999; padding:0; display:grid; }
  .presentation-stage.is-slideshow .presentation-canvas { width:min(100vw,calc(100vh * var(--slide-ratio,1.77778))); }
  .presentation-stage.is-slideshow .presentation-shape { pointer-events:none; box-shadow:none; }
  .slideshow-hint { position:fixed; bottom:16px; left:50%; transform:translateX(-50%); background:#142125cc; color:#fff; padding:8px 18px; border-radius:20px; font-size:12px; z-index:10001; pointer-events:none; }
  #desktop .formula-bar { min-height:35px; background:var(--ui-bg)!important; border-color:var(--ui-border)!important; padding:4px 8px; gap:5px; }
  #desktop .formula-bar input,#desktop .formula-bar #spreadsheetCellName { font-size:12px; border:1px solid var(--ui-border)!important; border-radius:4px; background:var(--ui-input)!important; color:var(--ui-text)!important; }
  .spreadsheet-color-palette,.spreadsheet-table-gallery { border-radius:10px; background:var(--ui-raised)!important; color:var(--ui-text)!important; border:1px solid var(--ui-border)!important; box-shadow:0 14px 40px #0004; z-index:2000; }
  .spreadsheet-color-palette h4,.spreadsheet-table-gallery h4 { font-size:12px; }
  .spreadsheet-color-swatch { border-radius:2px; }
  .spreadsheet-color-swatch:hover { outline:2px solid var(--accent); outline-offset:2px; }
  #desktop .spreadsheet-cell.is-selected:not([contenteditable]):not(:has(.cell-validation-editor)) { overflow:hidden; }
  #desktop .spreadsheet-cell.is-selected::after { right:0; bottom:0; }
  .ribbon-collapse { margin-left:auto; min-width:30px; }
  #desktop .is-ribbon-collapsed>.office-ribbon,#desktop .is-ribbon-collapsed>.spreadsheet-ribbon { display:none!important; }
  #desktop .office-app-window.is-ribbon-collapsed { grid-template-rows:36px 58px 36px minmax(0,1fr) 30px; }
  #desktop .office-app-window.is-read-mode { grid-template-rows:36px minmax(0,1fr) 30px; }
  .glyph.has-vector { display:inline-flex!important; align-items:center; justify-content:center; position:relative; width:1.2em!important; height:1.2em!important; }
  .glyph.has-vector::before,.glyph.has-vector::after { content:none!important; }
  .glyph.has-vector svg { width:100%; height:100%; overflow:visible; }
  @media (max-width:1100px) {
    .office-appbar { grid-template-columns:auto minmax(130px,1fr) auto; }
    .office-command-search { display:none; }
    .office-ribbon-group,.ribbon-group { flex-shrink:0; }
    .office-ribbon,.spreadsheet-ribbon { overflow-x:auto; }
  }
  @media (max-width:760px) {
    #desktop .office-app-window { min-width:0; min-height:0; inset:0 0 var(--taskbar-height)!important; }
    .office-quick button { padding:0 6px!important; }
    .office-file-title { min-width:70px; }
    #desktop .office-appbar { padding:6px 8px; gap:7px; }
    #desktop .presentation-workspace { grid-template-columns:125px minmax(0,1fr); }
    .presentation-thumbnail .presentation-canvas { width:80px; }
    .office-statusbar>div { gap:8px; }
    .office-statusbar label { font-size:0; }
    .office-statusbar input[type=range] { width:70px; }
  }
  @media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
}
