/* HeroUI refresh: keep the dashboard's widget contracts and security actions. */
:is(.overview-refresh,.security-page,[data-clients-refresh],.client-create-refresh,[data-client-detail-refresh]) {
  --workspace-rgb: 255 255 255;
  --workspace-text: #11181c;
  --workspace-muted: #62626d;
  --workspace-border: #d4d4d8;
  --workspace-divider: #e4e4e7;
  --workspace-soft: #f4f4f5;
  --workspace-blue: #005bc4;
  --workspace-blue-soft: #e6f1fe;
  --workspace-green: #0a6b35;
  --workspace-green-soft: #e8faf0;
  --workspace-warning: #854d0e;
  --workspace-warning-soft: #fff4d5;
  --workspace-danger: #b80846;
  --workspace-danger-soft: #fff0f5;
  --text: var(--workspace-text);
  --muted: var(--workspace-muted);
  --border: var(--workspace-border);
  --primary: #006fee;
  --active: var(--workspace-blue-soft);
  color: var(--workspace-text);
  font-family: 'HeroUI Inter',ui-sans-serif,system-ui,sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
[data-theme='dark'] :is(.overview-refresh,.security-page,[data-clients-refresh],.client-create-refresh,[data-client-detail-refresh]) {
  --workspace-rgb: 27 27 32;
  --workspace-text: #f4f4f5;
  --workspace-muted: #c8c8d2;
  --workspace-border: #3f3f46;
  --workspace-divider: #41414a;
  --workspace-soft: #27272a;
  --workspace-blue: #88bcff;
  --workspace-blue-soft: #142b47;
  --workspace-green: #75e3a2;
  --workspace-green-soft: #123522;
  --workspace-warning: #ffd27a;
  --workspace-warning-soft: #3b2d16;
  --workspace-danger: #ff8fb5;
  --workspace-danger-soft: #351322;
}
:is(.overview-refresh,.security-page) *, :is(.overview-refresh,.security-page) *::before, :is(.overview-refresh,.security-page) *::after { box-sizing: border-box; }
:is(.overview-refresh,.security-page) :is(h1,h2,h3,p,dd,dl) { margin: 0; }
:is(.overview-refresh,.security-page) .icon-svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[data-design][data-theme] .content :is(.overview-refresh,.security-page) .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 14px;
  border: 1px solid var(--workspace-border); border-radius: 12px; background: rgb(var(--workspace-rgb)); color: var(--workspace-text);
  font-family: inherit; font-size: 13px; font-weight: 500; line-height: 20px; text-decoration: none; box-shadow: none; transform: none;
}
[data-design][data-theme] .content :is(.overview-refresh,.security-page) .btn.primary { background: #006fee !important; border-color: #006fee !important; color: #fff !important; }
:is(.overview-refresh,.security-page) :is(a,button,input,select):focus-visible { outline: 2px solid var(--workspace-blue); outline-offset: 3px; }
[data-design][data-theme] .content .overview-refresh .dashboard-widget-grid > [data-dashboard-widget],
[data-design][data-theme] .content .security-page .panel {
  border: 1px solid var(--workspace-border); border-radius: 14px;
  background: linear-gradient(145deg,rgb(var(--workspace-rgb) / var(--motion-panel-alpha-top,.96)),rgb(var(--workspace-rgb) / var(--motion-panel-alpha-bottom,.9)));
  box-shadow: 0 4px 12px rgb(0 0 0 / 5%); backdrop-filter: blur(18px);
}

/* The same two upper widgets and lower team / analytics / finance row. */
[data-design][data-theme] .content .overview-refresh .overview-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: auto; min-height: 56px; margin: 12px 0 24px; }
.overview-heading-group { display: flex; align-items: center; gap: 24px; min-width: 0; }
[data-design][data-theme] .content .overview-refresh .motion-overview-brand { margin: 0; gap: 12px; flex: 0 0 auto; }
[data-design][data-theme] .content .overview-refresh .motion-overview-brand > img { width: 56px; height: 56px; }
[data-design][data-theme] .content .overview-refresh .motion-overview-brand > span { color: var(--workspace-text); font-family: inherit; font-size: 26px; font-weight: 650; }
.overview-heading-copy { border-left: 1px solid var(--workspace-border); padding-left: 24px; }
[data-design][data-theme] .content .overview-refresh .overview-head h1 { color: var(--workspace-text); font-size: 22px; font-weight: 600; line-height: 28px; letter-spacing: -.025em; }
.overview-heading-copy p { margin-top: 2px; color: var(--workspace-muted); font-size: 12px; }
.overview-refresh .overview-customize { flex-shrink: 0; }
.overview-refresh [data-dashboard-edit][hidden] { display: none !important; }
[data-design][data-theme] .content .overview-refresh .dashboard-widget-grid { gap: 20px; }
[data-design][data-theme] .content .overview-refresh .dashboard-widget-grid > [data-dashboard-widget] { padding: 24px; }
[data-design][data-theme] .content .overview-refresh .motion-command-summary { gap: 20px; }
[data-design][data-theme] .content .overview-refresh .motion-command-summary .motion-eyebrow { color: var(--workspace-muted); font-size: 11px; font-weight: 500; letter-spacing: .06em; }
[data-design][data-theme] .content .overview-refresh .motion-command-summary .command-copy h2 { margin: 8px 0; color: var(--workspace-text); font-size: clamp(24px,1.8vw,32px); font-weight: 600; line-height: 1.25; letter-spacing: -.035em; }
[data-design][data-theme] .content .overview-refresh .motion-command-summary .command-copy p { color: var(--workspace-muted); font-size: 13px; line-height: 20px; }
[data-design][data-theme] .content .overview-refresh .motion-command-summary .command-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; gap: 12px; margin: 24px 0 0; }
[data-design][data-theme] .content .overview-refresh .motion-command-summary .command-metrics > div { min-width: 0; max-width: none; padding: 0 12px 0 0; border-right: 1px solid var(--workspace-divider); }
[data-design][data-theme] .content .overview-refresh .motion-command-summary .command-metrics > div:last-child { border: 0; padding: 0; }
[data-design][data-theme] .content .overview-refresh .command-metrics dd { margin-bottom: 4px; color: var(--workspace-text); font-size: 30px; font-weight: 600; line-height: 36px; font-variant-numeric: tabular-nums; }
[data-design][data-theme] .content .overview-refresh .command-metrics dt { color: var(--workspace-muted); font-size: 12px; line-height: 18px; }
[data-design][data-theme] .content .overview-refresh .motion-client-add { margin-top: 24px; }
[data-design][data-theme] .content .overview-refresh .motion-command-context { gap: 20px; }
[data-design][data-theme] .content .overview-refresh .motion-command-summary .overview-clock time { font-variant-numeric: tabular-nums; }
[data-design][data-theme] .content .overview-refresh .motion-command-summary .overview-clock :is([data-clock-date],[data-clock-weekday]) { color: var(--workspace-muted); font-size: 12px; }
[data-design][data-theme] .content .overview-refresh .panel-head { margin-bottom: 16px; gap: 12px; }
[data-design][data-theme] .content .overview-refresh .panel-head h2 { color: var(--workspace-text); font-size: 16px; font-weight: 600; line-height: 24px; letter-spacing: -.02em; }
[data-design][data-theme] .content .overview-refresh .panel-head :is(p,a), [data-design][data-theme] .content .overview-refresh .motion-attention-head a { font-size: 12px; }
[data-design][data-theme] .content .overview-refresh .panel-head a { color: var(--workspace-blue); }
[data-design][data-theme] .content .overview-refresh .today-list > a { min-height: 68px; grid-template-columns: 36px minmax(0,1fr) auto 14px; gap: 12px; padding: 12px; border-color: var(--workspace-divider); }
[data-design][data-theme] .content .overview-refresh .today-list strong { color: var(--workspace-text); font-size: 13px; font-weight: 500; }
[data-design][data-theme] .content .overview-refresh .today-list small { color: var(--workspace-muted); font-size: 11px; line-height: 16px; }
[data-design][data-theme] .content .overview-refresh .today-list > a > b { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 8px; background: var(--workspace-blue-soft); color: var(--workspace-blue); font-size: 12px; font-weight: 600; }
[data-design][data-theme] .content .overview-refresh .signal-icon { width: 36px; height: 36px; border: 0; border-radius: 12px; }
[data-design][data-theme] .content .overview-refresh .signal-icon.warning { color: var(--workspace-warning); background: var(--workspace-warning-soft); }
[data-design][data-theme] .content .overview-refresh .signal-icon.danger { color: var(--workspace-danger); background: var(--workspace-danger-soft); }
[data-design][data-theme] .content .overview-refresh .signal-icon.info { color: var(--workspace-blue); background: var(--workspace-blue-soft); }
[data-design][data-theme] .content .overview-refresh .today-list .signal-icon .icon-svg { width: 18px; height: 18px; }
[data-design][data-theme] .content .overview-refresh .compact-insight-values { gap: 12px; padding: 0 0 20px; border-bottom: 1px solid var(--workspace-divider); }
[data-design][data-theme] .content .overview-refresh .compact-insight-values span { color: var(--workspace-muted); font-size: 12px; line-height: 18px; }
[data-design][data-theme] .content .overview-refresh .compact-insight-values strong { margin-top: 6px; color: var(--workspace-text); font-size: clamp(22px,2vw,30px); font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
[data-design][data-theme] .content .overview-refresh .motion-chart { margin-top: 20px; }
[data-design][data-theme] .content .overview-refresh .motion-team-card { border-radius: 14px; border-color: var(--workspace-border); background: rgb(var(--workspace-rgb)); box-shadow: 0 4px 12px rgb(0 0 0 / 8%); }
[data-design][data-theme] .content .overview-refresh .motion-team-cover { flex-basis: 44%; background: linear-gradient(135deg,var(--workspace-blue-soft),var(--workspace-soft)); }
[data-design][data-theme] .content .overview-refresh span.motion-team-avatar { background: rgb(var(--workspace-rgb)); border-color: var(--workspace-border); color: var(--workspace-blue); }
[data-design][data-theme] .content .overview-refresh .motion-team-copy { padding: 12px 16px; gap: 6px; }
[data-design][data-theme] .content .overview-refresh .motion-team-copy > small { color: var(--workspace-muted); letter-spacing: 0; text-transform: none; font-size: 11px; }
[data-design][data-theme] .content .overview-refresh .motion-team-card[data-center='true'] .motion-team-copy > strong { font-weight: 600; }
[data-design][data-theme] .content .overview-refresh .motion-team-kpis > span { color: var(--workspace-muted); border: 0; background: var(--workspace-soft); }
[data-design][data-theme] .content .overview-refresh .motion-team-nav { border-radius: 12px; width: 36px; height: 36px; border-color: var(--workspace-border); background: rgb(var(--workspace-rgb)); }
[data-design][data-theme] .content .overview-refresh .dashboard-edit-toolbar, [data-design][data-theme] .content .overview-refresh .dashboard-settings-dialog { border-radius: 14px; border-color: var(--workspace-border); background: rgb(var(--workspace-rgb)); color: var(--workspace-text); }

/* Keep one glass formula at rest and on hover, so its existing progress animates. */
[data-design][data-theme] .content .overview-refresh .dashboard-widget-grid > [data-dashboard-widget] {
  --motion-glass: linear-gradient(145deg,rgb(var(--workspace-rgb) / calc(var(--motion-panel-alpha-top,.76) * (1 - var(--motion-hover-progress)) + var(--motion-panel-hover-top,.86) * var(--motion-hover-progress))),rgb(var(--workspace-rgb) / calc(var(--motion-panel-alpha-bottom,.64) * (1 - var(--motion-hover-progress)) + var(--motion-panel-hover-bottom,.74) * var(--motion-hover-progress))));
  background: var(--motion-glass);
}
[data-design][data-theme] .content .overview-refresh .dashboard-widget-grid > [data-dashboard-widget]:hover { background: var(--motion-glass); }
[data-design][data-theme] .content .overview-refresh:not(.layout-editing) .dashboard-widget-grid > [data-dashboard-widget] { transition: --motion-hover-progress var(--motion-hover-duration,250ms) ease; }
[data-design][data-theme] .content .overview-refresh :is(.task-rows,.today-list,.recent-client-rows,.attention-compact) > a {
  padding-inline: 12px; border-radius: 12px; background-color: transparent; background-image: none;
  outline: 1px solid transparent; outline-offset: -1px;
  transition: background-color var(--motion-hover-duration,250ms) ease,outline-color var(--motion-hover-duration,250ms) ease,color var(--motion-hover-duration,250ms) ease;
}
[data-design][data-theme] .content .overview-refresh :is(.task-rows,.today-list,.recent-client-rows,.attention-compact) > a:is(:hover,:focus-visible) {
  background-color: color-mix(in srgb,var(--workspace-blue) 12%,transparent); background-image: none;
  outline-color: color-mix(in srgb,var(--workspace-blue) 40%,transparent);
}
[data-design][data-theme] .content .overview-refresh :is(.task-rows,.today-list,.recent-client-rows,.attention-compact) > a:focus-visible { outline: 2px solid var(--workspace-blue); outline-offset: -2px; }

/* Security: protection settings and device access are distinct, readable regions. */
[data-design] .content:has(.security-page) { display: block !important; overflow: auto !important; padding: 32px clamp(20px,3vw,48px) 40px !important; }
.security-page { width: 100%; max-width: 1440px; min-width: 0; margin: 0 auto; }
.security-page.motion-composed-page { display: block; height: auto; overflow: visible; flex: none; }
.security-page > .motion-page-panels { display: contents !important; }
.workspace-eyebrow { display: block; margin-bottom: 6px; color: var(--workspace-muted); font-size: 12px; line-height: 16px; }
.security-head { margin-bottom: 28px; }
.security-page-heading { display: flex; align-items: center; gap: 20px; }
.security-heading-icon { display: grid; place-items: center; width: 64px; height: 64px; flex-shrink: 0; border: 1px solid var(--workspace-border); border-radius: 14px; background: var(--workspace-blue-soft); color: var(--workspace-blue); }
.security-heading-icon .icon-svg { width: 32px; height: 32px; }
[data-design][data-theme] .content .security-page h1 { color: var(--workspace-text); font-size: 30px; line-height: 1.25; font-weight: 650; letter-spacing: -.035em; }
.security-head .security-page-heading > div > p:last-child { margin-top: 8px; color: var(--workspace-muted); font-size: 14px; }
.security-layout { display: grid; grid-template-columns: minmax(280px,340px) minmax(0,1fr); align-items: start; gap: 24px; }
.security-protection { display: grid; gap: 20px; min-width: 0; }
[data-design][data-theme] .content .security-page .security-card { padding: 24px; margin: 0; }
.security-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.security-feature-icon, .security-device-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--workspace-blue-soft); color: var(--workspace-blue); }
.security-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; max-width: 100%; border-radius: 8px; color: var(--workspace-muted); background: var(--workspace-soft); font-size: 12px; line-height: 18px; }
.security-status::before { content: ''; width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.security-status.is-success, .security-current-label { color: var(--workspace-green); background: var(--workspace-green-soft); }
.security-status.is-warning { color: var(--workspace-warning); background: var(--workspace-warning-soft); }
[data-design][data-theme] .content .security-page h2 { color: var(--workspace-text); font-size: 16px; font-weight: 600; line-height: 24px; letter-spacing: -.02em; }
.security-card > p { margin-top: 12px; color: var(--workspace-muted); font-size: 13px; line-height: 20px; }
.security-card > .security-policy-note { font-size: 12px; line-height: 18px; }
.security-card > .btn { margin-top: 24px; width: 100%; }
.security-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--workspace-divider); color: var(--workspace-green); font-size: 12px; line-height: 20px; }
[data-design][data-theme] .content .security-page .security-sessions { min-width: 0; padding: 0; margin: 0; overflow: hidden; }
.security-sessions-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; border-bottom: 1px solid var(--workspace-divider); }
.security-sessions-head p { margin-top: 8px; color: var(--workspace-muted); font-size: 13px; line-height: 20px; }
.security-session-count { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid var(--workspace-border); border-radius: 12px; color: var(--workspace-blue); background: var(--workspace-blue-soft); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.security-session-list { margin: 0; padding: 0 24px; list-style: none; }
.security-session { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: start; gap: 16px; padding: 24px 0; }
.security-session + .security-session { border-top: 1px solid var(--workspace-divider); }
.security-session:not(.is-current) .security-device-icon { color: var(--workspace-muted); background: var(--workspace-soft); }
.security-device-copy { min-width: 0; }
.security-device-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
[data-design][data-theme] .content .security-page h3 { color: var(--workspace-text); font-size: 14px; line-height: 20px; font-weight: 600; }
.security-current-label { padding: 2px 6px; border-radius: 6px; font-size: 12px; line-height: 16px; }
.security-device-ip { margin-top: 6px !important; color: var(--workspace-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.security-device-agent { margin-top: 4px !important; color: var(--workspace-muted); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.security-last-seen { display: grid; gap: 4px; min-width: 0; text-align: right; }
.security-last-seen > span { color: var(--workspace-muted); font-size: 12px; line-height: 16px; }
.security-last-seen time { color: var(--workspace-text); font-size: 12px; line-height: 20px; font-variant-numeric: tabular-nums; }
.security-session-actions, .security-signout-all { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin: 0 24px; padding: 24px 0; border-top: 1px solid var(--workspace-divider); }
.security-session-actions > div { flex: 1 1 180px; }
.security-session-actions p, .security-signout-all p { margin-top: 6px; color: var(--workspace-muted); font-size: 12px; line-height: 18px; }
.security-session-actions form, .security-signout-all form { margin: 0; }
.security-signout-all { margin: 0; padding: 24px; background: var(--workspace-danger-soft); }
.security-signout-all > div { flex: 1 1 240px; }
[data-design][data-theme] .content .security-page .btn.danger-btn { color: var(--workspace-danger); background: rgb(var(--workspace-rgb)); border-color: var(--workspace-danger); }
.security-sessions-empty { display: grid; justify-items: center; gap: 12px; padding: 48px 16px; text-align: center; }
.security-sessions-empty p { color: var(--workspace-muted); font-size: 13px; }

/* Widgets still reflow when the user chooses three or four blocks per row. */
@container (max-width:520px) {
  [data-design][data-theme] .content .overview-refresh .motion-command-summary { grid-template-columns: minmax(0,1fr); gap: 24px; }
  [data-design][data-theme] .content .overview-refresh .motion-command-context { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: start; }
  [data-design][data-theme] .content .overview-refresh .motion-command-summary .overview-clock { align-self: start; text-align: left; justify-items: start; }
  [data-design][data-theme] .content .overview-refresh .motion-command-summary .overview-clock time { font-size: 36px; }
  [data-design][data-theme] .content .overview-refresh .motion-today-body { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:1100px) {
  .security-layout { grid-template-columns: minmax(0,1fr); }
  .security-protection { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:760px) {
  [data-design][data-theme] .content .overview-refresh .overview-head { align-items: start; flex-wrap: wrap; gap: 16px; margin: 8px 0 24px; }
  .overview-heading-group { flex-wrap: wrap; gap: 12px; }
  [data-design][data-theme] .content .overview-refresh .motion-overview-brand > img { width: 44px; height: 44px; }
  [data-design][data-theme] .content .overview-refresh .motion-overview-brand > span { font-size: 22px; }
  .overview-heading-copy { padding-left: 12px; }
  .overview-heading-copy p { display: none; }
  [data-design][data-theme] .content .overview-refresh .dashboard-widget-grid > [data-dashboard-widget] { padding: 20px; }
  [data-design][data-theme] .content .overview-refresh .motion-command-context { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: start; }
  .security-head { margin-bottom: 24px; }
  .security-page-heading { gap: 12px; align-items: start; }
  .security-heading-icon { width: 44px; height: 44px; border-radius: 12px; }
  .security-heading-icon .icon-svg { width: 24px; height: 24px; }
  [data-design][data-theme] .content .security-page h1 { font-size: 26px; }
  .security-head .security-page-heading > div > p:last-child { font-size: 13px; }
  .security-protection { grid-template-columns: minmax(0,1fr); }
  [data-design][data-theme] .content .security-page .security-card { padding: 20px; }
  .security-sessions-head { padding: 20px; align-items: start; }
  .security-session-list { padding-inline: 20px; }
  .security-session { grid-template-columns: 36px minmax(0,1fr); gap: 12px; padding-block: 20px; }
  .security-device-icon { width: 36px; height: 36px; }
  .security-last-seen { grid-column: 2; text-align: left; }
  .security-session-actions { margin-inline: 20px; padding-block: 20px; }
  .security-signout-all { padding: 20px; }
  .security-session-actions form, .security-signout-all form, .security-session-actions .btn, .security-signout-all .btn { width: 100%; }
  .security-page .btn { min-height: 44px; }
}
@media(hover:hover) {
  [data-design][data-theme] .content :is(.overview-refresh,.security-page) .btn:not(.primary):hover { background: var(--workspace-blue-soft); color: var(--workspace-blue); }
  [data-design][data-theme] .content .security-page .btn.danger-btn:hover { background: var(--workspace-danger-soft); color: var(--workspace-danger); }
}
@media(forced-colors:active) {
  [data-design][data-theme] .content .overview-refresh .dashboard-widget-grid > [data-dashboard-widget], [data-design][data-theme] .content .security-page .panel,
  .security-status, .security-current-label { border: 1px solid CanvasText; }
}
