#appPermissionsPanel { display:grid; gap:16px; color:#20242a; font-size:14px; }
#appPermissionsPanel header, .ap-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.ap-access, .ap-modules { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.ap-access label, .ap-modules details { border:1px solid #dfe3e7; border-radius:8px; padding:12px; }
.ap-modules summary { cursor:pointer; }
.ap-modules summary label { display:inline-flex!important; align-items:center; gap:7px; margin:0!important; }
.ap-modules details { align-self:start; }
body:has(#adminUserDrawer.open) .notification-center,
body:has(#adminUserDrawer.open) .mobile-bell,
body:has(.cs-dialog[open]) .notification-center,
body:has(.cs-dialog[open]) .mobile-bell { display:none!important; }
.ap-modules details > label { display:flex; align-items:center; gap:9px; margin:14px 0 0; font-weight:500; }
.ap-modules summary label { font-weight:750; }
.ap-modules input, .ap-access input { accent-color:#f65d13; width:18px; height:18px; flex:none; }
.ap-preset { display:grid; gap:8px; }
.ap-preview { display:grid; gap:6px; padding:12px 0; border-top:1px solid #e1e5e8; }
#appPermissionsStatus { color:#176638; font-size:13px; }
.ap-footer button, .cs-shell button, .cs-dialog button, .cs-signing button { display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid #dfe3e7; border-radius:8px; padding:11px 14px; min-height:44px; background:white; color:#20242a; font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.cs-signing *, .cs-dialog * { box-sizing:border-box; }
.cs-signing button:disabled, .cs-shell button:disabled { opacity:.5; cursor:default; }
.ap-footer button svg, .cs-shell button svg, .cs-dialog button svg { width:18px; height:18px; }
#appSavePermissions, .cs-primary { background:#f45b0b!important; color:#fff!important; border-color:#f45b0b!important; }
.cs-shell { max-width:1400px; margin:0 auto; color:#20242a; }
.cs-shell header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:22px; }
.cs-shell h1 { font-size:28px; margin:0; }
.cs-tabs { display:flex; gap:4px; border-bottom:1px solid #dfe3e7; margin-bottom:16px; }
.cs-tabs button { border:0; border-radius:0; background:none; border-bottom:2px solid transparent; }
.cs-tabs button[aria-selected=true] { border-bottom-color:#f45b0b; color:#bc4100; }
.cs-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:18px; }
.cs-filters label { display:grid; gap:6px; font-size:12px; font-weight:650; }
.cs-shell input, .cs-shell select, .cs-dialog input, .cs-dialog textarea, .cs-signing input { width:100%; min-width:0; border:1px solid #d9dfe4; background:#fff; color:#20242a; border-radius:8px; padding:11px 12px; min-height:44px; font:inherit; }
.cs-table-wrap { width:100%; overflow:auto; background:#fff; border:1px solid #dfe3e7; border-radius:8px; }
.cs-table { width:100%; border-collapse:collapse; font-size:14px; }
.cs-table th, .cs-table td { padding:14px; text-align:left; border-bottom:1px solid #e7eaed; max-width:280px; overflow-wrap:anywhere; }
.cs-table th { font-size:12px; background:#f8fafb; color:#5b636d; white-space:nowrap; }
.cs-table td small { display:block; color:#68717c; margin-top:5px; }
.cs-table tr:last-child td { border-bottom:0; }
.cs-shell footer { display:flex; align-items:center; justify-content:flex-end; gap:14px; padding:14px 0; }
.cs-empty { padding:40px 18px; text-align:center; color:#63717b; }
.cs-dialog { box-sizing:border-box; inset:0; margin:auto; overflow:auto; border:1px solid #dfe3e7; border-radius:8px; width:min(680px,calc(100vw - 24px)); max-height:90dvh; padding:24px; color:#20242a; }
.cs-dialog::backdrop { background:#171e2a66; }
.cs-dialog header, .cs-dialog footer { display:flex; gap:12px; justify-content:space-between; align-items:center; flex-wrap:wrap; }
.cs-dialog h2 { font-size:22px; }
.cs-details { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin:20px 0; }
.cs-details dt { font-size:12px; color:#64707b; }
.cs-details dd { margin:5px 0 0; font-weight:650; overflow-wrap:anywhere; }
.cs-details .cs-amount { color:#b83c0b; font-size:20px; font-variant-numeric:tabular-nums; }
.cs-signature-image { width:100%; max-height:140px; object-fit:contain; border:1px solid #e2e6e9; border-radius:6px; }
.cs-error { color:#ac2727; white-space:pre-wrap; }
.cs-signing { background:#f6f8fa; color:#1c242c; margin:0; padding:20px; font:16px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.cs-signing main { max-width:1000px; margin:0 auto; }
.cs-signing h1 { font-size:26px; }
.cs-signing .cs-fields { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:20px 0; }
.cs-signing label { display:grid; gap:8px; }
.cs-signing canvas { display:block; width:100%; height:260px; background:#fff; border:2px solid #cbd5df; border-radius:8px; touch-action:none; }
.cs-signing footer { display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.cs-review-link { border-top:1px solid #e0e4e8; margin-top:16px; padding:16px 0; }
@media(max-width:650px) { .ap-modules,.cs-filters { grid-template-columns:1fr 1fr; } .cs-shell h1{font-size:24px;} .cs-details,.cs-signing .cs-fields {grid-template-columns:1fr;} .cs-signing{padding:16px;} .cs-signing canvas{height:220px;} .cs-table th,.cs-table td{padding:10px;font-size:13px;} }
@media(max-width:380px) { .ap-modules,.cs-filters {grid-template-columns:1fr;} }
