.workspace > .topbar { flex-wrap: wrap; }
/* The topbar switches to a column below 640px; a pixel flex-basis becomes height. */
.workspace > .topbar > div:first-child { flex: 0 1 auto; min-width: min(100%, 380px); max-width: 100%; }
.workspace > .topbar .topbar-actions { flex: 0 1 auto; min-width: 0; max-width: 100%; margin-inline-start: auto; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.topbar-actions > button, .client-download-trigger, .tools-nav-link { flex-shrink: 0; white-space: nowrap; }
.tools-nav-link { display: inline-flex; align-items: center; padding: 10px 13px; border-radius: 9px; text-decoration: none; font-weight: 700; font-size: 14px; }
.client-download-trigger { position: relative; display: inline-flex; align-items: center; padding-right: 16px; }
.client-info { position: absolute; right: 0; top: -2px; display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #9a6654; border-radius: 50%; color: #875743; font: 12px Georgia, serif; cursor: help; }
.client-info-tip { display: none; position: absolute; z-index: 20; right: -10px; top: 23px; width: min(270px, 78vw); padding: 12px; border: 1px solid #dfc7ba; border-radius: 10px; background: #fffaf5; box-shadow: 0 8px 30px #40291920; color: #58493f; white-space: normal; font: 13px/1.6 "Microsoft YaHei", sans-serif; }
.client-info:hover .client-info-tip, .client-info:focus .client-info-tip { display: block; }
.usage-disclosure { padding: 12px 24px 24px; color: #7b6c60; font-size: 12px; line-height: 1.7; }
.usage-disclosure span { display: block; font-family: monospace; }
.client-download-dialog { width: min(780px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; box-sizing: border-box; padding: 26px; border: 1px solid #ddc4b3; border-radius: 20px; background: #fffaf6; color: #382e28; box-shadow: 0 20px 80px #241b1840; }
.client-download-dialog::backdrop { background: #201b1966; backdrop-filter: blur(3px); }
.client-download-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.client-download-dialog h2 { margin: 6px 0; font-size: 26px; }
.client-download-dialog p { line-height: 1.7; font-size: 14px; }
.tools-eyebrow { color: #a04d32; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.client-download-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.client-choice { min-width: 0; background: white; border: 1px solid #ecd6ca; border-radius: 14px; padding: 20px; }
.client-choice h3 { margin: 10px 0; }
.client-choice details { margin-top: 16px; font-size: 12px; color: #706156; }
.client-choice code { display: block; margin-top: 8px; overflow-wrap: anywhere; }
.tools-button { display: inline-flex; align-items: center; justify-content: center; background: #bd462c; color: white; text-decoration: none; padding: 12px 20px; border-radius: 9px; font-weight: 700; }
.tools-button.is-disabled { background: #c6bbb4; cursor: not-allowed; }
.usage-dashboard { min-width: 0; }
.usage-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.usage-filters label { flex: 1 1 150px; min-width: 0; font-size: 13px; font-weight: 700; }
.usage-filters input, .usage-filters select { width: 100%; min-width: 0; box-sizing: border-box; margin-top: 6px; }
.usage-notice { background: #f5ece5; color: #705442; border-left: 3px solid #bd6747; padding: 12px 16px; line-height: 1.8; font-size: 13px; }
.usage-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.usage-kpis article { background: #fff; border: 1px solid #e3d3c9; border-radius: 12px; padding: 16px; }
.usage-kpis span { display: block; font-size: 13px; color: #796458; }
.usage-kpis strong { display: block; font-size: 28px; margin-top: 8px; color: #9f3b27; overflow-wrap: anywhere; }
.usage-dashboard h4 { margin: 28px 0 12px; }
.usage-dashboard .rbac-table-wrap { max-width: 100%; overflow-x: auto; }
.usage-dashboard table { min-width: 600px; width: 100%; }
.usage-dashboard td { overflow-wrap: anywhere; max-width: 230px; }
.usage-days { display: flex; flex-wrap: wrap; gap: 8px; max-height: 200px; overflow: auto; }
.usage-days span { display: inline-flex; gap: 10px; border: 1px solid #ead9cd; padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.usage-pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 16px 0; }
@media (max-width: 600px) {
  .client-download-dialog { padding: 18px; }
  .client-download-list { grid-template-columns: minmax(0, 1fr); }
  .usage-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-disclosure { padding-bottom: 110px; }
}
