:root {
  color-scheme: light;
  --bg: #f7f2e9;
  --panel: #fffdf9;
  --ink: #122334;
  --muted: #6f7781;
  --line: #e7dece;
  --green: #092f4f;
  --green-soft: #f3ead7;
  --navy: #092f4f;
  --gold: #d4ad57;
  --gold-deep: #b98b31;
  --shadow: 0 9px 28px rgba(9, 47, 79, 0.08);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100%; margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.ui-icon { width: 1em; height: 1em; display: inline-block; flex: 0 0 auto; overflow: visible; color: inherit; vertical-align: -.125em; }
button:not(:disabled), a[href], [role="button"] { cursor: pointer; }
button:disabled { cursor: not-allowed; }
.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 244px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: max(25px,env(safe-area-inset-top,0px)) max(18px,env(safe-area-inset-right,0px)) max(18px,env(safe-area-inset-bottom,0px)) max(18px,env(safe-area-inset-left,0px)); background: var(--panel); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; padding: 0 8px 29px; color: var(--ink); text-decoration: none; }
.brand-lockup { display: block; width: 158px; height: auto; }
.brand-emblem { display: none; width: 34px; height: 34px; }
.nav { display: grid; gap: 5px; min-height:0; overflow-y:auto; scrollbar-width:thin; }
.nav-link { min-height: 43px; display: flex; align-items: center; gap: 13px; padding: 0 13px; border-radius: 9px; text-decoration: none; color: #566476; font-weight: 600; }
.nav-link span { width: 20px; text-align: center; color: #69778a; font-size: 19px; }
.nav-link.active { color: var(--navy); background: var(--green-soft); box-shadow: inset 3px 0 0 var(--gold); }
.nav-link.active span { color: var(--green); }
.nav-link .ai-nav-glyph { font-size: 18px; font-weight: 800; }
.badge { margin-left: auto; min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 10px; background: #e55858; color: white; font-size: 11px; }
.storage-card { margin-top: auto; margin-bottom: 20px; padding: 15px; border: 1px solid var(--line); background: #fbf7ef; border-radius: 12px; }
.storage-title { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.storage-title span { color: var(--ink); font-size: 12px; font-weight: 650; }
.progress { height: 5px; margin: 11px 0 8px; background: #e8decb; border-radius: 3px; overflow: hidden; }
.progress i { display: block; width: 8%; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); border-radius: inherit; }
.storage-card small { color: var(--muted); font-size: 10px; }
.sidebar-footer { display: grid; grid-template-columns: 36px 1fr 24px; gap: 9px; align-items: center; padding: 15px 5px 0; border-top: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border: 2px solid #e2c781; border-radius: 50%; color: #fff; background: var(--navy); font-size: 11px; font-weight: 700; }
.sidebar-footer b { display: block; font-size: 11px; }
.sidebar-footer small { color: var(--muted); font-size: 10px; }
.sidebar-footer button, .file-row button { border: 0; background: none; color: var(--muted); cursor: pointer; }.sidebar-footer button .ui-icon { width: 17px; height: 17px; }
main { min-width: 0; }
.topbar { height: calc(78px + env(safe-area-inset-top,0px)); position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 13px; padding: env(safe-area-inset-top,0px) max(38px,env(safe-area-inset-right,0px)) 0 max(38px,env(safe-area-inset-left,0px)); border-bottom: 1px solid var(--line); background: rgba(255,253,249,.96); backdrop-filter: blur(12px); }
.search { width: min(470px, 55vw); display: flex; align-items: center; gap: 9px; padding: 0 14px; background: var(--bg); border: 1px solid transparent; border-radius: 9px; }
.search:focus-within { border-color: var(--gold); background: white; box-shadow: 0 0 0 3px rgba(212,173,87,.13); }
.search span { color: var(--muted); font-size: 19px; }
.search input { width: 100%; height: 40px; border: 0; outline: 0; background: transparent; color: var(--ink); }
.icon-button { position: relative; margin-left: auto; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); transition: border-color .15s ease, color .15s ease, background .15s ease; }.icon-button .ui-icon { width: 18px; height: 18px; }
.icon-button:hover { border-color: #d8bd7c; background: #fffaf0; color: var(--navy); }
.icon-button i { position: absolute; right: 9px; top: 7px; width: 6px; height: 6px; border: 1px solid #fff; background: #e24d4d; border-radius: 50%; }
.primary-button { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 18px; border: 1px solid #123f61; border-radius: 9px; background: var(--navy); color: white; font-weight: 650; box-shadow: 0 6px 15px rgba(9,47,79,.2); transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }.primary-button .ui-icon { width: 16px; height: 16px; }
.primary-button:hover { background: #123f61; box-shadow: 0 8px 18px rgba(9,47,79,.25); transform: translateY(-1px); }
.content { width: min(1210px, calc(100% - 64px)); margin: 0 auto; padding: 34px max(0px,env(safe-area-inset-right,0px)) max(55px,env(safe-area-inset-bottom,0px)) max(0px,env(safe-area-inset-left,0px)); }
.welcome { min-height: 142px; display: flex; justify-content: space-between; align-items: center; overflow: hidden; padding: 27px 34px; border-radius: 15px; color: white; background: linear-gradient(120deg, #061f36 0%, #0b3a5e 68%, #16506f 100%); box-shadow: 0 14px 34px rgba(9,47,79,.2); }
.welcome p { margin: 0 0 5px; color: #e4c978; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.welcome h1 { margin: 0 0 5px; font-size: 26px; letter-spacing: -.6px; }
.welcome span { color: #eee8dc; font-size: 12px; }
.welcome-glyph { position: relative; width: 180px; height: 100px; display: grid; place-items: center; }
.welcome-glyph:before, .welcome-glyph:after, .welcome-glyph i { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.welcome-glyph:before { width: 150px; height: 150px; }
.welcome-glyph:after { width: 100px; height: 100px; }
.welcome-glyph i { width: 57px; height: 57px; background: rgba(212,173,87,.18); }
.welcome-glyph b { z-index: 1; color: #e4c978; font-size: 17px; letter-spacing: 1px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 21px 0 27px; }
.quick-card { min-height: 78px; display: grid; grid-template-columns: 42px 1fr 26px; gap: 12px; align-items: center; text-align: left; padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); cursor: pointer; }
.quick-card:hover { border-color: #d8bd7c; transform: translateY(-1px); }
.quick-card i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; font-style: normal; font-size: 20px; }.quick-card i .ui-icon { width: 22px; height: 22px; }
.quick-card i.doc { color: #2e6eb8; background: #e8f1fb; }
.quick-card i.sheet { color: #99701f; background: #fbf0d6; }
.quick-card i.mail { color: #7b5520; background: #f6ead7; }
.quick-card b, .quick-card small { display: block; }
.quick-card b { font-size: 12px; }
.quick-card small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.quick-card em { color: #97a3b1; font-size: 20px; font-style: normal; }.quick-card em .ui-icon { width: 18px; height: 18px; }
.section-block { padding: 21px 23px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 15px; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.section-heading a { display: inline-flex; align-items: center; gap: 5px; color: var(--green); text-decoration: none; font-size: 11px; font-weight: 650; }.section-heading a .ui-icon { width: 13px; height: 13px; }
.file-list { display: grid; }
.file-row { min-height: 62px; display: grid; grid-template-columns: 38px 1fr 70px 24px; gap: 12px; align-items: center; border-top: 1px solid #eef1f4; }
.file-row:first-child { border-top: 0; }
.file-icon { width: 34px; height: 38px; display: grid; place-items: center; border-radius: 6px 6px 9px 6px; color: white; font-style: normal; }.file-icon .ui-icon { width: 20px; height: 20px; }
.file-icon.word { background: #3e78ba; }.file-icon.excel { background: #25845f; }.file-icon.slides { background: #c66f3d; }
.file-row b, .file-row small { display: block; }
.file-row b { font-size: 11px; }.file-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }.file-row>span { color: var(--muted); font-size: 10px; }
.bottom-grid { display: grid; grid-template-columns: 1.55fr .75fr; gap: 18px; margin-top: 18px; }
.mail-preview article { min-height: 66px; display: grid; grid-template-columns: 36px 1fr 38px; gap: 11px; align-items: center; border-top: 1px solid #eef1f4; }
.mail-preview article:first-of-type { border-top: 0; }
.mail-preview .avatar.blue { background: #3d6f9d; }.mail-preview .avatar.green { background: #4a7d69; }
.mail-preview article b, .mail-preview article strong { display: inline; font-size: 10px; }.mail-preview article strong:before { content: " · "; color: #a8b0ba; }
.mail-preview article p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }.mail-preview time { align-self: start; margin-top: 18px; color: var(--muted); font-size: 9px; }
.company-card { text-align: center; }.company-card .section-heading { text-align: left; }
.folder-visual { height: 68px; display: grid; place-items: center; position: relative; margin: 0 auto 9px; }.folder-visual span { color: #e4ad54; font-size: 56px; line-height: 1; }.folder-visual span .ui-icon { width: 58px; height: 58px; }
.company-card h3 { margin: 0; font-size: 11px; }.company-card>p { margin: 4px 0 13px; color: var(--muted); font-size: 9px; }.company-card>button { width: 100%; height: 34px; border: 1px solid #b9cdc6; border-radius: 8px; background: #f4faf7; color: var(--green); font-weight: 650; font-size: 10px; transition: border-color .15s ease, background .15s ease, transform .15s ease; }.company-card>button:hover { border-color: var(--green); background: var(--green-soft); transform: translateY(-1px); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 74px 1fr; }
  .sidebar { padding-inline: 12px; }.brand { justify-content: center; padding-inline: 0; }.brand-lockup { display: none; }.brand-emblem { display: block; }.nav-link:not(.active){ font-size: 0; }.nav-link { justify-content: center; padding: 0; font-size: 0; }.nav-link span { font-size: 19px; }.badge { position: absolute; margin: -24px 0 0 24px; font-size: 9px; min-width: 17px; height: 17px; }
  .storage-card, .sidebar-footer>div:not(.avatar), .sidebar-footer button { display: none; }.sidebar-footer { grid-template-columns: 1fr; justify-items: center; }
  .topbar { padding-inline: 20px; }.content { width: calc(100% - 36px); }.quick-grid { grid-template-columns: 1fr; }.bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  #notifications-button { display:grid; }
  .shell { display: block; }.sidebar { position: fixed; inset: auto 0 0; z-index: 5; width: 100%; height: 64px; display: block; padding: 7px 6px; overflow-x:auto;scrollbar-width:none;border: 0; border-top: 1px solid var(--line); }.sidebar::-webkit-scrollbar{display:none}.brand,.storage-card,.sidebar-footer { display: none; }.nav { width:max(100%,840px);height: 100%; display: grid; grid-template-columns: repeat(14,minmax(58px,1fr));overflow:visible; }.nav-link,.nav-link:not(.active) { min-height: 48px; display:flex; flex-direction:column; gap:1px; justify-content:center; padding:0 2px;font-size:7px; }.nav-link span { font-size:17px; }.badge{ margin:-20px 0 0 22px; }
  .topbar { height: 64px; padding: 0 13px; }.search { flex: 1; width: auto; }.topbar>.primary-button { width: 40px; padding: 0; }.topbar>.primary-button>span { display: none; }.topbar>.primary-button>.ui-icon { width: 18px; height: 18px; }.icon-button { display: none; }
  .content { width: calc(100% - 24px); padding-top: 18px; padding-bottom: 85px; }.welcome { min-height: 128px; padding: 22px; }.welcome h1 { font-size: 21px; }.welcome-glyph { display:none; }.file-row { grid-template-columns: 34px 1fr 24px; }.file-row>span { display:none; }.section-block { padding: 17px; }
}

.hidden { display: none !important; }
.clickable { cursor: pointer; }
.muted { color: var(--muted); }
.loading-state { min-height: 420px; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.loading-state.small { min-height: 220px; }
.loading-state i { width: 32px; height: 32px; border: 3px solid #dce8e3; border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
.loading-state p { margin-top: 13px; font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading>div:first-child>p { margin: 0 0 4px; color: var(--green); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: 1.1px; }
.page-heading h1 { margin: 0; font-size: 27px; letter-spacing: -.7px; }
.page-heading>div:first-child>span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.page-actions { display: flex; gap: 9px; }
.primary-button.inline, .secondary-button { height: 38px; padding: 0 15px; border-radius: 8px; font-size: 11px; font-weight: 700; cursor: pointer; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }.secondary-button .ui-icon { width: 15px; height: 15px; }
.secondary-button { border: 1px solid #cad4dc; background: #fff; color: #415164; }
.secondary-button:hover { border-color: #99b7ac; color: var(--green); }
.breadcrumbs { min-height: 36px; display: flex; align-items: center; gap: 6px; margin: -10px 0 11px; }
.breadcrumbs button { border: 0; background: none; color: #657386; font-size: 10px; cursor: pointer; }
.breadcrumbs button:last-child { color: var(--ink); font-weight: 700; }
.breadcrumbs span { color: #abb4be; }
.files-section { padding: 0; overflow: visible; }
.files-toolbar { min-height: 65px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); }
.files-toolbar b, .files-toolbar small { display: block; }.files-toolbar b { font-size: 12px; }.files-toolbar small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.view-switch { display: flex; padding: 3px; border-radius: 7px; background: var(--bg); }.view-switch>span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 5px; color: var(--muted); font-size: 9px; }.view-switch>span.active { background: white; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.07); }.view-switch>span b { font: inherit; }.view-switch .ui-icon { width: 13px; height: 13px; }
.files-table-head, .files-table-row { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(110px, .8fr) 130px 80px 34px; gap: 13px; align-items: center; padding: 0 20px; }
.files-table-head { min-height: 38px; color: #8a96a5; background: #fafbfc; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.files-table-row { min-height: 66px; border-top: 1px solid #eef1f4; color: #5b6979; font-size: 10px; cursor: pointer; content-visibility: auto; contain-intrinsic-size: 66px; }
.files-table-row:hover { background: #f8fbfa; }.files-table-row>div:first-child { min-width: 0; display: flex; align-items: center; gap: 12px; }.files-table-row>div:first-child>span { min-width: 0; }.files-table-row b, .files-table-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.files-table-row b { color: var(--ink); font-size: 11px; }.files-table-row small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.folder-icon { width: 38px; display: grid; place-items: center; color: #d99e42; font-size: 34px; font-style: normal; line-height: 1; }
.folder-icon .ui-icon { width: 34px; height: 34px; }
.file-icon.pdf { background: #bd4c4c; }.file-icon.image { background: #775ba6; }.file-icon.generic { background: #718096; }
.row-menu { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: #8994a2; cursor: pointer; }.row-menu:hover { background: #edf2f0; color: var(--green); }
.row-menu .ui-icon { width: 17px; height: 17px; }
.context-menu { position: fixed; z-index: 30; width: 160px; display: grid; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 12px 34px rgba(18,31,48,.18); }
.context-menu button, .context-menu a { display: flex; align-items: center; min-height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-decoration: none; text-align: left; font-size: 10px; cursor: pointer; }.context-menu button:hover, .context-menu a:hover { background: var(--bg); }.context-menu .danger { color: #b74949; }
.context-menu button, .context-menu a { gap: 8px; }.context-menu .ui-icon { width: 15px; height: 15px; }
.empty-state { min-height: 280px; display: grid; place-content: center; justify-items: center; text-align: center; padding: 30px; }
.empty-state.compact { min-height: 220px; }.empty-state i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--green-soft); color: var(--green); font-size: 22px; font-style: normal; }.empty-state.error i { color: #b44848; background: #faeaea; }.empty-state h2 { margin: 14px 0 4px; font-size: 14px; }.empty-state p { max-width: 330px; margin: 0 0 14px; color: var(--muted); font-size: 10px; }.empty-state button { height: 34px; padding: 0 13px; border: 0; border-radius: 7px; background: var(--green); color: white; font-size: 10px; font-weight: 700; }
.empty-state i .ui-icon { width: 24px; height: 24px; }.empty-state button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }.empty-state button .ui-icon { width: 14px; height: 14px; }
.mini-empty { display: grid; place-items: center; min-height: 110px; color: var(--muted); font-size: 10px; }

.activity-section,.trash-section { padding:0;overflow:hidden; }
.activity-summary { min-height:65px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 21px;border-bottom:1px solid var(--line); }
.activity-summary b,.activity-summary small { display:block; }.activity-summary b { font-size:12px; }.activity-summary small { margin-top:2px;color:var(--muted);font-size:9px; }.activity-summary>span { color:#8a96a5;font-size:9px; }
.activity-row { min-height:70px;display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:13px;align-items:center;padding:11px 21px;border-top:1px solid #eef1f4;content-visibility:auto;contain-intrinsic-size:70px; }
.activity-row:first-of-type { border-top:0; }.activity-row:hover,.trash-row:hover { background:#f8fbfa; }
.activity-glyph { width:36px;height:36px;display:grid;place-items:center;border-radius:10px;font-style:normal; }.activity-glyph .ui-icon { width:17px;height:17px; }
.activity-glyph.added,.activity-glyph.restored { color:#177756;background:#e8f5ef; }.activity-glyph.updated { color:#356fa9;background:#eaf1f8; }.activity-glyph.deleted { color:#b44f4f;background:#faecec; }.activity-glyph.moved { color:#8a641e;background:#faf1df; }
.activity-main { min-width:0; }.activity-main p { margin:0;overflow:hidden;color:#526070;font-size:10px;text-overflow:ellipsis;white-space:nowrap; }.activity-main p b,.activity-main p strong { color:var(--ink);font-weight:700; }.activity-main small { display:block;margin-top:4px;overflow:hidden;color:var(--muted);font-size:8px;text-overflow:ellipsis;white-space:nowrap; }.activity-row time { color:#7d8997;font-size:9px;white-space:nowrap; }
.history-tabs { display:flex;align-items:center;gap:5px;margin:0 0 12px;padding:4px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:var(--shadow);width:max-content;max-width:100%;overflow-x:auto; }
.history-tabs button { min-height:34px;display:inline-flex;align-items:center;gap:6px;padding:0 13px;border:0;border-radius:7px;background:transparent;color:#687586;font-size:9px;font-weight:700;white-space:nowrap;cursor:pointer; }
.history-tabs button.active,.history-tabs button[aria-selected="true"] { background:var(--green-soft);color:var(--green); }.history-tabs button:focus-visible { outline:2px solid #4c9b80;outline-offset:1px; }.history-tabs .ui-icon { width:14px;height:14px; }
.history-ai-row { min-height:86px;display:grid;grid-template-columns:38px minmax(0,1fr) minmax(190px,auto);gap:13px;align-items:center;padding:12px 21px;border-top:1px solid #eef1f4;content-visibility:auto;contain-intrinsic-size:86px; }
.history-ai-row:first-of-type { border-top:0; }.history-ai-row:hover { background:#f8fbfa; }
.history-ai-status { width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:#e8f5ef;color:#177756;font-size:14px;font-style:normal; }
.history-ai-status.processing,.history-ai-status.queued { background:#edf2fb;color:#416fa5; }.history-ai-status.failed,.history-ai-status.cancelled { background:#faecec;color:#b44f4f; }
.history-ai-main { min-width:0; }.history-ai-title { min-width:0;display:flex;align-items:center;gap:8px; }.history-ai-title>b { min-width:0;overflow:hidden;color:var(--ink);font-size:10px;text-overflow:ellipsis;white-space:nowrap; }
.history-ai-status-label { flex:0 0 auto;padding:3px 6px;border-radius:999px;background:#e8f5ef;color:#177756;font-size:9px;font-weight:750; }.history-ai-status-label.processing,.history-ai-status-label.queued { background:#edf2fb;color:#416fa5; }.history-ai-status-label.failed,.history-ai-status-label.cancelled { background:#faecec;color:#a74747; }
.history-ai-main p { margin:5px 0 0;overflow:hidden;color:#526070;font-size:9px;text-overflow:ellipsis;white-space:nowrap; }.history-ai-main>small { display:block;margin-top:5px;overflow:hidden;color:var(--muted);font-size:9px;text-overflow:ellipsis;white-space:nowrap; }
.history-ai-usage { min-width:190px;display:grid;justify-items:end;gap:6px;text-align:right; }.history-ai-cost { color:#506253;font-size:9px;font-weight:700;white-space:nowrap; }.history-ai-cost.pending { color:#8b96a3;font-weight:500; }.history-ai-usage time { color:#7d8997;font-size:9px;white-space:nowrap; }
.trash-row { min-height:82px;display:grid;grid-template-columns:minmax(210px,1.4fr) minmax(140px,.8fr) minmax(170px,1fr) auto;gap:18px;align-items:center;padding:12px 21px;border-top:1px solid #eef1f4;content-visibility:auto;contain-intrinsic-size:82px; }
.trash-row:first-of-type { border-top:0; }.trash-file { min-width:0;display:flex;align-items:center;gap:12px; }.trash-file>span,.trash-meta,.trash-path { min-width:0; }.trash-file b,.trash-file small,.trash-meta b,.trash-meta small,.trash-path b,.trash-path span { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.trash-file b { color:var(--ink);font-size:11px; }.trash-file small,.trash-meta small,.trash-path span { margin-top:2px;color:var(--muted);font-size:8px; }.trash-meta b,.trash-path b { color:#526070;font-size:9px; }.trash-path b { margin-top:3px; }.trash-restore { min-width:122px; }

.mail-workspace { min-height: 610px; display: grid; grid-template-columns: 165px 340px 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.mail-folders { display: grid; align-content: start; gap: 4px; padding: 15px 10px; border-right: 1px solid var(--line); background: #fafbfc; }
.mail-folders button { min-height: 39px; display: grid; grid-template-columns: 22px 1fr 20px; align-items: center; border: 0; border-radius: 7px; background: transparent; color: #667486; text-align: left; font-size: 10px; cursor: pointer; }.mail-folders button span { text-align: center; font-size: 14px; }.mail-folders button b { color: inherit; text-align: center; }.mail-folders button.active { color: var(--green); background: var(--green-soft); font-weight: 700; }
.mail-folders button span { display: grid; place-items: center; }.mail-folders button .ui-icon { width: 16px; height: 16px; }
.mail-list { min-width: 0; border-right: 1px solid var(--line); overflow-y: auto; }.mail-list>header { position: sticky; top: 0; z-index: 1; min-height: 55px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); }.mail-list>header b { font-size: 12px; }.mail-list>header span { color: var(--muted); font-size: 9px; }
.mail-row { min-height: 91px; display: grid; grid-template-columns: 35px 1fr; gap: 10px; align-items: start; padding: 15px 14px; border-bottom: 1px solid #eef1f4; cursor: pointer; content-visibility: auto; contain-intrinsic-size: 91px; }.mail-row:hover, .mail-row.selected { background: #f4faf7; }.mail-row.unread { background: #f7fbf9; }.mail-row.unread strong:before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 5px 1px 0; border-radius: 50%; background: var(--green); }
.mail-row>div>div { display: flex; justify-content: space-between; gap: 8px; }.mail-row b { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.mail-row time { flex: none; color: var(--muted); font-size: 8px; }.mail-row strong { display: block; margin-top: 4px; overflow: hidden; color: #344154; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.mail-row p { margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.mail-reader { min-width: 0; overflow-y: auto; }.message header { padding: 25px 27px 20px; border-bottom: 1px solid var(--line); }.message header>p { margin: 0 0 4px; color: var(--green); font-size: 8px; font-weight: 750; text-transform: uppercase; letter-spacing: .8px; }.message h2 { margin: 0 0 20px; font-size: 18px; letter-spacing: -.3px; }.message-person { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; }.message-person b, .message-person small { display: block; }.message-person b { font-size: 10px; }.message-person small { margin-top: 2px; color: var(--muted); font-size: 8px; }.message-person time { color: var(--muted); font-size: 8px; }.message-body { min-height: 260px; padding: 28px; color: #344154; font-size: 11px; line-height: 1.75; white-space: normal; }.message footer { padding: 15px 27px 24px; }.attachments { display: grid; gap: 7px; margin: 0 27px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }.attachments>b { font-size: 9px; }.attachments span { padding: 7px; border-radius: 6px; background: var(--bg); font-size: 9px; }.attachments small { margin-left: 6px; color: var(--muted); }
.attachments span { display: flex; align-items: center; gap: 5px; }.attachments span .ui-icon { width: 14px; height: 14px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 18px; background: rgba(20,31,43,.48); }
.modal { width: min(540px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 24px; border-radius: 15px; background: white; box-shadow: 0 24px 70px rgba(15,26,40,.28); animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal>header { display: flex; justify-content: space-between; margin-bottom: 20px; }.modal>header p { margin: 0 0 3px; color: var(--green); font-size: 8px; font-weight: 750; text-transform: uppercase; letter-spacing: .8px; }.modal>header h2 { margin: 0; font-size: 18px; }.modal>header>button { width: 30px; height: 30px; border: 0; border-radius: 7px; background: var(--bg); color: #657386; font-size: 19px; cursor: pointer; }
.modal>header>button { display: grid; place-items: center; }.modal>header>button .ui-icon { width: 17px; height: 17px; }
.modal form { display: grid; gap: 14px; }.modal label { display: grid; gap: 6px; color: #4c5a6b; font-size: 9px; font-weight: 700; }.modal input, .modal textarea { width: 100%; border: 1px solid #d7dee5; border-radius: 8px; outline: none; background: white; color: var(--ink); font-size: 11px; font-weight: 400; }.modal input { height: 41px; padding: 0 12px; }.modal textarea { padding: 11px 12px; resize: vertical; line-height: 1.55; }.modal input:focus, .modal textarea:focus { border-color: #70a692; box-shadow: 0 0 0 3px rgba(18,107,82,.09); }.modal label small { color: var(--muted); font-size: 8px; font-weight: 400; }.modal form>footer { display: flex; justify-content: flex-end; gap: 9px; padding-top: 7px; }
.create-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.create-options button { min-height: 72px; display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; }.create-options button:hover { border-color: #9abcae; background: #f8fbfa; }.create-options i { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; font-style: normal; font-size: 19px; }.create-options i.doc { color:#2e6eb8;background:#e8f1fb}.create-options i.sheet{color:#16835b;background:#e6f5ee}.create-options i.slides{color:#b9683a;background:#f8eee7}.create-options i.folder{color:#a86e17;background:#fbf0d9}.create-options i.upload{color:#5d6673;background:#eef1f4}.create-options b,.create-options small{display:block}.create-options b{font-size:10px}.create-options small{margin-top:2px;color:var(--muted);font-size:8px}
.create-options i .ui-icon { width: 21px; height: 21px; }
.drop-zone { min-height: 170px; place-content: center; justify-items: center; padding: 25px; border: 1px dashed #9fb9af !important; border-radius: 10px; background: #f8fbfa; text-align: center; cursor: pointer; }.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }.drop-zone i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 20px; font-style: normal; }.drop-zone b { margin-top: 10px; color: var(--ink); font-size: 10px; }.drop-zone small { color: var(--muted); }
.drop-zone i .ui-icon { width: 20px; height: 20px; }
.drop-zone.has-file { border-style:solid !important;border-color:#79a997 !important;background:#f2f8f5; }.drop-zone.has-file i { color:#fff;background:var(--green); }.drop-zone.has-file b { display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.drop-zone.uploading { cursor:progress;opacity:.82; }
.modal [data-close-modal]:disabled { opacity:.45;cursor:not-allowed; }
.upload-conflict-card { display:grid;grid-template-columns:38px minmax(0,1fr);gap:11px;align-items:start;padding:13px;border:1px solid #ead9b5;border-radius:10px;background:#fffaf0; }
.upload-conflict-card>i { width:38px;height:38px;display:grid;place-items:center;border-radius:9px;background:#f8e8c5;color:#8a5a12;font-style:normal; }
.upload-conflict-card>i .ui-icon { width:19px;height:19px; }
.upload-conflict-card>span { min-width:0;display:grid;gap:4px; }.upload-conflict-card b { overflow-wrap:anywhere;color:var(--ink);font-size:10px;line-height:1.4; }.upload-conflict-card small { color:var(--muted);font-size:9px;line-height:1.45; }
#toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: grid; gap: 8px; }.toast { min-width: 220px; padding: 12px 15px; border-radius: 9px; background: #173c32; color: white; box-shadow: 0 12px 28px rgba(18,31,48,.2); font-size: 10px; opacity: 0; transform: translateY(8px); transition: .2s ease; }.toast.error { background: #a94343; }.toast.show { opacity: 1; transform: none; }

.ai-view { overflow:hidden; }.ai-view .topbar { display:none; }.ai-view .content { width:100%;height:100vh;height:100dvh;margin:0;padding:0; }
.ai-workspace { position:relative;height:100%;min-height:0;display:grid;grid-template-columns:250px minmax(0,1fr);overflow:hidden;background:#fff; }
.ai-panel { min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding:25px 18px;border-right:1px solid var(--line);background:#f8faf9; }
.ai-panel-head { display:flex;align-items:center;gap:10px;padding:0 5px 22px;border-bottom:1px solid var(--line); }.ai-panel-logo { width:34px;height:34px;display:grid;place-items:center;border-radius:10px;color:white;background:linear-gradient(145deg,#183e4c,#147258);box-shadow:0 6px 16px rgba(18,107,82,.18);font-size:16px; }.ai-panel-head b,.ai-panel-head small { display:block; }.ai-panel-head b { font-size:12px; }.ai-panel-head small { margin-top:1px;color:var(--muted);font-size:8px; }
.ai-new-chat { min-height:39px;display:flex;align-items:center;justify-content:center;gap:7px;margin:18px 0 24px;border:0;border-radius:8px;color:white;background:var(--green);font-size:10px;font-weight:700;box-shadow:0 5px 13px rgba(18,107,82,.16); }.ai-new-chat .ui-icon { width:14px;height:14px; }
.ai-panel-section { display:grid;gap:4px; }.ai-panel-section>p { margin:0 0 7px;padding:0 7px;color:#8a96a5;font-size:8px;font-weight:750;text-transform:uppercase;letter-spacing:.8px; }.ai-panel-section>span { min-height:35px;display:flex;align-items:center;gap:9px;padding:0 7px;border-radius:7px;color:#5b6979;font-size:9px; }.ai-panel-section>span .ui-icon { width:15px;height:15px;color:#728093; }
.ai-panel-note { display:grid;grid-template-columns:23px 1fr;gap:8px;margin-top:auto;padding:12px;border:1px solid #dbe8e3;border-radius:9px;background:#f1f7f4; }.ai-panel-note>i { width:19px;height:19px;display:grid;place-items:center;border-radius:50%;color:#fff;background:#5c927f;font-size:8px;font-weight:800;font-style:normal; }.ai-panel-note p { margin:0;color:#647267;font-size:8px;line-height:1.55; }.ai-panel-note b { display:block;margin-bottom:2px;color:#345548;font-size:8px; }
.ai-chat { min-width:0;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;overflow:hidden;background:linear-gradient(#fff 0,#fbfcfc 100%); }.ai-chat>header { grid-row:1;min-width:0;min-height:75px;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:0 32px;border-bottom:1px solid var(--line);overflow:hidden;background:rgba(255,255,255,.96); }.ai-chat>header p { margin:0 0 1px;color:var(--green);font-size:8px;font-weight:750;text-transform:uppercase;letter-spacing:.9px; }.ai-chat>header h1 { margin:0;overflow:hidden;font-size:17px;letter-spacing:-.3px;text-overflow:ellipsis;white-space:nowrap; }
.ai-chat-tools { min-width:0;display:flex;flex:0 0 auto;align-items:center;gap:9px; }.ai-quality { height:32px;display:flex;align-items:center;gap:7px;padding:0 5px 0 10px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--muted);font-size:8px; }.ai-quality select { height:24px;border:0;outline:0;background:#f2f5f4;color:#334339;font-size:8px;font-weight:700; }
.ai-status { display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:7px;background:#f2f5f4;color:#627067;font-size:8px;font-weight:650; }.ai-status i { width:6px;height:6px;border-radius:50%;background:#98a49f; }.ai-status.ready { color:#267258;background:#edf7f2; }.ai-status.ready i { background:#2d9a70;box-shadow:0 0 0 3px rgba(45,154,112,.12); }.ai-status.offline { color:#9a5d2a;background:#fff4e7; }.ai-status.offline i { background:#d58a43; }.ai-status.pending i { animation:pulse 1s ease infinite; }
.ai-setup-banner { grid-row:2;width:min(850px,calc(100% - 48px));display:grid;grid-template-columns:28px 1fr;gap:10px;align-items:center;margin:15px auto 0;padding:10px 13px;border:1px solid #efcfac;border-radius:9px;background:#fff8ef;color:#765536; }.ai-setup-banner>span { width:28px;height:28px;display:grid;place-items:center;border-radius:7px;background:#f6e4ce; }.ai-setup-banner .ui-icon { width:15px;height:15px; }.ai-setup-banner p { margin:0;font-size:8px;line-height:1.5; }.ai-setup-banner b { display:block;color:#5f432a;font-size:9px; }
.ai-conversation { grid-row:3;min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;padding:24px max(30px,calc((100% - 850px)/2)) 16px;scrollbar-gutter:stable;overscroll-behavior:contain;scroll-behavior:auto; }
.ai-empty { min-height:100%;display:grid;place-content:center;justify-items:center;text-align:center;padding:20px 0 35px; }.ai-orb { width:64px;height:64px;display:grid;place-items:center;margin-bottom:15px;border:1px solid #d4e5df;border-radius:20px;background:linear-gradient(145deg,#f4faf7,#e4f1ec);box-shadow:0 12px 35px rgba(31,70,57,.1); }.ai-orb span { width:38px;height:38px;display:grid;place-items:center;border-radius:13px;color:white;background:linear-gradient(145deg,#193e4c,#147159);font-size:18px; }.ai-empty>p { margin:0;color:var(--green);font-size:8px;font-weight:750;text-transform:uppercase;letter-spacing:1px; }.ai-empty h2 { margin:7px 0 7px;font-size:23px;letter-spacing:-.6px; }.ai-empty>span { max-width:570px;color:var(--muted);font-size:10px;line-height:1.65; }
.ai-chat-loading { min-height:100%;display:flex;align-items:center;justify-content:center;gap:9px;color:#718079;font-size:9px; }.ai-chat-loading i { width:18px;height:18px;border:2px solid #d8e5e0;border-top-color:var(--green);border-radius:50%;animation:spin .75s linear infinite; }
.ai-starter-grid { width:min(720px,100%);display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:25px;text-align:left; }.ai-starter-grid button { min-width:0;min-height:69px;display:grid;grid-template-columns:37px minmax(0,1fr) 16px;gap:10px;align-items:center;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);box-shadow:0 4px 15px rgba(25,42,62,.035); }.ai-starter-grid button:hover { border-color:#a6c8bc;background:#f9fcfb;transform:translateY(-1px); }.ai-starter-grid button>i { width:37px;height:37px;display:grid;place-items:center;border-radius:9px;color:var(--green);background:var(--green-soft); }.ai-starter-grid button>i .ui-icon { width:18px;height:18px; }.ai-starter-grid b,.ai-starter-grid small { display:block; }.ai-starter-grid b { font-size:10px; }.ai-starter-grid small { margin-top:2px;color:var(--muted);font-size:8px; }.ai-starter-grid button>.ui-icon { width:13px;height:13px;color:#9aa5b0; }
.ai-message { min-width:0;display:grid;grid-template-columns:32px minmax(0,1fr);gap:10px;margin-bottom:20px; }.ai-message>div:last-child { min-width:0; }.ai-message.user { max-width:720px;margin-left:auto; }.ai-message-avatar { width:32px;height:32px;display:grid;place-items:center;border-radius:9px;color:white;background:var(--green);font-size:9px;font-weight:750; }.ai-message.assistant .ai-message-avatar { background:linear-gradient(145deg,#193e4c,#147159);font-size:13px; }.ai-message.assistant.partial .ai-message-avatar { background:linear-gradient(145deg,#7a4b18,#d18b38); }.ai-message-meta { min-width:0;min-height:26px;display:flex;align-items:flex-start;gap:7px; }.ai-message-meta b { flex:0 0 auto;font-size:9px; }.ai-message-meta time,.ai-message-meta span { color:var(--muted);font-size:8px; }.ai-message-meta span { min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.ai-message-meta time { flex:0 0 auto;white-space:nowrap; }.ai-message-partial { flex:0 0 auto;padding:2px 5px;border-radius:999px;background:#fff1dc;color:#8a581e;font-size:7px;font-style:normal;font-weight:750;white-space:nowrap; }.ai-message-text { min-width:0;max-width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:4px 11px 11px 11px;overflow-wrap:anywhere;word-break:break-word;background:#fff;color:#344154;font-size:10px;line-height:1.7;box-shadow:0 4px 14px rgba(25,42,62,.035); }.ai-message-text pre,.ai-message-text table { display:block;max-width:100%;overflow-x:auto; }.ai-message.user .ai-message-text { border:0;border-radius:11px 4px 11px 11px;background:#e9f4ef;color:#27483d;box-shadow:none; }
.ai-markdown>:first-child { margin-top:0; }.ai-markdown>:last-child { margin-bottom:0; }.ai-markdown p { margin:0 0 9px; }
.ai-markdown :is(h1,h2,h3,h4,h5,h6) { margin:1.45em 0 .55em;color:#243747;font-weight:750;line-height:1.25;overflow-wrap:anywhere;letter-spacing:-.01em; }
.ai-markdown h1 { padding-bottom:.38em;border-bottom:1px solid #dce6e2;font-size:1.55em;font-weight:800;letter-spacing:-.025em; }
.ai-markdown h2 { padding-left:9px;border-left:3px solid #4f9079;font-size:1.34em;font-weight:780; }
.ai-markdown h3 { font-size:1.18em;font-weight:760; }
.ai-markdown h4 { font-size:1.06em;font-weight:750; }
.ai-markdown h5 { font-size:1em;font-weight:740;letter-spacing:.01em; }
.ai-markdown h6 { color:#657583;font-size:.95em;font-weight:730;letter-spacing:.025em; }
.ai-markdown ul,.ai-markdown ol { margin:7px 0 10px;padding-left:20px; }.ai-markdown li { margin:3px 0;padding-left:2px; }.ai-markdown blockquote { margin:9px 0;padding:7px 10px;border-left:3px solid #86aa9d;background:#f3f7f5;color:#52655e; }.ai-markdown blockquote p { margin:0; }.ai-markdown code { padding:1px 4px;border-radius:4px;background:#edf2f0;color:#315447;font:9px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; }.ai-markdown pre { margin:9px 0;padding:10px;border-radius:7px;background:#22313c;color:#eef5f2;white-space:pre;overflow-wrap:normal;word-break:normal; }.ai-markdown pre code { padding:0;background:transparent;color:inherit; }.ai-markdown hr { height:1px;margin:13px 0;border:0;background:#e0e6e9; }.ai-markdown a { color:#126b52;text-decoration:underline;text-underline-offset:2px; }.ai-markdown-image { color:#7b8793;font-style:italic; }
.ai-markdown-table { max-width:100%;margin:10px 0 13px;overflow-x:auto;border:1px solid #d3dee2;border-radius:8px;background:#fff;overscroll-behavior-inline:contain;scrollbar-width:thin; }
.ai-message-text .ai-markdown-table table { display:table;width:max-content;min-width:100%;overflow:visible;border-collapse:collapse;border-spacing:0;background:#fff;font-size:.96em;line-height:1.45;font-variant-numeric:tabular-nums; }
.ai-markdown-table th,.ai-markdown-table td { min-width:105px;max-width:270px;padding:8px 10px;border-right:1px solid #e2e8eb;border-bottom:1px solid #e2e8eb;vertical-align:top;text-align:left;overflow-wrap:anywhere;word-break:normal; }
.ai-markdown-table th:first-child,.ai-markdown-table td:first-child { min-width:170px; }.ai-markdown-table th:last-child,.ai-markdown-table td:last-child { border-right:0; }.ai-markdown-table tbody tr:last-child td { border-bottom:0; }
.ai-markdown-table th { background:#e9f2ee;color:#29473c;font-weight:780;line-height:1.4; }.ai-markdown-table tbody tr:nth-child(even) { background:#fafcfc; }.ai-markdown-table tbody tr:has(td:first-child strong) { background:#eef7f3;font-weight:700; }
.ai-markdown-table th.align-right,.ai-markdown-table td.align-right { text-align:right;white-space:nowrap; }.ai-markdown-table th.align-center,.ai-markdown-table td.align-center { text-align:center; }.ai-markdown-table th.align-left,.ai-markdown-table td.align-left { text-align:left; }.ai-markdown-table:focus { outline:2px solid rgba(18,107,82,.24);outline-offset:2px; }
.ai-message-files { display:flex;flex-wrap:wrap;gap:7px;margin:0 0 7px; }.ai-file-badge { min-width:0;max-width:270px;display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:8px;align-items:center;padding:7px 8px;border:1px solid #dfe5e9;border-radius:8px;background:#fff; }.ai-file-badge>i { width:28px;height:28px;display:grid;place-items:center;border-radius:6px;color:var(--green);background:var(--green-soft); }.ai-file-badge>i .ui-icon { width:15px;height:15px; }.ai-file-badge b,.ai-file-badge small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.ai-file-badge b { font-size:8px; }.ai-file-badge small { color:var(--muted);font-size:7px; }.ai-file-badge>button { width:20px;height:20px;display:grid;place-items:center;border:0;border-radius:5px;background:#f1f3f5;color:#7d8997; }.ai-file-badge>button .ui-icon { width:11px;height:11px; }
.ai-message-warnings { margin-top:8px;padding:10px 12px;border-left:3px solid #d29450;border-radius:5px;background:#fff7ed;color:#765536;font-size:8px;line-height:1.5; }.ai-message-warnings>b { display:block;margin-bottom:3px;font-size:9px; }.ai-message-warnings p { margin:3px 0; }
.ai-preflight { margin-top:10px;overflow:hidden;border:1px solid #dce5e8;border-radius:10px;background:#fff; }.ai-preflight>header { display:flex;align-items:center;gap:9px;padding:9px 11px;border-bottom:1px solid #e8edef;background:#f6f8f8; }.ai-preflight>header>span { width:29px;height:24px;display:grid;place-items:center;border-radius:5px;background:#233d4c;color:white;font-size:7px;font-weight:800;letter-spacing:.5px; }.ai-preflight>header b,.ai-preflight>header small { display:block; }.ai-preflight>header b { font-size:9px; }.ai-preflight>header small { color:var(--muted);font-size:7px; }.ai-preflight-row { display:grid;grid-template-columns:minmax(130px,1fr) 70px 70px 98px;gap:8px;align-items:center;padding:9px 11px;border-top:1px solid #edf1f3; }.ai-preflight-row:first-of-type { border-top:0; }.ai-preflight-row>div b,.ai-preflight-row>div small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.ai-preflight-row>div b { font-size:8px; }.ai-preflight-row>div small { color:var(--muted);font-size:7px; }.ai-preflight-row>span { color:#485768;text-align:right;font-size:8px; }.ai-preflight-row>em { padding:4px 6px;border-radius:9px;background:#fff1df;color:#9a602d;text-align:center;font-size:7px;font-style:normal;white-space:nowrap; }.ai-preflight-row>em.high { background:#eaf6f0;color:#247257; }
.ai-artifacts { margin-top:10px;overflow:hidden;border:1px solid #cfe1da;border-radius:10px;background:#fff; }.ai-artifacts>header { display:flex;align-items:center;gap:9px;padding:10px 12px;border-bottom:1px solid #e3ece8;background:#f3f9f6; }.ai-artifacts>header>span { width:26px;height:26px;display:grid;place-items:center;border-radius:7px;color:#fff;background:#2a8b67; }.ai-artifacts>header .ui-icon { width:13px;height:13px; }.ai-artifacts b,.ai-artifacts small { display:block; }.ai-artifacts b { font-size:9px; }.ai-artifacts small { margin-top:1px;color:var(--muted);font-size:7px; }.ai-artifacts>a { display:grid;grid-template-columns:30px minmax(0,1fr) 16px;gap:8px;align-items:center;padding:9px 12px;border-top:1px solid #edf1ef;color:var(--ink);text-decoration:none; }.ai-artifacts>a>span { min-width:0; }.ai-artifacts>a b,.ai-artifacts>a small { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.ai-artifacts>a:first-of-type { border-top:0; }.ai-artifacts>a:hover { background:#f8fbfa; }.ai-artifacts>a>i { width:30px;height:30px;display:grid;place-items:center;border-radius:7px;color:var(--green);background:var(--green-soft); }.ai-artifacts>a>i .ui-icon { width:15px;height:15px; }.ai-artifacts>a>.ui-icon { width:13px;height:13px;color:#7f8c99; }
.ai-typing { min-height:43px;display:flex;align-items:center;gap:5px;padding:0 13px;border:1px solid var(--line);border-radius:4px 11px 11px 11px;background:#fff;color:var(--muted);font-size:8px; }.ai-typing i { width:5px;height:5px;border-radius:50%;background:#5d927f;animation:typing 1.1s infinite; }.ai-typing i:nth-child(2){animation-delay:.15s}.ai-typing i:nth-child(3){animation-delay:.3s}.ai-typing span { margin-left:4px; }
.ai-composer { grid-row:4;min-width:0;width:min(850px,calc(100% - 32px));margin:0 auto 12px;padding:6px 8px 5px;border:1px solid #d9e0e5;border-radius:12px;overflow:hidden;background:#fff;box-shadow:0 8px 26px rgba(24,42,62,.085);transition:border-color .15s,box-shadow .15s; }.ai-composer:focus-within,.ai-composer.dragging { border-color:#78aa98;box-shadow:0 8px 26px rgba(24,79,61,.11),0 0 0 3px rgba(18,107,82,.07); }.ai-selected-files { min-width:0;display:flex;flex-wrap:nowrap;gap:6px;padding:0 0 6px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;overscroll-behavior-inline:contain; }.ai-selected-files .ai-file-badge { flex:0 0 min(220px,75vw);grid-template-columns:22px minmax(0,1fr) 18px;gap:6px;padding:4px 6px; }.ai-selected-files .ai-file-badge>i { width:22px;height:22px; }.ai-selected-files .ai-file-badge>i .ui-icon { width:13px;height:13px; }.ai-selected-files .ai-file-badge small { display:none; }.ai-selected-files .ai-file-badge>button { width:18px;height:18px; }.ai-composer-row { min-width:0;display:grid;grid-template-columns:32px 32px minmax(0,1fr) 34px;gap:6px;align-items:center; }.ai-composer-row textarea { height:34px;min-height:34px;max-height:34px;padding:8px 2px;border:0;outline:0;overflow-y:auto;resize:none;color:var(--ink);background:transparent;font:inherit;font-size:10px;line-height:1.45; }.ai-composer-row textarea::placeholder { color:#98a3af; }.ai-attach,.ai-drive-attach,.ai-send { width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:8px; }.ai-attach,.ai-drive-attach { color:#667485;background:#f1f4f5; }.ai-drive-attach { color:var(--green);background:#eaf4ef; }.ai-send { width:34px;height:34px;color:#fff;background:var(--green);box-shadow:0 4px 10px rgba(18,107,82,.2); }.ai-attach .ui-icon,.ai-drive-attach .ui-icon,.ai-send .ui-icon { width:15px;height:15px; }.ai-send:disabled { opacity:.45; }.ai-composer>footer { min-width:0;display:flex;justify-content:space-between;gap:8px;padding:4px 2px 0;overflow:hidden;color:#909ba6;font-size:7px;line-height:1.2; }.ai-composer>footer span { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.ai-composer>footer span:last-child { flex:1;text-align:right; }.ai-composer.has-files>footer { display:none; }
@keyframes typing { 0%,60%,100%{transform:translateY(0);opacity:.45}30%{transform:translateY(-3px);opacity:1} }@keyframes pulse { 50%{opacity:.25} }

.login-page { min-height: 100vh; background: #f8f2e8; }.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; }.login-story { min-height: 100vh; display: flex; flex-direction: column; padding: 42px 56px; overflow: hidden; position: relative; color: white; background: linear-gradient(145deg, #061f36 0%, #092f4f 62%, #164b6a 100%); }.login-story:before,.login-story:after { content:"";position:absolute;border:1px solid rgba(228,201,120,.18);border-radius:50%; }.login-story:before{width:520px;height:520px;right:-230px;top:8%}.login-story:after{width:340px;height:340px;right:-120px;top:21%}.login-brand,.mobile-login-brand { display:flex;align-items:center;gap:10px;color:inherit;text-decoration:none;font-size:17px; }.login-copy { position:relative;z-index:1;margin:auto 0;max-width:500px; }.eyebrow { color:#d8b65f;font-size:9px;font-weight:750;text-transform:uppercase;letter-spacing:1.2px; }.login-copy h1 { margin:14px 0 18px;font-size:46px;line-height:1.08;letter-spacing:-1.7px; }.login-copy>p { max-width:440px;margin:0;color:#e9e1d3;font-size:13px;line-height:1.7; }.login-features { position:relative;z-index:1;display:flex;gap:9px;flex-wrap:wrap;margin-bottom:35px; }.login-features span { padding:9px 12px;border:1px solid rgba(228,201,120,.22);border-radius:8px;background:rgba(255,255,255,.06);font-size:9px; }.login-features i { margin-right:6px;color:#e4c978;font-style:normal;font-size:13px; }.login-story>small { color:rgba(255,255,255,.58);font-size:8px; }.login-panel { display:grid;place-items:center;padding:40px;background:radial-gradient(circle at 75% 18%,rgba(212,173,87,.11),transparent 30%),#fffdf9; }.login-card { width:min(390px,100%);padding:30px;border:1px solid #eadfc9;border-radius:16px;background:rgba(255,255,255,.82);box-shadow:0 18px 50px rgba(9,47,79,.09); }.mobile-login-brand { display:none;color:var(--ink);margin-bottom:48px; }.login-card>h2 { margin:7px 0 5px;font-size:27px;letter-spacing:-.7px; }.login-help { margin:0 0 25px;color:var(--muted);font-size:10px; }.login-card>label,.login-card form>label { display:grid;gap:7px;margin-top:15px;color:#4c5969;font-size:9px;font-weight:700; }.login-card input { width:100%;height:45px;padding:0 13px;border:1px solid #ded4c2;border-radius:8px;outline:0;background:white;color:var(--ink);font-size:12px;font-weight:400; }.login-card input:focus { border-color:#d4ad57;box-shadow:0 0 0 3px rgba(212,173,87,.14); }.password-field { position:relative; }.password-field input { padding-right:75px; }.password-field button { position:absolute;right:6px;top:6px;height:33px;padding:0 9px;border:0;border-radius:6px;background:var(--bg);color:var(--navy);font-size:8px;font-weight:700; }.login-submit { width:100%;height:46px;margin-top:22px;border:1px solid #123f61;border-radius:8px;background:var(--navy);color:white;font-size:11px;font-weight:750;box-shadow:0 8px 18px rgba(9,47,79,.2);cursor:pointer; }.login-submit:hover { background:#123f61; }.login-submit:disabled { opacity:.6;cursor:wait; }.login-note { margin:17px 0 0;text-align:center;color:var(--muted);font-size:8px;line-height:1.55; }.login-error { margin:16px 0 -2px;padding:10px 12px;border:1px solid #efc4c4;border-radius:7px;background:#fff1f1;color:#9e3737;font-size:9px; }
.login-brand,.mobile-login-brand { gap:0;font-size:0; }.login-brand-logo { display:block;width:182px;height:auto; }.mobile-login-brand .login-brand-logo { width:175px; }
.login-sso { display:flex;align-items:center;justify-content:center;text-decoration:none; }.login-security-note { margin:18px 0 0;padding-top:15px;border-top:1px solid #eadfc9;color:var(--muted);font-size:8px;line-height:1.55;text-align:center; }

.admin-summary { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px; }.admin-summary article { display:flex;align-items:baseline;gap:9px;padding:16px 18px;border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:var(--shadow); }.admin-summary b { color:var(--navy);font-size:24px; }.admin-summary span { color:var(--muted);font-size:9px; }.admin-section { overflow:hidden; }.onboarding-section { margin-bottom:16px; }.admin-section>header { display:flex;justify-content:space-between;padding:15px 18px;border-bottom:1px solid var(--line); }.admin-section>header div { display:grid;gap:3px; }.admin-section>header b { font-size:11px; }.admin-section>header small { color:var(--muted);font-size:8px; }.admin-user-row { display:grid;grid-template-columns:34px minmax(170px,1.4fr) minmax(90px,.6fr) minmax(120px,.7fr) auto;gap:12px;align-items:center;padding:12px 18px;border-bottom:1px solid var(--line); }.admin-user-row:last-child { border-bottom:0; }.admin-user-row.disabled { opacity:.68;background:#faf7f1; }.admin-user-row .avatar { width:32px;height:32px;font-size:9px; }.admin-user-main,.admin-security { min-width:0;display:grid;gap:3px; }.admin-user-main b { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px; }.admin-user-main small,.admin-security small { overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:8px; }.admin-role { width:max-content;padding:5px 8px;border:1px solid rgba(212,173,87,.34);border-radius:999px;background:rgba(212,173,87,.1);color:var(--navy);font-size:8px;font-weight:700; }.admin-security b { color:#257457;font-size:9px; }.admin-user-row.disabled .admin-security b { color:#a14848; }.admin-user-actions { display:flex;gap:6px; }.admin-user-actions button { min-height:32px;padding:0 9px;font-size:8px; }.danger-button { min-height:34px;padding:0 12px;border:1px solid #e5bcbc;border-radius:7px;background:#fff3f3;color:#9e3737;font-size:9px;font-weight:700; }.modal select { width:100%;height:42px;padding:0 10px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);font:inherit; }.form-note { margin:14px 0 0;padding:10px 12px;border-left:3px solid var(--gold);border-radius:5px;background:#fbf5e8;color:var(--muted);font-size:8px;line-height:1.55; }.temporary-access { display:grid;gap:12px; }.temporary-access>p { margin:0;color:var(--muted);font-size:9px;line-height:1.55; }.temporary-access label { display:grid;gap:5px;color:var(--muted);font-size:8px;font-weight:700; }.temporary-access code { padding:11px 12px;border:1px solid var(--line);border-radius:7px;background:#f8f4ec;color:var(--navy);font:600 11px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;overflow-wrap:anywhere;user-select:all; }.security-callout { display:grid;gap:3px;padding:11px 12px;border:1px solid rgba(212,173,87,.35);border-radius:8px;background:rgba(212,173,87,.1); }.security-callout b { color:var(--navy);font-size:9px; }.security-callout span { color:var(--muted);font-size:8px; }
.profile-layout { display:grid;grid-template-columns:minmax(220px,.65fr) minmax(360px,1.35fr);gap:16px;align-items:start; }.profile-card { min-height:150px;display:flex;align-items:center;gap:16px;padding:24px;border:1px solid var(--line);border-radius:14px;background:linear-gradient(145deg,#082d4c,#124766);color:white;box-shadow:var(--shadow); }.profile-avatar { width:64px;height:64px;font-size:17px; }.profile-card h2 { margin:0 0 4px;font-size:18px; }.profile-card p { margin:0;color:#e8ddca;font-size:10px; }.profile-details { padding:0;overflow:hidden; }.profile-details>header { padding:17px 20px;border-bottom:1px solid var(--line); }.profile-details>header b,.profile-details>header small { display:block; }.profile-details>header small { margin-top:3px;color:var(--muted);font-size:8px; }.profile-details dl { margin:0; }.profile-details dl>div { display:grid;grid-template-columns:minmax(130px,.7fr) minmax(0,1.3fr);gap:16px;padding:13px 20px;border-top:1px solid #edf0f2; }.profile-details dl>div:first-child { border-top:0; }.profile-details dt { color:var(--muted);font-size:9px; }.profile-details dd { margin:0;color:var(--ink);font-size:10px;font-weight:650;overflow-wrap:anywhere; }.profile-security { grid-column:1/-1; }.profile-security .secondary-button { justify-self:start;margin-top:7px;text-decoration:none; }

.telegram-login { width:100%;height:47px;display:flex;align-items:center;justify-content:center;gap:10px;margin:18px 0 0;border-radius:8px;background:#229ed9;color:white;text-decoration:none;font-size:11px;font-weight:750;box-shadow:0 8px 18px rgba(34,158,217,.18);transition:background .16s ease,transform .16s ease; }.telegram-login:hover { background:#168bc4;transform:translateY(-1px); }.telegram-login:focus-visible { outline:3px solid rgba(34,158,217,.25);outline-offset:2px; }.telegram-login svg { width:20px;height:20px;fill:currentColor; }.login-divider { display:flex;align-items:center;gap:10px;margin:19px 0 3px;color:#98a3af;font-size:8px;white-space:nowrap; }.login-divider:before,.login-divider:after { content:"";height:1px;flex:1;background:#e1e5e9; }

.editor-page { height:100vh;height:100dvh;overflow:hidden;background:#edf1f4;overscroll-behavior:none; }
.editor-shell { height:100vh;height:100dvh;display:grid;grid-template-columns:204px minmax(0,1fr); }
.editor-sidebar { min-height:0;display:flex;flex-direction:column;padding:max(20px,env(safe-area-inset-top,0px)) 13px max(14px,env(safe-area-inset-bottom,0px)) max(13px,env(safe-area-inset-left,0px));border-right:1px solid var(--line);background:#fff; }
.editor-brand { display:flex;align-items:center;padding:0 7px 22px;color:var(--ink);text-decoration:none; }
.editor-brand .brand-lockup { width:158px; }
.editor-nav { display:grid;gap:4px; }
.editor-nav-link { min-height:39px;display:flex;align-items:center;gap:11px;padding:0 11px;border-radius:8px;color:#657184;text-decoration:none;font-size:11px; }
.editor-nav-link span { width:19px;text-align:center;color:#778497;font-size:17px;font-weight:400; }
.editor-nav-link b { font-weight:620; }
.editor-nav-link:hover { background:#f4f7f6; }
.editor-nav-link.active { color:var(--green);background:var(--green-soft); }
.editor-nav-link.active span { color:var(--green); }
.editor-user { min-width:0;display:grid;grid-template-columns:34px minmax(0,1fr);gap:9px;align-items:center;margin-top:auto;padding:14px 7px 0;border-top:1px solid var(--line); }
.editor-user .avatar { width:34px;height:34px; }
.editor-user span:last-child { min-width:0; }
.editor-user b,.editor-user small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.editor-user b { font-size:10px; }.editor-user small { margin-top:1px;color:var(--muted);font-size:8px; }
.editor-workspace { min-width:0;height:100vh;height:100dvh;display:grid;grid-template-rows:calc(64px + env(safe-area-inset-top,0px)) minmax(0,1fr); }
.editor-header { min-width:0;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:env(safe-area-inset-top,0px) max(18px,env(safe-area-inset-right,0px)) 0 18px;border-bottom:1px solid var(--line);background:#fff;box-shadow:0 2px 10px rgba(31,48,67,.04); }
.editor-file { min-width:0;display:flex;align-items:center;gap:10px; }
.editor-back { width:31px;height:31px;display:grid;place-items:center;flex:0 0 auto;border:1px solid var(--line);border-radius:8px;color:#5f6d7e;text-decoration:none;font-size:16px; }
.editor-back .ui-icon { width:16px;height:16px; }
.editor-back:hover { color:var(--green);border-color:#b8d3ca;background:#f3f8f6; }
.editor-file-icon { width:31px;height:35px;display:grid;place-items:center;flex:0 0 auto;border-radius:5px 5px 8px 5px;background:#25845f;color:white;font-size:10px;font-weight:800; }
.editor-file-icon .ui-icon { width:18px;height:18px; }
.editor-file-name { min-width:0; }
.editor-file-name b,.editor-file-name small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.editor-file-name b { max-width:360px;font-size:11px; }.editor-file-name small { margin-bottom:1px;color:var(--muted);font-size:8px; }
.editor-actions { display:flex;align-items:center;gap:12px;flex:0 0 auto; }
.editor-mode { color:#657184;font-size:9px; }
.editor-share { min-height:34px;display:inline-flex;align-items:center;gap:7px;padding:0 11px;border:1px solid #a9cbbf;border-radius:8px;background:#f2f8f5;color:var(--green);font-size:9px;font-weight:700;cursor:pointer; }
.editor-share:hover { border-color:#74a994;background:#e9f4ef; }.editor-share .ui-icon { width:14px;height:14px; }
.editor-save-status { min-width:0;display:flex;align-items:center;gap:6px;padding:7px 9px;border-radius:7px;background:#f1f4f6;color:#657184;font-size:8px;font-weight:650;transition:color .15s ease,background-color .15s ease; }
.editor-save-status>span { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.editor-save-status i { width:6px;height:6px;flex:0 0 auto;border-radius:50%;background:#8693a1;box-shadow:0 0 0 3px rgba(134,147,161,.12); }
.editor-save-status.ready,.editor-save-status.saved { background:#edf7f2;color:#247157; }
.editor-save-status.ready i,.editor-save-status.saved i { background:#2c9b6f;box-shadow:0 0 0 3px rgba(44,155,111,.12); }
.editor-save-status.saving,.editor-save-status.warning { background:#fff6e3;color:#795a1f; }
.editor-save-status.saving i,.editor-save-status.warning i { background:#cf9934;box-shadow:0 0 0 3px rgba(207,153,52,.14); }
.editor-save-status.error { background:#fff0f0;color:#a94343; }
.editor-save-status.error i { background:#bd4c4c;box-shadow:0 0 0 3px rgba(189,76,76,.13); }
.editor-close { display:inline-flex;align-items:center;justify-content:center;padding:8px 11px;border:1px solid #dce3e8;border-radius:7px;color:#4f5e70;text-decoration:none;font-size:9px;font-weight:650; }
.editor-close:hover { border-color:#aecbc1;color:var(--green);background:#f5faf8; }
.editor-canvas { min-width:0;min-height:0;position:relative;padding:8px max(8px,env(safe-area-inset-right,0px)) max(8px,env(safe-area-inset-bottom,0px)) 8px;background:#dfe5e8; }
.editor-page #onlyoffice-editor { width:100%;height:100%;overflow:hidden;background:white;box-shadow:0 2px 10px rgba(31,48,67,.08); }
.editor-loading { position:absolute;top:8px;right:max(8px,env(safe-area-inset-right,0px));bottom:max(8px,env(safe-area-inset-bottom,0px));left:8px;z-index:2;display:grid;place-content:center;justify-items:center;gap:12px;padding:24px;background:#fff;color:#667487;text-align:center;font-size:10px;transition:opacity .2s ease,visibility .2s ease; }
.editor-loading i { width:26px;height:26px;border:3px solid #dfe9e5;border-top-color:var(--green);border-radius:50%;animation:spin .8s linear infinite; }
.editor-loading.hidden { opacity:0;visibility:hidden;pointer-events:none; }.editor-loading.failed i { display:none; }.editor-loading.failed span { max-width:420px;color:#a94343;line-height:1.6; }
.share-modal { width:min(560px,100%); }.share-modal fieldset { display:grid;gap:9px;margin:0;padding:0;border:0; }.share-modal legend { margin-bottom:8px;color:#4c5a6b;font-size:9px;font-weight:700; }
.share-access-option { min-width:0;display:grid !important;grid-template-columns:20px minmax(0,1fr);gap:11px !important;align-items:center;min-height:66px;padding:11px 13px;border:1px solid #dbe2e7;border-radius:10px;background:#fff;cursor:pointer; }
.share-access-option:hover { border-color:#a9cbbf;background:#f8fbfa; }.share-access-option.selected { border-color:#72aa95;background:#eff7f3;box-shadow:0 0 0 2px rgba(18,107,82,.06); }
.share-access-option input[type="radio"] { appearance:none;width:18px;height:18px;margin:0;padding:0;border:1px solid #aebbb6;border-radius:50%;background:#fff;box-shadow:none; }
.share-access-option input[type="radio"]:checked { border:5px solid var(--green); }.share-access-option input[type="radio"]:focus-visible { outline:3px solid rgba(18,107,82,.16);outline-offset:2px; }
.share-access-option b,.share-access-option small { display:block; }.share-access-option b { color:var(--ink);font-size:10px; }.share-access-option small { margin-top:3px;color:var(--muted);font-size:8px;font-weight:400;line-height:1.45; }
.share-link-box { display:grid;gap:7px;margin-top:14px;padding:12px;border:1px solid #d8e6e1;border-radius:10px;background:#f7faf9; }.share-link-box>label { color:#466458;font-size:9px;font-weight:700; }.share-link-box>div { min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px; }.share-link-box input { min-width:0;height:39px;background:#fff;font-size:9px; }.share-link-box button { min-width:104px; }.share-link-box>small { color:#6f7d77;font-size:8px;line-height:1.45; }
.share-link-pending { margin-top:14px;padding:11px 12px;border:1px dashed #b9ccc5;border-radius:9px;background:#f8fbfa;color:#6e7e78;font-size:8px; }.share-error { margin:12px 0 0;padding:9px 11px;border:1px solid #efcaca;border-radius:8px;background:#fff3f3;color:#994747;font-size:9px; }
.share-loading { min-height:160px;display:grid;place-content:center;justify-items:center;gap:10px;color:#728079;font-size:9px; }.share-loading i { width:23px;height:23px;border:2px solid #d9e5e0;border-top-color:var(--green);border-radius:50%;animation:spin .75s linear infinite; }
#editor-toast-root { position:fixed;right:22px;bottom:22px;z-index:60;display:grid;gap:8px; }
.public-share-page { height:100vh;margin:0;overflow:hidden;background:#e1e6e9; }.public-share-shell { height:100vh;display:grid;grid-template-rows:58px minmax(0,1fr); }.public-share-header { min-width:0;display:flex;align-items:center;gap:14px;padding:0 18px;border-bottom:1px solid var(--line);background:#fff;box-shadow:0 2px 10px rgba(31,48,67,.05); }.public-share-header>img { width:142px;height:auto;flex:0 0 auto; }.public-share-file { min-width:0;display:block;padding-left:14px;border-left:1px solid var(--line); }.public-share-file b,.public-share-file small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.public-share-file b { max-width:480px;color:var(--ink);font-size:10px; }.public-share-file small { margin-bottom:1px;color:var(--muted);font-size:7px; }.public-view-badge { margin-left:auto;padding:7px 10px;border-radius:7px;background:#edf7f2;color:#247157;font-size:8px;font-weight:700;white-space:nowrap; }.public-share-canvas { min-width:0;min-height:0;position:relative;padding:7px; }.public-share-canvas #onlyoffice-editor { width:100%;height:100%;overflow:hidden;background:#fff;box-shadow:0 2px 10px rgba(31,48,67,.08); }.public-share-canvas .editor-loading { inset:7px; }
.public-share-unavailable { min-height:100vh;display:grid;place-content:center;justify-items:center;padding:28px;text-align:center;background:#fff; }.public-share-unavailable>img { width:170px;height:auto;margin-bottom:48px; }.public-share-unavailable>span { width:48px;height:48px;display:grid;place-items:center;border-radius:15px;background:#f7eded;color:#a84b4b; }.public-share-unavailable .ui-icon { width:23px;height:23px; }.public-share-unavailable h1 { margin:16px 0 7px;color:var(--ink);font-size:24px; }.public-share-unavailable p { max-width:420px;margin:0;color:var(--muted);font-size:10px;line-height:1.6; }
@keyframes spin { to { transform:rotate(360deg); } }

@media (max-width: 1050px) {
  .mail-workspace { grid-template-columns: 135px 300px 1fr; }.files-table-head,.files-table-row{grid-template-columns:minmax(220px,2fr) 110px 80px 34px}.files-table-head>span:nth-child(2),.files-table-row>span:nth-child(2){display:none}
}
@media (max-width: 800px) {
  .mail-workspace { grid-template-columns: 105px 1fr; }.mail-reader { display:none; }.mail-reader.has-message { position:fixed;inset:64px 0 64px 74px;z-index:10;display:block;background:white; }.trash-row{grid-template-columns:minmax(210px,1fr) minmax(130px,.7fr) auto}.trash-path{display:none}.login-layout{grid-template-columns:1fr}.login-story{display:none}.login-panel{min-height:100vh}.mobile-login-brand{display:flex}.editor-shell{grid-template-columns:64px minmax(0,1fr)}.editor-sidebar{padding:17px 8px 12px}.editor-brand{justify-content:center;padding:0 0 20px}.editor-brand .brand-lockup{display:none}.editor-brand .brand-emblem{display:block}.editor-nav-link>b,.editor-user>span:last-child{display:none}.editor-nav-link{justify-content:center;padding:0}.editor-nav-link span{width:auto}.editor-user{display:flex;justify-content:center;padding:13px 0 0}.editor-mode{display:none}.editor-file-name b{max-width:230px}
}
@media (max-width: 620px) {
  .page-heading{align-items:flex-start}.page-heading h1{font-size:22px}.page-heading>div:first-child>span{max-width:220px}.page-actions .secondary-button{display:none}.files-table-head{display:none}.files-table-row{grid-template-columns:1fr 30px;min-height:68px;padding:0 12px}.files-table-row>span{display:none}.activity-summary{padding:0 14px}.activity-summary>span{display:none}.activity-row{grid-template-columns:34px minmax(0,1fr);gap:10px;padding:10px 14px}.activity-row time{grid-column:2;margin-top:-5px}.activity-glyph{width:34px;height:34px}.trash-row{grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:11px 13px}.trash-meta{grid-column:1}.trash-restore{grid-column:2;grid-row:1 / span 2;min-width:38px;width:38px;padding:0}.trash-restore span{display:none}.mail-workspace{grid-template-columns:1fr;min-height:calc(100vh - 190px)}.mail-folders{display:none}.mail-list{border:0}.mail-reader.has-message{inset:64px 0 64px 0}.create-options{grid-template-columns:1fr}.modal{padding:19px}.login-panel{padding:26px}.mobile-login-brand{margin-bottom:60px}.editor-shell{grid-template-columns:1fr}.editor-sidebar{display:none}.editor-workspace{grid-template-rows:58px minmax(0,1fr)}.editor-header{padding:0 9px;gap:8px}.editor-file{gap:7px}.editor-file-icon,.editor-mode,.editor-save-status{display:none}.editor-file-name b{max-width:120px}.editor-file-name small{font-size:7px}.editor-share{width:34px;padding:0;justify-content:center}.editor-share span{display:none}.editor-close{padding:7px 8px;font-size:0}.editor-close:after{content:"Закрыть";font-size:8px}.editor-canvas{padding:4px}.editor-loading{inset:4px}.share-link-box>div{grid-template-columns:1fr}.share-link-box button{width:100%}.public-share-header{gap:9px;padding:0 10px}.public-share-header>img{width:105px}.public-share-file{padding-left:9px}.public-share-file b{max-width:125px}.public-view-badge{padding:6px 7px}.public-share-canvas{padding:4px}.public-share-canvas .editor-loading{inset:4px}
}

/* Keep AI responsive overrides last: the AI workspace rules are defined after the portal's first mobile block. */
@media (max-width: 1100px) {
  .ai-chat>header{padding-inline:20px}.ai-chat-tools .ai-status{display:none}.ai-quality>span{display:none}.ai-preflight-row{grid-template-columns:minmax(0,1fr) 55px 55px 78px}.ai-preflight-row>div{min-width:0}
}
@media (max-width: 900px) {
  .ai-workspace{grid-template-columns:205px minmax(0,1fr)}.ai-panel{padding-inline:13px}.ai-chat>header{padding-inline:18px}.ai-conversation{padding-inline:24px}.ai-composer{width:calc(100% - 40px)}
}
@media (max-width: 800px) {
  .ai-workspace{height:100%;min-height:0;grid-template-columns:1fr}.ai-panel{display:none}.ai-chat{height:100%}.ai-chat>header{min-height:61px;padding:0 12px}.ai-chat>header h1{font-size:14px}.ai-chat-tools{gap:5px}.ai-quality{padding-left:5px}.ai-quality>span{display:none}.ai-status{max-width:115px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai-setup-banner{width:calc(100% - 24px);margin-top:10px}.ai-conversation{padding:19px 12px 12px}.ai-empty h2{font-size:19px}.ai-empty>span{font-size:9px}.ai-starter-grid{grid-template-columns:1fr;gap:7px;margin-top:18px}.ai-starter-grid button{min-height:61px}.ai-message{grid-template-columns:28px minmax(0,1fr);gap:7px}.ai-message-avatar{width:28px;height:28px}.ai-composer{width:calc(100% - 20px);margin-bottom:8px}.ai-composer>footer span:last-child{display:none}.ai-file-badge{max-width:100%}.ai-preflight-row{grid-template-columns:minmax(0,1fr) 55px 55px}.ai-preflight-row>em{display:none}
}
@media (max-width: 620px) {
  .ai-view{overflow:hidden}.ai-view .content{height:calc(100vh - 64px);height:calc(100dvh - 64px);padding:0}
}
@media (max-height: 650px) {
  .ai-panel{padding-block:12px 10px}.ai-panel-head{padding-bottom:12px}.ai-new-chat{margin:12px 0}.ai-panel-note{display:none}.ai-chat>header{min-height:58px}.ai-conversation{padding-block:14px 8px}.ai-composer{margin-bottom:8px}.ai-composer>footer{display:none}
}

/* Persistent AI Helper chats, jobs and notifications. */
.notification-badge { position:absolute;top:-5px;right:-6px;min-width:17px;height:17px;display:grid;place-items:center;padding:0 4px;border:2px solid #fff;border-radius:10px;background:#d85151;color:#fff;font-size:8px;font-weight:800;line-height:1;box-shadow:0 2px 6px rgba(111,30,30,.22); }
.ai-panel-close,.ai-mobile-history { display:none; }
.ai-history-heading { display:flex;align-items:center;justify-content:space-between;padding:0 7px 8px;color:#8a96a5; }
.ai-history-heading p { margin:0;font-size:8px;font-weight:750;text-transform:uppercase;letter-spacing:.8px; }
.ai-history-heading span { min-width:20px;padding:3px 6px;border-radius:9px;background:#e8eeeb;color:#66746c;text-align:center;font-size:7px;font-weight:750; }
.ai-chat-list { min-height:0;display:grid;align-content:start;gap:4px;margin:0 -5px 14px;padding:0 5px;overflow-y:auto;scrollbar-width:thin;scrollbar-gutter:stable; }
.ai-history-row { position:relative;min-width:0;min-height:51px;display:grid;grid-template-columns:12px minmax(0,1fr) auto;gap:8px;align-items:center;padding:7px 8px;border:1px solid transparent;border-radius:8px;background:transparent;color:#536173;text-align:left;cursor:pointer; }
.ai-history-row:hover { background:#f0f5f2; }
.ai-history-row.active { border-color:#cfe1da;background:#eaf4ef;color:#24483b; }
.ai-history-row>span:nth-child(2) { min-width:0; }
.ai-history-row b,.ai-history-row small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.ai-history-row b { color:inherit;font-size:9px; }
.ai-history-row small { margin-top:3px;color:#87938f;font-size:7px;font-weight:400; }
.ai-history-row time { align-self:start;margin-top:2px;color:#96a19d;font-size:7px;white-space:nowrap; }
.ai-history-state { width:9px;height:9px;display:grid;place-items:center; }
.ai-history-state i { width:6px;height:6px;border-radius:50%;background:#aab4b0; }
.ai-history-row.running .ai-history-state i { background:#d99843;box-shadow:0 0 0 3px rgba(217,152,67,.13);animation:pulse 1s ease infinite; }
.ai-history-row.failed .ai-history-state i { background:#cc5757; }
.ai-history-row.partial .ai-history-state i { background:#d18b38;box-shadow:0 0 0 3px rgba(209,139,56,.13); }
.ai-history-row.unread .ai-history-state i { background:#2d9a70;box-shadow:0 0 0 3px rgba(45,154,112,.12); }
.ai-history-empty { min-height:90px;display:grid;place-content:center;justify-items:center;gap:5px;color:#87938f;text-align:center;font-size:8px; }
.ai-history-empty i { width:16px;height:16px;border:2px solid #d3dfda;border-top-color:var(--green);border-radius:50%;animation:spin .8s linear infinite; }
.ai-history-empty small { color:#a0aaa6;font-size:7px; }
.ai-chat-heading { min-width:0;display:flex;align-items:center;gap:9px; }.ai-chat-heading>div { min-width:0; }
.ai-chat-heading>div,#ai-chat-billing-slot { max-width:100%; }
.ai-chat-usage-total { display:block;max-width:100%;margin-top:2px;overflow:hidden;color:#82908a;font-size:8px;font-weight:500;line-height:1.25;text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums; }
.ai-inline-bell { position:relative;width:32px;height:32px;display:grid;place-items:center;flex:0 0 auto;border:1px solid var(--line);border-radius:8px;background:#fff;color:#657386;cursor:pointer; }
.ai-inline-bell:hover { color:var(--green);border-color:#b5d0c6; }
.ai-inline-bell>.ui-icon { width:15px;height:15px; }
.ai-notification-permission { height:32px;display:flex;align-items:center;gap:6px;padding:0 9px;border:1px solid var(--line);border-radius:7px;background:#fff;color:#647283;font-size:8px;white-space:nowrap;cursor:pointer; }
.ai-notification-permission:hover { color:var(--green);border-color:#b5d0c6; }
.ai-notification-permission.granted { color:#287159;border-color:#cde1d9;background:#f0f8f4; }
.ai-notification-permission.unsupported { opacity:.62;cursor:default; }
.ai-notification-permission>.ui-icon { width:13px;height:13px; }
.ai-job-card { display:grid;grid-template-columns:32px minmax(0,1fr);gap:10px;margin-bottom:24px;padding:12px 14px;border:1px solid #cfe0da;border-radius:11px;background:#f5faf8;color:#52635d; }.ai-job-card>div:last-child { min-width:0; }
.ai-job-icon { width:32px;height:32px;display:grid;place-items:center;border-radius:9px;background:#e1f0ea; }
.ai-job-icon i { width:9px;height:9px;border-radius:50%;background:#298b68;box-shadow:0 0 0 4px rgba(41,139,104,.12);animation:pulse 1s ease infinite; }
.ai-job-head { display:flex;justify-content:space-between;gap:10px; }
.ai-job-head b { color:#29483d;font-size:9px; }
.ai-job-head time { color:#8c9893;font-size:7px;white-space:nowrap; }
.ai-job-card p { margin:3px 0 8px;color:#718079;font-size:8px; }
.ai-job-card small { display:block;margin-top:5px;color:#84908b;font-size:7px; }
.ai-message-usage { display:block;min-width:0;max-width:100%;margin:7px 2px 0;overflow:hidden;color:#87958f;font-size:8px;font-weight:500;line-height:1.35;text-align:right;text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums; }
.ai-history-row .ai-history-usage { margin-top:3px;color:#607d72;font-size:7px;font-weight:600;font-variant-numeric:tabular-nums; }
.ai-job-progress,.ai-upload-progress { height:5px;overflow:hidden;border-radius:4px;background:#dfeae6; }
.ai-job-progress i,.ai-upload-progress i { display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#197454,#43a680);transition:width .2s ease; }
.ai-job-progress.indeterminate i { width:38% !important;animation:ai-job-slide 1.35s ease-in-out infinite; }
.ai-upload-status { margin:0 2px 9px;padding:9px 10px;border:1px solid #d5e4de;border-radius:8px;background:#f5faf8; }
.ai-upload-status>div:first-child { display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px;color:#52635d;font-size:8px; }
.ai-upload-status button { margin-top:7px;padding:0;border:0;background:transparent;color:#9a5a4b;font-size:7px;cursor:pointer; }
.ai-file-badge[href] { color:var(--ink);text-decoration:none; }
.ai-file-badge[href]:hover { border-color:#a9c9bd;background:#f8fbfa; }
@keyframes ai-job-slide { 0%{transform:translateX(-105%)}50%{transform:translateX(85%)}100%{transform:translateX(265%)} }

@media (max-width: 1120px) {
  .ai-notification-permission span { display:none; }
  .ai-notification-permission { width:32px;justify-content:center;padding:0; }
}
@media (max-width: 800px) {
  .ai-mobile-history { width:32px;height:32px;display:grid;place-items:center;flex:0 0 auto;border:1px solid var(--line);border-radius:8px;background:#fff;color:#637181; }
  .ai-mobile-history>.ui-icon { width:15px;height:15px; }
  .ai-workspace.history-open:after { content:"";position:absolute;inset:0;z-index:34;background:rgba(20,31,43,.35); }
  .ai-workspace.history-open .ai-panel { position:absolute;inset:0 auto 0 0;z-index:35;width:min(300px,86vw);display:flex;box-shadow:12px 0 34px rgba(20,31,43,.22); }
  .ai-panel-close { width:29px;height:29px;display:grid;place-items:center;margin-left:auto;border:0;border-radius:7px;background:#edf2ef;color:#607067; }
  .ai-panel-close>.ui-icon { width:14px;height:14px; }
  .ai-chat-tools .ai-notification-permission { display:none; }
  .ai-chat-tools .ai-status { display:none; }
  .ai-chat-heading { min-width:0; }
  .ai-chat-heading>div { min-width:0; }
  .ai-chat-heading h1 { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  .ai-chat-usage-total { font-size:8px; }
  .ai-message-usage { margin-top:6px;font-size:9px; }
  .ai-history-row .ai-history-usage { font-size:8px; }
  .ai-job-card { padding:10px; }
  .notification-badge { top:-6px;right:-7px; }
}

/* Fast, calm motion for the AI workspace. */
.ai-view {
  --ai-motion-fast: 140ms;
  --ai-motion-content: 190ms;
  --ai-ease-out: cubic-bezier(.22, 1, .36, 1);
}
.ai-new-chat,
.ai-starter-grid button,
.ai-history-row,
.ai-mobile-history,
.ai-panel-close,
.ai-inline-bell,
.ai-notification-permission,
.ai-attach,
.ai-send,
.ai-file-badge>button {
  transition: color var(--ai-motion-fast) ease, background-color var(--ai-motion-fast) ease, border-color var(--ai-motion-fast) ease, opacity var(--ai-motion-fast) ease, transform var(--ai-motion-fast) var(--ai-ease-out), box-shadow var(--ai-motion-fast) ease;
}
.ai-view :where(button, select, a[href], [tabindex]):focus-visible {
  outline: 2px solid rgba(18,107,82,.62);
  outline-offset: 2px;
}
.ai-new-chat:disabled,
.ai-history-row:disabled,
.ai-attach:disabled,
.ai-send:disabled {
  opacity: .48;
  box-shadow: none;
}
.ai-history-row:disabled { cursor: progress; }
.ai-conversation-content { min-height:100%;display:flex;flex-direction:column; }
.ai-message-list { min-height:0;flex:1 0 auto; }
.ai-job-slot:empty { display:none; }
.ai-conversation-content.is-entering { animation: ai-chat-enter var(--ai-motion-content) var(--ai-ease-out) both; }
.ai-message.local { animation: ai-message-enter var(--ai-motion-content) var(--ai-ease-out) both; }
.ai-message-text { font-size: 12px; line-height: 1.65; }
.ai-message-meta b { font-size: 10px; }
.ai-message-meta time,.ai-message-meta span { font-size: 9px; }
.ai-history-row b { font-size: 10px; }
.ai-history-row small,.ai-history-row time { font-size: 8px; }
.ai-composer-row { align-items: end; }
.ai-composer-row textarea { height: 34px; min-height: 34px; max-height: 120px; font-size: 12px; }
.ai-chat-error { min-height:100%;display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:11px;place-content:center;align-items:center;padding:24px;color:#667281; }
.ai-chat-error>i { width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:#faecec;color:#ae4b4b;font-style:normal; }
.ai-chat-error>i .ui-icon { width:18px;height:18px; }
.ai-chat-error b,.ai-chat-error span { display:block; }
.ai-chat-error b { color:#344154;font-size:11px; }
.ai-chat-error span { margin-top:2px;font-size:9px; }
.ai-chat-error button { height:34px;padding:0 12px;border:1px solid #c8d8d2;border-radius:8px;background:#fff;color:var(--green);font-size:9px;font-weight:700; }

@media (hover: hover) and (pointer: fine) {
  .ai-new-chat:hover:not(:disabled),.ai-send:hover:not(:disabled) { background-color:#0f5d47;box-shadow:0 7px 16px rgba(18,107,82,.22);transform:translateY(-1px); }
  .ai-attach:hover:not(:disabled),.ai-mobile-history:hover,.ai-panel-close:hover,.ai-inline-bell:hover { border-color:#a6c8bc;background-color:#f4faf7;color:var(--green); }
  .ai-history-row:hover:not(:disabled),.ai-starter-grid button:hover { transform:translateY(-1px); }
  .ai-markdown-table tbody tr:hover { background:#f3f8f6; }
}
.ai-new-chat:active:not(:disabled),.ai-starter-grid button:active:not(:disabled),.ai-history-row:active:not(:disabled),.ai-attach:active:not(:disabled),.ai-send:active:not(:disabled) { transform:scale(.97); }

@keyframes ai-chat-enter { from { opacity:0;transform:translate3d(0,7px,0); } }
@keyframes ai-message-enter { from { opacity:0;transform:translate3d(0,5px,0); } }

@media (max-width: 800px) {
  .ai-panel { position:absolute;inset:0 auto 0 0;z-index:35;width:min(300px,86vw);display:flex;visibility:hidden;pointer-events:none;transform:translate3d(-104%,0,0);box-shadow:12px 0 34px rgba(20,31,43,0);transition:transform 200ms var(--ai-ease-out),box-shadow 200ms ease,visibility 0s linear 200ms; }
  .ai-workspace::after { content:"";position:absolute;inset:0;z-index:34;visibility:hidden;pointer-events:none;opacity:0;background:rgba(20,31,43,.35);transition:opacity 180ms ease,visibility 0s linear 180ms; }
  .ai-workspace.history-open::after { visibility:visible;pointer-events:auto;opacity:1;transition-delay:0s; }
  .ai-workspace.history-open .ai-panel { visibility:visible;pointer-events:auto;transform:none;box-shadow:12px 0 34px rgba(20,31,43,.22);transition-delay:0s; }
  .ai-mobile-history,.ai-inline-bell,.ai-panel-close { width:40px;height:40px; }
  .ai-composer-row { grid-template-columns:38px minmax(0,1fr) 40px; }
  .ai-attach { width:38px;height:38px; }
  .ai-send { width:40px;height:40px; }
  .ai-message-text { font-size:13px;line-height:1.62; }
  .ai-markdown h1 { font-size:1.45em; }
  .ai-markdown h2 { font-size:1.28em; }
  .ai-markdown-table th,.ai-markdown-table td { min-width:96px;max-width:240px;padding:8px 9px; }
  .ai-markdown-table th:first-child,.ai-markdown-table td:first-child { position:sticky;left:0;z-index:1;min-width:145px;box-shadow:1px 0 0 #e2e8eb; }
  .ai-markdown-table thead th:first-child { z-index:2;background:#e9f2ee; }
  .ai-markdown-table tbody td:first-child { background:#fff; }
  .ai-markdown-table tbody tr:nth-child(even) td:first-child { background:#fafcfc; }
  .ai-markdown-table tbody tr:has(td:first-child strong) td:first-child { background:#eef7f3; }
  .ai-composer-row textarea { min-height:38px;font-size:13px; }
  .ai-chat-error { grid-template-columns:36px minmax(0,1fr); }
  .ai-chat-error button { grid-column:2;justify-self:start; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-conversation-content.is-entering,.ai-message.local { animation:none; }
  .ai-panel,.ai-workspace::after,.ai-new-chat,.ai-starter-grid button,.ai-history-row,.ai-mobile-history,.ai-panel-close,.ai-inline-bell,.ai-notification-permission,.ai-attach,.ai-send,.ai-file-badge>button,.ai-job-progress i,.ai-upload-progress i { transition:none; }
  .ai-status.pending i,.ai-chat-loading i,.ai-history-empty i,.ai-history-row.running .ai-history-state i,.ai-job-icon i,.ai-typing i,.ai-job-progress.indeterminate i,.loading-state i,.editor-loading i { animation:none; }
  .ai-job-progress.indeterminate i { width:100% !important;transform:none;opacity:.5; }
}

/* SimplyOffice navy, gold and warm-paper theme based on the supplied brand references. */
::selection { background:#ecd79f;color:#092f4f; }
.section-block,.quick-card,.modal,.mail-workspace,.files-table-row,.activity-row,.trash-row { background-color:var(--panel); }
.files-table-row:hover,.activity-row:hover,.trash-row:hover { background-color:#fcf8f0; }
.secondary-button:hover,.row-menu:hover { border-color:#d8bd7c;color:var(--navy); }
.folder-visual span,.folder-icon { color:var(--gold); }
.company-card>button { border-color:#dbc58f;background:#fffaf0;color:var(--navy); }
.company-card>button:hover { border-color:var(--gold-deep);background:var(--green-soft); }
.page-heading>div:first-child>p,.section-heading a { color:var(--gold-deep); }
.loading-state i,.editor-loading i,.ai-chat-loading i,.ai-history-empty i { border-color:#e9dec8;border-top-color:var(--gold-deep); }
.history-tabs button.active,.history-tabs button[aria-selected="true"],.editor-nav-link.active { color:var(--navy);background:var(--green-soft); }
.editor-nav-link.active { box-shadow:inset 3px 0 0 var(--gold); }
.editor-back:hover,.editor-share:hover { border-color:#d8bd7c;background:#fffaf0;color:var(--navy); }
.editor-file-icon { background:var(--navy); }
.editor-share { border-color:#dbc58f;background:#fffaf0;color:var(--navy); }
.ai-panel { background:#fbf8f1; }
.ai-panel-logo { border:1px solid #d4ad57;background:linear-gradient(145deg,#061f36,#0b3a5e);box-shadow:0 7px 17px rgba(9,47,79,.2);color:#e4c978; }
.ai-panel-note { border-color:#e4d5b5;background:#fff9ec; }
.ai-panel-note>i { background:var(--gold-deep); }
.ai-panel-note p,.ai-panel-note b { color:#64583f; }
.ai-history-row:hover { background:#f8f0df; }
.ai-history-row.active { border-color:#dec891;background:#f6ecd6;color:var(--navy); }
.ai-history-row.unread .ai-history-state i { background:var(--gold-deep);box-shadow:0 0 0 3px rgba(185,139,49,.14); }
.ai-notification-permission.granted { color:var(--navy);border-color:#dec891;background:#fff9ec; }
.ai-job-card,.ai-upload-status { border-color:#e1cfaa;background:#fffaf0;color:#5d574c; }
.ai-job-icon { background:#f3e3bc; }
.ai-job-icon i { background:var(--gold-deep);box-shadow:0 0 0 4px rgba(185,139,49,.13); }
.ai-job-head b { color:var(--navy); }
.ai-job-progress,.ai-upload-progress { background:#e9dec8; }
.ai-job-progress i,.ai-upload-progress i { background:linear-gradient(90deg,var(--gold-deep),#e3c46f); }
.ai-drive-attach { color:var(--navy);background:#f5ead4; }
.ai-view :where(button,select,a[href],[tabindex]):focus-visible { outline-color:rgba(185,139,49,.72); }
.ai-composer:focus-within,.ai-composer.dragging { border-color:var(--gold);box-shadow:0 8px 26px rgba(9,47,79,.1),0 0 0 3px rgba(212,173,87,.1); }

@media (max-width:620px) {
  .login-card { padding:24px; }
}

/* Corporate disk picker for AI Helper. */
.ai-drive-attach { transition:color var(--ai-motion-fast) ease,background-color var(--ai-motion-fast) ease,border-color var(--ai-motion-fast) ease,opacity var(--ai-motion-fast) ease,transform var(--ai-motion-fast) var(--ai-ease-out),box-shadow var(--ai-motion-fast) ease; }
.ai-drive-attach:disabled { opacity:.48;box-shadow:none; }
.ai-disk-picker-modal { width:min(780px,100%);height:min(650px,calc(100dvh - 36px));max-height:calc(100dvh - 36px);display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;overflow:hidden;padding:0; }
.ai-disk-picker-modal>header { min-width:0;align-items:center;margin:0;padding:20px 22px 17px;border-bottom:1px solid var(--line); }
.ai-disk-picker-toolbar { min-width:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-bottom:1px solid #edf0f2;background:#fafbfb; }
.ai-disk-picker-breadcrumbs { min-width:0;display:flex;align-items:center;gap:5px;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin;white-space:nowrap; }
.ai-disk-picker-breadcrumbs>span { color:#9aa5af;font-size:12px; }
.ai-disk-picker-breadcrumbs button { min-width:0;height:30px;display:inline-flex;align-items:center;gap:5px;padding:0 8px;border:0;border-radius:7px;background:transparent;color:#526174;font-size:9px;font-weight:650;white-space:nowrap; }
.ai-disk-picker-breadcrumbs button:hover { background:#edf4f1;color:var(--green); }
.ai-disk-picker-breadcrumbs .ui-icon { width:14px;height:14px; }
.ai-disk-select-folder { height:32px;display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;padding:0 10px;border:1px solid #cfdcd7;border-radius:8px;background:#fff;color:#426557;font-size:8px;font-weight:700; }
.ai-disk-select-folder.selected { border-color:#91b8aa;background:#eaf4ef;color:var(--green); }
.ai-disk-select-folder:disabled { opacity:.45; }
.ai-disk-select-folder .ui-icon { width:14px;height:14px; }
.ai-disk-picker-error { min-width:0;display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:8px;align-items:center;margin:10px 18px 0;padding:8px 10px;border:1px solid #efcccc;border-radius:8px;background:#fff4f4;color:#964848;font-size:8px; }
.ai-disk-picker-error>.ui-icon { width:16px;height:16px; }
.ai-disk-picker-error button { padding:3px 0;border:0;background:transparent;color:#8d3f3f;font-size:8px;font-weight:700; }
.ai-disk-picker-list { min-width:0;min-height:0;overflow-y:auto;scrollbar-gutter:stable;overscroll-behavior:contain; }
.ai-disk-picker-row { min-width:0;min-height:58px;display:grid;grid-template-columns:22px minmax(0,1fr) 82px 28px;gap:8px;align-items:center;padding:7px 18px;border-bottom:1px solid #edf0f2;background:#fff; }
.ai-disk-picker-row:hover { background:#f8fbfa; }
.ai-disk-picker-row.selected { background:#eaf4ef; }
.ai-disk-picker-row>input[type="checkbox"] { appearance:none;width:17px;height:17px;margin:0;padding:0;border:1px solid #b9c5c0;border-radius:5px;background:#fff;cursor:pointer; }
.ai-disk-picker-row>input[type="checkbox"]:checked { border-color:var(--green);background:var(--green) center/11px 11px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E"); }
.ai-disk-picker-name { min-width:0;display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:center;padding:0;border:0;background:transparent;color:var(--ink);text-align:left; }
.ai-disk-picker-name>span { min-width:0; }
.ai-disk-picker-name b,.ai-disk-picker-name small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.ai-disk-picker-name b { font-size:10px; }.ai-disk-picker-name small { margin-top:2px;color:var(--muted);font-size:8px; }
.ai-disk-picker-name .folder-icon,.ai-disk-picker-name .file-icon { width:34px;height:34px; }
.ai-disk-picker-name .ui-icon { width:17px;height:17px; }
.ai-disk-picker-size { color:#7b8795;font-size:8px;text-align:right;white-space:nowrap; }
.ai-disk-picker-open { width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:7px;background:transparent;color:#84908c; }
.ai-disk-picker-open:hover { background:#e3efea;color:var(--green); }.ai-disk-picker-open .ui-icon { width:13px;height:13px; }
.ai-disk-picker-state,.ai-disk-picker-empty { min-height:220px;display:grid;place-content:center;justify-items:center;gap:7px;color:#7d8985;text-align:center;font-size:9px; }
.ai-disk-picker-state i { width:22px;height:22px;border:2px solid #d5e2dd;border-top-color:var(--green);border-radius:50%;animation:spin .75s linear infinite; }
.ai-disk-picker-empty>.ui-icon { width:32px;height:32px;color:#9abaad; }.ai-disk-picker-empty b { color:#526058;font-size:10px; }.ai-disk-picker-empty span { color:#919c98;font-size:8px; }
.ai-disk-picker-footer { min-width:0;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 18px;border-top:1px solid var(--line);background:#fff; }
.ai-disk-picker-footer>div { min-width:0; }.ai-disk-picker-footer b,.ai-disk-picker-footer small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.ai-disk-picker-footer b { font-size:9px; }.ai-disk-picker-footer small { margin-top:2px;color:var(--muted);font-size:7px; }
.ai-disk-picker-footer>span { display:flex;gap:8px;flex:0 0 auto; }

@media (hover:hover) and (pointer:fine) {
  .ai-drive-attach:hover:not(:disabled) { border-color:#a6c8bc;background-color:#dfeee8;color:var(--green); }
}
.ai-drive-attach:active:not(:disabled) { transform:scale(.97); }

@media (max-width:800px) {
  .ai-composer-row { grid-template-columns:38px 38px minmax(0,1fr) 40px; }
  .ai-drive-attach { width:38px;height:38px; }
}

@media (max-width:620px) {
  .profile-layout { grid-template-columns:1fr; }.profile-security { grid-column:1; }.profile-details dl>div { grid-template-columns:1fr;gap:3px; }
  .admin-summary { grid-template-columns:1fr; }.admin-user-row { grid-template-columns:34px minmax(0,1fr); }.admin-role,.admin-security,.admin-user-actions { grid-column:2; }.admin-user-actions { flex-wrap:wrap; }.admin-user-actions button { flex:1; }
  .history-tabs { width:100%;margin-bottom:9px; }.history-tabs button { flex:1;justify-content:center;font-size:10px; }
  .history-ai-row { grid-template-columns:34px minmax(0,1fr);gap:10px;padding:11px 14px; }.history-ai-status { width:34px;height:34px; }
  .history-ai-section .activity-summary { min-height:0;align-items:flex-start;flex-direction:column;gap:4px;padding-block:11px; }.history-ai-section .activity-summary small,.history-ai-section .activity-summary>span { display:block;font-size:10px;line-height:1.4; }
  .history-ai-title>b { font-size:12px; }.history-ai-status-label { font-size:9px; }.history-ai-main p { display:-webkit-box;margin-top:6px;overflow:hidden;font-size:11px;line-height:1.4;text-overflow:clip;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2; }.history-ai-main>small { font-size:10px; }
  .history-ai-usage { grid-column:2;min-width:0;max-width:100%;justify-items:start;gap:3px;margin-top:-3px;text-align:left; }.history-ai-cost { max-width:100%;font-size:10px;line-height:1.4;overflow-wrap:anywhere;white-space:normal; }.history-ai-usage time { font-size:10px; }
  .ai-disk-picker-modal-backdrop { place-items:end stretch;padding:0; }
  .ai-disk-picker-modal { width:100%;height:min(88dvh,720px);max-height:calc(100dvh - 8px);padding:0;border-radius:16px 16px 0 0; }
  .ai-disk-picker-modal>header { padding:16px 15px 13px; }.ai-disk-picker-modal>header h2 { font-size:16px; }
  .ai-disk-picker-toolbar { display:grid;gap:8px;padding:9px 11px; }.ai-disk-picker-breadcrumbs { width:100%; }.ai-disk-select-folder { width:100%;justify-content:center; }
  .ai-disk-picker-error { margin:8px 10px 0; }
  .ai-disk-picker-row { grid-template-columns:22px minmax(0,1fr) 30px;gap:7px;padding:7px 11px; }.ai-disk-picker-size { display:none; }
  .ai-disk-picker-footer { align-items:stretch;display:grid;gap:9px;padding:10px 11px max(10px,env(safe-area-inset-bottom)); }.ai-disk-picker-footer>span { display:grid;grid-template-columns:1fr 1fr; }.ai-disk-picker-footer button { width:100%; }
}

@media (prefers-reduced-motion:reduce) {
  .ai-drive-attach { transition:none; }.ai-disk-picker-state i { animation:none; }
}

/* Workspace: search, collaboration, tasks, construction and automations. */
.progress progress { width:100%;height:5px;display:block;appearance:none;border:0;border-radius:3px;overflow:hidden;background:#e8decb; }
.progress progress::-webkit-progress-bar { background:#e8decb; }
.progress progress::-webkit-progress-value { border-radius:3px;background:linear-gradient(90deg,var(--gold-deep),var(--gold)); }
.progress progress::-moz-progress-bar { border-radius:3px;background:linear-gradient(90deg,var(--gold-deep),var(--gold)); }
.message footer { display:flex;flex-wrap:wrap;gap:8px; }
.ai-job-progress,.ai-upload-progress { width:100%;height:5px;display:block;appearance:none;border:0;border-radius:4px;overflow:hidden;background:#e9dec8; }
.ai-job-progress::-webkit-progress-bar,.ai-upload-progress::-webkit-progress-bar { background:#e9dec8; }
.ai-job-progress::-webkit-progress-value,.ai-upload-progress::-webkit-progress-value { background:linear-gradient(90deg,var(--gold-deep),#e3c46f); }
.ai-job-progress::-moz-progress-bar,.ai-upload-progress::-moz-progress-bar { background:linear-gradient(90deg,var(--gold-deep),#e3c46f); }
.ai-job-progress:indeterminate { opacity:.72; }
.ai-composer-row textarea { field-sizing:content;min-height:34px;max-height:120px;overflow-y:auto; }
.files-table-row,.file-row { position:relative; }
.workspace-context-menu { position:fixed;left:auto;right:auto;top:auto;width:240px;max-width:calc(100vw - 16px); }

.workspace-status { width:max-content;display:inline-flex;align-items:center;min-height:23px;padding:3px 8px;border:1px solid #d9dfe4;border-radius:999px;background:#f6f7f8;color:#647181;font-size:8px;font-weight:750;line-height:1;white-space:nowrap; }
.status-active,.status-done,.status-resolved,.status-approved,.status-completed,.status-on_plan { border-color:#bddbcf;background:#edf7f2;color:#237057; }
.status-open,.status-in_progress,.status-review,.status-ready_for_review,.status-running { border-color:#c8d8e8;background:#eef4fa;color:#376b9d; }
.status-planning,.status-normal,.status-draft,.status-ahead,.status-under_plan,.status-degraded { border-color:#e0cd9f;background:#fbf4e3;color:#825f20; }
.status-paused,.status-cancelled,.status-rejected,.status-blocked,.status-behind,.status-overrun,.status-critical,.status-urgent,.status-missing,.status-failed { border-color:#ebc4c4;background:#fff0f0;color:#a44646; }
.status-high { border-color:#ecd1af;background:#fff5e8;color:#9a5f22; }.status-medium { border-color:#ded3b8;background:#faf5e9;color:#776137; }.status-low { color:#667487; }
.workspace-empty { grid-column:1 / -1;width:100%;border:1px dashed #ded5c5;border-radius:13px;background:rgba(255,253,249,.7); }
.workspace-mini-empty { padding:26px 18px;color:var(--muted);font-size:10px;text-align:center; }
.workspace-inline-error { margin:12px 0;padding:10px 12px;border:1px solid #edcaca;border-radius:8px;background:#fff3f3;color:#994747;font-size:9px;line-height:1.5; }
.workspace-summary { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:17px; }
.workspace-summary article { display:flex;align-items:baseline;gap:8px;padding:16px 17px;border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:var(--shadow); }
.workspace-summary b { color:var(--navy);font-size:23px; }.workspace-summary span { color:var(--muted);font-size:9px; }
.workspace-back { display:inline-flex;align-items:center;gap:6px;margin:0 0 14px;padding:0;border:0;background:transparent;color:var(--navy);font-size:10px;font-weight:700; }.workspace-back .ui-icon { width:14px;height:14px; }
.workspace-open-resource { min-width:max-content; }
.form-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }.form-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.checkbox-label { display:flex !important;grid-template-columns:none !important;align-items:center;gap:8px !important; }.modal .checkbox-label input { width:17px;height:17px;margin:0;accent-color:var(--navy); }

.search-intro { min-height:370px;display:grid;place-content:center;justify-items:center;text-align:center; }
.search-orb { width:62px;height:62px;display:grid;place-items:center;border:1px solid #dbc58f;border-radius:20px;background:linear-gradient(145deg,#061f36,#0b3a5e);color:#e5c66f;box-shadow:0 12px 28px rgba(9,47,79,.2); }
.search-orb .ui-icon { width:27px;height:27px; }.search-intro h2 { margin:18px 0 7px;font:600 21px/1.25 Georgia,serif;color:var(--navy); }.search-intro>p { max-width:560px;margin:0;color:var(--muted);font-size:11px;line-height:1.7; }
.search-capabilities { display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:20px; }.search-capabilities span { display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid var(--line);border-radius:999px;background:#fbf7ef;color:#5d6872;font-size:9px;font-weight:650; }.search-capabilities .ui-icon { width:13px;height:13px;color:var(--gold-deep); }
.search-results { padding:0;overflow:hidden; }.search-results>header,.automation-section>header,.project-register>header { min-height:62px;display:flex;align-items:center;justify-content:space-between;padding:13px 19px;border-bottom:1px solid var(--line); }.search-results>header b,.search-results>header small,.automation-section>header b,.automation-section>header small,.project-register>header b,.project-register>header small { display:block; }.search-results>header b,.automation-section>header b,.project-register>header b { font-size:11px; }.search-results>header small,.automation-section>header small,.project-register>header small { margin-top:2px;color:var(--muted);font-size:8px; }
.search-result { min-height:92px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:13px;align-items:center;padding:14px 19px;border-top:1px solid #eee8dc; }.search-result:first-of-type { border-top:0; }.search-result:hover { background:#fcf8f0; }
.search-result-icon { width:40px;height:40px;display:grid;place-items:center;border-radius:11px;background:#f4ead5;color:var(--navy);font-style:normal; }.search-result-icon .ui-icon { width:20px;height:20px; }
.search-result-main { min-width:0; }.search-result-main header { display:flex;align-items:center;gap:6px; }.search-result-main header b { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px; }.search-result-main p { margin:6px 0 4px;display:-webkit-box;overflow:hidden;color:#4f5d6e;font-size:10px;line-height:1.45;-webkit-box-orient:vertical;-webkit-line-clamp:2; }.search-result-main small { display:block;overflow:hidden;color:var(--muted);font-size:8px;text-overflow:ellipsis;white-space:nowrap; }
.search-tag { flex:0 0 auto;padding:2px 5px;border-radius:5px;background:#edf3f8;color:#3c6a91;font-size:7px;font-weight:800; }.search-tag.ocr { background:#f5ead2;color:#865f1b; }.search-tag.warning { background:#fff0e5;color:#a3612c; }
.search-open { min-height:33px;display:inline-flex;align-items:center;gap:6px;padding:0 10px;border:1px solid #d8c48f;border-radius:7px;background:#fffaf0;color:var(--navy);font-size:8px;font-weight:700; }.search-open .ui-icon { width:13px;height:13px; }

.task-list { display:grid;gap:10px; }.task-card { display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:13px;align-items:start;padding:15px 17px;border:1px solid var(--line);border-left:3px solid #b4bdc7;border-radius:11px;background:var(--panel);box-shadow:var(--shadow); }.task-card.priority-high { border-left-color:#d18c47; }.task-card.priority-urgent { border-left-color:#bd4d4d; }.task-card.priority-low { border-left-color:#7994ac; }
.task-check { width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:#f4ead5;color:var(--navy); }.task-check .ui-icon { width:17px;height:17px; }.task-main { min-width:0; }.task-main header { display:flex;align-items:center;flex-wrap:wrap;gap:6px; }.task-main header>b { margin-right:3px;font-size:12px; }.task-main p { max-width:760px;margin:7px 0 5px;color:#536172;font-size:10px;line-height:1.5;white-space:pre-wrap; }.task-main small { color:var(--muted);font-size:8px; }.task-main .overdue { color:#aa4141;font-weight:700; }
.task-actions { display:flex;align-items:flex-end;gap:8px; }.task-actions label,.issue-row>label { display:grid;gap:4px;color:var(--muted);font-size:7px;font-weight:700; }.task-actions select,.issue-row select { min-width:120px;height:34px;padding:0 8px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);font-size:9px; }

.workspace-file-modal { width:min(980px,100%);padding:0;overflow:hidden; }.workspace-file-modal>header { margin:0;padding:20px 22px;border-bottom:1px solid var(--line); }.workspace-file-modal>header small,.sheet-policy-modal>header small { display:block;max-width:700px;margin-top:4px;overflow:hidden;color:var(--muted);font-size:8px;text-overflow:ellipsis;white-space:nowrap; }
.file-workspace-tabs { max-height:calc(100vh - 116px);display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);overflow:auto; }.file-workspace-tabs>section { min-width:0;padding:18px 20px; }.file-workspace-tabs>section+section { border-left:1px solid var(--line); }
.workspace-modal-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:11px; }.workspace-modal-heading b,.workspace-modal-heading small { display:block; }.workspace-modal-heading b { font-size:11px; }.workspace-modal-heading small { margin-top:2px;color:var(--muted);font-size:8px; }.workspace-modal-heading>span { min-width:24px;height:24px;display:grid;place-items:center;border-radius:12px;background:#f3ead7;color:var(--navy);font-size:8px;font-weight:800; }
.version-row { min-height:58px;display:grid;grid-template-columns:30px minmax(0,1fr) auto auto;gap:8px;align-items:center;padding:7px 0;border-top:1px solid #eee8dc; }.version-row>i { width:29px;height:29px;display:grid;place-items:center;border-radius:8px;background:#edf3f8;color:#386a99;font-style:normal; }.version-row>i .ui-icon { width:14px;height:14px; }.version-row b,.version-row small { display:block; }.version-row b { font-size:9px; }.version-row small { margin-top:2px;color:var(--muted);font-size:7px; }.version-row .secondary-button { min-height:30px;height:30px;padding:0 8px;font-size:7px;text-decoration:none; }
.version-compare-form { display:grid !important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px !important;align-items:end;margin-top:14px;padding-top:12px;border-top:1px solid var(--line); }.version-compare-form select { height:34px;font-size:8px; }.version-compare-form .secondary-button { height:34px;padding-inline:9px; }
.version-diff-head { margin-top:12px;color:var(--muted);font-size:8px; }.version-diff { max-height:250px;margin:6px 0 0;overflow:auto;border:1px solid var(--line);border-radius:8px;background:#fbfaf7;font:9px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace; }.version-diff span { display:block;min-height:15px;padding:0 8px;white-space:pre-wrap;word-break:break-word; }.version-diff span b { display:inline-block;width:16px;user-select:none; }.version-diff .removed { background:#fff0f0;color:#8f3737; }.version-diff .added { background:#edf8f1;color:#226848; }.version-diff-empty,.version-diff-unavailable { margin-top:10px;padding:10px;border-radius:8px;background:#f7f3eb;color:var(--muted);font-size:8px; }
.comment-list { display:grid;max-height:360px;overflow:auto; }.comment-card { display:grid;grid-template-columns:32px minmax(0,1fr);gap:10px;padding:11px 0;border-top:1px solid #eee8dc; }.comment-card:first-child { border-top:0; }.comment-card.resolved { opacity:.72; }.comment-card>.avatar { width:31px;height:31px;font-size:8px; }.comment-card>div { min-width:0; }.comment-card header { display:flex;align-items:center;flex-wrap:wrap;gap:6px; }.comment-card header b { font-size:9px; }.comment-card header time { margin-left:auto;color:var(--muted);font-size:7px; }.comment-card p { margin:6px 0;color:#465568;font-size:10px;line-height:1.5;overflow-wrap:anywhere; }.comment-card small { display:block;color:#8a6929;font-size:8px; }.comment-card footer { display:flex;gap:10px;margin-top:7px; }.comment-card footer button { display:inline-flex;align-items:center;gap:4px;padding:0;border:0;background:transparent;color:var(--navy);font-size:8px;font-weight:700; }.comment-card footer .ui-icon { width:12px;height:12px; }.comment-form { display:grid;grid-template-columns:minmax(0,1fr) auto !important;gap:8px !important;align-items:end;margin-top:12px;padding-top:12px;border-top:1px solid var(--line); }.comment-form textarea { min-height:68px; }.comment-form .primary-button { margin-bottom:1px; }

.sheet-policy-modal { width:min(820px,100%); }.sheet-policy-modal form { gap:12px; }.policy-help { display:grid;gap:5px;padding:11px 12px;border:1px solid #e5d4ae;border-radius:9px;background:#fff9ec;color:#686052;font-size:8px;line-height:1.5; }.policy-help b,.policy-help span,.policy-help em { display:block; }.policy-help em { margin-top:4px;padding-top:6px;border-top:1px solid #eadcbf;color:#82672e;font-size:7px;font-style:normal; }.policy-help code { color:var(--navy);font:8px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;word-break:break-all; }.sheet-policy-modal textarea { min-height:76px;font:9px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; }

.project-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px; }.project-card { min-width:0;display:block;padding:18px;border:1px solid var(--line);border-radius:13px;background:var(--panel);box-shadow:var(--shadow);color:var(--ink);text-align:left;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease; }.project-card:hover { border-color:#d7bd7d;box-shadow:0 13px 30px rgba(9,47,79,.12);transform:translateY(-2px); }.project-card>header { display:flex;align-items:center;justify-content:space-between;gap:8px; }.project-card>header>span:first-child { color:var(--gold-deep);font-size:9px;font-weight:800;letter-spacing:.6px;text-transform:uppercase; }.project-card h2 { margin:15px 0 5px;font:600 18px/1.25 Georgia,serif;color:var(--navy); }.project-card>p { height:34px;margin:0 0 15px;display:-webkit-box;overflow:hidden;color:var(--muted);font-size:9px;line-height:1.5;-webkit-box-orient:vertical;-webkit-line-clamp:2; }.project-card dl { display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0;padding:13px 0;border-block:1px solid #eee7d8; }.project-card dt { color:var(--muted);font-size:7px;text-transform:uppercase;letter-spacing:.35px; }.project-card dd { margin:3px 0 0;overflow:hidden;color:#334356;font-size:9px;font-weight:650;text-overflow:ellipsis;white-space:nowrap; }.project-card>footer { display:flex;align-items:center;justify-content:space-between;margin-top:13px;color:var(--muted);font-size:8px; }.project-card>footer .ui-icon { width:14px;height:14px;color:var(--gold-deep); }
.project-dashboard { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:15px; }.project-dashboard article { min-width:0;padding:15px 16px;border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:var(--shadow); }.project-dashboard span,.project-dashboard b,.project-dashboard small { display:block; }.project-dashboard span { color:var(--muted);font-size:8px;font-weight:700;text-transform:uppercase;letter-spacing:.35px; }.project-dashboard b { margin:7px 0 3px;color:var(--navy);font-size:20px; }.project-dashboard small { overflow:hidden;color:var(--muted);font-size:8px;line-height:1.45;text-overflow:ellipsis;white-space:nowrap; }
.project-register { margin-top:14px;padding:0;overflow:hidden; }.project-register>header button { display:inline-flex;align-items:center;gap:5px;padding:5px 0;border:0;background:transparent;color:var(--navy);font-size:8px;font-weight:750; }.project-register>header .ui-icon { width:12px;height:12px;color:var(--gold-deep); }
.issue-row { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:13px 18px;border-top:1px solid #eee8dc;border-left:3px solid #c7b481; }.issue-row.severity-critical { border-left-color:#b94848; }.issue-row.severity-high { border-left-color:#d4833d; }.issue-row.severity-low { border-left-color:#7b9bb7; }.issue-row header { display:flex;align-items:center;flex-wrap:wrap;gap:7px; }.issue-row header b { font-size:10px; }.issue-row p { margin:4px 0;color:#566374;font-size:9px; }.issue-row small { color:var(--muted);font-size:8px; }
.plan-fact-row { display:grid;grid-template-columns:minmax(150px,1.5fr) repeat(3,minmax(90px,.7fr)) auto;gap:11px;align-items:center;padding:12px 18px;border-top:1px solid #eee8dc; }.plan-fact-row>div b,.plan-fact-row>div small,.plan-fact-row>span small,.plan-fact-row>span b { display:block; }.plan-fact-row>div b { font-size:10px; }.plan-fact-row small { color:var(--muted);font-size:7px; }.plan-fact-row>span b { margin-top:2px;font-size:9px; }
.execution-document-row { display:grid;grid-template-columns:34px minmax(0,1fr) auto auto;gap:11px;align-items:center;padding:12px 18px;border-top:1px solid #eee8dc; }.execution-document-row>i { width:32px;height:32px;display:grid;place-items:center;border-radius:9px;background:#f4ead5;color:var(--navy);font-style:normal; }.execution-document-row>i .ui-icon { width:15px;height:15px; }.execution-document-row b,.execution-document-row small { display:block; }.execution-document-row b { font-size:10px; }.execution-document-row small { margin-top:3px;color:var(--muted);font-size:8px; }.execution-document-row .secondary-button { min-width:88px;height:32px;font-size:8px; }

.automation-note { display:grid;grid-template-columns:38px minmax(0,1fr);gap:11px;align-items:center;margin-bottom:14px;padding:13px 15px;border:1px solid #ddc997;border-radius:11px;background:#fff9ec; }.automation-note>i { width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:var(--navy);color:var(--gold);font-style:normal; }.automation-note>i .ui-icon { width:17px;height:17px; }.automation-note b,.automation-note span { display:block; }.automation-note b { color:var(--navy);font-size:10px; }.automation-note span { margin-top:2px;color:var(--muted);font-size:8px; }
.automation-section { padding:0;overflow:hidden; }.automation-section+.automation-section { margin-top:14px; }.automation-rule { display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:12px;align-items:start;padding:15px 18px;border-top:1px solid #eee8dc; }.automation-rule:first-of-type { border-top:0; }.automation-flow-icon { width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:#f4ead5;color:var(--navy); }.automation-flow-icon .ui-icon { width:17px;height:17px; }.automation-rule>div:nth-child(2) { min-width:0; }.automation-rule header { display:flex;align-items:center;gap:7px; }.automation-rule header b { font-size:11px; }.automation-rule p { margin:4px 0;color:#526071;font-size:9px; }.automation-rule small { color:var(--muted);font-size:8px; }.automation-rule>.danger-button { min-height:31px; }
.automation-steps { display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:10px; }.automation-steps>span { display:inline-flex;align-items:center;gap:5px;padding:5px 7px;border:1px solid var(--line);border-radius:7px;background:#fbf8f1;color:#526071;font-size:8px;font-weight:650; }.automation-steps>span i { width:16px;height:16px;display:grid;place-items:center;border-radius:50%;background:var(--navy);color:#fff;font-size:7px;font-style:normal; }.automation-steps>.ui-icon { width:11px;height:11px;color:var(--gold-deep); }
.automation-run { min-height:53px;display:grid;grid-template-columns:minmax(0,1fr) auto 80px;gap:12px;align-items:center;padding:10px 18px;border-top:1px solid #eee8dc; }.automation-run b,.automation-run small { display:block; }.automation-run b { font-size:9px; }.automation-run small { margin-top:2px;color:var(--muted);font-size:7px; }.automation-run-steps { display:flex;justify-content:flex-end;gap:4px; }.automation-run-steps i { width:8px;height:8px;border-radius:50%;background:#aab3bd; }.automation-run-steps .step-completed { background:#39906c; }.automation-run-steps .step-failed { background:#bd4d4d; }.automation-run-steps .step-unavailable { background:#d18c47; }
.automation-modal { width:min(650px,100%); }

@media (max-width:1050px) {
  .project-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .project-dashboard { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workspace-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .plan-fact-row { grid-template-columns:minmax(150px,1fr) repeat(2,minmax(85px,.6fr)) auto; }.plan-fact-row>span:nth-of-type(3) { display:none; }
}
@media (max-width:800px) {
  .file-workspace-tabs { grid-template-columns:1fr; }.file-workspace-tabs>section+section { border-top:1px solid var(--line);border-left:0; }
  .task-card { grid-template-columns:36px minmax(0,1fr); }.task-actions { grid-column:2;justify-content:flex-start; }
  .version-row { grid-template-columns:30px minmax(0,1fr) auto; }.version-row button { grid-column:3; }.version-row a { display:none; }
  .project-grid { grid-template-columns:1fr; }
}
@media (max-width:620px) {
  .page-actions [data-automation-event] { display:inline-flex;width:38px;padding:0; }.page-actions [data-automation-event] span { display:none; }
  .workspace-context-menu { width:min(240px,calc(100vw - 16px)); }
  .workspace-summary { gap:8px; }.workspace-summary article { padding:12px; }.workspace-summary b { font-size:18px; }
  .search-result { grid-template-columns:36px minmax(0,1fr);padding:12px; }.search-result-icon { width:34px;height:34px; }.search-open { grid-column:2;justify-self:start; }
  .task-card { grid-template-columns:32px minmax(0,1fr);padding:12px; }.task-check { width:31px;height:31px; }.task-actions { flex-wrap:wrap; }.task-actions label { flex:1; }.task-actions select { width:100%; }
  .workspace-file-modal-backdrop,.sheet-policy-modal-backdrop,.automation-modal-backdrop { place-items:end stretch;padding:0; }.workspace-file-modal,.sheet-policy-modal,.automation-modal { width:100%;max-height:92dvh;border-radius:16px 16px 0 0; }.workspace-file-modal>header { padding:16px; }.file-workspace-tabs>section { padding:15px; }.comment-form,.version-compare-form { grid-template-columns:1fr !important; }.comment-form button { width:100%; }
  .form-grid,.form-grid.three { grid-template-columns:1fr; }
  .project-dashboard { gap:8px; }.project-dashboard article { padding:12px; }.project-dashboard b { font-size:17px; }
  .issue-row { grid-template-columns:1fr;padding:12px 14px; }.issue-row>label { justify-self:stretch; }.issue-row select { width:100%; }
  .plan-fact-row { grid-template-columns:minmax(0,1fr) 1fr auto;padding:11px 14px; }.plan-fact-row>span:nth-of-type(2),.plan-fact-row>span:nth-of-type(3) { display:none; }
  .execution-document-row { grid-template-columns:30px minmax(0,1fr) auto;padding:11px 14px; }.execution-document-row .secondary-button { grid-column:2 / -1;justify-self:start; }
  .automation-rule { grid-template-columns:34px minmax(0,1fr);padding:13px; }.automation-rule>.danger-button { grid-column:2;justify-self:start; }.automation-steps>.ui-icon { display:none; }
  .automation-run { grid-template-columns:minmax(0,1fr) auto;padding:10px 13px; }.automation-run-steps { grid-column:1 / -1;justify-content:flex-start; }
}

/* Dynamic Telegram/iOS WebView chrome and safe-area overrides stay last. */
@media (min-width:621px) and (max-width:900px) {
  .sidebar {
    padding-right:12px;
    padding-left:max(12px,env(safe-area-inset-left,0px));
  }
  .topbar {
    padding-right:max(20px,env(safe-area-inset-right,0px));
    padding-left:max(20px,env(safe-area-inset-left,0px));
  }
}

@media (max-width:800px) {
  .editor-sidebar {
    padding-top:max(17px,env(safe-area-inset-top,0px));
    padding-right:8px;
    padding-bottom:max(12px,env(safe-area-inset-bottom,0px));
    padding-left:max(8px,env(safe-area-inset-left,0px));
  }
}

@media (max-width:620px) {
  :where(button,[role="button"],input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),select,textarea) {
    min-height:44px !important;
  }
  :where(button,[role="button"]) {
    min-width:44px !important;
  }
  :where(.nav-link,.section-heading a,.secondary-button,.search-open,.context-menu a) {
    min-height:44px;
  }
  .sidebar {
    height:calc(64px + env(safe-area-inset-bottom,0px));
    padding:7px max(6px,env(safe-area-inset-right,0px)) max(7px,env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px));
  }
  .topbar {
    height:calc(64px + env(safe-area-inset-top,0px));
    padding:env(safe-area-inset-top,0px) max(13px,env(safe-area-inset-right,0px)) 0 max(13px,env(safe-area-inset-left,0px));
  }
  .content {
    width:auto;
    margin-right:max(12px,env(safe-area-inset-right,0px));
    margin-left:max(12px,env(safe-area-inset-left,0px));
    padding-bottom:calc(85px + env(safe-area-inset-bottom,0px));
  }
  .mail-reader.has-message {
    top:calc(64px + env(safe-area-inset-top,0px));
    right:env(safe-area-inset-right,0px);
    bottom:calc(64px + env(safe-area-inset-bottom,0px));
    left:env(safe-area-inset-left,0px);
  }
  .editor-workspace {
    grid-template-rows:calc(58px + env(safe-area-inset-top,0px)) minmax(0,1fr);
  }
  .editor-header {
    min-height:calc(58px + env(safe-area-inset-top,0px));
    gap:4px;
    padding:env(safe-area-inset-top,0px) max(8px,env(safe-area-inset-right,0px)) 0 max(8px,env(safe-area-inset-left,0px));
  }
  .editor-file { min-width:0;gap:6px; }
  .editor-file-name small { display:none; }
  .editor-file-name b { max-width:clamp(42px,20vw,120px);font-size:10px; }
  .editor-actions { min-width:0;gap:4px; }
  .editor-back,.editor-share,.editor-close {
    width:44px;
    min-width:44px;
    height:44px;
    min-height:44px;
    padding:0;
    align-items:center;
    justify-content:center;
  }
  .editor-save-status {
    min-height:36px;
    max-width:clamp(58px,24vw,112px);
    display:flex;
    padding:6px 7px;
    font-size:8px;
  }
  .editor-canvas {
    padding-top:4px;
    padding-right:max(4px,env(safe-area-inset-right,0px));
    padding-bottom:max(4px,env(safe-area-inset-bottom,0px));
    padding-left:max(4px,env(safe-area-inset-left,0px));
  }
  .editor-loading {
    top:4px;
    right:max(4px,env(safe-area-inset-right,0px));
    bottom:max(4px,env(safe-area-inset-bottom,0px));
    left:max(4px,env(safe-area-inset-left,0px));
  }
  #editor-toast-root {
    right:max(12px,env(safe-area-inset-right,0px));
    bottom:max(12px,env(safe-area-inset-bottom,0px));
    left:max(12px,env(safe-area-inset-left,0px));
  }
}

/* Browser chrome in Telegram/iOS changes the visual viewport while scrolling. */
.login-page,.login-layout,.login-story {
  min-height:100vh;
  min-height:100dvh;
}

@media (max-width:800px) {
  .login-panel {
    min-height:100vh;
    min-height:100dvh;
    padding-top:max(40px,env(safe-area-inset-top,0px));
    padding-right:max(40px,env(safe-area-inset-right,0px));
    padding-bottom:max(40px,env(safe-area-inset-bottom,0px));
    padding-left:max(40px,env(safe-area-inset-left,0px));
  }
}

@media (max-width:620px) {
  .login-panel {
    padding-top:max(26px,env(safe-area-inset-top,0px));
    padding-right:max(26px,env(safe-area-inset-right,0px));
    padding-bottom:max(26px,env(safe-area-inset-bottom,0px));
    padding-left:max(26px,env(safe-area-inset-left,0px));
  }
}
