/* Communityline company theme. Layout and operational behavior live in workspace.css/js. */
:root {
  --navy: #16307a;
  --navy2: #26468f;
  --lime: #f4ce0a;
  --ink: #142443;
  --text: #526079;
  --muted: #657188;
  --line: #e2e7ef;
  --canvas: #f6f7f3;
  --green: #16704f;
  --red: #b12b3b;
  --amber: #8b5a0a;
  --radius: 20px;
  --shadow: 0 3px 12px #16307a04, 0 12px 30px #16307a03;
  --blue-soft: #eff3fd;
  --lime-soft: #f1f7d9;
  --focus: #3154a9;
}

/* Navigation carries the brand; working surfaces stay calm and readable. */
.sidebar { width: 268px; background: var(--navy); border-right: 1px solid #ffffff12; }
.sidebar .brand { padding: 26px 24px 22px; flex-direction: column; align-items: flex-start; gap: 10px; border-bottom: 1px solid #ffffff18; }
.brand-image { display: block; width: 220px; height: 60px; overflow: hidden; }
.brand-image img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.brand-caption { color: #c2cef0; font: 500 10px/1.5 Inter, Arial, sans-serif; letter-spacing: 1.5px; text-transform: uppercase; padding-left: 3px; }
.nav-scroll { padding: 22px 16px 28px; scrollbar-width: thin; scrollbar-color: #ffffff40 transparent; }
.nav-item { gap: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.55; color: #dbe3fc; border-radius: 11px; margin: 4px 0; }
.nav-item span { min-width: 0; }
.nav-item svg { opacity: .8; }
.nav-item:hover { background: #ffffff0e; color: white; }
.nav-item.active { color: white; background: #ffffff16; box-shadow: inset 3px 0 var(--lime); font-weight: 600; }
.nav-item.active svg { color: var(--lime); opacity: 1; }
.nav-item.featured { background: var(--lime); color: var(--navy); padding: 16px 14px; margin-bottom: 18px; font-weight: 650; box-shadow: 0 5px 18px #02123a18; }
.nav-item.featured:hover, .nav-item.featured.active { background: #f8dd4e; color: var(--navy); }
.nav-item.featured svg, .nav-item.featured.active svg { color: var(--navy); opacity: 1; }
.nav-label, details.nav-group > summary { color: #bbc9f0; font-size: 10px; letter-spacing: 1.45px; padding: 23px 13px 10px; }
.nav-group > summary::after { font-size: 13px; line-height: 1; }
.sidebar-foot { padding: 18px 22px; border-color: #ffffff20; background: #0014502b; }
.sidebar .avatar { background: #ffffff16; color: #fff2aa; border: 1px solid #ffffff24; }
.account-link > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.account-link small { color: #bac8ec; font-size: 11px; margin-top: 3px; }
.sidebar a:focus-visible, .sidebar summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.workspace { margin-left: 268px; }
.topbar { height: 80px; padding-inline: 36px; background: #fffffff2; border-color: var(--line); }
.topbar .trail { color: var(--muted); gap: 14px; font-size: 12px; }
.topbar .trail strong { color: var(--navy); font-weight: 650; }
.topbar .trail svg { color: #909bb1; }
.top-actions { gap: 12px; }
.top-actions .date { font-size: 12px; margin-right: 10px; }
.live-dot { background: var(--green); }
.icon-button { border-radius: 13px; border-color: var(--line); color: var(--navy); transition: background .18s, border-color .18s; }
.icon-button:hover { background: var(--blue-soft); border-color: #c7d2eb; }
.avatar { background: var(--blue-soft); color: var(--navy); border: 1px solid #dfe6f6; border-radius: 13px; }
.avatar.large { background: var(--lime-soft); border-color: #dce9a5; color: var(--navy); }
.unread { box-shadow: 0 0 0 2px white; }
.main { padding: 36px 36px 56px; max-width: 1720px; }
.workspace h1 { font-weight: 600; letter-spacing: -1.2px; color: var(--navy); overflow-wrap: anywhere; }
.workspace h2 { font-weight: 600; line-height: 1.35; }
.workspace h3 { font-weight: 600; }
.page-head { margin-bottom: 30px; gap: 24px; }
.page-head > div:first-child { min-width: 0; }
.page-head p { max-width: 740px; line-height: 1.75; color: var(--text); }
.eyebrow { color: var(--navy); font-size: 10px; letter-spacing: 1.75px; font-weight: 650; display: flex; align-items: center; gap: 9px; }
.workspace .eyebrow::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 2px; background: #819d0c; flex: none; }
.grid { gap: 24px; }
.spaced { margin-top: 26px; }
.card { border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 28px; }
.card-head { padding: 22px 26px; border-color: #e9edf3; background: #fff; }
.card-head h2 { font-size: 19px; color: var(--ink); }
.card-head .btn.quiet { padding-right: 0; }

/* Consistent actions, input states and readable status colors. */
.btn { border-color: #d4dce9; border-radius: 11px; color: var(--navy); font-weight: 600; transition: background .16s, border-color .16s, box-shadow .16s; }
.btn:hover { background: var(--blue-soft); border-color: #bac9e8; }
.btn.primary { background: var(--lime); border-color: #abc921; color: #132c0a; box-shadow: 0 2px 2px #4254090a; }
.btn.primary:hover { background: #c5e63d; border-color: #a0bd17; }
.btn.navy { background: var(--navy); border-color: var(--navy); color: white; }
.btn.navy:hover { background: #173b99; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--navy); }
.btn.quiet:hover { background: var(--blue-soft); }
.btn.danger { background: #fff5f4; color: var(--red); border-color: #f0d2d6; }
.btn.danger:hover { background: #fde9e9; border-color: #e8b5bd; }
.btn:disabled { box-shadow: none; opacity: .55; }
.workspace a:focus-visible, .workspace button:focus-visible, .mobile-nav :focus-visible,
dialog button:focus-visible, dialog a:focus-visible, dialog summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.field input, .field select, .field textarea, input.control, select.control { border-color: #cdd6e5; border-radius: 11px; background: #fff; transition: border-color .16s, box-shadow .16s; }
.field input:hover, .field select:hover, .field textarea:hover, .control:hover { border-color: #9bacce; }
.field input:focus, .field select:focus, .field textarea:focus, input.control:focus, select.control:focus { outline: 2px solid #3154a933; outline-offset: 1px; border-color: var(--focus); box-shadow: 0 0 0 4px #16307a07; }
.field input::placeholder, .field textarea::placeholder, input.control::placeholder { color: #76829a; opacity: 1; }
.field > span, .field > label { color: #45526b; }
.check input { accent-color: var(--navy); }
.section-label { color: var(--navy); border-color: var(--line); font-size: 11px; letter-spacing: 1.2px; }
.tabs { background: #edf0f7; padding: 5px; border: 1px solid #e0e5ef; border-radius: 13px; gap: 5px; }
.tab { border-radius: 9px; color: #53617c; }
.tab:hover { color: var(--navy); background: #ffffff80; }
.tab.active { color: var(--navy); background: white; font-weight: 650; box-shadow: 0 2px 5px #16307a10; }
.badge { border: 1px solid #e2e7ee; color: #536078; background: #f2f4f8; border-radius: 7px; }
.badge.good { color: #126844; background: #edf8f0; border-color: #d1eadc; }
.badge.warn { color: #80510a; background: #fff7e6; border-color: #f0e1bc; }
.badge.bad { color: #a72b3c; background: #fff0f1; border-color: #f2d6dc; }
.badge.blue { color: var(--navy); background: #edf2ff; border-color: #d7e1fa; }
.count { background: #ebeff7; color: #596781; }
.notice { background: #f5f8e9; border-color: #dce7b6; color: #45551d; border-radius: 13px; }
.notice.amber { background: #fff9ed; color: #80540b; border-color: #eddfbd; }
.notice.red, .error { background: #fff2f3; color: #a42b3b; border-color: #edcfd5; }
.loading { color: var(--muted); }

/* Dashboard: the same real records, with a clearer overview hierarchy. */
.dashboard-header { padding: 34px 34px 0; border-radius: 23px; background: var(--navy); color: white; position: relative; overflow: hidden; }
.dashboard-header .page-head { margin-bottom: 28px; position: relative; }
.dashboard-header h1 { color: white; font-size: 38px; margin-bottom: 14px; }
.dashboard-header .eyebrow { color: #e2ebb9; letter-spacing: 2px; margin-bottom: 14px; }
.dashboard-header .eyebrow::before { background: var(--lime); }
.dashboard-header p { color: #d2ddfb; font-size: 15px; max-width: 590px; }
.dashboard-header .head-actions { padding-top: 4px; }
.dashboard-header a:focus-visible, .dashboard-header button:focus-visible { outline-color: var(--lime); }
.dashboard-shortcuts { border-top: 1px solid #ffffff25; display: flex; flex-wrap: wrap; gap: 10px 30px; padding: 16px 0 18px; }
.dashboard-shortcuts a { display: inline-flex; align-items: center; gap: 9px; min-height: 34px; color: #f2f5ff; font-size: 12px; font-weight: 500; }
.dashboard-shortcuts a > svg:first-child { color: #d1e867; }
.dashboard-shortcuts a > svg:last-child { width: 12px; height: 12px; opacity: .75; margin-left: 8px; }
.dashboard-shortcuts a:hover { color: var(--lime); }
.setup-guide { margin-top: 22px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 26px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--lime); border-radius: 15px; }
.setup-guide > div:first-child { max-width: 590px; }
.setup-guide .eyebrow { font-size: 9px; margin-bottom: 6px; }
.setup-guide h2 { font-size: 17px; margin: 0 0 6px; }
.setup-guide p { margin: 0; font-size: 13px; line-height: 1.7; }
.setup-guide .actions { flex-shrink: 0; justify-content: flex-end; max-width: 400px; }
.kpis { gap: 20px; margin-block: 24px; }
.kpi { padding: 24px; position: relative; border-color: var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.kpi:first-child { background: #fff; color: var(--ink); border-color: #cfd8ee; }
.kpi:first-child .kpi-label, .kpi:first-child small { color: var(--muted); }
.kpi-label { color: var(--text); font-size: 12px; font-weight: 500; line-height: 1.5; margin: 0; }
.kpi-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 20px; }
.kpi-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--navy); background: var(--blue-soft); flex: none; }
.kpi:first-child .kpi-icon { background: var(--lime-soft); }
.kpi-value { color: var(--navy); font-size: 36px; font-weight: 600; letter-spacing: -1.3px; }
.kpi small { color: var(--muted); font-size: 11px; margin-top: 9px; }
.hero { background: var(--navy); }
.hero .eyebrow { color: var(--lime); }
.hero p { color: #d2ddfb; }
.progress { background: #edf0f5; height: 6px; }
.progress > i { background: #9ab815; }
.chart { border-color: var(--line); gap: 24px; }
.chart-bar { background: var(--navy); border-radius: 6px 6px 0 0; }
.chart-bar.lime { background: var(--lime); }
.legend { color: var(--text); }
.legend i { background: var(--navy); }
.legend i.lime { background: var(--lime); outline: 1px solid #92ae13; }

/* Lists reflow to labelled records; no small-screen horizontal tables. */
.toolbar { padding: 22px 26px; background: #fff; border-color: var(--line); gap: 12px; }
.record-header { background: #f6f8fc; color: #596984; font-size: 10px; font-weight: 650; letter-spacing: 1.15px; padding-block: 15px; }
.record-row { border-color: #e9edf4; padding-block: 22px; transition: background .15s; }
.record-row:hover { background: #f8faff; }
.row-title > a { color: var(--ink); font-weight: 600; }
.row-title > a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.row-title > a small { font-weight: 400; color: var(--muted); }
.row-actions .btn { border-color: #dbe3f3; background: #f8faff; color: var(--navy); }
.row-actions .btn:hover { background: #eaf0ff; border-color: #b9c9ee; }
.cell-label { color: #596981; font-weight: 500; }
.list-footer { padding: 20px 26px; border-top: 1px solid #edf0f5; background: #fcfdff; }
.definition { gap: 24px; margin-block: 20px 0; }
.definition dt { color: #637089; margin-bottom: 7px; }
.definition dd { color: var(--ink); line-height: 1.65; }
.metric-link { background: #fcfdff; border-color: var(--line); border-radius: 14px; transition: border-color .16s, background .16s; }
.metric-link b { color: var(--navy); }
.metric-link:hover { border-color: #adbfeb; background: var(--blue-soft); }
.simple-row, .file-row { border-color: #e9edf4; }
.timeline-item { border-color: #dce4f4; }
.timeline-item:before { background: var(--navy); border-color: #e8eefc; }
.empty { padding: 48px 24px; }
.empty .empty-icon { background: var(--blue-soft); border: 1px solid #dfe6f7; color: var(--navy); border-radius: 18px; width: 60px; height: 60px; }
.empty h3 { color: var(--ink); font-size: 19px; line-height: 1.4; margin-bottom: 10px; }
.empty p { color: var(--muted); font-size: 13px; line-height: 1.8; max-width: 365px; margin-inline: auto; }

dialog { background: white; border-color: #d4ddee; border-radius: 22px; box-shadow: 0 30px 100px #03164f33; }
dialog::backdrop { background: #03164f80; backdrop-filter: blur(4px); }
.dialog-head { padding: 24px 28px; background: #f7f9ff; border-bottom: 1px solid #dce4f4; }
.dialog-head h2 { color: var(--navy); font-size: 22px; letter-spacing: -.5px; }
.dialog-head .icon-button { background: #edf2fe; color: var(--navy); }
.dialog-body { padding: 28px; }
.dialog-foot { background: #fff; border-color: var(--line); box-shadow: 0 -5px 20px #16307a04; }
.code-box { color: var(--navy); background: #f0f4fc; }
#toast { background: var(--navy); border: 1px solid #3550a1; box-shadow: 0 8px 30px #03164f30; }
.more-menu .nav-item { color: var(--ink); }
.more-menu .nav-item:hover, .more-menu .nav-item:focus { background: var(--blue-soft); color: var(--navy); }
.more-menu .nav-item.active { background: var(--blue-soft); color: var(--navy); box-shadow: inset 3px 0 var(--navy); }
.more-menu .nav-item.active svg { color: var(--navy); }
.more-menu .nav-item.featured, .more-menu .nav-item.featured:focus { background: var(--lime); color: var(--navy); box-shadow: none; border: 1px solid #afcf25; }
.more-menu .nav-item.featured:hover { background: #f8dd4e; }
.more-menu .nav-group > summary { color: #51607b; font-weight: 650; }
.more-menu .nav-group { border-color: var(--line); }

@container (max-width: 850px) {
  .record-row { padding: 26px; gap: 20px; }
  .record-row:nth-child(even) { background: #fbfcff; }
  .record-row:hover { background: #f4f7ff; }
}
@media (min-width: 601px) {
  .workspace h1 { font-size: 34px; }
  .dashboard-header h1 { font-size: 38px; }
  .btn { font-size: 14px; min-height: 46px; padding: 11px 17px; }
  .btn.small { font-size: 12px; min-height: 36px; padding: 8px 12px; }
  .field input, .field select, .field textarea, input.control, select.control { min-height: 47px; }
  .toolbar select { max-width: 210px; }
}
@media (min-width: 1900px) { .main { padding-inline: 48px; } }
@media (max-width: 1250px) {
  .sidebar { width: 236px; }
  .sidebar .brand { padding-inline: 20px; }
  .brand-image { width: 196px; height: 55px; }
  .brand-caption { font-size: 9px; letter-spacing: 1.2px; }
  .workspace { margin-left: 236px; }
  .main { padding: 30px 28px 48px; }
  .topbar { padding-inline: 28px; }
  .dashboard-header { padding: 30px 28px 0; }
  .setup-guide { flex-wrap: wrap; }
  .setup-guide .actions { justify-content: flex-start; max-width: 100%; }
}
@media (max-width: 1000px) {
  .workspace { margin-left: 0; }
  .topbar { background: var(--navy); border-bottom-color: #ffffff20; height: 76px; padding-inline: 24px; }
  .mobile-brand { display: flex; padding: 0; gap: 0; }
  .mobile-brand .brand-image { width: 194px; height: 54px; }
  .mobile-brand .brand-caption { display: none; }
  .topbar .icon-button { color: white; border-color: #ffffff30; background: #ffffff0b; }
  .topbar .icon-button:hover { background: #ffffff20; }
  .topbar .avatar { background: #ffffff15; color: white; border-color: #ffffff30; }
  .topbar a:focus-visible { outline-color: var(--lime); }
  .topbar .unread { background: var(--lime); box-shadow: 0 0 0 2px var(--navy); }
  .main { padding: 30px 24px 116px; }
  .mobile-nav { border-top: 1px solid #dce3ef; background: #fffffff5; box-shadow: 0 -4px 20px #16307a05; gap: 5px; }
  .mobile-nav a, .mobile-nav button { border-radius: 12px; color: #657188; padding-block: 9px; }
  .mobile-nav .active { background: var(--blue-soft); color: var(--navy); font-weight: 650; }
  .mobile-nav .active svg { background: transparent; padding: 0; margin: 0; color: var(--navy); }
  .mobile-nav [data-action=more] { color: var(--navy); }
}
@media (max-width: 600px) {
  .topbar { height: 76px; padding-inline: 16px; gap: 10px; }
  .mobile-brand .brand-image { width: 170px; height: 49px; }
  .top-actions { gap: 8px; }
  .top-actions > a:last-child { display: none; }
  .main { padding: 28px 18px 118px; }
  .workspace h1 { font-size: 32px; letter-spacing: -.9px; }
  .page-head { margin-bottom: 26px; }
  .page-head p { font-size: 17px; line-height: 1.65; }
  .eyebrow { font-size: 11px; letter-spacing: 1.5px; }
  .grid { gap: 20px; }
  .card { border-radius: 18px; }
  .card-pad { padding: 25px 21px; }
  .card-head { padding: 22px 21px; }
  .card-head h2 { font-size: 21px; }
  .card-head .btn.quiet { padding: 8px 0; }
  .btn { min-height: 52px; font-size: 17px; padding: 13px 17px; border-radius: 12px; }
  .btn.small { min-height: 44px; font-size: 16px; padding: 10px 14px; }
  .field input, .field select, .field textarea, input.control, select.control { min-height: 54px; font-size: 18px; }
  .section-label { font-size: 13px; }
  .dashboard-header { padding: 27px 22px 0; border-radius: 20px; }
  .dashboard-header h1 { font-size: 34px; line-height: 1.18; }
  .dashboard-header .page-head { margin-bottom: 22px; gap: 22px; }
  .dashboard-header .eyebrow { font-size: 10px; letter-spacing: 1.6px; }
  .dashboard-header p { font-size: 17px; line-height: 1.65; }
  .dashboard-header .head-actions { padding: 0; }
  .dashboard-shortcuts { display: grid; grid-template-columns: 1fr; gap: 0; padding: 9px 0 12px; }
  .dashboard-shortcuts a { min-height: 48px; font-size: 15px; gap: 12px; }
  .dashboard-shortcuts a > svg:last-child { margin-left: auto; }
  .setup-guide { padding: 22px 20px; margin-top: 20px; gap: 18px; }
  .setup-guide .eyebrow { font-size: 10px; }
  .setup-guide h2 { font-size: 21px; margin-block: 7px 10px; }
  .setup-guide p { font-size: 16px; }
  .setup-guide .actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .kpis { gap: 16px; margin-block: 22px; }
  .kpi { padding: 24px; }
  .kpi-heading { margin-bottom: 15px; }
  .kpi-label { font-size: 16px; }
  .kpi-icon { width: 38px; height: 38px; border-radius: 12px; }
  .kpi-value { font-size: 40px; }
  .kpi small { font-size: 14px; }
  .toolbar { padding: 22px 20px; }
  .record-row { padding: 26px 21px; }
  .record-row .cell { margin-top: 20px; }
  .record-row .cell:first-child { margin-top: 0; }
  .row-title > a { font-size: 20px; }
  .cell-label { font-size: 13px; }
  .list-footer { padding: 20px; }
  .empty { padding: 36px 20px; }
  .empty h3 { font-size: 23px; }
  .empty p { font-size: 17px; line-height: 1.7; }
  .definition { gap: 24px; }
  .legend { gap: 14px; flex-wrap: wrap; }
  dialog { border: 0; border-radius: 0; }
  .dialog-head { padding: 20px; }
  .dialog-head h2 { font-size: 23px; }
  .dialog-body { padding: 26px 20px; }
  .dialog-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); }
  .more-menu .nav-item.featured { font-size: 18px; padding: 21px 18px; }
  .more-menu .nav-group > summary { font-size: 12px; min-height: 52px; }
}
@media (max-width: 360px) {
  .topbar { padding-inline: 12px; gap: 6px; }
  .mobile-brand .brand-image { width: 162px; }
  .top-actions { gap: 6px; }
  .main { padding-inline: 14px; }
  .dashboard-header { padding-inline: 20px; }
  .card-pad, .card-head { padding-inline: 18px; }
}
@media print {
  .workspace { margin: 0; }
  .main { padding: 0; }
  .dashboard-header { background: white; padding: 0; border-radius: 0; color: var(--ink); }
  .dashboard-header h1, .dashboard-header p, .dashboard-header .eyebrow { color: var(--ink); }
  .dashboard-shortcuts { display: none; }
  .card, .kpi { box-shadow: none; }
}

/* Account menu and self-service profile */
.avatar.has-photo { overflow: hidden; padding: 0; background: #fff; }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.account-menu { position: relative; }
.account-trigger { display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border: 1px solid var(--line); border-radius: 16px; background: white; color: var(--navy); cursor: pointer; min-height: 48px; }
.account-trigger:hover, .account-trigger[aria-expanded=true] { background: var(--blue-soft); border-color: #c7d2eb; }
.account-trigger:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.account-trigger svg { transition: transform .18s; }
.account-trigger[aria-expanded=true] svg { transform: rotate(180deg); }
.account-trigger .avatar { width: 40px; height: 40px; }
.account-dropdown { position: absolute; right: 0; top: calc(100% + 10px); width: 300px; max-width: calc(100vw - 24px); background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px #07172f2e; padding: 8px; z-index: 60; }
.account-dropdown[hidden] { display: none; }
.account-dropdown-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); min-width: 0; }
.account-dropdown-head > div { min-width: 0; }
.account-dropdown-head strong { display: block; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-dropdown-head small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-dropdown [role=menuitem] { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.account-dropdown [role=menuitem] svg { color: var(--navy); flex-shrink: 0; }
.account-dropdown [role=menuitem] span { display: flex; flex-direction: column; min-width: 0; }
.account-dropdown [role=menuitem] small { font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.account-dropdown [role=menuitem]:hover, .account-dropdown [role=menuitem]:focus-visible { background: var(--blue-soft); outline: none; }
.account-dropdown .danger-item { color: var(--red); margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.account-dropdown .danger-item svg { color: var(--red); }
.account-dropdown .danger-item:hover, .account-dropdown .danger-item:focus-visible { background: #fff5f5; }

.profile-hero { display: flex; align-items: center; gap: 26px; padding: 28px; flex-wrap: wrap; }
.profile-photo { position: relative; flex-shrink: 0; }
.profile-photo .avatar.large { width: 112px; height: 112px; border-radius: 30px; font-size: 38px; }
.photo-edit { position: absolute; right: -6px; bottom: -6px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 3px solid white; background: var(--navy); color: white; cursor: pointer; }
.photo-edit:hover { background: var(--navy2); }
.photo-edit:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.profile-hero-text { flex: 1 1 240px; min-width: 0; }
.profile-hero-text h2 { margin: 4px 0 6px; font-size: 28px; overflow-wrap: anywhere; }
.profile-hero-text p { margin: 0 0 12px; color: var(--text); }
.profile-hero-text .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-hero-actions { flex-wrap: wrap; }
.card-head.flush { padding: 0 0 14px; border-bottom: 0; }
.card-head small { color: var(--muted); }
.completion { margin-bottom: 18px; }
.completion small { color: var(--muted); font-size: 12px; }
.meter { height: 8px; border-radius: 99px; background: #edf0f5; overflow: hidden; margin-bottom: 6px; min-width: 120px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), #5a7bd6); border-radius: inherit; }
.meter.wide { flex: 0 1 220px; margin: 0; }
.hint { color: var(--muted); font-size: 13px; margin: 16px 0 0; }
.req-list { padding-top: 6px; padding-bottom: 6px; }
.req-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.req-row:last-child { border-bottom: 0; }
.req-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.req-row .actions { flex-wrap: nowrap; }
.avatar-picker { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.avatar-picker .field { flex: 1 1 260px; }
.avatar-preview .avatar.large { width: 96px; height: 96px; border-radius: 26px; font-size: 32px; }
@media (max-width: 1000px) {
  .account-trigger { background: #ffffff0b; border-color: #ffffff30; color: white; }
  .account-trigger:hover, .account-trigger[aria-expanded=true] { background: #ffffff20; border-color: #ffffff50; }
}
@media (max-width: 600px) {
  .top-actions > .account-menu { display: block; }
  .account-trigger { padding: 2px; min-height: 44px; }
  .account-trigger > svg { display: none; }
  .account-trigger .avatar { width: 38px; height: 38px; }
  .profile-hero { padding: 22px 20px; gap: 18px; }
  .profile-photo .avatar.large { width: 88px; height: 88px; font-size: 30px; border-radius: 24px; }
  .profile-hero-actions { width: 100%; }
  .profile-hero-actions .btn { flex: 1 1 auto; }
  .req-row { grid-template-columns: minmax(0, 1fr) auto; }
  .req-row .actions { grid-column: 1 / -1; }
  .card-head .meter.wide { flex-basis: 100%; }
}
@media (max-width: 380px) {
  .top-actions .settings-link { display: none; }
}

/* Directory photos, status history, birthdays and batch approval */
.file-row .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.photo-note { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.photo-note .btn.quiet { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; display: flex; gap: 16px; padding: 0 0 22px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline-dot { width: 14px; height: 14px; border-radius: 50%; background: white; border: 3px solid var(--navy); flex-shrink: 0; margin-top: 3px; position: relative; }
.timeline li:first-child .timeline-dot { background: var(--lime); border-color: var(--navy); }
.timeline-body { min-width: 0; flex: 1; }
.timeline-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.timeline-head strong { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.timeline-head small, .timeline-body > small { color: var(--muted); font-size: 12px; }
.timeline-body > small { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.timeline-body p { margin: 8px 0 0; padding: 10px 12px; background: var(--canvas); border-radius: 10px; font-size: 14px; overflow-wrap: anywhere; }
.birthday-banner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 22px 0; padding: 22px 26px; border-radius: var(--radius); background: var(--lime-soft); border: 1px solid #dce9a5; }
.birthday-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--navy); color: var(--lime); flex-shrink: 0; }
.birthday-text { flex: 1 1 280px; min-width: 0; }
.birthday-text h2 { margin: 4px 0 12px; font-size: 22px; color: var(--navy); overflow-wrap: anywhere; }
.birthday-people { display: flex; gap: 10px; flex-wrap: wrap; }
.birthday-person { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 14px; background: white; border: 1px solid #dce9a5; color: var(--ink); text-decoration: none; min-width: 0; }
.birthday-person:hover { border-color: var(--navy); }
.birthday-person span { display: flex; flex-direction: column; font-weight: 600; font-size: 14px; min-width: 0; }
.birthday-person small { font-weight: 400; font-size: 12px; color: var(--muted); }
.batch-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.batch-total { color: var(--navy); }
.batch-list { border: 1px solid var(--line); border-radius: 14px; max-height: 320px; overflow: auto; margin-bottom: 18px; }
.batch-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.batch-row:last-child { border-bottom: 0; }
.batch-row input { width: 20px; height: 20px; accent-color: var(--navy); }
.batch-row small { display: block; color: var(--muted); font-size: 12px; }
.batch-row b { color: var(--ink); white-space: nowrap; }
@media (max-width: 600px) {
  .birthday-banner { padding: 20px; }
  .birthday-banner .actions, .birthday-banner .actions .btn { width: 100%; }
  .file-row .actions { justify-content: flex-start; }
}

/* Leave requests */
.leave-balances { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 6px; }
.leave-balance { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; background: white; min-width: 0; }
.leave-balance span { font-size: 13px; font-weight: 600; color: var(--text); }
.leave-balance strong { font-size: 24px; color: var(--navy); letter-spacing: -.3px; }
.leave-balance small { font-size: 12px; color: var(--muted); }
.leave-balance.muted strong { color: var(--muted); }
.date-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.date-chips span { padding: 5px 10px; border-radius: 99px; background: var(--blue-soft); color: var(--navy); font-size: 13px; font-weight: 600; }
.leave-count { margin: -4px 0 0; font-size: 13px; color: var(--muted); min-height: 1em; }
.policy-row { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 10px; margin: 0 0 14px; }
.policy-row legend { font-weight: 700; color: var(--navy); padding: 0 6px; }
.day-picks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.on-leave-strip { margin-bottom: 22px; }
.on-leave-strip h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 0 0 12px; }

/* Workspace search */
.search-trigger { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 230px; padding: 0 10px 0 14px; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.search-trigger:hover { border-color: #c7d2eb; background: var(--blue-soft); color: var(--navy); }
.search-trigger:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.search-trigger span { flex: 1; text-align: left; }
.search-trigger kbd, .search-hint kbd { font: 600 11px/1 inherit; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--canvas); color: var(--muted); }
dialog.search-palette { width: min(680px, calc(100% - 32px)); margin-top: 10vh; }
dialog.search-palette .dialog-body { padding: 0; }
.search-box { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-box input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 18px; color: var(--ink); background: transparent; min-width: 0; }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }
#search-results { max-height: min(60vh, 520px); overflow: auto; padding: 8px; }
.search-hint { color: var(--muted); font-size: 14px; padding: 18px 12px; margin: 0; }
.search-group + .search-group { margin-top: 6px; }
.search-group-label { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); padding: 10px 12px 6px; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.search-item.active { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--navy); }
.search-item .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.search-kind { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--canvas); color: var(--navy); flex-shrink: 0; }
.search-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.search-text strong, .search-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-text small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.search-item mark { background: #e8f3b4; color: inherit; border-radius: 3px; padding: 0 1px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.pick-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pick-filters .control { flex: 1 1 180px; min-width: 0; }
.batch-row[hidden] { display: none; }
.more-search { width: 100%; margin-bottom: 12px; justify-content: flex-start; }
@media (max-width: 1000px) {
  .search-trigger { min-width: 0; background: #ffffff0b; border-color: #ffffff30; color: white; }
  .search-trigger:hover { background: #ffffff20; color: white; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger { width: 44px; padding: 0; justify-content: center; }
}
@media (max-width: 600px) {
  /* Company settings stays reachable from the More menu; search keeps the top-bar slot. */
  .top-actions .settings-link { display: none; }
}
@media (max-width: 380px) {
  .top-actions .search-trigger { display: none; }
}
@media (max-width: 600px) {
  dialog.search-palette { margin-top: 12px; width: calc(100% - 16px); }
  .search-box input { font-size: 17px; }
}

/* Page help */
.title-row { display: flex; align-items: flex-start; gap: 12px; }
.title-row h1 { margin: 0; min-width: 0; }
.title-row .help-button { margin-top: .35em; }
.help-button { width: 30px; height: 30px; flex-shrink: 0; display: inline-grid; place-items: center; border-radius: 50%; border: 1.5px solid #c7d2eb; background: white; color: var(--navy); font: 700 16px/1 inherit; cursor: pointer; transition: background .15s, border-color .15s; }
.help-button:hover, .help-button[aria-expanded=true] { background: var(--navy); border-color: var(--navy); color: white; }
.help-button:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.dashboard-header .help-button { background: #ffffff14; border-color: #ffffff55; color: white; }
.dashboard-header .help-button:hover, .dashboard-header .help-button[aria-expanded=true] { background: var(--lime); border-color: var(--lime); color: var(--navy); }
.help-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 70; background: white; border-left: 1px solid var(--line); box-shadow: -24px 0 60px #07172f24; display: flex; flex-direction: column; }
.help-panel[hidden] { display: none; }
.help-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); background: var(--canvas); }
.help-head h2 { margin: 4px 0 0; font-size: 21px; color: var(--navy); outline: none; }
.help-body { overflow: auto; padding: 18px 22px 28px; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.help-purpose { color: var(--ink); font-size: 15px; margin: 0 0 12px; }
.help-who { margin: 0 0 18px; padding: 10px 12px; border-radius: 10px; background: var(--blue-soft); font-size: 13.5px; }
.help-section h3, .help-tips h3, .help-related h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--navy); margin: 20px 0 10px; }
.help-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.help-steps li { counter-increment: step; position: relative; padding: 0 0 12px 38px; }
.help-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: white; font-size: 12px; font-weight: 700; }
.help-steps b, .help-tips b { color: var(--ink); }
.help-steps code, .help-tips code { font-size: 12.5px; background: var(--canvas); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
.help-tips { margin-top: 8px; padding: 2px 16px 8px; border-radius: 12px; background: var(--lime-soft); border: 1px solid #dce9a5; }
.help-tips ul { margin: 0; padding-left: 18px; }
.help-tips li { margin-bottom: 6px; }
.help-related .actions { flex-wrap: wrap; gap: 6px; }
.help-foot { margin: 22px 0 0; font-size: 12px; color: var(--muted); }
.help-foot kbd { font: 600 11px/1 inherit; padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--canvas); }
@media (min-width: 1600px) { body.help-open .workspace { margin-right: 420px; } }
@media (max-width: 600px) {
  .help-panel { top: auto; height: 86dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; box-shadow: 0 -20px 60px #07172f33; }
  .help-body { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .help-button { width: 28px; height: 28px; font-size: 15px; }
}
@media print { .help-button, .help-panel { display: none !important; } }
@media print { .account-menu { display: none; } }
