@font-face{font-family:Montserrat;src:url('/assets/fonts/Montserrat-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:Montserrat;src:url('/assets/fonts/Montserrat-SemiBold.ttf') format('truetype');font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:Montserrat;src:url('/assets/fonts/Montserrat-Bold.ttf') format('truetype');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:'Playfair Display';src:url('/assets/fonts/PlayfairDisplay-Bold.ttf') format('truetype');font-weight:700;font-style:normal;font-display:swap}
:root {
    --navy: #173b5d;
    --navy-2: #214d75;
    --navy-3: #2f6392;
    --ink: #18354f;
    --muted: #7b746d;
    --brown: #b98955;
    --brown-soft: #ead7c2;
    --sand: #f5eee5;
    --paper: #fffdf9;
    --canvas: #f7f4ef;
    --line: #e9dfd2;
    --green: #23845b;
    --shadow: 0 10px 30px rgba(32, 48, 63, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.view-switch[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); font-family: Montserrat, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.mfa-secret-control { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; align-items: stretch; margin-top: 7px; }
.mfa-secret-control input { min-width: 0; margin-top: 0 !important; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; }
.mfa-secret-control button { display: grid; place-items: center; min-height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: var(--sand); font-size: 23px; line-height: 1; transition: color .15s ease, background .15s ease, transform .15s ease; }
.mfa-secret-control button:hover, .mfa-secret-control button:focus-visible { outline: none; color: white; background: var(--navy); }
.mfa-secret-control button.copied { color: white; background: var(--green); transform: scale(.96); }
.mfa-copy-status { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 500; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 13px; color: #fff; background: linear-gradient(180deg, #173b5d 0%, #12324f 100%); scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; border-bottom: 1px solid rgba(255,255,255,.12); letter-spacing: .05em; }
.brand-logo { display:block; width:132px; height:auto; }
.brand small { color: #e3b47c; font-size: 11px; font-weight:700; letter-spacing:.14em; }
.profile { margin: 16px 0 22px; min-height: 66px; display: flex; align-items: center; gap: 5px; padding: 5px; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; background: rgba(255,255,255,.09); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.avatar { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.78); border-radius: 50%; background: linear-gradient(135deg, #d98698, #a94d70); color: white; box-shadow: 0 3px 12px rgba(0,0,0,.22); font-size: 13px; font-weight: 800; letter-spacing: .03em; }
.avatar img, .profile-page-avatar img, .tenant-user-avatar img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; }
.profile-action { min-width: 0; flex: 1; display: flex; align-items: center; gap: 11px; padding: 5px; border: 0; border-radius: 8px; color: white; background: transparent; text-align: left; }
.profile-action:hover, .profile-action:focus-visible { outline: none; background: rgba(255,255,255,.12); }
.profile-copy { min-width: 0; flex: 1; }
.profile #logout-action { width: 26px; height: 26px; border: 0; border-radius: 7px; color: #d6e2ec; background: transparent; }
.profile #logout-action:hover { color: white; background: rgba(255,255,255,.12); }
.profile b, .profile small { display: block; }
.profile b { overflow: hidden; font-size: 13px; line-height: 1.2; text-overflow: ellipsis; }
.profile small { margin-top: 3px; color: #d6e2ec; font-size: 10px; }
.nav-heading { margin: 22px 10px 8px; color: #e4b77f; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav-item { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 11px; margin: 3px 0; padding: 8px 10px; border: 0; border-radius: 9px; color: #dce8f1; background: transparent; text-align: left; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.nav-item:hover { transform: translateX(2px); background: rgba(255,255,255,.08); box-shadow: 0 0 18px rgba(255,255,255,.08); }
.nav-item.active { color: white; background: linear-gradient(90deg, #365f91, #2d5683); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon-svg, .menu-icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ui-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.nav-icon { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 8px; background: rgba(255,255,255,.07); font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif; font-size: 15px; font-weight: 800; line-height: 1; transition: transform .15s ease, filter .15s ease; }
.nav-icon.icon-svg { padding: 5px; }
.nav-item:hover .nav-icon { transform: scale(1.14); filter: drop-shadow(0 0 6px currentColor); }
.dashboard-icon { color: #77cff5; background: rgba(119,207,245,.12); } .companies-icon { color: #ffc83d; background: rgba(255,200,61,.12); } .partners-icon { color: #8ee2c2; background: rgba(142,226,194,.12); } .contacts-icon { color: #7fc8ef; background: rgba(127,200,239,.12); } .deals-icon { color: #50d785; background: rgba(80,215,133,.12); } .tasks-icon { color: #f39b6d; background: rgba(243,155,109,.12); } .calls-icon { color: #6fe38a; background: rgba(111,227,138,.12); } .calendar-icon { color: #b899ef; background: rgba(184,153,239,.12); }
.management-icon { color: #f4bd67; } .commercial-icon { color: #67d6a0; } .projects-icon { color: #84b8ff; } .finance-icon { color: #57d4c5; } .accounting-icon { color: #e8ab72; } .legal-icon { color: #d9bc7d; } .hr-icon { color: #f19bae; } .smm-icon { color: #d58cf0; } .it-icon { color: #7ed5ed; }
.requests-icon { color: #ffb86b; background: rgba(255,184,107,.12); } .documents-icon { color: #f6bd60; background: rgba(246,189,96,.12); }
.management-icon { background: rgba(244,189,103,.12); } .commercial-icon { background: rgba(103,214,160,.12); } .projects-icon { background: rgba(132,184,255,.12); } .finance-icon { background: rgba(87,212,197,.12); } .accounting-icon { background: rgba(232,171,114,.12); } .legal-icon { background: rgba(217,188,125,.12); } .hr-icon { background: rgba(241,155,174,.12); } .smm-icon { background: rgba(213,140,240,.12); } .it-icon { background: rgba(126,213,237,.12); }
.knowledge-icon { color: #b8dc68; background: rgba(184,220,104,.12); }
.franchise-icon { color: #ffbd71; background: rgba(255,189,113,.12); }
.email-icon { color: #ef8eae; background: rgba(239,142,174,.12); }
.users-icon, .groups-icon { color: #7fc8ef; background: rgba(127,200,239,.12); }
.import-icon { color: #9eb6c9; background: rgba(158,182,201,.14); }

.main { min-width: 0; }
.settings-choice-group { padding: 18px 0 4px; }
.settings-choice-group h3 { margin: 0 0 12px; color: var(--navy); font-size: 15px; }
.settings-choice-list { display: flex; flex-wrap: wrap; gap: 10px; }
.settings-choice-list button { padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; }
.settings-choice-list button:hover, .settings-choice-list button.active { border-color: var(--navy); color: var(--navy); background: var(--sand); }
.deal-filter-panel { margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--sand); }
.product-description-panel{margin:0 0 18px;padding:14px 16px;border:1px solid var(--line);border-radius:10px;background:#fffdf9}.product-description-panel .subpanel-title{margin:0 0 12px}.product-description-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.product-description-card{padding:14px;border:1px solid var(--line);border-radius:9px;background:var(--sand)}.product-description-card h4{margin:0 0 7px;color:var(--navy);font-size:15px}.product-description-card p{margin:0 0 8px;color:var(--muted);line-height:1.45}.product-description-card ul{margin:0;padding-left:18px;color:var(--navy);font-size:12px;line-height:1.55}.product-description-card dl{display:grid;gap:7px;margin:0;color:var(--navy);font-size:12px;line-height:1.45}.product-description-card dt{font-weight:800;color:var(--navy)}.product-description-card dd{margin:0;color:var(--muted)}@media(max-width:900px){.product-description-grid{grid-template-columns:1fr}}
.deal-filter-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--navy); }
.deal-filter-heading button { padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: white; }
.deal-filter-fields { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; }
.deal-filter-fields label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.deal-filter-fields select { min-height: 34px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; }
.filter-count { display: inline-grid; min-width: 18px; height: 18px; place-items: center; border-radius: 9px; color: white; background: var(--brown); font-size: 10px; }
body.crm-theme-sand { --paper: #f4eee4; --sand: #eee2d1; }
body.crm-theme-contrast { --paper: #eef3f7; --sand: #dce7f0; --ink: #132b42; }
.read-only-banner { position: sticky; top: 0; z-index: 14; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 10px 22px; border-bottom: 1px solid #d6a44e; color: #5d3c08; background: #fff2cf; box-shadow: 0 5px 18px rgba(77,52,10,.1); text-align: center; }
.read-only-banner b { white-space: nowrap; }
.read-only-banner span { font-size: 13px; }
.owner-mfa-banner { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 54px; padding: 10px 22px; border-bottom: 1px solid #d6a44e; color: #5d3c08; background: #fff2cf; box-shadow: 0 5px 18px rgba(77,52,10,.08); }
.owner-mfa-banner > div { display: grid; gap: 2px; }
.owner-mfa-banner span { font-size: 13px; }
.owner-mfa-banner button { flex: 0 0 auto; border-color: #c7953f; color: #fff; background: #8b5b13; }
.read-only-mode .topbar { position: relative; top: auto; }
.read-only-mode #create-action, .read-only-mode #primary-action, .read-only-mode #email-spam-action, .read-only-mode .file-upload-button { display: none !important; }
.topbar { height: 64px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: 0 28px; background: rgba(255,253,249,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.mobile-menu { display: none; align-items: center; justify-content: center; border: 0; background: none; color: var(--navy); }
.search-wrap { max-width: 720px; flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.search-wrap:focus-within { border-color: #9bb5cc; box-shadow: 0 0 0 3px rgba(47,99,146,.09); }
.search-wrap input { width: 100%; height: 40px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.top-actions { display: flex; gap: 6px; }
.top-actions button { width: 40px; height: 40px; border: 0; border-radius: 9px; background: transparent; }
.top-actions button, .notifications-heading button { display: inline-flex; align-items: center; justify-content: center; }
.top-actions button:hover { background: var(--sand); }
#notifications-action { position: relative; }
#notifications-count { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 1px 5px; border-radius: 999px; color: white; background: #b4433c; font-size: 10px; font-weight: 800; }
.notifications-panel { position: fixed; z-index: 40; top: 58px; right: 72px; width: min(390px, calc(100vw - 28px)); max-height: min(620px, calc(100vh - 76px)); overflow-y: auto; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 20px 60px rgba(12,31,48,.25); }
.notifications-heading { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); background: white; }
.notifications-heading button { width: 30px; height: 30px; border: 0; border-radius: 7px; color: var(--muted); background: var(--sand); }
.notification-item { width: 100%; display: grid; gap: 5px; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: white; text-align: left; }
.notification-item:hover { background: var(--sand); }
.notification-item small { color: var(--muted); }
.notification-item.danger b { color: #a43b34; }
.announcement-item { width: 100%; display: grid; gap: 5px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: #fffaf2; text-align: left; }
.announcement-item.critical { background: #fff0ee; }
.announcement-item.important { background: #fff7e6; }
.announcement-item small { color: var(--muted); }
.announcement-item:not(.unread) { opacity: .72; background: white; }
.notification-preferences { display: grid; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.notification-preferences label { display: flex; gap: 8px; align-items: center; }
.announcement-popup { position: fixed; z-index: 80; top: 76px; right: 24px; width: min(440px, calc(100vw - 28px)); display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 16px 18px; border: 1px solid #d5ab6b; border-left: 5px solid var(--gold); border-radius: 12px; background: white; box-shadow: 0 18px 50px rgba(12,31,48,.24); }
.announcement-popup[hidden] { display: none; }
.announcement-popup p { margin: 5px 0 0; color: var(--muted); }
.announcement-popup button { flex: 0 0 auto; }
.meeting-reminder-popup { top:auto; bottom:24px; border-color:#7ba8ca; border-left-color:#3976b9; }
.management-announcement-heading { margin-top: 22px; }
#management-workspace-panel { min-width: 0; overflow: hidden; }
#management-workspace-panel > .official-forms { min-width: 0; padding: 18px; border-top: 1px solid var(--line); }
#management-workspace-panel > .official-forms h3 { margin: 0 0 10px; color: var(--navy); font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
#management-workspace-panel > .official-forms .auth-hint { margin: 0 0 12px; padding: 0; line-height: 1.5; overflow-wrap: anywhere; }
#management-workspace-panel > .official-forms .tenant-users-list { min-width: 0; padding: 0; }
#management-workspace-panel > .official-forms .tenant-user { min-width: 0; grid-template-columns: minmax(0, 1fr) auto; padding-inline: 0; }
#management-workspace-panel > .official-forms .tenant-user > span { min-width: 0; }
#management-workspace-panel > .official-forms .tenant-user b,
#management-workspace-panel > .official-forms .tenant-user small { max-width: 100%; line-height: 1.45; overflow-wrap: anywhere; word-break: normal; }
.calendar-list { display: grid; gap: 0; padding: 4px 18px 18px; }
.calendar-item { display: grid; grid-template-columns: 110px 130px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; }
.calendar-item:hover { background: var(--sand); }
.calendar-item time, .calendar-item small { color: var(--muted); }
.calendar-item-open { display:contents; color:inherit; background:transparent; border:0; text-align:left; }
.calendar-item-export { padding:7px 10px; border:1px solid var(--line); border-radius:7px; color:var(--navy); background:#fff; text-decoration:none; white-space:nowrap; }
.calendar-heading .entry-actions { align-items:center; margin:0; }
.calendar-heading .entry-actions button { padding:7px 10px; border:1px solid var(--line); border-radius:7px; background:#fff; }
.calendar-connection { margin:14px 18px 0; padding:12px 14px; border-left:4px solid var(--green); border-radius:8px; background:#f2faf6; color:var(--ink); }
.calendar-meeting-summary { margin:14px 18px 0; padding:14px 16px; border:1px solid #c8d8e5; border-radius:10px; background:#f4f8fb; }
.calendar-meeting-summary h3 { margin:0 0 8px; color:var(--navy); }
.calendar-meeting-summary .calendar-item { padding:10px 0; }
.meeting-outcomes-summary { border-color:#e1bf82; background:#fff8ea; }
.meeting-outcome-item { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:10px 0; border-bottom:1px solid var(--line); }
.meeting-outcome-item:last-child { border-bottom:0; }
.meeting-outcome-item span { display:grid; gap:3px; min-width:0; }
.meeting-outcome-item small { color:var(--muted); }
.meeting-outcome-item button { flex:0 0 auto; padding:8px 11px; border:1px solid #c69757; border-radius:7px; color:var(--navy); background:#fff; }
.calendar-connect-intro { margin:0 0 16px; color:var(--muted); line-height:1.5; }
.calendar-connect-step { display:flex; align-items:center; gap:9px; margin:14px 0 10px; color:var(--navy); }
.calendar-connect-step span { width:24px; height:24px; display:grid; place-items:center; flex:0 0 24px; border-radius:50%; color:#fff; background:var(--gold); font-size:12px; font-weight:800; }
.calendar-connect-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.calendar-provider { display:flex; align-items:center; gap:10px; min-height:68px; padding:11px 12px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:#fff; text-align:left; }
.calendar-provider:hover { border-color:#a7b7c6; background:#f8fbfd; }
.calendar-provider.selected { border:2px solid var(--navy); padding:10px 11px; background:#f2f7fb; box-shadow:0 0 0 3px rgba(25,60,89,.08); }
.calendar-provider b,.calendar-provider small { display:block; }
.calendar-provider small { margin-top:3px; color:var(--muted); font-size:12px; }
.calendar-provider-icon { width:34px; height:34px; display:grid; place-items:center; flex:0 0 34px; border-radius:9px; color:#fff; background:var(--navy); font-weight:800; }
.calendar-provider[data-calendar-provider="google"] .calendar-provider-icon { color:#246fdb; background:#fff; border:1px solid var(--line); }
.calendar-provider[data-calendar-provider="apple"] .calendar-provider-icon { color:#111; background:#f0f0f0; }
.calendar-provider[data-calendar-provider="outlook"] .calendar-provider-icon { background:#1473e6; }
.calendar-connect-guide { margin-top:14px; padding:2px 14px 14px; border:1px solid #c7ddd2; border-radius:10px; background:#f4faf7; }
.calendar-connect-guide ol { margin:6px 0 0; padding-left:22px; color:var(--ink); line-height:1.55; }
.calendar-connect-guide li + li { margin-top:5px; }
.calendar-connect-guide-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.calendar-connect-guide-actions button { padding:9px 13px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.calendar-connect-guide-actions .primary { color:#fff; border-color:var(--navy); background:var(--navy); }
.calendar-advanced { margin-top:14px; color:var(--muted); }
.calendar-advanced summary { cursor:pointer; color:var(--navy); font-size:13px; }
.calendar-security-note { margin:12px 0 0; padding-left:22px; color:var(--muted); font-size:13px; line-height:1.45; position:relative; }
.calendar-security-note::before { content:'🔒'; position:absolute; left:0; top:0; }
.calendar-feed-field { display:grid; gap:7px; margin-top:14px; color:var(--muted); }
.calendar-feed-field input { width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:#fff; }
@media(max-width:760px){.calendar-heading{align-items:flex-start;flex-direction:column;padding-block:10px}.calendar-item{grid-template-columns:1fr auto;gap:6px}.calendar-item-open{display:grid;grid-column:1;gap:4px}.calendar-item-export{grid-column:2;grid-row:1}.calendar-connect-options{grid-template-columns:1fr}.calendar-provider{min-height:58px}}
.tenant-users-list { display: grid; gap: 0; padding: 0 18px 18px; }
.commercial-filter-toolbar { display:flex; flex-wrap:wrap; gap:10px; padding:0 18px 14px; align-items:end; }
.commercial-filter-toolbar label { min-width:180px; flex:1 1 180px; }
.commercial-filter-toolbar select,.commercial-filter-toolbar input { width:100%; }
.commercial-analytics-row { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:14px 0; border-bottom:1px solid var(--line); }
.commercial-analytics-row:last-child { border-bottom:0; }
.commercial-analytics-row small { display:block; color:var(--muted); margin-top:4px; }
.commercial-analytics-metrics { display:flex; flex-wrap:wrap; gap:8px 16px; justify-content:flex-end; text-align:right; }
.commercial-analytics-metrics b { color:var(--navy); }
.tenant-user { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto; align-items: center; gap: 16px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.tenant-user span, .tenant-user small { display: block; }
.tenant-user small { margin-top: 4px; color: var(--muted); }
.tenant-user button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--navy); background: white; }
.tenant-user-actions { display: flex !important; align-items: center; justify-content: flex-end; gap: 7px; }
.tenant-user-actions select { min-width: 170px; height: 34px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; }
.tenant-user.inactive { opacity: .65; }
.tenant-user-identity { display: flex !important; align-items: center; gap: 10px; }
.tenant-user-avatar { flex: 0 0 38px; width: 38px; height: 38px; display: grid !important; place-items: center; overflow: hidden; border-radius: 50%; color: white; background: linear-gradient(135deg,#d98698,#8f4164); font-size: 11px; font-weight: 800; }
.access-preview-notice { margin:0 0 18px; padding:12px 14px; border-left:4px solid #d5ab6b; border-radius:7px; background:var(--sand); color:var(--ink); line-height:1.5; }
.access-preview-content { display:grid; gap:14px; }
.access-preview-card { padding:14px; border:1px solid var(--line); border-radius:9px; background:white; }
.access-preview-card b,.access-preview-card small { display:block; }
.access-preview-card small { margin-top:7px; color:var(--muted); line-height:1.5; }
.access-preview-tags { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.access-preview-tags span { padding:5px 8px; border-radius:999px; color:var(--navy); background:#e8f2fb; font-size:12px; }
.group-members-panel { grid-column:1 / -1; }

.content { padding: 28px clamp(18px, 3vw, 46px) 50px; }
.profile-workspace { min-width: 0; max-width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items:start; gap: 18px; }
.profile-workspace > .panel { min-width: 0; max-width: 100%; }
.profile-side-column { display:contents; }
.profile-avatar-card { min-width:0; grid-column:1; grid-row:1; }
.profile-main-card { grid-column:1; grid-row:2; }
.profile-security-card { min-width:0; grid-column:1; grid-row:3; }
.profile-performance-card { min-width:0; grid-column:2; grid-row:1 / span 3; align-self:stretch; }
.profile-card-toolbar { min-height:52px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 16px; border-bottom:1px solid var(--line); background:linear-gradient(90deg,var(--sand),#fbf8f3); }
.profile-card-toolbar,
.profile-performance-card > .panel-title { height:52px; min-height:52px; box-sizing:border-box; padding-block:0; }
.profile-performance-card > .panel-title { padding-inline:16px; }
.profile-card-toolbar h2 { margin:0; color:var(--navy); font-size:13px; letter-spacing:.06em; text-transform:uppercase; }
.profile-card-toolbar button { padding:8px 11px; border-color:#d7cabc; background:white; }
.profile-fields-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 36px; padding:22px 16px; }
.profile-fields-grid.compact { padding:18px 14px; }
.profile-fields-grid small,.profile-fields-grid b { display:block; }
.profile-fields-grid small { margin-bottom:5px; color:#846c59; }
.profile-fields-grid b { color:var(--navy); font-size:14px; overflow-wrap:anywhere; }
.profile-subsection { border-top:1px solid var(--line); }
.profile-subsection > h3 { margin:0; padding:14px 16px; border-left:4px solid var(--brown); color:var(--navy); background:var(--sand); font-size:12px; letter-spacing:.08em; text-transform:uppercase; }
.profile-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px 28px; padding:18px 16px; }
.profile-settings-grid > div { display:flex; align-items:center; gap:10px; }
.profile-settings-grid b,.profile-settings-grid small { display:block; }
.profile-settings-grid small { margin-top:3px; color:var(--muted); }
.profile-status-dot { flex:0 0 30px; width:30px; height:30px; display:grid; place-items:center; border-radius:8px; color:white; background:#8a969f; font-weight:900; }
.profile-status-dot.enabled { background:#258667; }.profile-status-dot.birthday { background:#b17a26; }
.profile-birthday-form { display:flex; align-items:end; gap:10px; padding:14px 16px; border-top:1px solid var(--line); background:#fffaf2; }
.profile-birthday-form label { display:grid; gap:5px; color:var(--muted); }.profile-birthday-form input { padding:9px 10px; border:1px solid var(--line); border-radius:8px; }
.profile-birthday-form small { align-self:center; color:var(--muted); }
.profile-avatar-content { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; justify-items:start; gap:24px; padding:22px 24px; }
.profile-avatar-content dl { width:100%; margin:0; }.profile-avatar-content dt { margin-top:14px; color:#846c59; }.profile-avatar-content dt:first-child { margin-top:0; }.profile-avatar-content dd { margin:4px 0 0; color:var(--navy); font-weight:700; }
#profile-performance { min-width: 0; max-width: 100%; }
#profile-performance .official-forms { min-width: 0; padding: 2px 18px 18px; }
#profile-performance .official-forms + .official-forms { padding-top: 18px; border-top: 1px solid var(--line); }
#profile-performance .official-forms h3 { margin: 0 0 10px; color: var(--navy); font-size: 17px; }
.profile-summary, .profile-security-content { padding: 24px; }
.profile-summary { display: grid; grid-template-columns: auto minmax(170px,.55fr) minmax(330px,1.45fr); align-items: center; gap: 18px; }
.profile-page-avatar { flex: 0 0 78px; width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(135deg,#d98698,#8f4164); box-shadow: 0 8px 22px rgba(143,65,100,.24); font-size: 22px; font-weight: 800; }
.profile-summary small, .profile-security-content small { color: var(--muted); }
.profile-summary h3 { margin: 5px 0 6px; font-family: "Playfair Display",serif; font-size: 25px; }
.profile-summary p, .profile-security-content p { margin: 4px 0; color: var(--muted); }
.profile-contact-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.profile-contact-grid > div { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fffdfa; }
.profile-contact-grid span:not(.profile-contact-icon),.profile-contact-grid b,.profile-contact-grid small { min-width: 0; display: block; }
.profile-contact-grid b { margin-top: 3px; overflow: hidden; color: var(--navy); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-contact-icon { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: white; font-weight: 900; }
.profile-contact-icon.login { background: #3b78a8; }.profile-contact-icon.phone { background: #258667; }.profile-contact-icon.email { background: #a65e8e; }
.profile-security-content { min-height: 126px; display: grid; gap: 10px; }
.profile-security-option { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fffdfa; }
.profile-security-option button { white-space: nowrap; }
.profile-security-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: white; font-size: 12px; font-weight: 900; }
.profile-security-icon.shield { background: #258667; }.profile-security-icon.password { background: #b17a26; letter-spacing: 1px; }
.profile-score-grid { padding-top: 14px; }
.profile-score-card { position: relative; overflow: hidden; border-top: 4px solid var(--score-color,#3b78a8) !important; background: linear-gradient(145deg,#fff 65%,color-mix(in srgb,var(--score-color,#3b78a8) 10%,white)); }
.profile-score-card strong { position:relative; z-index:1; color:var(--score-color,#173b5d); }
.score-personal { --score-color:#3b78a8; }.score-team { --score-color:#a65e8e; }.score-total { --score-color:#b17a26; }.score-workload { --score-color:#258667; }
#profile-performance .official-forms h3 { display:flex; align-items:center; }
.profile-facts-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.profile-fact-card { min-width:0; display:flex; align-items:center; gap:11px; padding:12px; border:1px solid var(--line); border-radius:9px; background:white; }
.profile-fact-card small,.profile-fact-card strong { display:block; }.profile-fact-card strong { margin-top:3px; color:var(--navy); font-size:17px; }
.profile-condition { display:flex; gap:12px; margin-top:10px; padding:10px 12px; border-left:4px solid #b17a26; border-radius:7px; background:#fff8e9; }
.profile-condition span { color:var(--muted); }
.profile-month-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.profile-month-card { padding:11px; border:1px solid var(--line); border-left:4px solid #c8d0d6; border-radius:8px; background:white; }
.profile-month-card.has-activity { border-left-color:#258667; background:#f7fcfa; }
.profile-month-card > b { display:flex; justify-content:space-between; color:var(--navy); }.profile-month-card > b small { color:var(--muted); font-weight:500; }
.profile-month-card > div { display:grid; grid-template-columns:repeat(3,1fr); gap:5px; margin-top:9px; }
.profile-month-card span { min-width:0; color:var(--muted); font-size:9px; overflow-wrap:anywhere; }.profile-month-card span strong { display:block; color:var(--ink); font-size:13px; }
.profile-two-columns { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.profile-two-columns > div + div { padding-left:18px; border-left:1px solid var(--line); }
.profile-history-list { display:grid; gap:8px; }
.profile-history-row { display:flex; gap:10px; align-items:center; padding:10px; border:1px solid var(--line); border-radius:8px; background:white; }
.profile-history-row b,.profile-history-row small { display:block; }.profile-history-row small { margin-top:3px; color:var(--muted); }
.profile-history-mark { flex:0 0 28px; width:28px; height:28px; display:grid; place-items:center; border-radius:8px; color:white; background:#80909d; font-weight:800; }
.profile-history-row.warning .profile-history-mark { background:#b17a26; }.profile-history-row.danger .profile-history-mark { background:#b4433c; }.profile-history-row.success .profile-history-mark { background:#258667; }.profile-history-row.award .profile-history-mark { background:#c79327; }
.profile-access-block > div { padding:13px 14px; border:1px solid var(--line); border-radius:9px; background:#f7fafc; }.profile-access-block p { margin:4px 0 11px; color:var(--muted); line-height:1.5; }.profile-access-block p:last-child { margin-bottom:0; }
.status-card.success { color:#17664c; border-color:#a9d9c7; background:#f1fbf7; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 5px; color: var(--brown); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font-family: "Playfair Display", serif; font-size: clamp(28px, 3vw, 40px); font-weight: 700; }
.page-heading p:last-child { margin: 7px 0 0; color: var(--muted); }
.primary { padding: 11px 18px; border: 0; border-radius: 9px; color: white; background: var(--navy); box-shadow: 0 7px 20px rgba(23,59,93,.18); }
.primary:hover { background: var(--navy-2); }
.status-card { padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.status-card.error { color: #9b2c27; border-color: #efc3bf; background: #fff3f2; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric { --metric-color:#3b78a8; position:relative; min-height:154px; overflow:hidden; padding:17px 18px 15px; border:1px solid var(--line); border-top:4px solid var(--metric-color); border-radius:12px; background:linear-gradient(145deg,#fffdfa,#fff 70%); box-shadow:var(--shadow); }
.metric-clients { --metric-color:#c79327; }.metric-contacts { --metric-color:#3b78a8; }.metric-deals { --metric-color:#258667; }
.metric-heading { display:flex; align-items:center; gap:9px; color:var(--navy); font-size:12px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.metric-heading span,.metric small { display:block; }
.metric-icon { width:30px; height:30px; padding:6px; border-radius:8px; color:var(--metric-color); background:color-mix(in srgb,var(--metric-color) 11%,white); }
.metric strong { display:block; margin:11px 0 2px; color:var(--navy); font-family:"Playfair Display",serif; font-size:33px; line-height:1; }
.metric small { color:var(--muted); font-size:11px; }
.metric button { position:absolute; right:14px; bottom:12px; display:flex; align-items:center; gap:7px; padding:5px 0; border:0; color:var(--metric-color); background:transparent; font-size:11px; font-weight:800; }
.metric button span { font-size:15px; transition:transform .15s ease; }.metric button:hover span { transform:translateX(3px); }
.metric.accent { --metric-color:#7fd6b6; color:white; border:0; border-top:4px solid #69d6ad; background:linear-gradient(135deg,#173b5d,#2f6392); }
.metric.accent .metric-heading,.metric.accent small,.metric.accent strong,.metric.accent button { color:white; }
.metric.accent .metric-icon { color:white; background:rgba(255,255,255,.13); }
.dashboard-metrics { grid-template-columns:repeat(auto-fit,minmax(175px,1fr)); }
.dashboard-metrics .metric { min-height:146px; }
.metric-revenue { --metric-color:#a46512; }.metric-conversion { --metric-color:#8a63d2; }
.metric-revenue strong { font-size:27px; }
.dashboard-analytics-grid { display:grid;grid-template-columns:minmax(0,1.55fr) minmax(310px,.7fr);gap:18px;margin-bottom:18px; }
.dashboard-chart-panel,.dashboard-outcome-panel { min-height:330px; }
.chart-legend { display:flex;align-items:center;gap:7px;color:var(--muted);font-size:11px;font-weight:700; }
.chart-legend i { width:10px;height:10px;border-radius:3px;background:#8ba2b6; }.chart-legend i.won { margin-left:5px;background:#258667; }
.sales-chart { display:grid;grid-template-columns:repeat(6,minmax(70px,1fr));align-items:end;gap:14px;min-height:270px;padding:22px 22px 16px; }
.sales-month { min-width:0;display:grid;grid-template-rows:1fr auto auto;gap:8px;height:230px;text-align:center; }
.sales-bars { display:flex;align-items:end;justify-content:center;gap:6px;min-height:164px;border-bottom:1px solid var(--line);background:repeating-linear-gradient(to top,transparent 0,transparent 39px,rgba(29,61,91,.06) 40px); }
.sales-bar { position:relative;width:min(28px,38%);min-height:0;height:var(--bar-height);border-radius:6px 6px 2px 2px;background:linear-gradient(180deg,#9cb1c2,#657f95);transition:height .25s ease; }
.sales-bar.won { background:linear-gradient(180deg,#48a985,#258667); }
.sales-bar span { position:absolute;left:50%;bottom:calc(100% + 4px);transform:translateX(-50%);color:var(--navy);font-size:10px;font-weight:800; }
.sales-month b { color:var(--navy);font-size:12px;text-transform:capitalize; }.sales-month small { min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:10px;white-space:nowrap; }
.dashboard-outcomes { display:grid;gap:18px;padding:24px; }
.outcome-main { display:grid;grid-template-columns:142px minmax(0,1fr);align-items:center;gap:20px; }
.outcome-donut { --open-angle:0deg;--won-angle:0deg;position:relative;width:138px;height:138px;border-radius:50%;background:conic-gradient(#3976b9 0 var(--open-angle),#258667 var(--open-angle) var(--won-angle),#b42318 var(--won-angle) 360deg);box-shadow:inset 0 0 0 1px rgba(20,50,76,.08); }
.outcome-donut::after { content:"";position:absolute;inset:25px;border-radius:50%;background:var(--paper); }
.outcome-donut strong { position:absolute;inset:0;z-index:1;display:grid;place-items:center;color:var(--navy);font-family:"Playfair Display",serif;font-size:27px; }
.outcome-legend { display:grid;gap:10px; }.outcome-legend div { display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;padding-bottom:8px;border-bottom:1px solid var(--line);font-size:12px; }.outcome-legend i { width:10px;height:10px;border-radius:3px; }.outcome-legend b { color:var(--navy); }
.outcome-operational { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }.outcome-operational article { padding:12px;border:1px solid var(--line);border-radius:9px;background:#fff; }.outcome-operational span,.outcome-operational small { display:block;color:var(--muted);font-size:10px; }.outcome-operational strong { display:block;margin:4px 0;color:var(--navy);font-size:20px; }.outcome-operational article.warning strong { color:#b1603d; }
.dashboard-funnel-panel { margin-bottom:18px; }.dashboard-funnel { display:grid;gap:9px;padding:18px; }
.dashboard-employee-panel { margin-bottom:18px; }.dashboard-employee-list { display:grid;gap:0;padding:0 18px 8px; }.dashboard-employee-row { display:grid;grid-template-columns:minmax(210px,1.5fr) repeat(3,minmax(120px,1fr));align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid var(--line); }.dashboard-employee-row:last-child{border-bottom:0}.dashboard-employee-row>span{display:flex;flex-direction:column;gap:3px}.dashboard-employee-row small{color:var(--muted);font-size:.78rem}.dashboard-employee-row em{color:#b42318;font-style:normal}.dashboard-employee-name{display:flex;flex-direction:column;align-items:flex-start;gap:3px;background:none;border:0;padding:0;color:var(--ink);cursor:pointer;text-align:left}.dashboard-employee-name:hover b{text-decoration:underline}
.funnel-row { display:grid;grid-template-columns:minmax(155px,230px) minmax(160px,1fr) 94px;align-items:center;gap:12px; }
.funnel-name { min-width:0;display:flex;align-items:center;gap:8px;color:var(--navy);font-size:11px;font-weight:800; }.funnel-name i { flex:0 0 11px;width:11px;height:11px;border-radius:3px;background:var(--stage-color); }.funnel-name span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.funnel-track { height:16px;overflow:hidden;border-radius:999px;background:#edf0f2; }.funnel-fill { width:var(--funnel-width);height:100%;min-width:3px;border-radius:inherit;background:linear-gradient(90deg,color-mix(in srgb,var(--stage-color) 72%,white),var(--stage-color)); }
.funnel-value { text-align:right; }.funnel-value b,.funnel-value small { display:block; }.funnel-value b { color:var(--navy);font-size:12px; }.funnel-value small { color:var(--muted);font-size:9px; }
.dashboard-focus-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); gap:18px; margin-bottom:18px; }
.dashboard-focus-panel { min-height:210px; }
.dashboard-focus-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 12px; padding:8px 18px 14px; }
.dashboard-focus-item { min-width:0; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; padding:12px 4px; border:0; border-bottom:1px solid var(--line); color:var(--ink); background:transparent; text-align:left; }
.dashboard-focus-item:hover { color:var(--navy-3); }.dashboard-focus-item:nth-last-child(-n+2) { border-bottom-color:transparent; }
.dashboard-focus-mark { width:34px; height:34px; display:grid; place-items:center; border-radius:9px; color:#2f6392; background:#eaf3fa; font-size:13px; font-weight:900; }
.dashboard-focus-item.attention .dashboard-focus-mark { color:#a35332; background:#fff0e7; }
.dashboard-focus-item b,.dashboard-focus-item small { min-width:0; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-focus-item small { margin-top:3px; color:var(--muted); font-size:11px; }
.dashboard-focus-item time { color:var(--navy); font-size:11px; font-weight:800; white-space:nowrap; }
.dashboard-focus-list > .empty { grid-column:1/-1; padding:44px 20px; }
.dashboard-attention-panel .brown-line { background:#b1603d; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); gap: 18px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.panel-title { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 18px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--sand), #fbf8f3); }
.panel-title > div { display: flex; align-items: center; gap: 11px; }
.brown-line { display: block; width: 4px; height: 27px; border-radius: 3px; background: var(--brown); }
.panel-title h2 { margin: 0; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.panel-title button { border: 0; color: var(--navy-3); background: transparent; }
.cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:14px 18px 18px; }
.deal-card { width:100%; min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; padding:14px; border:1px solid var(--line); border-radius:10px; color:inherit; background:#fffdfa; text-align:left; transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease; }
.deal-card:hover { transform:translateY(-1px); border-color:#cbbba8; box-shadow:0 8px 22px rgba(31,48,61,.08); }.deal-card:hover b { color: var(--navy-3); }
.deal-card b, .deal-card small { display: block; }
.deal-card b,.deal-card small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.deal-card small { margin-top:5px; color:var(--muted); }
.stage { align-self: center; padding: 5px 9px; border-radius: 999px; color: white; font-size: 11px; font-weight: 700; }
.quick-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; padding:14px; }
.quick-actions button { min-width:0; display:grid; grid-template-columns:38px minmax(0,1fr); column-gap:10px; padding:12px; border:1px solid var(--line); border-radius:9px; color:var(--ink); background:#fffdfa; text-align:left; }
.quick-actions button:hover { transform:translateY(-1px); border-color:#c7b7a5; background:white; box-shadow:0 7px 18px rgba(31,48,61,.07); }
.quick-icon { grid-row: 1 / span 2; width: 38px; height: 38px; display: grid; place-items: center; padding: 8px; border-radius: 9px; background: var(--sand); font-weight: 800; }
.quick-actions small { margin-top: 3px; color: var(--muted); }

.table-panel { min-height: 420px; width:100%; min-width:0; }
.table-panel > .panel-title { min-width:0; overflow:hidden; }
.table-panel .list-heading-actions { min-width:0; max-width:100%; overflow-x:auto; }
.count-badge { padding: 5px 9px; border-radius: 999px; color: var(--navy); background: white; font-size: 12px; }
.table-scroll { overflow-x: auto; }
.library-workspace{display:grid;grid-template-columns:minmax(230px,18%) minmax(0,1fr);min-height:620px}.library-workspace[hidden]{display:none}.library-navigation{min-width:0;border-right:1px solid var(--line);background:#fbf9f5}.library-navigation-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 16px;border-bottom:1px solid var(--line);color:var(--navy);font-size:12px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.library-navigation-heading button{padding:5px 7px;border:0;background:transparent;color:var(--muted);font-size:11px}.library-navigation-tree{display:flex;flex-direction:column;gap:14px;padding:14px}.library-navigation-tree button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 11px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--ink);text-align:left}.library-navigation-tree button:hover,.library-navigation-tree button.active{border-color:#d9c8b4;background:#fff}.library-navigation-tree button.active{box-shadow:inset 3px 0 var(--brown)}.library-navigation-tree button span,.library-navigation-tree button b,.library-navigation-tree button small{display:block}.library-navigation-tree button small,.library-tree-group p,.library-tree-divider small{color:var(--muted);font-size:11px}.library-navigation-tree button em{font-style:normal;font-size:11px;color:var(--muted)}.library-root{padding:13px!important;background:#f5eee4!important}.library-tree-group h3{margin:0 0 5px;padding:0 9px;color:var(--navy);font-size:12px}.library-tree-group p{margin:6px 9px;line-height:1.45}.library-tree-divider{padding:14px 9px 0;border-top:1px solid var(--line)}.library-tree-divider span,.library-tree-divider small{display:block}.library-tree-divider span{color:var(--brown);font-size:12px;font-weight:800;text-transform:uppercase}.library-reader{min-width:0;display:grid;grid-template-columns:minmax(260px,34%) minmax(0,1fr);background:#fff}.library-reader-list{min-width:0;border-right:1px solid var(--line)}.library-reader-list-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;border-bottom:1px solid var(--line);background:#fffdfa}.library-reader-list-heading span{font-weight:800;color:var(--navy)}.library-reader-list-heading small{color:var(--muted)}.library-material-link{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border:0;border-bottom:1px solid var(--line);background:#fff;color:var(--ink);text-align:left}.library-material-link:hover,.library-material-link.active{background:#f8f3ec}.library-material-link.active{box-shadow:inset 4px 0 var(--navy-3)}.library-material-link span,.library-material-link b,.library-material-link small{display:block;min-width:0}.library-material-link b{overflow-wrap:anywhere}.library-material-link small{margin-top:4px;color:var(--muted);line-height:1.35}.library-material-link em{font-style:normal;color:var(--brown)}.library-reading-pane{min-width:0;padding:34px clamp(22px,4vw,64px)}.library-reading-meta{display:flex;flex-wrap:wrap;gap:7px}.library-reading-meta span{padding:5px 9px;border-radius:999px;background:var(--sand);color:var(--brown);font-size:11px;font-weight:700}.library-reading-pane h2{margin:18px 0 10px;color:var(--navy);font-family:Georgia,serif;font-size:clamp(25px,2.5vw,38px);line-height:1.12}.library-reading-lead{margin:0 0 24px;color:var(--muted);font-size:16px;line-height:1.55}.library-reading-body{color:var(--ink);font-size:15px;line-height:1.75;overflow-wrap:anywhere}.library-reading-pane footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:34px;padding-top:16px;border-top:1px solid var(--line)}.library-reading-pane footer small{color:var(--muted)}.library-reading-pane footer button{padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--navy);font-weight:700}.library-reader-placeholder{display:grid;place-items:center;align-content:center;gap:7px;min-height:360px;color:var(--muted);text-align:center}.library-reader-placeholder b{color:var(--navy)}.library-workspace.navigation-collapsed{grid-template-columns:0 minmax(0,1fr)}.library-workspace.navigation-collapsed .library-navigation{overflow:hidden;border:0}.library-workspace.navigation-collapsed .library-reader{grid-column:1/-1}
.library-reader-list-heading{flex-wrap:wrap}.library-search{width:100%;padding:9px 11px;border:1px solid var(--line);border-radius:8px;background:#fff}.library-reader-actions{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.library-reader-actions button,.library-reader-actions a{padding:8px 11px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--navy);font:inherit;font-size:12px;font-weight:700;text-decoration:none}.library-reader-actions .active{border-color:var(--brown);background:var(--sand);color:var(--brown)}.library-bookmark{display:flex;align-items:center;gap:6px}.library-bookmark input{width:78px;padding:7px;border:1px solid var(--line);border-radius:7px}.library-pdf-reader{width:100%;height:min(72vh,900px);margin:18px 0;border:1px solid var(--line);border-radius:10px;background:#f5f3ef}.library-notify{margin:0 0 4px!important}.library-submissions{padding:10px 9px;border-top:1px solid var(--line)}.library-submissions h3{margin:0 0 7px;color:var(--navy);font-size:12px}.library-submissions p{margin:5px 0;color:var(--muted);font-size:11px}.library-moderation{display:flex;gap:8px;margin:12px 0}.library-moderation button{padding:8px 11px;border:0;border-radius:8px;background:var(--navy);color:#fff;font-weight:700}.library-moderation button:last-child{background:#8f3c36}.library-upload-dialog{width:min(720px,calc(100vw - 28px));padding:0;border:0;border-radius:14px;box-shadow:0 24px 70px #102f4e55}.library-upload-dialog::backdrop{background:#102f4e80}.library-upload-dialog form{display:grid;grid-template-columns:1fr 1fr;gap:15px;padding:22px}.library-upload-dialog header,.library-upload-dialog footer,.library-upload-dialog .wide{grid-column:1/-1}.library-upload-dialog header,.library-upload-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.library-upload-dialog header div,.library-upload-dialog header b,.library-upload-dialog header span{display:block}.library-upload-dialog header b{color:var(--navy);font-size:20px}.library-upload-dialog header span{margin-top:3px;color:var(--muted);font-size:12px}.library-upload-dialog header button{border:0;background:transparent;font-size:24px}.library-upload-dialog label{display:grid;gap:6px;color:var(--navy);font-size:12px;font-weight:700}.library-upload-dialog input,.library-upload-dialog textarea{box-sizing:border-box;width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;background:#fff;font:inherit}.library-upload-dialog textarea{min-height:90px;resize:vertical}.library-upload-dialog footer{justify-content:flex-end}.library-upload-dialog footer button{padding:9px 14px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--navy);font-weight:700}.library-upload-dialog footer button:last-child{border-color:var(--navy);background:var(--navy);color:#fff}#library-upload-status{grid-column:1/-1;margin:0;color:var(--brown);font-size:12px}
@media(max-width:980px){.library-workspace{grid-template-columns:220px minmax(0,1fr)}.library-reader{grid-template-columns:1fr}.library-reader-list{border-right:0;border-bottom:1px solid var(--line)}.library-reading-pane{padding:26px 22px}}
@media(max-width:700px){.library-workspace{display:block}.library-navigation{border-right:0;border-bottom:1px solid var(--line)}.library-navigation-tree{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.library-root,.library-tree-divider{grid-column:1/-1}.library-reader-list-heading{position:sticky;top:0;z-index:2}.library-reading-pane{padding:22px 16px}.library-reading-pane footer{align-items:flex-start;flex-direction:column}.library-navigation-tree button{min-height:48px}.library-upload-dialog form{grid-template-columns:1fr}.library-upload-dialog form>*{grid-column:1!important}.library-pdf-reader{height:65vh}}

/* Библиотека ARKASCALE: каталог на странице, чтение — в отдельном окне. */
.library-tree-group{border:1px solid transparent;border-radius:9px}.library-tree-group[open]{border-color:#e6d8c8;background:#fff}.library-tree-group summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 11px;color:var(--navy);font-size:12px;font-weight:800;cursor:pointer;list-style:none}.library-tree-group summary::-webkit-details-marker{display:none}.library-tree-group summary span::before{display:inline-block;width:16px;content:'›';color:var(--brown);font-size:18px;line-height:10px;transform:rotate(0);transition:transform .15s ease}.library-tree-group[open] summary span::before{transform:rotate(90deg)}.library-tree-group summary small{font-size:11px;font-weight:600}.library-tree-group>div{padding:0 5px 6px}.library-tree-group>div button{padding-block:8px}.library-reader{display:block}.library-reader-list{border-right:0}.library-material-link{min-height:74px}.library-material-link em{flex:0 0 auto;padding:6px 10px;border:1px solid var(--line);border-radius:8px;font-size:11px;font-weight:700}.library-reading-dialog{box-sizing:border-box;width:min(1240px,calc(100vw - 32px));height:min(92vh,960px);max-width:none;max-height:none;margin:auto;padding:0;border:0;border-radius:14px;background:#fff;box-shadow:0 24px 80px #102f4e66;overflow:hidden}.library-reading-dialog::backdrop{background:#102f4e99}.library-reading-window{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}.library-reading-window-header{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 16px;border-bottom:1px solid var(--line);background:#fbf9f5}.library-reading-window-header>div:first-child{min-width:0}.library-reading-window-header small,.library-reading-window-header b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.library-reading-window-header small{margin-bottom:3px;color:var(--brown);font-size:11px;font-weight:800;text-transform:uppercase}.library-reading-window-header b{color:var(--navy);font-size:17px}.library-reading-window-actions{display:flex;gap:8px}.library-reading-window-actions button{width:38px;height:38px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--navy);font-size:20px;line-height:1}.library-reading-dialog-content{min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}.library-reading-toolbar{display:flex;align-items:center;gap:7px;padding:9px 12px;border-bottom:1px solid var(--line);background:#fff;overflow-x:auto}.library-reading-toolbar button,.library-reading-toolbar a{flex:0 0 auto;padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--navy);font:inherit;font-size:12px;font-weight:700;text-decoration:none}.library-reading-toolbar .active{border-color:var(--brown);background:var(--sand);color:var(--brown)}.library-reading-document{min-height:0;overflow:hidden;background:#efefef}.library-reading-dialog .library-pdf-reader{display:block;width:100%;height:100%;margin:0;border:0;border-radius:0}.library-reading-dialog .library-reading-body{box-sizing:border-box;height:100%;max-width:900px;margin:0 auto;padding:32px;overflow:auto;background:#fff}.library-reading-dialog:fullscreen,.library-reading-dialog.is-fullscreen{width:100vw;height:100vh;max-width:none;max-height:none;margin:0;border-radius:0}.library-reading-dialog.is-fullscreen{position:fixed;inset:0;z-index:10000}.library-reading-dialog:fullscreen .library-reading-window-header,.library-reading-dialog.is-fullscreen .library-reading-window-header{padding-inline:20px}@media(max-width:700px){.library-tree-group{grid-column:1/-1}.library-reading-dialog{width:100vw;height:100dvh;margin:0;border-radius:0}.library-reading-window-header{padding:10px 12px}.library-reading-window-header b{font-size:14px}.library-reading-toolbar{padding:7px}.library-bookmark{font-size:0}.library-bookmark input{width:62px}.library-reading-dialog .library-reading-body{padding:20px}}
.library-book-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:20px 0}.library-book-facts div{padding:12px;border:1px solid var(--line);border-radius:9px;background:#fffdfa}.library-book-facts dt{color:var(--muted);font-size:11px}.library-book-facts dd{margin:5px 0 0;color:var(--navy);font-weight:800}.library-benefit{margin:14px 0;padding:15px 17px;border-left:4px solid var(--brown);background:#f8f3ec}.library-benefit h3{margin:0 0 6px;color:var(--navy);font-size:14px}.library-benefit p{margin:0;line-height:1.55}.library-source-links{display:flex;flex-wrap:wrap;gap:9px;margin:16px 0}.library-source-links a{padding:8px 11px;border:1px solid var(--line);border-radius:8px;color:var(--navy-3);background:#fff;text-decoration:none;font-weight:700}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); background: #fbf9f5; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
td { font-size: 14px; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: #faf5ee; }
tbody tr[data-record-id] { cursor: pointer; }
tbody tr[data-record-id]:focus { outline: 3px solid rgba(47,99,146,.22); outline-offset: -3px; }
.select-cell{width:44px!important;padding-left:16px!important;padding-right:8px!important;text-align:center!important}.select-cell input{width:18px;height:18px;margin:0;accent-color:var(--navy-3);cursor:pointer}.email-bulk-actions{display:flex!important;align-items:center!important;gap:8px!important;padding:4px 6px 4px 10px;border:1px solid #d6c7b6;border-radius:9px;background:#fff}.email-bulk-actions[hidden]{display:none!important}.email-bulk-actions b{font-size:12px;white-space:nowrap}.email-bulk-actions button{padding:6px 9px!important;border:1px solid var(--line)!important;border-radius:7px!important;background:#fbf8f3!important;font-size:12px}.email-bulk-actions button[data-email-bulk-state="trash"]{border-color:#d8a6a2!important;color:#9c2f2b!important;background:#fff7f6!important}
.empty { padding: 50px 20px; color: var(--muted); text-align: center; }
.back-button { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 14px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: white; }
.back-button:hover { border-color: #c7b7a5; background: var(--sand); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 18px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 8px 18px 20px; }
.field { min-width: 0; padding: 14px 10px; border-bottom: 1px solid var(--line); }
.field.wide { grid-column: 1 / -1; }
.field span, .field strong { display: block; }
.field span { margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.field strong { overflow-wrap: anywhere; color: var(--ink); font-size: 14px; font-weight: 600; }
.field a { color: var(--navy-3); text-decoration: none; }
.field a:hover { text-decoration: underline; }
.single-column { grid-template-columns: 1fr; }
.single-column .field { grid-column: auto; }
.related-organizations-panel { grid-column: 1 / -1; }
.related-organizations-list { display: grid; gap: 10px; padding: 10px 18px 18px; }
.related-organization-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid #e4c27a; border-left: 4px solid #d6962f; border-radius: 9px; background: #fffaf0; }
.related-organization-main { min-width: 0; display: grid; gap: 5px; }
.related-organization-main button { padding: 0; border: 0; color: var(--navy-3); background: transparent; text-align: left; cursor: pointer; }
.related-organization-main button:hover { text-decoration: underline; }
.related-organization-main small { color: var(--muted); }
.related-organization-reasons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.related-organization-reasons span { padding: 4px 7px; border-radius: 999px; color: #7a531f; background: #f8e3b2; font-size: 11px; white-space: nowrap; }

.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 10%, #315c82 0, #173b5d 36%, #102b44 100%); }
.auth-card { width: min(440px, 100%); padding: 34px; border-radius: 16px; background: var(--paper); box-shadow: 0 24px 80px rgba(5,20,34,.32); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; color: var(--navy); }
.auth-brand small { display: block; }
.auth-logo { display:flex; align-items:center; gap:8px; width:max-content; height:44px; padding:0 12px; border-radius:8px; background:var(--navy); }
.auth-logo img { display:block; width:122px; height:auto; }
.auth-logo-crm { color:#e3b47c; font-family:Montserrat, sans-serif; font-size:11px; font-weight:700; letter-spacing:.14em; }
.auth-brand > small { color: var(--brown); }
.auth-card h1 { font-size: 34px; }
.auth-card > p { margin: 8px 0 22px; color: var(--muted); }
.auth-card label { display: grid; gap: 7px; margin: 14px 0; color: var(--ink); font-size: 13px; font-weight: 700; }
.auth-card input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: white; }
.auth-card input:focus { border-color: #7598b8; box-shadow: 0 0 0 3px rgba(47,99,146,.1); }
.auth-card .auth-hint { margin: -2px 0 14px; font-size: 12px; }
.auth-hint ol { margin: 10px 0 14px; padding-left: 22px; }
.auth-hint li { margin: 7px 0; line-height: 1.45; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 14px; border-radius: 8px; color: white; background: var(--navy); font-weight: 700; text-decoration: none; }
.button-link:hover { background: var(--navy-2); }
.auth-error { margin: 12px 0; padding: 10px 12px; border: 1px solid #efc3bf; border-radius: 8px; color: #9b2c27; background: #fff3f2; font-size: 13px; }
.auth-card .primary { width: 100%; margin-top: 8px; }
.department-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px; }
.department-tool { min-height: 142px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.department-tool .tool-status { display: inline-block; margin-bottom: 14px; padding: 4px 8px; border-radius: 999px; color: #7a531f; background: #fff1db; font-size: 11px; }
.department-tool .tool-status.building { color: #255a85; background: #e8f2fb; }
.department-tool .tool-status.ready { color: #23613c; background: #e6f5eb; }
.department-tool b, .department-tool small { display: block; }
.department-tool b { font-size: 16px; }
.department-tool small { margin-top: 8px; color: var(--muted); line-height: 1.5; }
.communication-panel { margin-top: 18px; }
.communication-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.communication-options button { padding: 16px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; text-align: left; }
.communication-options button:hover { border-color: #c7b7a5; background: var(--sand); }
.communication-options b, .communication-options small { display: block; }
.communication-options small { margin-top: 7px; color: var(--muted); line-height: 1.45; }
.communication-options button.active { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(30,61,88,.08); }
.communication-toolbar { border-top: 1px solid var(--line); }
#department-communication-list { padding: 0 18px 18px; display: grid; gap: 10px; }
.department-thread { border: 1px solid var(--line); border-radius: 9px; padding: 14px; background: white; }
.department-thread h3 { margin: 0 0 5px; }
.department-thread > small { color: var(--muted); }
.department-thread p { margin: 10px 0 0; padding: 9px 11px; border-radius: 7px; background: var(--sand); line-height: 1.45; }
.department-thread button { margin-top: 10px; }
.record-dialog { width: min(780px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 14px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 90px rgba(12,31,48,.32); }
.record-dialog::backdrop { background: rgba(12,31,48,.48); backdrop-filter: blur(3px); }
.record-dialog form { padding: 24px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.dialog-heading h2 { margin: 0; font-family: "Playfair Display", serif; font-size: 28px; font-weight:700; }
.dialog-heading > button { width: 36px; height: 36px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 26px; }
.dialog-heading > button:hover { color: var(--ink); background: var(--sand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid label { display: grid; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 700; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid .stage-picker-field { position: relative; display: grid; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 700; }
.form-grid .stage-picker-field.wide { grid-column: 1 / -1; }
.stage-picker-toggle { display:flex;align-items:center;gap:10px;width:100%;min-height:42px;padding:9px 11px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-weight:700;text-align:left; }
.stage-picker-toggle:focus { border-color:#7598b8;box-shadow:0 0 0 3px rgba(47,99,146,.1);outline:none; }
.stage-picker-field.disabled .stage-picker-toggle { cursor:not-allowed;opacity:.72;background:#f3f1ec; }
.stage-color-dot { flex:0 0 13px;width:13px;height:13px;border-radius:4px;background:var(--stage-color,var(--selected-stage-color,#8492A6));box-shadow:inset 0 0 0 1px rgba(0,0,0,.08); }
.stage-picker-toggle .stage-color-dot { background:var(--selected-stage-color,#8492A6); }
.stage-picker-chevron { margin-left:auto;color:var(--muted);font-size:18px;line-height:1; }
.stage-picker-menu { position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:2300;max-height:330px;padding:6px;overflow:auto;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 16px 38px rgba(20,50,76,.22); }
.stage-picker-menu[hidden] { display:none; }
.stage-picker-menu button,.deal-stage-popover button { display:flex;align-items:center;gap:10px;width:100%;padding:9px 10px;border:0;border-radius:7px;background:transparent;color:var(--ink);font:inherit;font-weight:700;text-align:left; }
.stage-picker-menu button:hover,.stage-picker-menu button.selected,.deal-stage-popover button:hover,.deal-stage-popover button.selected { background:color-mix(in srgb,var(--stage-color) 12%,white); }
.stage-picker-menu button b,.deal-stage-popover button b { margin-left:auto;visibility:hidden;color:var(--stage-color); }
.stage-picker-menu button.selected b,.deal-stage-popover button.selected b { visibility:visible; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; outline: none; color: var(--ink); background: white; font: inherit; }
.form-grid textarea { min-height: 76px; resize: vertical; }
.form-grid .clipboard-summary-field { grid-column: 1 / -1; display:grid; gap:9px; padding:13px; border:1px solid #d8c7b2; border-radius:10px; background:#fbf7f0; }
.clipboard-summary-field label { display:grid; gap:7px; }
.clipboard-summary-field textarea { min-height:130px; background:#fff; }
.clipboard-summary-field > div { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.clipboard-summary-field button { padding:9px 12px; border:1px solid var(--navy); border-radius:8px; background:var(--navy); color:#fff; font:inherit; font-weight:700; }
.clipboard-summary-field button:disabled { opacity:.65; cursor:wait; }
.clipboard-summary-field small { flex:1 1 320px; color:var(--muted); line-height:1.4; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: #7598b8; box-shadow: 0 0 0 3px rgba(47,99,146,.1); }
.form-grid .checkbox-field { display: flex; align-items: center; gap: 9px; align-self: end; min-height: 42px; }
.form-grid .checkbox-field input { width: 18px; min-height: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.dialog-actions button { padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; }
.dialog-actions button:not(.primary) { color: var(--ink); background: white; }
.deal-record-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--navy); box-shadow: var(--shadow); }
.deal-record-toolbar button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; color: white; background: rgba(255,255,255,.07); font-weight: 700; }
.deal-record-toolbar button:hover { background: rgba(255,255,255,.16); }
.deal-stage-popover { position:fixed;z-index:2400;width:min(340px,calc(100vw - 24px));max-height:min(520px,calc(100vh - 24px));padding:9px;overflow:auto;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 20px 55px rgba(12,31,48,.3); }
.deal-stage-popover[hidden] { display:none; }
.deal-stage-popover h3 { margin:4px 6px 9px;font-size:14px; }
.deal-stage-popover button { --stage-color:#8492A6; }
.board-stage-hint{display:block;width:100%;margin:6px 0 2px;padding:0;border:0;background:transparent;color:inherit;opacity:.92;font:500 11px/1.3 inherit;text-align:left;}
button.board-stage-hint{cursor:pointer;}button.board-stage-hint:hover{text-decoration:underline;}
.deal-close-reason-dialog { width:min(560px,calc(100vw - 32px)); }
.dialog-help { margin:-6px 0 18px;color:var(--muted);line-height:1.45; }
.deal-chat-panel { grid-column: 1 / -1; }
.detail-grid.deal-detail-layout { grid-template-columns: minmax(480px, .9fr) minmax(560px, 1.25fr); align-items: start; gap: 14px; }
.deal-detail-layout .detail-main-panel { grid-column: 1; grid-row: 1; }
.deal-detail-layout .detail-side-panel { grid-column: 1; grid-row: 2; }
.deal-left-workspace { grid-column: 1; grid-row: 2; display: grid; gap: 14px; min-width: 0; }
.deal-detail-layout .deal-chat-panel { grid-column: 2; grid-row: 1 / span 20; position: sticky; top: 16px; }
.deal-detail-layout .deal-timeline { height: clamp(340px,calc(100vh - 430px),640px); max-height: none; }
.deal-responsible-summary { display:grid; gap:8px; margin:0 16px 12px; padding:12px 14px; border:1px solid #d8c7b2; border-radius:10px; background:#fbf7f0; }
.deal-responsible-summary[hidden] { display:none; }
.deal-responsible-label { color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.deal-responsible-person { display:flex; align-items:center; gap:10px; min-width:0; }
.deal-responsible-person img,.deal-responsible-placeholder { width:42px; height:42px; flex:0 0 42px; border-radius:50%; object-fit:cover; background:#d9e7f2; color:var(--navy); display:grid; place-items:center; font-weight:800; }
.deal-responsible-person > span:last-child { display:grid; gap:3px; min-width:0; }
.deal-responsible-person b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--navy); font-size:13px; }
.deal-responsible-person small { color:var(--muted); font-size:11px; }
.deal-responsible-summary>[data-deal-responsible-edit] { justify-self:start; padding:6px 10px; border:1px solid #c9b293; border-radius:7px; background:#fff; color:var(--navy); font-size:11px; font-weight:700; }
.deal-contacts-list,.deal-company-card { padding: 0 16px 12px; }
.deal-contact-card { padding: 14px 0; border-bottom: 1px solid var(--line); }
.deal-contact-card:last-child { border-bottom: 0; }
.deal-contact-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.deal-contact-heading button,.deal-company-grid button { padding: 0; border: 0; color: var(--navy); background: transparent; text-align: left; }
.deal-contact-heading button:hover,.deal-company-grid button:hover { text-decoration: underline; }
.decision-badge { padding: 3px 8px; border-radius: 999px; color: white; background: #45b96d; font-size: 10px; font-weight: 800; }
.deal-contact-grid,.deal-company-grid,.deal-legacy-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 20px; }
.deal-contact-grid > span,.deal-company-grid > span,.deal-legacy-grid > div { min-width: 0; }
.deal-contact-grid small,.deal-company-grid small,.deal-legacy-grid small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.deal-contact-grid b,.deal-company-grid b,.deal-legacy-grid b { overflow-wrap: anywhere; color: var(--ink); font-size: 13px; }
.deal-company-grid { padding: 14px 0 4px; }
.deal-channel-list,.deal-link-list { display: flex; flex-wrap: wrap; gap: 5px 10px; }
.deal-channel-list a,.deal-link-list a { color: var(--navy-3); font-size: 12px; text-decoration: none; overflow-wrap: anywhere; }
.deal-channel-list a:hover,.deal-link-list a:hover { text-decoration: underline; }
.muted-value { color: var(--muted); font-size: 12px; }
.deal-legacy-sections { display: grid; gap: 14px; }
.deal-legacy-grid { padding: 15px 18px 18px; }
.deal-legacy-panel .panel-title > button { margin-left: auto; }
.deal-calculator-form { padding: 0 18px 18px; }
.deal-calculator-field { display: block; min-width: 0; }
.deal-calculator-field input,.deal-calculator-field textarea { width: 100%; box-sizing: border-box; }
.deal-calculator-field textarea { min-height: 72px; resize: vertical; }
.deal-calculator-form .entry-actions { align-items: center; margin-top: 14px; }
.deal-calculator-form [data-calculator-error] { display: inline-block; margin: 0; }
.deal-related-records { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.deal-related-records section { min-width: 0; padding: 15px 16px 18px; border-right: 1px solid var(--line); }
.deal-related-records section:last-child { border-right: 0; }
.deal-related-records h3 { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 9px; color: var(--navy); font-size: 13px; }
.deal-related-records h3 span { padding: 2px 7px; border-radius: 999px; background: var(--sand); font-size: 11px; }
.deal-related-records button { display: block; width: 100%; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); color: var(--navy-3); background: transparent; text-align: left; font-size: 12px; }
.deal-related-records small { color: var(--muted); }
.compact-empty { padding: 24px 12px; }
.deal-timeline { min-height: 260px; max-height: 480px; overflow-y: auto; padding: 8px 18px; }
.timeline-entry { position: relative; padding: 15px 44px 15px 6px; border-bottom: 1px solid var(--line); }
.timeline-entry:last-child { border-bottom: 0; }
.timeline-entry-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.timeline-entry-header .entry-type { padding: 3px 7px; border-radius: 999px; color: #245277; background: #e8f2fb; font-size: 11px; font-weight: 700; }
.timeline-entry-header time { margin-left: auto; color: var(--muted); font-size: 11px; }
.timeline-entry h3 { margin: 8px 0 0; font-size: 14px; }
.timeline-entry p { margin: 7px 0 0; color: #4b5055; white-space: pre-wrap; line-height: 1.5; }
.timeline-delete { position: absolute; top: 43px; right: 4px; border: 0; color: #9b2c27; background: transparent; font-size: 12px; }
.deal-files { padding: 10px 18px; border-top: 1px solid var(--line); background: #fff; }
.deal-files-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--navy); font-size: 13px; }
.file-upload-button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbf8f3; cursor: pointer; }
.deal-files-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.deal-file { display: inline-flex; align-items: center; gap: 8px; max-width: 320px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: white; text-decoration: none; }
.deal-file span { display: flex; align-items: center; gap: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-file small { flex: none; color: var(--muted); }
.chat-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fbf8f3; }
.chat-actions button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: white; }
.chat-actions button.active { color: white; border-color: var(--navy); background: var(--navy); }
.message-form { display: grid; gap: 10px; padding: 16px 18px 20px; }
.message-form label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.message-form select, .message-form textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: white; font: inherit; }
.message-form textarea { min-height: 82px; resize: vertical; }
.message-form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.message-form .primary { justify-self: end; }
.contact-message-history { border-top: 1px solid var(--line); padding: 0 18px 18px; }
.contact-message-attachments { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 4px 0; font-size: 12px; }
.contact-message-attachments label { display: inline-flex; gap: 4px; align-items: center; color: #245277; }
.contact-message-attachments small { color: var(--muted); }
.contact-attachments-label { width: 100%; color: var(--muted); font-size: 11px; }
.contact-message-history h3 { margin: 16px 0 8px; font-size: 14px; }
.contact-message-entry { padding: 10px 0; border-bottom: 1px solid var(--line); }
.contact-message-entry:last-child { border-bottom: 0; }
.contact-message-entry header { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 11px; }
.contact-message-entry header span { color: #245277; font-weight: 700; }
.contact-message-entry header time { margin-left: auto; }
.contact-message-entry strong { display: block; margin-top: 5px; font-size: 13px; }
.contact-message-entry p { margin: 5px 0 0; white-space: pre-wrap; line-height: 1.45; color: #4b5055; }
.partner-workspace-panel { grid-column: 1 / -1; }
.partner-rating-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.partner-rating-summary article { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.partner-rating-summary span, .partner-rating-summary small { display: block; color: var(--muted); font-size: 12px; }
.partner-rating-summary strong { display: block; margin: 7px 0 3px; color: var(--navy); font-size: 22px; }
.partner-rating-summary .zone-red strong { color: #a43b34; }
.partner-rating-summary .zone-green strong { color: var(--green); }
.smm-analytics-panel { border-bottom:1px solid var(--line); background:#fbfaf8; }
.smm-analytics-toolbar { display:flex; align-items:end; justify-content:space-between; gap:18px; padding:16px 18px 0; }
.smm-analytics-toolbar h3 { margin:0; color:var(--navy); font-size:16px; }
.smm-analytics-toolbar p { margin:5px 0 0; color:var(--muted); font-size:12px; }
.smm-analytics-filters { display:flex; flex-wrap:wrap; gap:10px; }
.smm-analytics-filters label { display:grid; gap:5px; color:#806b58; font-size:11px; font-weight:700; }
.smm-analytics-filters select { min-width:210px; max-width:320px; padding:9px 32px 9px 10px; border:1px solid var(--line); border-radius:8px; background:white; color:var(--navy); font:inherit; }
.smm-metrics { grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); }
.smm-metrics article { min-width:0; }
.smm-metrics span,.smm-metrics strong,.smm-metrics small { overflow-wrap:anywhere; }
.smm-platform-analytics { margin:0 18px 16px; padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.smm-platform-analytics h4 { margin:0 0 4px; color:var(--navy); font-size:14px; }
.smm-platform-analytics > p { margin:0 0 12px; color:var(--muted); font-size:12px; }
.smm-platform-metric-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px; }
.smm-platform-metric-grid article { min-width:0; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:var(--cream); }
.smm-platform-metric-grid span,.smm-platform-metric-grid strong,.smm-platform-metric-grid small { display:block; overflow-wrap:anywhere; }
.smm-platform-metric-grid span { color:var(--muted); font-size:11px; }
.smm-platform-metric-grid strong { margin:4px 0; color:var(--navy); font-size:18px; }
.smm-platform-metric-grid small { color:var(--muted); font-size:10px; }
.smm-platform-fields { margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
.smm-platform-fields h3 { margin:0; color:var(--navy); font-size:15px; }
.panel > .auth-hint { margin:0; padding:14px 18px; border-bottom:1px solid var(--line); line-height:1.5; overflow-wrap:anywhere; }
.partner-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 18px; border-bottom: 1px solid var(--line); }
.partner-actions button { padding: 9px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: white; }
.partner-actions button:hover { border-color: #c7b7a5; background: var(--sand); }
.partner-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.partner-columns section { min-width: 0; padding: 18px; border-right: 1px solid var(--line); }
.partner-columns section:last-child { border-right: 0; }
.partner-columns h3 { margin: 0 0 12px; color: var(--navy); font-size: 14px; }
.finance-columns { grid-template-columns: 1fr 1fr; }
#department-section { min-width: 0; width: 100%; max-width: 100%; }
#accounting-workspace-panel { min-width: 0; width: 100%; max-width: 100%; }
#accounting-workspace-panel > .partner-columns,
#accounting-workspace-panel > .official-forms,
#accounting-workspace-panel .partner-columns > section,
#accounting-official-forms,
#accounting-official-forms .partner-entry { min-width: 0; width: 100%; max-width: 100%; }
#accounting-workspace-panel .partner-entry b,
#accounting-workspace-panel .partner-entry small,
#accounting-workspace-panel .auth-hint { max-width: 100%; overflow-wrap: anywhere; }
#accounting-workspace-panel .entry-actions { min-width: 0; max-width: 100%; }
#accounting-workspace-panel .entry-actions > * { max-width: 100%; overflow-wrap: anywhere; }
#hr-workspace-panel { min-width: 0; width: 100%; max-width: 100%; }
#hr-workspace-panel > .partner-columns,
#hr-workspace-panel > .official-forms,
#hr-workspace-panel .partner-columns > section,
#hr-birthdays-list { min-width: 0; width: 100%; max-width: 100%; }
#hr-birthdays-list .tenant-user,
#department-reworks-panel .tenant-user { min-width: 0; grid-template-columns: minmax(0, 1fr) auto; }
#hr-birthdays-list .tenant-user > span,
#department-reworks-panel .tenant-user > span { min-width: 0; }
#hr-workspace-panel .tenant-user b,
#hr-workspace-panel .tenant-user small,
#hr-workspace-panel .auth-hint,
#department-reworks-panel .tenant-user b,
#department-reworks-panel .tenant-user small { max-width: 100%; overflow-wrap: anywhere; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.partner-entry { padding: 11px 0; border-bottom: 1px solid var(--line); }
.partner-entry:last-child { border-bottom: 0; }
.partner-entry b, .partner-entry small { display: block; overflow-wrap: anywhere; }
.partner-entry small { margin-top: 5px; color: var(--muted); line-height: 1.4; }
.crm-tenant-detail-dialog{width:min(1080px,calc(100vw - 32px))}.crm-tenant-tabs{display:flex;gap:7px;overflow-x:auto;margin:0 0 16px;padding:0 0 8px;border-bottom:1px solid var(--line)}.crm-tenant-tabs button{flex:0 0 auto;padding:8px 11px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--navy);font-weight:700}.crm-tenant-tabs button.active{border-color:#2f7fc1;background:#edf5fb;box-shadow:inset 0 3px 0 #2f7fc1}.crm-tenant-tab-content{min-height:300px}.crm-tenant-tab-content section{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.crm-tenant-tab-content section[hidden]{display:none}.crm-tenant-fact{padding:12px;border:1px solid var(--line);border-radius:9px;background:#fff}.crm-tenant-fact b,.crm-tenant-fact small{display:block}.crm-tenant-fact small{margin-top:5px;color:var(--muted);line-height:1.45}.crm-tenant-fact.wide,.crm-tenant-tab-content .entry-actions.wide{grid-column:1/-1}.crm-tenant-history{grid-column:1/-1}.crm-tenant-empty{grid-column:1/-1;padding:24px;text-align:center;color:var(--muted)}
.crm-support-note{margin:7px 0;color:var(--muted);font-size:13px}.crm-support-entry{margin-top:10px;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft)}.crm-support-entry .entry-actions{margin-top:8px}.crm-support-entry small b{display:inline;color:var(--navy)}
@media(max-width:700px){.crm-tenant-detail-dialog{width:calc(100vw - 18px)}.crm-tenant-tab-content section{grid-template-columns:1fr}.crm-tenant-fact.wide{grid-column:auto}}

/* Юридический отдел: самостоятельная сетка вместо неоформленного потока полей. */
#legal-workspace-panel { min-width: 0; }
.legal-workspace-heading { min-height: 68px; }
.legal-workspace-heading > div:first-child { min-width: 0; }
.legal-workspace-heading > div:first-child > span:last-child { min-width: 0; display: grid; gap: 3px; }
.legal-workspace-heading > div:first-child small { color: var(--brown); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.legal-workspace-heading .entry-actions { margin: 0; }
.legal-workspace-heading .entry-actions button { min-height: 36px; padding: 8px 12px; border: 1px solid #d9c9b7; border-radius: 8px; color: var(--navy); background: #fff; font-weight: 700; }
.legal-workspace-heading .entry-actions button:hover { border-color: #bda68c; background: #fdfaf6; }
.legal-work-queue { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px; background: #fbfaf7; }
.legal-queue-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.legal-queue-card > header { display: flex; align-items: center; gap: 11px; min-height: 72px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fffdfa; }
.legal-queue-card > header > span:last-child { min-width: 0; }
.legal-queue-card h3 { margin: 0; color: var(--navy); font-size: 14px; line-height: 1.35; }
.legal-queue-card header small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.legal-section-icon { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #e5d3ba; border-radius: 10px; color: #8c6335; background: #f8eee0; font: 700 18px/1 Georgia, serif; }
.legal-queue-card > div { min-height: 112px; padding: 0 16px 6px; }
.legal-queue-card .empty { padding: 34px 12px; font-size: 12px; }
.legal-due-diligence { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, .8fr); align-items: start; gap: 16px; padding: 0 18px 18px; border-top: 1px solid var(--line); background: #f7f4ef; }
.legal-dd-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px 24px 20px; background: #fff; }
.legal-due-diligence > .legal-dd-heading { grid-column: 1 / -1; margin: 0 -18px; }
.legal-dd-heading > div { min-width: 0; }
.legal-section-kicker { display: block; margin-bottom: 6px; color: var(--brown); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.legal-dd-heading h3 { margin: 0; color: var(--navy); font: 700 clamp(22px, 2vw, 29px)/1.2 "Playfair Display", Georgia, serif; }
.legal-dd-heading p { max-width: 800px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.legal-security-badge { flex: 0 0 auto; padding: 7px 10px 7px 28px; border: 1px solid #c8dfd2; border-radius: 999px; color: #246348; background: #f0f9f4; font-size: 10px; font-weight: 700; position: relative; white-space: nowrap; }
.legal-security-badge::before { content: '✓'; position: absolute; left: 10px; top: 6px; font-size: 12px; }
.legal-dd-form { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0; }
.legal-form-section { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.legal-form-source { grid-column: 1 / -1; }
.legal-form-risks, .legal-form-authority { align-self: stretch; grid-template-columns: 1fr; }
.legal-form-risks label, .legal-form-authority label, .legal-form-risks label.wide, .legal-form-authority label.wide { grid-column: auto; }
.legal-form-section legend { display: flex; align-items: center; gap: 8px; padding: 0 8px 0 0; color: var(--navy); font-size: 13px; font-weight: 800; }
.legal-form-section legend span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--navy); font-size: 11px; }
.legal-form-section label { min-width: 0; display: grid; align-content: start; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 700; }
.legal-form-section label.wide { grid-column: 1 / -1; }
.legal-form-section label small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.45; }
.legal-form-section input, .legal-form-section select, .legal-form-section textarea { width: 100%; min-width: 0; min-height: 42px; padding: 10px 11px; border: 1px solid #ddd3c6; border-radius: 8px; outline: 0; color: var(--ink); background: #fff; font: inherit; font-weight: 500; }
.legal-form-section textarea { resize: vertical; line-height: 1.5; }
.legal-form-source textarea { min-height: 190px; }
.legal-form-risks textarea { min-height: 100px; }
.legal-form-section input:focus, .legal-form-section select:focus, .legal-form-section textarea:focus { border-color: #7295b5; box-shadow: 0 0 0 3px rgba(47,99,146,.1); }
.legal-form-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border: 1px solid #dfd2c1; border-radius: 10px; background: #fffaf3; }
.legal-form-actions > span { max-width: 660px; color: #75624d; font-size: 11px; line-height: 1.45; }
.legal-form-actions .entry-actions { flex: 0 0 auto; margin: 0; }
.legal-form-actions button { min-height: 40px; padding: 9px 14px; border: 1px solid var(--navy); border-radius: 8px; color: var(--navy); background: #fff; font-weight: 700; }
.legal-form-actions button[type="submit"] { color: #fff; background: var(--navy); }
.legal-form-actions button:hover { box-shadow: 0 5px 14px rgba(23,59,93,.13); }
.legal-form-actions button:disabled { cursor: wait; opacity: .65; }
.legal-dd-form > .form-error { grid-column: 1 / -1; margin: 0; }
.legal-results-section { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
#legal-dd-preview-section { grid-column: 1; }
.legal-saved-reviews { grid-column: 2; grid-row: 2 / span 2; position: sticky; top: 82px; max-height: calc(100vh - 104px); overflow-y: auto; }
.legal-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 50px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fffdfa; }
.legal-results-heading h4 { margin: 0; color: var(--navy); font-size: 13px; }
.legal-results-heading small { color: var(--muted); font-size: 10px; line-height: 1.4; text-align: right; }
.legal-results-section .tenant-users-list { min-width: 0; padding: 0 16px 10px; }
.legal-results-section .partner-entry { min-width: 0; padding: 13px 0; }
.legal-results-section .partner-entry b, .legal-results-section .partner-entry small { max-width: 100%; overflow-wrap: anywhere; }
.legal-results-section:has(.tenant-users-list:empty) .legal-results-heading { border-bottom: 0; }

@media (max-width: 1180px) {
    .legal-due-diligence { grid-template-columns: 1fr; }
    .legal-dd-form, #legal-dd-preview-section, .legal-saved-reviews { grid-column: 1; }
    .legal-saved-reviews { grid-row: auto; position: static; max-height: none; }
}

@media (max-width: 980px) {
    .legal-work-queue { grid-template-columns: 1fr; }
    .legal-dd-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .legal-form-actions { align-items: flex-start; flex-direction: column; }
    .legal-form-actions .entry-actions { width: 100%; }
}

@media (max-width: 640px) {
    .legal-workspace-heading { align-items: flex-start; flex-direction: column; padding-block: 12px; }
    .legal-workspace-heading .entry-actions { width: 100%; }
    .legal-workspace-heading .entry-actions button { flex: 1; }
    .legal-work-queue { gap: 10px; padding: 12px; }
    .legal-dd-heading { padding: 20px 16px 16px; }
    .legal-security-badge { white-space: normal; }
    .legal-due-diligence { gap: 12px; padding: 0 12px 12px; }
    .legal-due-diligence > .legal-dd-heading { margin: 0 -12px; }
    .legal-dd-form { grid-template-columns: 1fr; padding: 0; }
    .legal-form-source { grid-column: auto; }
    .legal-form-section { grid-template-columns: 1fr; padding: 14px; }
    .legal-form-section label.wide { grid-column: auto; }
    .legal-form-actions .entry-actions { display: grid; grid-template-columns: 1fr; }
    .legal-form-actions button { width: 100%; }
    .legal-results-section { margin: 0; }
    .legal-results-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .legal-results-heading small { text-align: left; }
}
.smm-calendar { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; align-items:start; padding-top:8px; }
.smm-calendar-day { min-width:0; border:1px solid var(--line); border-radius:12px; background:#fff; overflow:hidden; }
.smm-calendar-day > h4 { margin:0; padding:10px 12px; color:var(--navy); background:var(--warm); border-bottom:1px solid var(--line); font-size:13px; }
.smm-calendar-day .partner-entry { margin:0 10px; }
.smm-calendar-day .entry-actions { margin-top:8px; display:flex; flex-wrap:wrap; gap:6px; }
#smm-workspace-panel { min-width:0; width:100%; max-width:100%; }
#smm-workspace-panel .smm-section-heading { min-height:72px; align-items:flex-start; padding-block:13px; }
#smm-workspace-panel .smm-section-heading > div { min-width:0; display:grid; align-content:start; gap:5px; }
#smm-workspace-panel .smm-section-heading h3,
#smm-workspace-panel .smm-section-heading .auth-hint { max-width:100%; margin:0; line-height:1.4; overflow-wrap:anywhere; }
#smm-workspace-panel .smm-section-heading h3 { color:var(--navy); font-size:14px; }
#smm-workspace-panel .smm-section-heading button { flex:0 0 auto; margin-top:0; }
@media(max-width:700px){#smm-workspace-panel .smm-section-heading{flex-direction:column;gap:10px}#smm-workspace-panel .smm-section-heading button{align-self:flex-start}}
.annual-ratings-panel { margin-top: 18px; }
.annual-rating-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.annual-rating-columns section { padding: 18px; }
.annual-rating-columns section + section { border-left: 1px solid var(--line); }
.annual-rating-columns h3 { margin: 0 0 10px; color: var(--navy); }
.top-entry { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); color: inherit; background: transparent; text-align: left; }
.top-entry:hover { background: #fbf8f3; }
.top-entry:last-child { border-bottom: 0; }
.top-position { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--navy); font-weight: 800; }
.top-entry:nth-child(1) .top-position { background: #c79327; }.top-entry:nth-child(2) .top-position { background: #80909d; }.top-entry:nth-child(3) .top-position { background: #a8663b; }
.top-entry b, .top-entry small { display: block; }
.top-entry small { margin-top: 3px; color: var(--muted); }
.top-score { font-weight: 800; }
.top-score small { white-space: nowrap; text-align: right; font-size: 10px; font-weight: 500; }
.rating-note { min-height: 38px; margin: -3px 0 10px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.rating-period-tools { display: flex; align-items: center; gap: 8px; }
.rating-period-tools select { min-height: 34px; padding: 6px 30px 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--navy); font-weight: 700; }
.employee-top-entry { cursor: default; }
.award-badge { display: inline-flex; margin-top: 6px; padding: 3px 7px; border-radius: 999px; background: #f2e3be; color: #765015; font-size: 10px; font-style: normal; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.negative-reasons { grid-column: 1 / -1; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.negative-reasons legend { padding: 0 6px; color: var(--ink); font-size: 13px; font-weight: 700; }
.negative-reasons label { display: flex; align-items: flex-start; gap: 8px; margin: 7px 0; font-weight: 400; }
.negative-reasons input { width: 16px; min-height: 16px; margin-top: 2px; }

/* Компактный настольный масштаб повторяет плотность действующей CRM. */
@media (min-width: 981px) {
    body { font-size: 13px; }
    .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
    .sidebar { padding: 14px 10px; }
    .brand { gap: 8px; padding: 0 6px 15px; }
    .brand-logo { width: 112px; }
    .brand small { font-size: 9px; }
    .profile { min-height: 56px; margin: 12px 0 16px; padding: 4px; }
    .avatar { flex-basis: 36px; width: 36px; height: 36px; font-size: 11px; }
    .profile-action { gap: 8px; padding: 4px; }
    .profile b { font-size: 11px; }
    .profile small { font-size: 8px; }
    .nav-heading { margin: 16px 8px 6px; font-size: 8px; }
    .nav-item { min-height: 36px; gap: 9px; margin: 2px 0; padding: 6px 8px; }
    .nav-icon { flex-basis: 24px; width: 24px; height: 24px; border-radius: 7px; font-size: 13px; }
    .nav-icon.icon-svg { padding: 4px; }
    .topbar { height: 52px; gap: 13px; padding: 0 22px; }
    .search-wrap { max-width: 620px; padding: 0 11px; }
    .search-wrap input { height: 34px; }
    .top-actions button { width: 34px; height: 34px; }
    .content { padding: 22px clamp(16px, 2vw, 32px) 38px; }
    .page-heading { gap: 16px; margin-bottom: 18px; }
    .eyebrow { font-size: 9px; }
    h1 { font-size: clamp(26px, 2.4vw, 34px); }
    .page-heading p:last-child { margin-top: 5px; }
    .primary { padding: 9px 14px; border-radius: 8px; }
    .metrics { gap: 11px; margin-bottom: 14px; }
    .metric { min-height: 130px; padding: 14px; }
    .metric strong { margin: 7px 0 3px; font-size: 28px; }
    .workspace-grid, .detail-grid, .profile-workspace { gap: 14px; }
    .panel { border-radius: 10px; }
    .panel-title { min-height: 46px; gap: 12px; padding: 0 14px; }
    .brown-line { width: 3px; height: 23px; }
    .panel-title h2 { font-size: 12px; }
    .count-badge { padding: 4px 8px; font-size: 10px; }
    .profile-summary, .profile-security-content { padding: 19px; }
    .profile-summary { gap: 14px; }
    .profile-page-avatar { flex-basis: 64px; width: 64px; height: 64px; font-size: 18px; }
    .profile-summary h3 { font-size: 21px; }
    .profile-security-content { min-height: 102px; }
    .partner-rating-summary { gap: 10px; padding: 14px; }
    .partner-rating-summary article { padding: 11px; }
    .partner-rating-summary strong { font-size: 19px; }
    #profile-performance .official-forms { padding: 2px 14px 14px; }
    #profile-performance .official-forms + .official-forms { padding-top: 14px; }
    #profile-performance .official-forms h3 { font-size: 15px; }
    .tenant-users-list { padding-inline: 14px; padding-bottom: 14px; }
    .tenant-user { gap: 12px; padding: 10px 3px; }
    .field-grid { padding: 6px 14px 16px; }
    .field { padding: 11px 8px; }
    th, td { padding: 11px 13px; }
    td { font-size: 12px; }
}

/* На обычном ноутбуке правая колонка кабинета уже: месяцы остаются читаемыми без обрезания подписей. */
@media (min-width: 981px) and (max-width: 1600px) {
    .profile-month-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 82px minmax(0, 1fr); }
    .sidebar { padding-inline: 8px; }
    .brand small, .profile-copy, .nav-item:not(.active)::after, .nav-item { font-size: 0; }
    .brand { justify-content: center; padding-inline: 0; }
    .brand-logo { width:60px; }
    .profile { justify-content: center; padding: 9px 5px; }
    .profile #logout-action { display: grid; flex: 0 0 26px; place-items: center; }
    .nav-heading { text-align: center; font-size: 8px; }
    .nav-item { justify-content: center; }
    .nav-icon { font-size: 16px; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-analytics-grid { grid-template-columns:1fr; }
    .dashboard-focus-grid { grid-template-columns:1fr; }
    .workspace-grid { grid-template-columns: 1fr; }
    .cards { grid-template-columns:1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-grid.deal-detail-layout { grid-template-columns: 1fr; }
    .deal-detail-layout .detail-main-panel,.deal-detail-layout .detail-side-panel,.deal-detail-layout .deal-chat-panel,.deal-left-workspace { grid-column: 1; grid-row: auto; position: static; }
    .deal-detail-layout .deal-timeline { max-height: 480px; }
    .communication-options { grid-template-columns: 1fr; }
    .partner-columns { grid-template-columns: 1fr; }
    .annual-rating-columns { grid-template-columns: 1fr; }
    .annual-rating-columns section + section { border-left: 0; border-top: 1px solid var(--line); }
    .partner-columns section { border-right: 0; border-bottom: 1px solid var(--line); }
    #accounting-workspace-panel > .partner-columns { grid-template-columns: minmax(0, 1fr); }
    #hr-workspace-panel > .partner-columns { grid-template-columns: minmax(0, 1fr); }
    .profile-workspace { grid-template-columns: 1fr; }
    .profile-avatar-card { grid-column:1; grid-row:1; }
    .profile-main-card { grid-column:1; grid-row:2; }
    .profile-security-card { grid-column:1; grid-row:3; }
    .profile-performance-card { grid-column:1; grid-row:4; }
}

@media (max-width: 640px) {
    .app-shell { display: block; }
    .owner-mfa-banner { align-items: stretch; flex-direction: column; gap: 8px; padding: 10px 14px; }
    .owner-mfa-banner button { width: 100%; }
    .sidebar { display: none; }
    .sidebar.mobile-open { position: fixed; inset: 0 auto 0 0; z-index: 80; display: block; width: min(292px, 86vw); padding: 18px 13px; box-shadow: 12px 0 38px rgba(9,28,45,.35); }
    .sidebar.mobile-open .brand small, .sidebar.mobile-open .profile-copy, .sidebar.mobile-open .nav-item { font-size: inherit; }
    .sidebar.mobile-open .brand-logo { width:132px; }
    .profile-summary { grid-template-columns: auto minmax(0,1fr); }
    .profile-contact-grid { grid-column: 1 / -1; grid-template-columns: 1fr; width:100%; }
    .profile-settings-grid { grid-template-columns: 1fr; }
    .profile-settings-grid > div > span:last-child { min-width:0; overflow-wrap:anywhere; }
    .profile-security-option { grid-template-columns: auto minmax(0,1fr); }
    .profile-security-option button { grid-column: 1 / -1; width:100%; }
    .profile-facts-grid,.profile-month-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .profile-two-columns { grid-template-columns:1fr; }
    .profile-two-columns > div + div { padding:14px 0 0; border-left:0; border-top:1px solid var(--line); }
    .sidebar.mobile-open .brand, .sidebar.mobile-open .profile, .sidebar.mobile-open .nav-item { justify-content: flex-start; }
    body.mobile-navigation-open::after { content: ''; position: fixed; inset: 0; z-index: 70; background: rgba(9,28,45,.45); }
    .topbar { padding: 0 14px; }
    .mobile-menu { display: flex; }
    .notifications-panel { left: 14px; right: 14px; width: auto; max-width: none; }
    .announcement-popup { left: 14px; right: 14px; width: auto; max-width: none; }
    .content { padding: 20px 14px 36px; }
    .page-heading { align-items: flex-start; }
    .page-heading > .primary { display: none; }
    .metrics { grid-template-columns: 1fr 1fr; }
    .metric { min-height: 128px; padding: 15px; }
    .metric strong { font-size: 28px; }
    .dashboard-focus-list { grid-template-columns:1fr; }
    .sales-chart { grid-template-columns:repeat(6,72px);overflow-x:auto;padding-inline:16px; }
    .outcome-main { grid-template-columns:1fr;justify-items:center; }
    .outcome-legend { width:100%; }
    .funnel-row { grid-template-columns:minmax(0,1fr) 76px;gap:7px 10px; }
    .funnel-track { grid-column:1 / -1;grid-row:2; }
    .dashboard-focus-item:nth-last-child(-n+2) { border-bottom:1px solid var(--line); }
    .dashboard-focus-item:last-child { border-bottom-color:transparent; }
    .quick-actions { grid-template-columns:1fr; }
    .field-grid { grid-template-columns: 1fr; }
    .field.wide { grid-column: auto; }
    .tenant-user { grid-template-columns: 1fr; gap: 9px; padding: 14px 0; }
    .tenant-user-actions { justify-content: flex-start; flex-wrap: wrap; }
    .tenant-user-actions select { width: 100%; min-width: 0; }
    #management-workspace-panel > .official-forms { padding: 16px 14px; }
    #management-workspace-panel > .official-forms .tenant-user { grid-template-columns: minmax(0, 1fr); }
    .department-tools { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid label.wide { grid-column: auto; }
    .deal-contact-grid,.deal-company-grid,.deal-legacy-grid,.deal-related-records { grid-template-columns: 1fr; }
    .deal-related-records section { border-right: 0; border-bottom: 1px solid var(--line); }
    .deal-record-toolbar { overflow-x: auto; flex-wrap: nowrap; }
    .deal-record-toolbar button { flex: 0 0 auto; }
    .partner-rating-summary { grid-template-columns: 1fr 1fr; }
    .smm-analytics-toolbar { align-items:stretch; flex-direction:column; }
    .smm-analytics-filters { display:grid; grid-template-columns:1fr; }
    .smm-analytics-filters select { width:100%; max-width:none; min-width:0; }
}
@media (max-width: 460px) {
    .profile-summary, .profile-security-content { padding: 18px; }
    .profile-summary { align-items: flex-start; gap: 14px; }
    .profile-page-avatar { flex-basis: 62px; width: 62px; height: 62px; }
    .profile-summary h3 { overflow-wrap: anywhere; font-size: 21px; }
    .profile-security-content { align-items: flex-start; flex-direction: column; }
    .profile-security-content .primary { width: 100%; }
    .partner-rating-summary { grid-template-columns: 1fr; padding: 14px; }
    #profile-performance .official-forms { padding-inline: 14px; }
    #profile-performance .official-forms .tenant-user { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .ai-assistant-action { right: 14px; bottom: 14px; padding: 5px; font-size: 0; }
    .ai-assistant-action span { width: 44px; height: 44px; }
}
.recovery-codes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.recovery-codes code{padding:9px 11px;border:1px solid var(--line);border-radius:8px;background:#f7f3ec;color:var(--navy);font-weight:700;letter-spacing:.08em;text-align:center}
.search-wrap{position:relative}.global-search-results{position:absolute;top:calc(100% + 10px);left:0;right:0;z-index:50;max-height:min(520px,70vh);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 16px 40px rgba(20,50,76,.18);padding:8px}.global-search-results button{display:grid;grid-template-columns:82px minmax(140px,1fr);gap:2px 10px;width:100%;padding:10px 12px;border:0;border-bottom:1px solid var(--line);background:#fff;text-align:left;color:var(--navy);cursor:pointer}.global-search-results button:last-child{border-bottom:0}.global-search-results button:hover,.global-search-results button:focus{background:#f5f8fb;outline:none}.global-search-results small{grid-row:1/3;color:#9b7043;text-transform:uppercase;font-size:10px;font-weight:800}.global-search-results b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-search-results span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#6b7783;font-size:12px}
.list-heading-actions,.view-switch{display:flex!important;align-items:center;gap:8px}.view-switch{padding:3px;border:1px solid var(--line);border-radius:9px;background:#fff}.panel-title .view-switch button{padding:6px 10px;border-radius:6px;color:#667684}.panel-title .view-switch button.active{background:var(--navy);color:#fff}.deal-board{display:flex;align-items:flex-start;gap:12px;overflow-x:auto;padding:14px;min-height:520px;scroll-behavior:smooth}.board-column{flex:0 0 275px;display:flex;flex-direction:column;height:min(720px,calc(100vh - 240px));min-height:520px;border:1px solid var(--line);border-radius:10px;background:#f7f8fa;overflow:hidden}.board-column-heading{position:relative;z-index:3;flex:0 0 auto;box-sizing:border-box;min-height:132px;padding:13px 14px;border-radius:9px 9px 0 0;background:var(--stage-color,#3976b9);color:var(--stage-text-color,#fff);box-shadow:0 4px 12px rgba(20,50,76,.18)}.stage-settings-open .board-column-heading{min-height:176px}.board-column-heading div{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;min-height:36px}.board-column-heading b{font-size:14px;line-height:1.25;letter-spacing:.01em}.board-column-heading span{flex:0 0 auto;min-width:28px;padding:2px 7px;border:1px solid currentColor;border-radius:999px;background:rgba(255,255,255,.18);font-size:12px;font-weight:800;text-align:center}.board-column-heading small{display:block;margin-top:6px;color:inherit;opacity:.9;font-weight:700}.board-stage-color-control{display:grid;grid-template-columns:auto 34px 1fr;align-items:center;gap:7px;margin-top:9px;padding-top:8px;border-top:1px solid currentColor;font-size:10px;font-weight:800}.board-stage-color-control span{min-width:0;padding:0;border:0;background:transparent;font-size:10px;text-align:left}.board-stage-color-control input{width:34px;height:24px;padding:1px;border:1px solid currentColor;border-radius:6px;background:#fff;cursor:pointer}.board-stage-color-control em{font-style:normal;letter-spacing:.04em}.board-cards{display:flex;flex:1 1 auto;flex-direction:column;gap:9px;padding:10px;min-height:0;overflow-y:auto;overflow-x:hidden}.board-card{display:flex;flex-direction:column;gap:7px;padding:11px;border:1px solid #e3ded4;border-radius:9px;background:#fff;color:var(--navy);text-align:left;box-shadow:0 2px 8px rgba(20,50,76,.05);cursor:pointer}.board-card[data-board-movable=true]{cursor:grab;touch-action:none;user-select:none}.board-card.is-dragging{opacity:.35;cursor:grabbing;outline:2px solid #2f7fc1;outline-offset:2px}.board-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.board-drag-ghost{position:fixed;z-index:10000;width:245px;pointer-events:none;opacity:.98;border-color:#2f7fc1;box-shadow:0 16px 40px rgba(20,50,76,.32);transform:rotate(1deg)}.board-card b{font-size:13px}.board-card small{color:#6b7783}.board-card-footer{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:#9b7043}body.board-drag-active,body.board-drag-active *{cursor:grabbing!important;user-select:none!important}
.board-meeting-badge{align-self:flex-start;padding:5px 8px;border:1px solid #9fc9b3;border-radius:999px;background:#eef8f2;color:#176b48;font-size:11px;font-weight:800;line-height:1.2}.board-card-heading.is-urgent b{color:#b42318}.panel-title .view-switch [data-deal-meeting-filter].active{background:#176b48;color:#fff}
.partner-board{display:grid;grid-template-columns:repeat(4,minmax(220px,1fr));align-items:start;width:100%;box-sizing:border-box}.partner-board .board-column{width:auto;min-width:220px;flex:none}.partner-board .board-column-heading{min-height:94px}

/* Прочитанные письма спокойные; жирное начертание и синяя точка остаются признаком нового письма. */
.email-message-copy b{font-weight:550}.email-message-copy strong{font-weight:500}.email-message-row.unread .email-message-copy b,.email-message-row.unread .email-message-copy strong{font-weight:800}
/* Безопасно восстановленные абзацы не сливаются в одну строку даже у старых импортированных писем. */
.email-reader-body>p,.email-thread-message>div p{margin:0 0 1em}.email-reader-body>p:last-child,.email-thread-message>div p:last-child{margin-bottom:0}
.list-more{display:flex;justify-content:center;padding:14px}.list-more button{padding:9px 18px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--navy);font-weight:700}.list-more button:hover{box-shadow:0 0 14px rgba(64,168,247,.2)}
.ai-assistant-action{position:fixed;right:24px;bottom:22px;z-index:40;display:flex;align-items:center;gap:9px;padding:6px 14px 6px 6px;border:1px solid #c69757;border-radius:999px;background:var(--navy);color:#fff;box-shadow:0 10px 28px rgba(20,50,76,.28);font-weight:800}.ai-assistant-action span{display:grid;place-items:center;width:40px;height:40px;overflow:hidden;border:1px solid #d4a45f;border-radius:50%;background:#071f39;box-shadow:0 0 12px rgba(89,195,244,.32)}.ai-assistant-action img{display:block;width:100%;height:100%;object-fit:cover}.ai-assistant-action:hover{transform:scale(1.03);box-shadow:0 0 22px rgba(64,168,247,.45)}.ai-assistant-dialog{width:min(900px,calc(100vw - 28px))}.ai-assistant-dialog form{padding-bottom:18px}.ai-assistant-dialog .partner-rating-summary{padding:14px 18px}.ai-safety-note{margin:0 18px 16px;padding:11px 13px;border-left:3px solid #c69757;background:#fbf7f0;color:#684f34}.ai-safety-note b{display:block;margin-bottom:3px;color:var(--navy)}.ai-assistant-dialog section{padding:0 18px}.ai-assistant-dialog section h3{margin:0;color:var(--navy);font-size:13px;text-transform:uppercase}.ai-mode-section{margin-bottom:16px}.ai-mode-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:9px}.ai-mode-card{display:flex;min-height:82px;padding:13px;align-items:flex-start;flex-direction:column;gap:5px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--navy);text-align:left}.ai-mode-card small{color:#6b7783;line-height:1.35}.ai-mode-card:hover{border-color:#8aa9c3;background:#f7fafc}.ai-mode-card.active{border-color:#2f7fc1;background:#f1f7fc;box-shadow:inset 0 3px 0 #2f7fc1}.ai-mode-panel{margin:0 18px 16px;padding:15px!important;border:1px solid var(--line);border-radius:11px;background:#fff}.ai-mode-panel[hidden]{display:none}.ai-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.ai-panel-heading p{margin:4px 0 0;color:#7b7b79;font-size:12px}.ai-panel-heading button{flex:0 0 auto}.ai-focus-list{display:grid;gap:7px;margin-top:12px}.ai-focus-item{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px;border:1px solid #e8e1d7;border-radius:9px;background:#fbfaf8}.ai-focus-item.overdue{border-left:3px solid #c94b46;background:#fff7f6}.ai-focus-number{display:grid;width:26px;height:26px;place-items:center;border-radius:50%;background:#e7eff6;color:var(--navy);font-weight:800}.ai-focus-item b,.ai-focus-item small{display:block}.ai-focus-item small{margin-top:3px;color:#777}.ai-focus-item.overdue small{color:#a33531}.ai-explanation{padding:14px;border-radius:9px;background:#f4f7fa;color:#5d6872}.ai-explanation b{color:var(--navy)}.ai-explanation p{margin:5px 0 0;line-height:1.5}.ai-mode-panel .dialog-actions{padding:14px 0 0}.ai-proposals-section{margin-top:18px;border-top:1px solid var(--line);padding-top:16px!important}.ai-proposal{align-items:flex-start}.ai-proposal>span:first-child{display:grid;gap:3px}.ai-proposal small{display:block;color:#697581}.ai-proposal .ai-expiry{margin-top:5px;color:#9b7043}.danger-text{color:#b33b36!important;font-weight:700}
@media(max-width:700px){.ai-mode-grid{grid-template-columns:1fr}.ai-mode-card{min-height:0}.ai-panel-heading{align-items:flex-start;flex-direction:column}.ai-focus-item{grid-template-columns:30px minmax(0,1fr)}.ai-focus-item button{grid-column:2;justify-self:start}.ai-assistant-dialog .partner-rating-summary{grid-template-columns:1fr}.ai-proposal .entry-actions{width:100%;justify-content:flex-start}}
.launch-acceptance-dialog{width:min(760px,calc(100vw - 28px))}.launch-acceptance-dialog form{padding-bottom:16px}.launch-acceptance-dialog .dialog-help{margin:0 18px 14px;padding:11px 13px;border-left:3px solid #c69757;background:#fbf7f0;color:#684f34;line-height:1.45}.launch-acceptance-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:0 18px}.launch-acceptance-check{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:start;padding:11px;border:1px solid var(--line);border-radius:9px;background:#fff;cursor:pointer}.launch-acceptance-check:has(input:checked){border-color:#258b66;background:#f0fbf7}.launch-acceptance-check input{width:18px;height:18px;margin:2px 0 0;accent-color:#258b66}.launch-acceptance-check b,.launch-acceptance-check small{display:block}.launch-acceptance-check b{color:var(--navy);line-height:1.3}.launch-acceptance-check small{margin-top:3px;color:#74808a;line-height:1.35}.launch-acceptance-comment{display:grid;gap:6px;margin:14px 18px 0;color:var(--navy);font-weight:700}.launch-acceptance-comment textarea{min-height:76px}.launch-acceptance-dialog .auth-error{margin-inline:18px}@media(max-width:660px){.launch-acceptance-checks{grid-template-columns:1fr}}
/* Счётчик непрочитанных писем в меню */
.nav-notification-dot{display:inline-block;flex:0 0 8px;width:8px;height:8px;margin-left:auto;border-radius:50%;background:#d33f3f;box-shadow:0 0 0 2px rgba(211,63,63,.18)}
.page-actions{display:flex;gap:8px;align-items:center}
.email-view-switch{flex-wrap:wrap}
.email-mailbox-switch{display:flex;gap:10px;padding:12px 14px;overflow-x:auto;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#fbfaf8}.email-mailbox-switch[hidden]{display:none}.email-mailbox-card{display:grid;grid-template-columns:34px minmax(150px,1fr) auto;gap:10px;align-items:center;min-width:250px;padding:10px 12px;border:1px solid #ded7ca;border-radius:11px;background:#fff;color:var(--navy);text-align:left;box-shadow:0 2px 7px rgba(20,50,76,.04)}.email-mailbox-card:hover{border-color:#9bb3c7;background:#f8fbfd}.email-mailbox-card.active{border-color:#2f7fc1;background:#f0f7fc;box-shadow:inset 0 3px 0 #2f7fc1}.email-mailbox-icon{display:grid;width:32px;height:32px;place-items:center;border-radius:9px;background:#eaf2f8;color:#1d659d;font-size:15px}.email-mailbox-card span:nth-child(2){min-width:0}.email-mailbox-card b,.email-mailbox-card small{display:block}.email-mailbox-card span:nth-child(2) b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-mailbox-card small{margin-top:2px;color:#77838e;font-size:11px}.email-mailbox-count{text-align:right}.email-mailbox-count b{font-size:15px}.email-mailbox-card.active .email-mailbox-icon{background:#2f7fc1;color:#fff}
.email-mailbox-copy{min-width:0}.email-mailbox-copy strong{display:block;margin-top:3px;overflow:hidden;color:#264e70;font-size:12px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.email-mailbox-current{display:flex;align-items:center;gap:8px;min-height:42px;padding:9px 16px;border-bottom:1px solid var(--line);background:#f7fafc;color:#6f7b84}.email-mailbox-current[hidden]{display:none}.email-mailbox-current b{color:var(--navy);font-size:14px}.email-mailbox-current small{margin-left:auto;color:#7b858d}.email-mailbox-current span{font-size:12px}.email-mailbox-card[aria-pressed="true"] .email-mailbox-copy strong{color:#163e61}@media(max-width:640px){.email-mailbox-current{align-items:flex-start;flex-direction:column;gap:2px}.email-mailbox-current small{margin-left:0}.email-mailbox-card{min-width:min(292px,86vw)}}
.board-drop-actions{position:fixed;left:50%;bottom:18px;z-index:9998;display:grid;grid-template-columns:repeat(3,minmax(190px,1fr));gap:12px;width:min(920px,calc(100vw - 40px));padding:12px;transform:translateX(-50%);border:1px solid rgba(20,50,76,.16);border-radius:16px;background:rgba(255,255,255,.96);box-shadow:0 18px 50px rgba(20,50,76,.28);backdrop-filter:blur(12px)}.board-drop-actions.board-drop-actions-two{grid-template-columns:repeat(2,minmax(220px,340px));width:min(720px,calc(100vw - 40px))}.board-drop-actions[hidden]{display:none}.board-win-zone,.board-close-zone,.board-delete-zone{box-sizing:border-box;min-height:82px;padding:15px 18px;border:2px dashed;border-radius:11px;text-align:center}.board-win-zone{border-color:#258b66;background:#f0fbf7;color:#176449}.board-close-zone{border-color:#c78819;background:#fff9ec;color:#79510c}.board-delete-zone{border-color:#c94b46;background:#fff4f3;color:#8f2925}.board-win-zone b,.board-win-zone small,.board-close-zone b,.board-close-zone small,.board-delete-zone b,.board-delete-zone small{display:block}.board-win-zone small,.board-close-zone small,.board-delete-zone small{margin-top:5px;line-height:1.35}.board-trash-icon{display:inline-block;margin-right:6px;font-size:21px;font-weight:900;line-height:.7;transform:rotate(45deg)}.board-win-zone.drag-over{border-style:solid;background:#d9f6ea;box-shadow:0 0 0 4px rgba(37,139,102,.2)}.board-close-zone.drag-over{border-style:solid;background:#ffedbd;box-shadow:0 0 0 4px rgba(199,136,25,.2)}.board-delete-zone.drag-over{border-style:solid;background:#ffd8d5;box-shadow:0 0 0 4px rgba(201,75,70,.2)}
.board-trash-icon{display:inline-block;width:22px;height:22px;margin:0 auto 3px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transform:none}
@media(max-width:760px){.board-drop-actions{grid-template-columns:1fr;width:calc(100vw - 24px);bottom:10px}.board-win-zone,.board-close-zone,.board-delete-zone{min-height:68px;padding:10px 14px}}
@media(max-width:760px){.list-heading-actions{align-items:flex-start!important;flex-direction:column}.email-view-switch{max-width:100%}.panel-title .email-view-switch button{padding:6px 8px}.email-mailbox-card{min-width:225px}.deal-filter-fields{grid-template-columns:1fr}.deal-filter-panel{width:100%;box-sizing:border-box}}
.email-workspace{display:grid;grid-template-columns:240px minmax(310px,390px) minmax(420px,1fr);min-height:min(720px,calc(100vh - 205px));border-top:1px solid var(--line);background:#fff}.email-workspace[hidden]{display:none}.email-navigation{min-width:0;padding:14px 12px;border-right:1px solid var(--line);background:#f8f7f4}.email-compose-button{width:100%;min-height:42px;margin-bottom:16px;border:0;border-radius:10px;background:#f0b64d;color:#173652;font-weight:800;box-shadow:0 4px 12px rgba(152,104,34,.15)}.email-navigation-heading{display:flex;align-items:center;justify-content:space-between;margin:12px 8px 7px;color:#61707c;font-size:11px;text-transform:uppercase;letter-spacing:.05em}.email-navigation-heading small{font-size:10px;text-transform:none}.email-workspace-mailboxes,.email-folder-list{display:grid;gap:3px}.email-workspace-mailboxes button,.email-folder-list button{display:grid;width:100%;min-width:0;border:0;border-radius:8px;background:transparent;color:var(--navy);text-align:left}.email-workspace-mailboxes button{grid-template-columns:28px minmax(0,1fr) auto;gap:8px;align-items:center;padding:9px 8px}.email-workspace-mailboxes button:hover,.email-workspace-mailboxes button.active,.email-folder-list button:hover,.email-folder-list button.active{background:#e7eef5}.email-workspace-mailboxes span:nth-child(2){min-width:0}.email-workspace-mailboxes b,.email-workspace-mailboxes small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-workspace-mailboxes b{font-size:12px}.email-workspace-mailboxes small{margin-top:2px;color:#71808c;font-size:10px}.email-workspace-mailboxes em{display:grid;min-width:21px;height:21px;padding:0 5px;place-items:center;border-radius:999px;background:#2f7fc1;color:#fff;font-size:10px;font-style:normal;font-weight:800}.email-workspace-mailbox-icon{display:grid;width:27px;height:27px;place-items:center;border-radius:8px;background:#fff;color:#2f7fc1}.email-folder-list button{grid-template-columns:minmax(0,1fr) auto;padding:9px 10px}.email-folder-list b{font-size:11px}.email-message-column{min-width:0;border-right:1px solid var(--line);background:#fbfaf8}.email-column-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;min-height:65px;padding:10px 14px;border-bottom:1px solid var(--line);background:#fff}.email-column-heading>span{min-width:0}.email-column-heading b,.email-column-heading small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-column-heading small{margin-top:3px;color:#71808c;font-size:11px}.email-column-heading strong{display:grid;min-width:28px;height:28px;padding:0 7px;place-items:center;border-radius:999px;background:#edf2f6;color:#536879;font-size:11px}.email-message-list{height:calc(min(720px,calc(100vh - 205px)) - 65px);overflow:auto}.email-message-row{position:relative;display:grid;width:100%;grid-template-columns:38px minmax(0,1fr);gap:9px;padding:12px 14px;border:0;border-bottom:1px solid #ebe4da;background:#fff;color:var(--navy);text-align:left}.email-message-row:hover,.email-message-row.active{background:#f0f6fb}.email-message-row.unread{background:#f7fbff}.email-message-avatar{display:grid;width:36px;height:36px;place-items:center;border-radius:50%;background:#dce9f4;color:#285e89;font-weight:800}.email-message-copy{display:block;min-width:0}.email-message-copy>span{display:flex;justify-content:space-between;gap:10px}.email-message-copy b,.email-message-copy strong,.email-message-copy small,.email-message-copy em{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-message-copy b{font-size:12px}.email-message-copy time{flex:0 0 auto;color:#77838d;font-size:10px}.email-message-copy strong{margin-top:4px;font-size:12px}.email-message-copy small{margin-top:3px;color:#6f7b85;font-size:11px}.email-message-copy em{margin-top:5px;color:#96714b;font-size:10px;font-style:normal}.email-message-row>i{position:absolute;right:7px;bottom:8px;width:7px;height:7px;border-radius:50%;background:#2f7fc1}.email-list-empty,.email-reader-empty{display:grid;min-height:260px;padding:28px;place-content:center;gap:7px;color:#79848c;text-align:center}.email-list-empty b,.email-reader-empty b{color:var(--navy)}.email-reader-empty span{font-size:34px}.email-reader{min-width:0;background:#fff}.email-reader-toolbar{display:flex;min-height:52px;align-items:center;gap:7px;padding:8px 16px;border-bottom:1px solid var(--line);overflow-x:auto}.email-reader-toolbar button{flex:0 0 auto;padding:7px 10px;border:1px solid #ddd4c8;border-radius:7px;background:#fff;color:var(--navy);font-size:11px}.email-reader-header{padding:20px 22px 16px;border-bottom:1px solid var(--line)}.email-reader-header p{margin:0 0 8px;color:#9a7042;font-size:11px;font-weight:800;text-transform:uppercase}.email-reader-header h3{margin:0;color:var(--navy);font-family:Montserrat,sans-serif;font-size:21px;line-height:1.3}.email-reader-header div{display:flex;justify-content:space-between;gap:15px;margin-top:13px;color:#60717e;font-size:12px}.email-reader-body{min-height:220px;padding:22px;white-space:pre-wrap;overflow-wrap:anywhere;color:#263d52;line-height:1.65}.email-reader-crm{display:grid;gap:5px;margin:0 22px 22px;padding:13px;border:1px solid #dce6ee;border-radius:9px;background:#f5f9fc}.email-reader-crm b{color:var(--navy)}.email-reader-crm span{color:#657681;font-size:12px}.email-mobile-back{display:none!important}
.email-reader-attachments{padding:14px 22px;border-bottom:1px solid var(--line);background:#fafcff}.email-attachment-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;color:var(--navy)}.email-attachment-heading>span{display:flex;align-items:center;gap:8px}.email-attachment-heading small{display:grid;min-width:20px;height:20px;place-items:center;border-radius:999px;background:#e4edf5}.email-attachment-bulk{flex-wrap:wrap;justify-content:flex-end}.email-attachment-bulk a,.email-attachment-actions a{padding:6px 9px;border:1px solid #b9cbd9;border-radius:7px;background:#fff;color:#245b86;font-size:11px;font-weight:700;text-decoration:none}.email-attachment-bulk a:hover,.email-attachment-actions a:hover{border-color:#2f7fc1;background:#edf6fc}.email-attachment-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px}.email-attachment-card{display:grid;grid-template-columns:30px minmax(0,1fr);gap:7px 9px;padding:11px;border:1px solid #d9e3eb;border-radius:9px;background:#fff;color:var(--navy)}.email-attachment-icon{grid-row:1/3;align-self:start;font-size:21px}.email-attachment-copy{min-width:0}.email-attachment-copy b,.email-attachment-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-attachment-copy small{margin-top:3px;color:#72808b}.email-attachment-actions{grid-column:2;display:flex;flex-wrap:wrap;gap:6px}.email-attachment-error{padding:10px;border:1px solid #efc3bf;border-radius:8px;background:#fff3f2;color:#9b2c27}.email-reader-body:has(.email-thread-message){display:grid;gap:12px;background:#f7f8fa;white-space:normal}.email-thread-message{box-sizing:border-box;width:min(100%,1120px);padding:16px;border:1px solid #e2ddd5;border-radius:10px;background:#fff;box-shadow:0 2px 8px rgba(20,50,76,.04)}.email-thread-message.current{border-color:#9cbad2;box-shadow:inset 3px 0 0 #2f7fc1}.email-thread-message header{display:flex;justify-content:space-between;gap:15px;padding-bottom:10px;border-bottom:1px solid #eee8df}.email-thread-message header b,.email-thread-message header small{display:block}.email-thread-message header small,.email-thread-message header time{color:#73808a;font-size:11px}.email-thread-message>div{padding-top:13px;white-space:normal;overflow-wrap:anywhere;line-height:1.6}.email-thread-message footer{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:12px;padding-top:10px;border-top:1px solid #eee8df}.email-thread-message footer span{color:#657684;font-size:11px}.email-thread-message footer a{padding:6px 8px;border-radius:7px;background:#eef4f8;color:#245b86;font-size:11px;text-decoration:none}@media(max-width:640px){.email-attachment-heading{align-items:flex-start;flex-direction:column}.email-attachment-bulk{justify-content:flex-start}.email-attachment-grid{grid-template-columns:1fr}}
.email-compose-file input{margin-top:7px;padding:9px;border:1px dashed #cbbba8;border-radius:8px;background:#fff}.email-compose-file small{display:block;margin-top:6px;color:var(--muted);font-size:11px}.email-compose-attachment-list{display:grid;gap:7px}.email-compose-attachment-list:empty{display:none}.email-compose-attachment{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px 11px;border:1px solid var(--line);border-radius:8px;background:#fffdfa}.email-compose-attachment span{font-size:18px}.email-compose-attachment b,.email-compose-attachment small{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-compose-attachment small{margin-top:2px;color:var(--muted);font-size:10px}.email-compose-attachment button{padding:6px 8px;border:1px solid #e1b4b0;border-radius:7px;background:#fff7f6;color:#9c2f2b;font-size:11px}.email-compose-attachment-list>.empty{padding:10px}
@media(max-width:1100px){.email-workspace{grid-template-columns:210px minmax(290px,360px) minmax(360px,1fr)}}
@media(max-width:820px){.email-workspace{position:relative;display:block;min-height:calc(100vh - 180px);overflow:hidden}.email-navigation,.email-message-column,.email-reader{position:absolute;inset:0}.email-navigation{z-index:3;transform:translateX(-100%);transition:transform .2s ease}.email-workspace.mobile-navigation-open .email-navigation{transform:translateX(0)}.email-message-column{z-index:1;border-right:0;background:#fff}.email-reader{z-index:2;transform:translateX(100%);transition:transform .2s ease;overflow:auto}.email-reader.mobile-open{transform:translateX(0)}.email-mobile-back{display:inline-flex!important}.email-column-heading{grid-template-columns:auto minmax(0,1fr) auto}.email-message-list{height:calc(100vh - 245px)}.email-reader-header div{align-items:flex-start;flex-direction:column}.email-reader-toolbar{position:sticky;top:0;z-index:2;background:#fff}}
.email-navigation{overflow-y:auto}.email-navigation-heading button{display:grid;width:23px;height:23px;padding:0;place-items:center;border:1px solid #d6dde3;border-radius:6px;background:#fff;color:#285e89;font-size:15px}.email-organizer-row{display:grid;grid-template-columns:minmax(0,1fr) 25px;gap:2px}.email-organizer-row>button:first-child{grid-template-columns:10px minmax(0,1fr) auto;gap:7px;align-items:center;padding:8px}.email-organizer-row>button:first-child i{width:8px;height:8px;border-radius:50%;background:var(--organizer-color)}.email-organizer-row>button:last-child{display:grid;padding:0;place-items:center;color:#88939b}.email-organizer-row>button:last-child:hover{background:#f7dfdf;color:#a62b25}.email-organizer-empty{display:block;padding:5px 8px 9px;color:#8a949b;font-size:10px}.email-label-badges{display:flex!important;gap:4px;margin-top:5px;overflow:hidden}.email-label-badge{display:inline-flex!important;max-width:110px;padding:2px 6px;border-radius:999px;background:color-mix(in srgb,var(--label-color) 18%,#fff);color:#304454!important;font-size:9px!important;font-weight:700}.email-label-options{display:grid;gap:8px;margin:16px 0}.email-label-options label{display:grid;grid-template-columns:auto 10px minmax(0,1fr);gap:8px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:8px}.email-label-options i{width:9px;height:9px;border-radius:50%;background:var(--label-color)}
.email-column-search{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:7px;align-items:center;margin:9px 12px;padding:0 9px;border:1px solid #ded7ca;border-radius:9px;background:#fff;color:#72808a}.email-column-search:focus-within{border-color:#2f7fc1;box-shadow:0 0 0 2px rgba(47,127,193,.12)}.email-column-search input{min-width:0;height:34px;padding:0;border:0;outline:0;background:transparent;color:var(--navy);font:inherit;font-size:12px}.email-column-search button{width:26px;height:26px;padding:0;border:0;border-radius:6px;background:#edf2f6;color:#536879;font-size:18px}.email-column-search button[hidden]{display:none}.email-message-list{height:calc(min(720px,calc(100vh - 205px)) - 118px)}
@media(max-width:820px){.email-message-list{height:calc(100vh - 298px)}}
.future-section-panel{min-height:320px}.future-section-message{display:flex;align-items:center;gap:20px;max-width:720px;margin:54px auto;padding:28px;border:1px solid var(--line);border-radius:16px;background:#fbfaf8}.future-section-icon{width:54px;height:54px;flex:0 0 auto;padding:12px;border-radius:14px;color:var(--navy);background:#eaf3fb}.future-section-message h3{margin:0 0 8px;color:var(--navy);font-size:22px}.future-section-message p{margin:0;color:var(--muted);line-height:1.55}@media(max-width:640px){.future-section-message{align-items:flex-start;margin:24px 0;padding:20px}.future-section-icon{width:46px;height:46px}}
.email-draft-status{min-height:1.35em;color:#667085}
.email-message-copy strong mark{background:none;color:#b54708;font:inherit;font-weight:700}.email-message-row.pinned{box-shadow:inset 3px 0 #d89a3d}.email-message-row.pinned .email-message-avatar{background:#f7e7c8;color:#81561f}
.email-message-row{grid-template-columns:24px minmax(0,1fr);align-items:center}.email-message-row>input{width:16px;height:16px;margin:0;accent-color:#2f7fc1}.email-message-open{position:relative;display:grid;width:100%;min-width:0;grid-template-columns:38px minmax(0,1fr);gap:9px;padding:0;border:0;background:transparent;color:inherit;text-align:left}.email-message-open>i{position:absolute;right:-7px;bottom:-4px;width:7px;height:7px;border-radius:50%;background:#2f7fc1}.email-bulk-actions{max-width:min(100%,900px);overflow-x:auto}
.email-reader-body{font-size:14px}.email-thread-message{padding:18px}.email-thread-message>div{line-height:1.65}.email-reader-crm{gap:12px;padding:16px;border-radius:11px}.email-reader-crm-heading{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center}.email-reader-crm-heading>span{display:grid;width:34px;height:34px;place-items:center;border-radius:9px;background:#173e61;color:#fff;font-size:10px;font-weight:800}.email-reader-crm-heading b{color:var(--navy)}.email-reader-crm>p{margin:0;color:#657681;font-size:12px;line-height:1.5}.email-reader-crm-links{display:grid;gap:8px}.email-reader-crm-links button{display:grid;gap:3px;width:100%;padding:10px;border:1px solid #d2dee8;border-radius:8px;background:#fff;color:var(--navy);text-align:left}.email-reader-crm-links button:hover{border-color:#2f7fc1;background:#f7fbfe}.email-reader-crm-links small{color:#778692;font-size:10px;text-transform:uppercase}.email-reader-crm-links b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.email-reader-crm-links span{color:#286b9f;font-size:11px;font-weight:700}
@media(min-width:1700px){#email-reader-content:not([hidden]){display:grid;grid-template-columns:minmax(0,1120px) minmax(280px,330px);justify-content:center;align-items:start;column-gap:24px}.email-reader-toolbar,.email-reader-header,.email-reader-attachments{grid-column:1/-1}.email-reader-toolbar{grid-row:1}.email-reader-header{grid-row:2}.email-reader-attachments{grid-row:3}.email-reader-body{grid-column:1;grid-row:4;margin-left:0;padding-right:0}.email-reader-crm{grid-column:2;grid-row:4;position:sticky;top:16px;margin:22px 22px 22px 0}}
.email-crm-loading,.email-crm-no-match,.email-crm-error{margin:0;color:#657681;font-size:11px;line-height:1.45}.email-crm-error{color:#a33a33}.email-crm-suggestions,.email-crm-choices{display:grid;gap:7px;padding-top:10px;border-top:1px solid #dce6ee}.email-crm-suggestions>b,.email-crm-choices>b{color:var(--navy);font-size:12px}.email-crm-suggestions>small{color:#6f7f8b;font-size:10px}.email-crm-link-action{width:100%;padding:8px 10px;border:1px solid #b9cbd9;border-radius:8px;background:#fff;color:#245b86;font-size:11px;font-weight:700;text-align:left}.email-crm-link-action:hover{border-color:#2f7fc1;background:#edf6fc}.email-crm-link-action.primary{border-color:#245b86;background:#245b86;color:#fff;text-align:center}.email-crm-link-action:disabled{opacity:.55}
.email-crm-actions{display:grid;gap:8px;padding-top:10px;border-top:1px solid #dce6ee}.email-crm-actions>b{color:var(--navy);font-size:12px}.email-crm-actions>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.email-crm-action{min-height:34px;padding:7px 8px;border:1px solid #c5d4df;border-radius:8px;background:#fff;color:#245b86;font-size:10px;font-weight:700;line-height:1.25;text-align:left}.email-crm-action:hover{border-color:#2f7fc1;background:#edf6fc}.email-crm-action:disabled{opacity:.5}.email-crm-notice{padding:8px 9px;border:1px solid #a9d6c3;border-radius:8px;background:#effaf5!important;color:#237056!important;font-size:11px!important;font-weight:700}@media(max-width:420px){.email-crm-actions>div{grid-template-columns:1fr}}
.email-crm-responsible{display:grid;gap:7px;padding-top:10px;border-top:1px solid #dce6ee}.email-crm-responsible>b{color:var(--navy);font-size:12px}.email-crm-responsible>span{font-size:12px;color:#36546c}.email-crm-responsible>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}.email-crm-responsible select{min-width:0;height:36px;padding:0 8px;border:1px solid #c5d4df;border-radius:8px;background:#fff;color:var(--navy);font:600 11px Montserrat,sans-serif}.email-crm-responsible button{min-height:36px;padding:7px 10px;border:0;border-radius:8px;background:#245b86;color:#fff;font-size:10px;font-weight:700}@media(max-width:420px){.email-crm-responsible>div{grid-template-columns:1fr}}
.email-ai-analysis{display:grid;gap:9px;padding:12px;border:1px solid #d8c7a8;border-radius:10px;background:#fffaf1}.email-ai-analysis header{display:flex;gap:9px;align-items:center}.email-ai-analysis header>span{display:grid;width:30px;height:30px;place-items:center;border-radius:9px;background:#c69757;color:#fff;font-size:10px;font-weight:900}.email-ai-analysis header b,.email-ai-analysis header small{display:block}.email-ai-analysis header small{margin-top:2px;color:#806e59;font-size:9px}.email-ai-analysis p{margin:0;color:#2f485d;font-size:11px;line-height:1.5}.email-ai-analysis>div{display:grid;gap:4px}.email-ai-analysis>div>b{font-size:10px;color:#173e61}.email-ai-analysis ul{display:grid;gap:3px;margin:0;padding-left:17px;color:#425a6c;font-size:10px;line-height:1.45}.email-ai-analysis .email-crm-action{width:100%;background:#fff}.email-ai-confirmation{color:#806e59!important;font-size:9px!important;line-height:1.35}
.email-reader-privacy{display:flex;align-items:center;gap:8px;padding:10px 22px;border-bottom:1px solid #ead9b8;background:#fff9ec;color:#72552f;font-size:11px}.email-reader-privacy[hidden]{display:none}.email-reader-privacy b{color:#594020}@media(max-width:640px){.email-reader-privacy{align-items:flex-start;flex-direction:column}}
@media(min-width:1700px){.email-reader-privacy{grid-column:1/-1;grid-row:3}.email-reader-attachments{grid-row:4}.email-reader-body{grid-row:5}.email-reader-crm{grid-row:5}}
.email-compose-signature{padding:12px 14px;border:1px solid #dfd3c5;border-radius:9px;background:#fbf9f5}.email-compose-signature b{display:block;margin-bottom:7px;color:#173e61;font-size:11px}.email-compose-signature pre{margin:0;white-space:pre-wrap;color:#455d70;font:11px/1.55 Montserrat,sans-serif}

/* Keep imported mail readable at the full width of the reading pane. */
.email-reader-body{box-sizing:border-box;width:100%;max-width:none;white-space:normal}
.email-thread-message{width:100%;max-width:1120px}
.email-thread-message>div{box-sizing:border-box;width:100%;max-width:none}

.library-tags{display:flex;flex-wrap:wrap;gap:7px;margin:-8px 0 24px}
.library-tags span{padding:5px 9px;border:1px solid var(--line);border-radius:999px;background:#fffdfa;color:var(--navy);font-size:11px;font-weight:700}
 .deal-proposal-prices{margin:12px 0;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fbfaf8}.deal-proposal-prices legend{padding:0 5px;color:var(--navy);font-weight:800}.deal-proposal-price-list{display:grid;gap:7px;max-height:180px;overflow:auto;margin:6px 0}.deal-proposal-price{display:flex!important;align-items:flex-start;gap:8px;padding:8px;border:1px solid #e8e1d7;border-radius:8px;background:#fff}.deal-proposal-price span{display:grid;gap:2px}.deal-proposal-price small{color:#687582}
.price-refresh-items{display:grid;gap:4px;margin:8px 0 0;padding-left:18px}.price-refresh-items li{color:var(--navy);font-size:11px}.price-refresh-items small{display:block;overflow-wrap:anywhere;color:var(--muted);font-size:10px}
.price-catalog-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(120px,180px) minmax(180px,1.3fr) auto auto;gap:10px;align-items:end}.price-catalog-row label{display:grid;gap:4px;color:var(--navy);font-size:11px;font-weight:700}.price-catalog-row input:not([type="checkbox"]){width:100%;box-sizing:border-box}.price-catalog-row .price-catalog-active{display:flex;align-items:center;gap:5px;white-space:nowrap}.price-catalog-row button{white-space:nowrap}.price-catalog-row small{grid-column:1/-1}@media(max-width:900px){.price-catalog-row{grid-template-columns:1fr 1fr}.price-catalog-row label:nth-child(3),.price-catalog-row small{grid-column:1/-1}}@media(max-width:640px){.price-catalog-row{grid-template-columns:1fr}.price-catalog-row label:nth-child(3),.price-catalog-row small{grid-column:auto}}
.price-refresh-run{display:grid;gap:10px}.price-refresh-run-heading{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.price-refresh-run-heading>span{display:grid;gap:3px}.price-refresh-run-heading small{color:var(--muted);font-size:10px}.price-refresh-items{padding:0;margin:0;list-style:none}.price-refresh-items li{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:7px 0;border-top:1px solid var(--line)}.price-refresh-items li span:nth-child(2){white-space:nowrap}.price-refresh-items li a{color:#2c6e9f;font-size:10px}.price-refresh-review{display:grid;gap:4px;padding:10px 12px;border:1px solid #e5d5b9;border-radius:8px;background:#fffaf0;color:#5e4c35;font-size:11px}.price-refresh-check{display:flex;gap:7px;align-items:center;margin-top:4px;font-weight:700}.price-refresh-check input{accent-color:#245b86}.price-refresh-run [data-price-refresh-action="approve"]:disabled{opacity:.5;cursor:not-allowed}@media(max-width:640px){.price-refresh-run-heading{display:grid}.price-refresh-items li{grid-template-columns:minmax(0,1fr) auto}.price-refresh-items li a{grid-column:1/-1}}
