/* Nyanza Flash UI refresh — shared clarity layer for the web workspace. */
:root {
    --ui-canvas: #f7f8fc;
    --ui-surface: #ffffff;
    --ui-ink: #131345;
    --ui-blue: #084c9e;
    --ui-yellow: #ffbd00;
    --ui-muted: #666b83;
    --ui-line: #dfe3ef;
    --ui-soft: #eef3fb;
    --ui-radius: 16px;
    --ui-shadow: 0 10px 30px rgba(19, 19, 69, .07);
}

html { scroll-behavior: smooth; }
body { background: var(--ui-canvas); }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid rgba(8, 76, 158, .24); outline-offset: 2px; }

.workspace-app .workspace { background: linear-gradient(180deg, #f7f8fc 0, #fff 620px); }
.workspace-app .workspace > * { width: min(100%, 1440px); margin-left: auto; margin-right: auto; }
.workspace-app .panel,
.workspace-app .metrics > a { border-color: var(--ui-line); border-radius: var(--ui-radius); box-shadow: none; }

/* Compact desktop workspace navigation: daily areas stay visible, supporting areas expand on demand. */
.workspace-nav-more { margin: 4px 10px; border-top: 1px solid rgba(255,255,255,.13); color: #fff; }
.workspace-nav-more summary { position: relative; padding: 15px 28px 12px 10px; color: #cdd4ec; cursor: pointer; list-style: none; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.workspace-nav-more summary::-webkit-details-marker { display: none; }
.workspace-nav-more summary::after { content: "+"; position: absolute; right: 8px; top: 12px; font-size: 18px; color: var(--ui-yellow); }
.workspace-nav-more[open] summary::after { content: "−"; }
.workspace-nav-more > div { display: grid; gap: 3px; padding: 0 0 9px; }
.workspace-nav-more > div > a { display: flex; align-items: center; min-height: 42px; padding: 9px 10px; border-radius: 10px; color: #fff; }
.workspace-nav-more > div > a:hover,
.workspace-nav-more > div > a[aria-current="page"] { background: rgba(255,255,255,.11); color: #fff; }

/* Workspace home. */
.dashboard-home-head { min-height: 180px; padding: 30px 34px; border: 0; border-radius: 22px; background: linear-gradient(135deg, #131345 0%, #084c9e 100%); color: #fff; box-shadow: var(--ui-shadow); }
.dashboard-home-copy { min-width: 0; }
.dashboard-home-head .eyebrow { color: #ffd454; }
.dashboard-home-head h1 { margin: 5px 0 8px; color: #fff; font-size: clamp(32px, 4vw, 52px); line-height: 1; letter-spacing: -.035em; }
.dashboard-home-head p { margin: 0; color: #dce4f5; }
.dashboard-scope label { display: grid; gap: 6px; }
.dashboard-scope span { color: #c8d3ed; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-scope select { min-width: 180px; min-height: 46px; border: 1px solid rgba(255,255,255,.32); border-radius: 12px; padding: 0 38px 0 13px; background: #fff; color: var(--ui-ink); font-weight: 750; }

.dashboard-onboarding { padding: 0; overflow: clip; background: #fffdf5; }
.dashboard-onboarding > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; padding: 16px 20px; cursor: pointer; list-style: none; }
.dashboard-onboarding > summary::-webkit-details-marker { display: none; }
.dashboard-onboarding > summary > span:first-child { display: grid; gap: 3px; }
.dashboard-onboarding > .onboarding-list { padding: 0 18px 18px; }

.dashboard-actions { margin-top: 18px; }
.dashboard-actions .panel-title { align-items: end; }
.dashboard-actions .panel-title h2 { margin: 3px 0 0; font-size: clamp(22px, 2.4vw, 30px); }
.dashboard-all-tools { color: var(--ui-blue); font-weight: 800; white-space: nowrap; }
.quick.quick-priority { grid-template-columns: repeat(4, minmax(0,1fr)); }
.quick.quick-priority > a { min-height: 92px; border-radius: 14px; border-color: var(--ui-line); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.quick.quick-priority > a:hover { transform: translateY(-2px); border-color: #aabbd9; box-shadow: var(--ui-shadow); }

.dashboard-metrics { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.dashboard-metrics > a { min-height: 150px; padding: 20px; background: var(--ui-surface); }
.dashboard-metrics > a small { color: var(--ui-muted); }
.dashboard-metrics > a strong { font-size: clamp(22px, 2.2vw, 31px); letter-spacing: -.025em; }
.dashboard-metrics > a span { color: var(--ui-blue); font-weight: 750; }
.dashboard-finance-strip { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)) auto; align-items: center; gap: 14px; margin-top: 12px; padding: 14px 18px; border: 1px solid var(--ui-line); border-radius: 14px; background: #fff; color: var(--ui-ink); }
.dashboard-finance-strip > span { display: grid; gap: 3px; }
.dashboard-finance-strip small { color: var(--ui-muted); font-size: 11px; }
.dashboard-finance-strip b { font-size: 15px; }
.dashboard-finance-strip i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--ui-soft); color: var(--ui-blue); font-style: normal; font-weight: 900; }

.dashboard-recent { margin-top: 18px; }
.dashboard-recent-list > a { min-height: 65px; border-radius: 12px; transition: background .15s ease; }
.dashboard-recent-list > a:hover { background: #f5f7fc; }

/* Consistent, touch-friendly controls across workspace pages. */
.workspace :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { min-height: 46px; border-radius: 12px; }
.workspace :where(button, .btn) { min-height: 44px; }

@media (max-width: 1050px) {
    .quick.quick-priority,
    .dashboard-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 800px) {
    /* The main hamburger is context-aware, so a second workspace bar is unnecessary. */
    .workspace-app .workspace-menu-toggle,
    .workspace-app .shell > aside { display: none !important; }
    .workspace-app .shell { display: block !important; }
    .workspace-app .workspace { width: 100%; min-width: 0; padding: 16px 14px 34px; }
    .dashboard-home-head { min-height: 0; padding: 23px 20px; border-radius: 18px; align-items: flex-start; }
    .dashboard-home-head h1 { font-size: 32px; }
    .dashboard-scope { width: 100%; margin-top: 18px; }
    .dashboard-scope select { width: 100%; }
    .dashboard-actions .panel-title { align-items: flex-start; }
    .dashboard-actions .panel-title h2 { font-size: 23px; }
    .quick.quick-priority { gap: 10px; }
    .quick.quick-priority > a { min-height: 86px; padding: 13px; }
    .dashboard-metrics { gap: 10px; }
    .dashboard-metrics > a { min-height: 122px; padding: 15px; }
    .dashboard-metrics > a strong { font-size: 21px; }
    .dashboard-finance-strip { grid-template-columns: repeat(3, minmax(0,1fr)); padding: 13px; }
    .dashboard-finance-strip i { display: none; }
    .dashboard-finance-strip b { font-size: 13px; }
    .dashboard-onboarding > summary { padding: 14px 15px; }
}

@media (max-width: 420px) {
    .workspace-app .workspace { padding-left: 11px; padding-right: 11px; }
    .dashboard-metrics > a strong { font-size: 18px; }
    .dashboard-metrics > a span { font-size: 11px; }
    .quick.quick-priority > a b { font-size: 13px; }
    .dashboard-all-tools { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
