/* Client access view. Load after dashboard-shadcn.css. */
.shell.screen-access .client-access-panel { display: grid; gap: 20px; min-width: 0; }
.shell.screen-access .client-access-panel > .panel-head { margin: 0; align-items: flex-start; gap: 16px; }
.shell.screen-access .client-access-panel > .panel-head p { max-width: 65ch; line-height: 1.5; }
.shell.screen-access .client-access-kicker { display: block; margin-bottom: 6px; color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.shell.screen-access .client-access-panel h2 { margin-bottom: 6px; font-size: clamp(20px, 2vw, 24px); }
.shell.screen-access .client-access-scope { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px); align-items: end; gap: 20px; padding: 20px; border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg); background: hsl(var(--muted) / .4); }
.shell.screen-access .client-access-scope strong { display: block; color: hsl(var(--foreground)); font-size: 15px; }
.shell.screen-access .client-access-scope p { margin: 6px 0 0; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.5; }
.shell.screen-access .client-access-selector { display: grid; gap: 7px; width: 100%; max-width: none; margin: 0; }
.shell.screen-access .client-access-selector > span { color: hsl(var(--foreground)); font-size: 13px; font-weight: 600; }
.shell.screen-access .client-access-selector select { width: 100%; min-height: 44px; }
.shell.screen-access .client-access-guidance,
.shell.screen-access .client-access-feedback { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; padding: 13px 16px; border: 1px solid hsl(var(--border)); border-radius: var(--radius-md); background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); font-size: 13px; line-height: 1.5; }
.shell.screen-access .client-access-guidance { border-left: 3px solid hsl(var(--primary)); }
.shell.screen-access .client-access-feedback[role="alert"] { border-left: 3px solid hsl(var(--destructive)); }
.shell.screen-access .client-access-feedback a,
.shell.screen-access .client-access-empty a { color: hsl(var(--primary)); font-weight: 650; }
.shell.screen-access .client-access-create { margin: 0; border-color: hsl(var(--border)); background: hsl(var(--card)); }
.shell.screen-access .client-access-create > summary { cursor: pointer; }
.shell.screen-access .client-access-create .summary-action { color: hsl(var(--primary)); }
.shell.screen-access .client-access-create .action-content { padding: 20px; }
.shell.screen-access .client-access-form-context { margin: 0 0 16px; color: hsl(var(--muted-foreground)); font-size: 13px; }
.shell.screen-access .client-access-form-context strong { color: hsl(var(--foreground)); }
.shell.screen-access .client-access-create .key-form-grid { grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1fr) auto; gap: 14px; align-items: end; }
.shell.screen-access .client-access-create .key-form-grid label { min-width: 0; }
.shell.screen-access .client-access-create .key-form-grid select,
.shell.screen-access .client-access-create .key-form-grid input { width: 100%; min-height: 40px; }
.shell.screen-access .client-access-secret { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0; border-color: hsl(var(--border)); background: hsl(var(--card)); }
.shell.screen-access .client-access-secret > div:first-child { display: grid; gap: 4px; }
.shell.screen-access .client-access-secret strong { color: hsl(var(--foreground)); }
.shell.screen-access .client-access-secret span { color: hsl(var(--muted-foreground)); }
.shell.screen-access .client-access-secret code { grid-column: 1 / -1; grid-row: 2; min-width: 0; max-width: 100%; overflow: auto; overflow-wrap: anywhere; border: 1px solid hsl(var(--border)); background: hsl(var(--muted) / .5); color: hsl(var(--foreground)); }
.shell.screen-access .client-access-secret-actions { display: flex; grid-column: 2; grid-row: 1; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.shell.screen-access .client-access-list-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-top: 3px; }
.shell.screen-access .client-access-list-head h3 { margin: 0; color: hsl(var(--foreground)); font-size: 17px; }
.shell.screen-access .client-access-list-head p { margin: 5px 0 0; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.5; }
.shell.screen-access .client-access-list-head > span { flex: none; color: hsl(var(--muted-foreground)); font-size: 12px; }
.shell.screen-access .client-access-empty { padding: 24px; border: 1px dashed hsl(var(--border)); border-radius: var(--radius-lg); background: hsl(var(--muted) / .3); }
.shell.screen-access .client-access-empty strong { color: hsl(var(--foreground)); }
.shell.screen-access .client-access-empty p { margin: 6px 0 0; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.5; }
.shell.screen-access .client-access-empty a { display: inline-block; margin-top: 12px; }
.shell.screen-access .client-access-table { min-width: 0; margin: 0; border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg); background: hsl(var(--card)); overflow-x: auto; }
.shell.screen-access .client-access-table table { width: 100%; min-width: 900px; }
.shell.screen-access .client-access-table th { background: hsl(var(--muted) / .45); color: hsl(var(--muted-foreground)); font-size: 12px; white-space: nowrap; }
.shell.screen-access .client-access-table td { vertical-align: top; color: hsl(var(--foreground)); }
.shell.screen-access .client-access-table td:nth-child(1) { min-width: 145px; }
.shell.screen-access .client-access-table td:nth-child(2) { min-width: 225px; }
.shell.screen-access .client-access-table td:nth-child(3) { min-width: 205px; }
.shell.screen-access .client-access-key,
.shell.screen-access .client-access-binding { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.shell.screen-access .client-access-key strong,
.shell.screen-access .client-access-binding strong { overflow-wrap: anywhere; line-height: 1.35; }
.shell.screen-access .client-access-key code,
.shell.screen-access .client-access-binding code { overflow-wrap: anywhere; white-space: normal; font-size: 11px; }
.shell.screen-access .client-access-binding small { color: hsl(var(--muted-foreground)); line-height: 1.45; }
.shell.screen-access .client-access-key-state { padding: 3px 8px; border: 1px solid hsl(var(--border)); border-radius: 999px; background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); font-size: 11px; font-weight: 650; }
.shell.screen-access .client-access-key-state.active { border-color: hsl(var(--primary) / .35); color: hsl(var(--primary)); }
.shell.screen-access .client-access-balances,
.shell.screen-access .client-access-dates { display: grid; gap: 6px; margin: 0; }
.shell.screen-access .client-access-balances > div,
.shell.screen-access .client-access-dates > div { display: flex; justify-content: space-between; gap: 12px; line-height: 1.35; }
.shell.screen-access .client-access-balances dt,
.shell.screen-access .client-access-dates dt { color: hsl(var(--muted-foreground)); font-size: 12px; }
.shell.screen-access .client-access-balances dd,
.shell.screen-access .client-access-dates dd { margin: 0; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.shell.screen-access .client-access-balances > div:last-child { padding-top: 6px; border-top: 1px solid hsl(var(--border)); font-weight: 700; }
.shell.screen-access .client-access-unavailable-note { display: block; margin-top: 9px; color: hsl(var(--muted-foreground)); line-height: 1.4; }
.shell.screen-access .client-access-balance-unavailable { display: grid; justify-items: start; gap: 8px; color: hsl(var(--muted-foreground)); font-size: 12px; }
.shell.screen-access .client-access-revoke-confirm { display: grid; gap: 7px; min-width: 170px; padding: 12px; border: 1px solid hsl(var(--destructive) / .4); border-radius: var(--radius-md); background: hsl(var(--destructive) / .06); }
.shell.screen-access .client-access-revoke-confirm strong { font-size: 12px; }
.shell.screen-access .client-access-revoke-confirm > span { color: hsl(var(--muted-foreground)); font-size: 12px; line-height: 1.4; }
.shell.screen-access .client-access-revoke-confirm .confirm-inline { flex-wrap: wrap; }
.shell.screen-access .client-access-panel a:focus-visible,
.shell.screen-access .client-access-panel summary:focus-visible,
.shell.screen-access .client-access-panel select:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 3px; }

@media (max-width: 900px) {
    .shell.screen-access .client-access-create .key-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shell.screen-access .client-access-create .key-form-grid button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 700px) {
    .shell.screen-access .client-access-panel { gap: 16px; }
    .shell.screen-access .client-access-scope { grid-template-columns: minmax(0, 1fr); padding: 16px; }
    .shell.screen-access .client-access-create .key-form-grid { grid-template-columns: minmax(0, 1fr); }
    .shell.screen-access .client-access-create .key-form-grid button { width: 100%; }
    .shell.screen-access .client-access-secret { grid-template-columns: minmax(0, 1fr); }
    .shell.screen-access .client-access-secret-actions { grid-column: 1; grid-row: 3; justify-content: stretch; }
    .shell.screen-access .client-access-secret-actions button { flex: 1 1 120px; }
    .shell.screen-access .client-access-list-head { align-items: start; }
    .shell.screen-access .client-access-table { overflow: visible; border: 0; background: transparent; }
    .shell.screen-access .client-access-table table,
    .shell.screen-access .client-access-table tbody { display: block; width: 100%; min-width: 0; }
    .shell.screen-access .client-access-table thead { display: none; }
    .shell.screen-access .client-access-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; margin-bottom: 12px; padding: 6px 16px; border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg); background: hsl(var(--card)); }
    .shell.screen-access .client-access-table td { display: block; min-width: 0 !important; padding: 12px 0; border: 0; }
    .shell.screen-access .client-access-table td:nth-child(1),
    .shell.screen-access .client-access-table td:nth-child(2),
    .shell.screen-access .client-access-table td:nth-child(3) { grid-column: 1 / -1; border-bottom: 1px solid hsl(var(--border)); }
    .shell.screen-access .client-access-table td:nth-child(2)::before,
    .shell.screen-access .client-access-table td:nth-child(3)::before,
    .shell.screen-access .client-access-table td:nth-child(4)::before,
    .shell.screen-access .client-access-table td:nth-child(5)::before { display: block; margin-bottom: 8px; color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
    .shell.screen-access .client-access-table td:nth-child(2)::before { content: "Provedora e wallet"; }
    .shell.screen-access .client-access-table td:nth-child(3)::before { content: "Saldo da wallet"; }
    .shell.screen-access .client-access-table td:nth-child(4)::before { content: "Atividade"; }
    .shell.screen-access .client-access-table td:nth-child(5)::before { content: "Ação"; }
}
@media (max-width: 480px) {
    .shell.screen-access .client-access-panel > .panel-head { flex-wrap: wrap; }
    .shell.screen-access .client-access-list-head > span { display: none; }
    .shell.screen-access .client-access-table tr { grid-template-columns: minmax(0, 1fr); }
    .shell.screen-access .client-access-table td:nth-child(4) { border-bottom: 1px solid hsl(var(--border)); }
}
