.portal-body { margin: 0; background: #f4f7f8; color: var(--ink); min-height: 100vh; }
.portal-body *, .portal-body *::before, .portal-body *::after { box-sizing: border-box; }
.portal-body [hidden] { display: none !important; }
.portal-body h1, .portal-body h2, .portal-body h3 { font-family: "KVS Inter Tight", Inter, sans-serif; letter-spacing: -.025em; }
.portal-body button, .portal-body input, .portal-body textarea { font: inherit; }
.portal-body button, .portal-body a, .portal-body input, .portal-body textarea { -webkit-tap-highlight-color: transparent; }
.portal-body :focus-visible { outline: 3px solid #086d84; outline-offset: 4px; }
.portal-body .button { min-height: 42px; padding: 11px 16px; border-radius: 7px; display: inline-flex; gap: 9px; align-items: center; justify-content: center; text-decoration: none; font-weight: 600; }
.portal-body .button.primary { color: #212529; background: #f29c00; border: 1px solid #f29c00; }
.portal-body .button.primary:hover { background: #e89000; border-color: #e89000; }
.portal-body .button.secondary { color: #15596b; background: #fff; border: 1px solid #ccdde2; }
.portal-body .button:disabled { opacity: .6; cursor: wait; }
.muted { color: #687980; }
.portal-kicker { font-size: 11px; font-weight: 700; letter-spacing: .13em; color: #157b93; margin: 0 0 9px; }
.portal-brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; color: inherit; text-decoration: none; }
.portal-brand small { display: block; font-weight: 400; font-size: 11px; color: #78858b; margin-top: 4px; }
.portal-brand .brand-mark { flex-shrink: 0; }
.portal-notice { border: 1px solid #c5dfe5; background: #eef8fa; color: #195767; padding: 13px 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; margin: 0 0 22px; }
.portal-notice.error { background: #fff4f1; border-color: #efcec6; color: #963f32; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.login-intro { padding: 48px clamp(30px, 6vw, 100px); background: #1aa7c9; display: flex; flex-direction: column; justify-content: space-between; gap: 70px; min-height: 100vh; color: #083845; }
.login-intro .brand-mark { background: #fff; }
.login-intro .portal-kicker { color: #0b5364; }
.login-intro h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1.08; font-weight: 500; margin: 18px 0 24px; }
.login-lead { max-width: 400px; font-size: 16px; line-height: 1.8; }
.login-foot { font-size: 12px; color: #105568; }
.login-card { align-self: center; justify-self: center; width: min(420px, calc(100% - 64px)); padding: 35px 0; }
.login-card > .brand-mark { margin-bottom: 30px; }
.login-card h1, .login-card h2 { font-size: 32px; font-weight: 500; margin: 0 0 18px; }
.login-card > p:not(.portal-kicker) { color: #6c7b83; line-height: 1.8; font-size: 14px; }
.login-card .login-small { font-size: 11px !important; margin: 20px 0 0; }
.login-card .portal-notice { margin: 22px 0; color: #195767; }
.login-symbol { display: inline-flex; width: 46px; height: 46px; border-radius: 12px; align-items: center; justify-content: center; color: #137e97; background: #edf8fb; font-size: 26px; margin-bottom: 27px; }
.microsoft-login { width: 100%; margin-top: 12px; }
.microsoft-mark { display: grid; grid-template-columns: 7px 7px; gap: 2px; }
.microsoft-mark i { width: 7px; height: 7px; background: #212529; }
.portal-app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.portal-sidebar { background: #fff; border-right: 1px solid #e1e9ec; padding: 30px 20px 18px; display: flex; flex-direction: column; gap: 38px; position: sticky; top: 0; height: 100vh; }
.portal-sidebar nav { display: grid; gap: 9px; }
.portal-nav { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 7px; padding: 13px 11px; background: transparent; color: #61727a; cursor: pointer; text-align: left; font-size: 13px !important; }
.portal-nav > span:first-child { font-size: 19px; }
.portal-nav.active { color: #096d85; background: #eaf7fa; font-weight: 600; }
.nav-count { margin-left: auto; font-size: 10px; background: #f2f5f6; color: #526b77; padding: 3px 6px; border-radius: 4px; }
.active .nav-count { background: #d6f0f6; color: #096d85; }
.sidebar-copy { display: flex; align-items: flex-start; gap: 8px; margin-top: auto; padding: 20px 5px; color: #87949a; font-size: 11px; line-height: 1.8; }
.sidebar-copy p { margin: 0; }
.sidebar-copy .status-dot { margin-top: 6px; flex-shrink: 0; }
.portal-account { display: flex; gap: 10px; align-items: center; border-top: 1px solid #e7ecee; padding-top: 20px; min-width: 0; }
.portal-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; background: #e3f5f8; color: #11738a; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.portal-account > div { min-width: 0; }
.portal-account strong { display: block; font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-account div > span { display: block; color: #91a0a7; font-size: 9px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-account button { margin-left: auto; flex-shrink: 0; }
.portal-main { padding: 42px clamp(24px, 4vw, 64px) 60px; max-width: 1450px; width: 100%; margin: 0 auto; min-width: 0; }
.portal-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.portal-top h1 { margin: 0 0 10px; font-size: 34px; font-weight: 500; }
.portal-top .muted { font-size: 13px; line-height: 1.6; margin: 0; }
.portal-top > .button { flex-shrink: 0; }
.portal-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.portal-stats > div { border: 1px solid #dde7eb; background: #fff; border-radius: 9px; padding: 19px 22px; }
.portal-stats span { color: #7b8c94; font-size: 11px; }
.portal-stats strong { display: block; font-family: "KVS Inter Tight", Inter, sans-serif; font-size: 29px; font-weight: 500; margin-top: 10px; }
.portal-search { display: flex; align-items: center; background: #fff; padding: 8px 9px 8px 18px; border: 1px solid #dbe6ea; border-radius: 8px; gap: 13px; }
.portal-search > span { color: #74929e; font-size: 25px; }
.portal-search input { border: 0; background: transparent; min-width: 0; flex: 1; font-size: 13px; padding: 12px 0; color: #273b43; }
.portal-search input::placeholder { color: #8a9aa1; }
.search-hint { margin: 10px 0 28px; color: #87979e; font-size: 10px; }
.search-hint strong { font-weight: 500; color: #657d87; }
.company-filter { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #c6e5ec; background: #eaf7fa; color: #166c80; padding: 12px 16px; border-radius: 7px; font-size: 12px; margin-bottom: 20px; }
.legacy-notice { background: #fffbef; border: 1px solid #eee1ba; border-radius: 8px; padding: 16px; margin-bottom: 24px; display: flex; gap: 20px; align-items: center; justify-content: space-between; }
.legacy-notice strong { font-size: 12px; color: #836525; }
.legacy-notice p { font-size: 11px; color: #8e7b52; line-height: 1.7; margin: 6px 0 0; }
.legacy-notice button { font-size: 11px; white-space: nowrap; }
.portal-results-head { display: flex; align-items: center; gap: 13px; margin: 4px 0 17px; }
.portal-results-head h2 { font-size: 18px; font-weight: 600; margin: 0; }
.portal-results-head .muted { font-size: 11px; }
.portal-results-head button { margin-left: auto; font-size: 11px; }
.portal-results { display: grid; gap: 20px; }
.mail-group { border: 1px solid #dce6ea; border-radius: 10px; background: #fff; overflow: hidden; }
.mail-group-head { padding: 20px 23px 17px; border-bottom: 1px solid #e6eef0; background: #fcfefe; }
.mail-group-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.mail-group-heading h3 { font-size: 18px; font-weight: 600; line-height: 1.45; margin: 0; overflow-wrap: anywhere; }
.mail-group-heading time { font-size: 10px; color: #90a0a6; white-space: nowrap; margin-top: 5px; }
.mail-addresses { font-size: 11px; color: #71858e; line-height: 1.8; margin: 10px 0; overflow-wrap: anywhere; }
.mail-addresses p { margin: 0; }
.mail-addresses strong { font-weight: 500; color: #465e68; }
.mail-group-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.mailbox-badge { font-size: 9px; color: #50717e; border-radius: 4px; background: #edf4f6; padding: 4px 7px; overflow-wrap: anywhere; }
.mail-group-bottom button { font-size: 10px; }
.mail-link-status { width: 100%; font-size: 10px; color: #937640; margin: 2px 0 0; }
.portal-note-list { padding: 6px 23px; }
.portal-note { padding: 17px 0; border-bottom: 1px solid #edf1f2; }
.portal-note:last-child { border-bottom: 0; }
.portal-note-head { display: flex; align-items: center; gap: 9px; }
.portal-note-head .portal-avatar { width: 28px; height: 28px; font-size: 9px; }
.portal-note-head strong { font-size: 11px; font-weight: 600; }
.portal-note-head time { color: #93a1a7; font-size: 9px; margin-left: auto; }
.portal-note-text { font-size: 12px; line-height: 1.85; color: #52656e; white-space: pre-wrap; overflow-wrap: anywhere; margin: 11px 0 0; }
.portal-note-edited { font-size: 9px; color: #99a7ad; margin-top: 8px; display: block; }
.portal-empty { text-align: center; border: 1px dashed #cfdee3; border-radius: 10px; padding: 54px 20px; color: #7c919b; font-size: 13px; background: #f8fbfc; }
.portal-empty > span { font-size: 33px; color: #6ab6c9; }
.portal-empty h3 { color: #526d79; font-size: 21px; font-weight: 500; }
.portal-empty p { line-height: 1.8; margin: 9px 0 0; }
.load-more { margin: 24px auto 0; display: flex !important; }
.load-more[hidden] { display: none !important; }
.companies-intro h2 { font-size: 22px; font-weight: 500; }
.companies-intro p { font-size: 13px; color: #72868f; line-height: 1.8; max-width: 650px; margin-bottom: 24px; }
.company-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.company-card { background: #fff; border: 1px solid #dce7eb; border-radius: 9px; padding: 23px; min-width: 0; }
.company-card h3 { margin: 0 0 15px; font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.company-card p { font-size: 12px; line-height: 1.8; color: #708891; overflow-wrap: anywhere; margin: 4px 0; }
.company-actions { display: flex; gap: 20px; margin-top: 20px; flex-wrap: wrap; }
.company-actions button { font-size: 11px; }
.company-dialog { width: min(520px, calc(100% - 32px)); border: 1px solid #d3e3e9; border-radius: 12px; padding: 28px; color: #293d45; box-shadow: 0 20px 90px #163d4933; max-height: calc(100vh - 40px); overflow: auto; }
.company-dialog::backdrop { background: #14323e66; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; gap: 20px; }
.dialog-heading h2 { font-size: 27px; font-weight: 500; margin: 0; }
.company-dialog label { display: block; font-size: 12px; font-weight: 600; margin: 19px 0 9px; }
.company-dialog input, .company-dialog textarea { width: 100%; padding: 12px; border: 1px solid #cedde3; border-radius: 6px; font-size: 13px; color: #29424c; }
.company-dialog textarea { resize: vertical; }
.dialog-help { font-size: 10px; line-height: 1.7; margin-top: 8px; }
.dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 26px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 1500px) { .portal-main { padding-top: 55px; } }
@media (max-width: 1000px) { .portal-app { grid-template-columns: 210px minmax(0,1fr); } .portal-sidebar { padding: 25px 14px 16px; } .portal-top { align-items: flex-start; } .portal-top h1 { font-size: 28px; } .portal-top > .button { font-size: 11px; } .portal-main { padding: 30px 24px; } }
@media (max-width: 760px) {
  .login-layout { grid-template-columns: 1fr; } .login-intro { min-height: auto; padding: 26px; gap: 35px; } .login-intro h1 { font-size: 40px; } .login-lead { font-size: 13px; margin-bottom: 0; } .login-foot { display: none; } .login-card { margin: 12px auto; width: calc(100% - 52px); }
  .portal-app { display: block; } .portal-sidebar { height: auto; position: static; padding: 17px 20px; border-right: 0; border-bottom: 1px solid #e1e9ec; display: grid; grid-template-columns: 1fr auto; gap: 16px; }
  .portal-sidebar .portal-brand { font-size: 13px; } .portal-sidebar .brand-mark { width: 40px; height: 36px; font-size: 15px; } .portal-sidebar nav { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 1fr 1fr; } .portal-account { border: 0; padding: 0; } .portal-account > div { display: none; } .sidebar-copy { display: none; }
  .portal-main { padding: 25px 18px 45px; } .portal-top { gap: 16px; flex-wrap: wrap; } .portal-top h1 { font-size: 29px; } .portal-top .muted { font-size: 12px; } .portal-top > .button { min-height: 36px; padding: 9px 12px; }
  .portal-stats { gap: 8px; } .portal-stats > div { padding: 13px 11px; } .portal-stats span { font-size: 9px; } .portal-stats strong { font-size: 24px; }
  .portal-search { gap: 8px; padding-left: 12px; } .portal-search input { font-size: 12px; } .portal-search .button { padding: 10px; font-size: 11px; }
  .legacy-notice { align-items: flex-start; flex-direction: column; gap: 12px; } .portal-results-head { gap: 9px; flex-wrap: wrap; } .portal-results-head h2 { font-size: 17px; } .portal-results-head .muted { font-size: 10px; }
  .mail-group-head { padding: 17px; } .mail-group-heading { display: block; } .mail-group-heading h3 { font-size: 17px; } .mail-group-heading time { display: block; margin-top: 7px; } .portal-note-list { padding: 3px 17px; }
  .company-grid { grid-template-columns: 1fr; } .company-dialog { padding: 23px; }
}
