/* Complete administrative design system, strictly scoped to #app. */
#app { --admin-surface: #111317; --admin-raised: #171a20; --admin-line: #292e36; --admin-muted: #929aa7; background: #08090b; }
#app #main-content { padding: 0 32px 50px; max-width: 1800px; }
#app .admin-topbar { background: #08090bf5; }
#app .saas-command-search { flex-direction: row; align-items: center; gap: 9px; }
#app .saas-command-search input { border: 0; background: none; min-height: 36px; padding: 0; }
#app .admin-context-tabs { margin-bottom: 0; }
#app .admin-view { padding-top: 30px; }
#app .admin-view-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
#app .admin-view-title { display: flex; align-items: center; gap: 18px; }
#app .admin-view-icon { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid #303743; background: linear-gradient(135deg,#262b34,#12151a); border-radius: 13px; flex: 0 0 auto; }
#app .admin-view-icon svg { width: 24px; height: 24px; color: #c4ccd9; }
#app .admin-view-category { font-size: 9px; color: #8992a0; text-transform: uppercase; letter-spacing: 1.6px; }
#app .admin-view-title h3 { margin: 5px 0 7px; font: 600 25px Inter,Arial,sans-serif; letter-spacing: -.8px; }
#app .admin-view-title p { margin: 0; color: var(--admin-muted); font-size: 12px; line-height: 1.6; max-width: 720px; }
#app .admin-view-marker { font: 10px monospace; letter-spacing: 1px; color: #626a78; white-space: nowrap; }
#app .admin-nav-icon { width: 16px; height: 16px; display: inline-flex; margin-right: 11px; vertical-align: middle; }
#app .admin-nav-icon svg { width: 100%; height: 100%; }
#app .nav { display: flex; align-items: center; height: 37px; }
#app .nav.active { background: #e5e9ef; color: #11151b; box-shadow: none; }
#app .nav.active .admin-nav-icon { color: #11151b; }
#app .panel, #app .settings-card { border-color: var(--admin-line); background: var(--admin-surface); border-radius: 12px; }
#app .panel { margin-bottom: 20px; padding: 24px; }
#app .admin-view > .page-actions { display: flex; justify-content: flex-end; margin: -8px 0 20px; }
#app .admin-view h4 { font-size: 14px; line-height: 1.5; }
#app .admin-workbench-tabs, #app .admin-settings-nav { display: flex; gap: 5px; width: fit-content; max-width: 100%; padding: 5px; border: 1px solid var(--admin-line); background: #101216; border-radius: 9px; overflow-x: auto; margin-bottom: 24px; }
#app .admin-workbench-tabs button, #app .admin-settings-nav button { min-height: 36px; background: none; border: 1px solid transparent; padding: 9px 17px; color: #969eab; font-weight: 500; white-space: nowrap; }
#app .admin-workbench-tabs button[aria-selected=true], #app .admin-settings-nav button[aria-selected=true] { background: #e1e6ee !important; border-color: #e1e6ee !important; color: #161b23 !important; }
#app .admin-workbench-pane { display: grid; gap: 20px; min-width: 0; }
#app [hidden] { display: none !important; }
#app #page-partner-apis > .key-admin-layout, #app #page-partner-apis > article.panel, #app #page-pass-keys > .key-admin-layout, #app #page-likes-api > article.panel { display: none; }
#app #page-socios > .reseller-admin-hero, #app #page-resellers > .reseller-admin-hero > div, #app #page-api-usage > .report-hero > div, #app #page-checker-whitelist > .report-hero > div, #app .logs-intro { display: none; }
#app #page-resellers > .reseller-admin-hero { background: none; border: 0; padding: 0; display: flex; justify-content: flex-end; margin-top: -8px; }
#app #page-resellers > .page-actions { display: none; }
#app .report-hero { background: none; border: 0; box-shadow: none; padding: 0; min-height: 0; margin-bottom: 20px; display: flex; justify-content: flex-end; }
#app .report-hero .security-pill { color: #9cabbc; background: #151b23; border-color: #2e3a49; font-size: 9px; padding: 8px 12px; }
#app .key-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 14px; margin: 0 0 22px; }
#app .key-metrics > * { border: 1px solid var(--admin-line); background: #13161b; border-radius: 10px; min-height: 94px; padding: 18px; }
#app .key-metrics b, #app .key-metrics strong { font: 600 26px Inter,Arial,sans-serif; letter-spacing: -1px; }
#app .key-metrics small, #app .key-metrics span { color: #929ba9; font: 10px Inter,Arial,sans-serif; letter-spacing: .2px; }
#app .settings-card-head { border-bottom: 1px solid var(--admin-line); padding-bottom: 18px; margin-bottom: 20px; align-items: center; }
#app .settings-card-head h3 { font: 600 16px Inter,Arial,sans-serif; margin: 6px 0 0; }
#app .settings-card-head > span { font-size: 9px; color: #95a0b0; background: #20262f; border: 1px solid #323b48; padding: 6px 9px; border-radius: 5px; letter-spacing: .6px; }
#app .form-grid { gap: 18px; }
#app .settings-fields { gap: 18px; }
#app label { display: flex; flex-direction: column; gap: 8px; color: #a6afbe; font-size: 11px; line-height: 1.5; }
#app input, #app select { min-height: 43px; padding: 10px 12px; background: #0b0d11; border: 1px solid #303743; box-shadow: none; }
#app textarea { padding: 12px; line-height: 1.7; resize: vertical; background: #0b0d11; font-size: 12px; }
#app input::placeholder, #app textarea::placeholder { color: #616b7b; }
#app .toggle-field, #app .whitelist-switch { flex-direction: row; align-items: center; gap: 10px; }
#app input[type=checkbox] { width: 16px; height: 16px; accent-color: #d9e1ed; min-height: 16px; }
#app p.muted { line-height: 1.8; font-size: 12px; }
#app .settings-layout { background: none; }
#app #settings-form { display: block; }
#app #settings-form .settings-toolbar { background: #11151b; padding: 20px 24px; border: 1px solid var(--admin-line); border-radius: 12px; margin-bottom: 22px; }
#app #settings-form .settings-toolbar > div h3 { font-size: 15px; margin: 5px 0; }
#app #settings-form .settings-toolbar > div p { font-size: 11px; margin: 0; }
#app #settings-form .settings-card { max-width: 1040px; padding: 26px; }
#app #settings-form .settings-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
#app .pix-panel { max-width: 1080px; }
#app .pix-panel .settings-toolbar { border-bottom: 1px solid var(--admin-line); padding-bottom: 24px; margin-bottom: 4px; }
#app .pix-panel .settings-card { background: #0c0f14; margin: 0; }
#app .api-report-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; align-items: end; }
#app .api-report-filters .filter-actions { display: flex; gap: 9px; grid-column: 1/-1; border-top: 1px solid var(--admin-line); padding-top: 18px; }
#app .api-report-search { grid-column: auto; }
#app .key-admin-layout, #app .partner-admin-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(260px,1fr); gap: 20px; }
#app .partner-admin-grid .panel { margin: 0; }
#app .partner-security-note, #app .whitelist-rules { background: linear-gradient(145deg,#171e28,#111317); }
#app .partner-security-note h3 { font-size: 19px; }
#app .partner-security-note p, #app .whitelist-rules p, #app .whitelist-rules li { color: #a0acbc; font-size: 12px; line-height: 1.9; }
#app .partner-security-note { display: flex; flex-direction: column; justify-content: center; padding: 34px; }
#app .api-endpoints { background: #11161e; border: 1px solid #2b3646; padding: 24px; border-radius: 12px; display: grid; gap: 12px; }
#app .api-endpoints code { background: #0b1017; color: #c1cede; border: 1px solid #263242; padding: 14px 16px; border-radius: 7px; font-size: 12px; overflow-wrap: anywhere; }
#app .likes-manual-layout { grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 20px; }
#app .likes-manual-layout .panel { margin: 0; min-height: 245px; }
#app .likes-manual-form { margin-top: 24px; gap: 14px; align-items: end; }
#app .likes-send-result { background: #141a23; border-color: #344154; }
#app .likes-result-empty { padding: 24px; }
#app .likes-result-empty > span { background: #242e3d; color: #c9d6e8; border-radius: 12px; }
#app .guest-import-panel { max-width: 1180px; }
#app .guest-import-head { padding-bottom: 20px; border-bottom: 1px solid var(--admin-line); margin-bottom: 20px; }
#app .guest-import-head h3 { font-size: 17px; }
#app .guest-import-head > span { font-size: 10px; border: 1px solid #323d4e; background: #1a222e; padding: 7px 10px; border-radius: 5px; }
#app .guest-import-controls { grid-template-columns: repeat(3,minmax(0,1fr)); padding: 0; background: none; border: 0; }
#app #guest-import-form textarea { min-height: 200px; max-height: 380px; font-family: monospace; }
#app input[type=file] { background: #151c27; border: 1px dashed #42506a; padding: 12px; }
#app input[type=file]::file-selector-button { background: #2a3545; color: #d4dfef; border: 0; padding: 8px 10px; border-radius: 5px; margin-right: 10px; }
#app .guest-import-actions { border-top: 1px solid var(--admin-line); padding-top: 20px; align-items: flex-start; gap: 24px; }
#app .guest-import-actions small { font-size: 11px; line-height: 1.8; }
#app .guest-catalog-heading { margin: 0; }
#app .guest-catalog-heading h3 { font-size: 17px; }
#app .guest-stock { gap: 16px; margin: 0; }
#app .guest-stock > * { background: linear-gradient(135deg,#1b222c,#11151b); border: 1px solid #323d4b; border-radius: 11px; padding: 24px; box-shadow: none; }
#app .guest-stock h3, #app .guest-stock b { font-family: inherit; }
#app .guest-center-panel { margin: 0; }
#app .guest-center-head h3 { font-size: 17px; }
#app .guest-center-summary { background: #0c0f14; border: 1px solid var(--admin-line); border-radius: 9px; padding: 0; }
#app .guest-center-filters { background: #161b23; border: 1px solid #303b4a; border-radius: 9px; padding: 16px; margin-bottom: 18px; }
#app .guest-center-actions { margin: 20px 0; display: flex; gap: 10px; flex-wrap: wrap; }
#app .skin-products-panel > summary { border-bottom: 1px solid var(--admin-line); padding-bottom: 20px; margin-bottom: 24px; }
#app .skin-products-panel summary h3 { font-size: 17px; }
#app .skin-workspace { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(280px,1fr); gap: 24px; }
#app .skin-workspace > * { padding: 22px; background: #0c0f14; border: 1px solid #2b3442; border-radius: 10px; }
#app .skin-search-form { display: flex; gap: 10px; }
#app .skin-search-form input { min-width: 0; flex: 1; }
#app .skin-reclassify-toolbar { background: #171f2b; border-color: #33435a; }
#app .skin-check-form { background: #0d1118; padding: 22px; border: 1px solid #29374a; border-radius: 10px; }
#app .admin-data-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 22px; border: 1px solid var(--admin-line); border-radius: 10px 10px 0 0; background: #15191f; }
#app .admin-data-toolbar h4 { margin: 0 0 5px; font-size: 13px; }
#app .admin-data-count { color: #818c9d; font-size: 10px; }
#app .admin-inline-search { display: flex; flex-direction: row; align-items: center; gap: 8px; background: #0c1016; border: 1px solid #303a48; padding: 0 12px; border-radius: 7px; width: 300px; }
#app .admin-inline-search svg { width: 16px; height: 16px; flex: 0 0 auto; color: #7e8b9e; }
#app .admin-inline-search input { background: none; border: 0; min-height: 37px; width: 100%; padding: 8px 0; }
#app .admin-inline-search input:focus { outline: none; }
#app .admin-inline-search:focus-within { outline: 2px solid #8799b477; }
#app .admin-data-content { background: #11151b; border-left: 1px solid var(--admin-line); border-right: 1px solid var(--admin-line); min-width: 0; }
#app .admin-data-block { min-width: 0; }
#app #orders-table td:first-child { min-width: 185px; max-width: 220px; }
#app #orders-table td:first-child b, #app #orders-table td:first-child .id-line { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app #orders-table td:first-child br { display: none; }
#app #orders-table td.actions { min-width: 40px; }
#app #orders-table .discord-user { min-width: 130px; }
#app .admin-data-content .table-scroll { border: 0; margin: 0; border-radius: 0; }
#app table { border-spacing: 0; }
#app table th { background: #0d1117; font-size: 9px; color: #8290a3; padding: 16px; white-space: nowrap; }
#app table td { padding: 18px 16px; color: #c3cbd8; vertical-align: middle; font-size: 11px; border-bottom: 1px solid #252e3a; }
#app table td small { font-size: 10px; line-height: 1.7; color: #7d8a9d; }
#app table td b { font-size: 12px; color: #e3e9f3; }
#app table .actions { min-width: 120px; }
#app table button { font-size: 10px !important; min-height: 31px !important; padding: 7px 10px !important; }
#app .admin-data-footer { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border: 1px solid var(--admin-line); border-top: 0; border-radius: 0 0 10px 10px; background: #131820; color: #8491a5; font-size: 10px; gap: 16px; }
#app .admin-data-footer > div { display: flex; gap: 8px; }
#app .admin-data-footer button { min-height: 31px; padding: 7px 12px; font-size: 10px; }
#app .admin-search-empty { padding: 30px; text-align: center; color: #9ba8bc; background: #11151b; border: 1px solid var(--admin-line); font-size: 12px; }
#app .admin-data-content .empty { margin: 0; padding: 42px 20px; text-align: center; border: 0; background: none; color: #7f8ea3; }
#app .badge { padding: 5px 8px; border-radius: 5px; font: 500 9px Inter,Arial,sans-serif; letter-spacing: .3px; background: #273143; color: #b9c9e1; border: 1px solid #3b4b64; }
#app .badge.approved, #app .badge.delivered, #app .badge.active, #app .badge.success { background: #182e26; color: #a0d6be; border-color: #2c4a3e; }
#app .badge.failed, #app .badge.error, #app .badge.invalid, #app .badge.rejected { background: #301f28; color: #dda7bb; border-color: #593449; }
#app .badge.pending, #app .badge.queued, #app .badge.quarantine, #app .badge.processing { background: #302b1c; color: #d6c394; border-color: #51472c; }
#app .log-groups { gap: 18px; }
#app .log-group { background: #12161d; border: 1px solid #2b3544; border-radius: 12px; }
#app .log-group summary { padding: 22px; }
#app .log-group h3 { font-size: 16px; }
#app .log-group summary small { color: #8e9cb1; }
#app .reseller-admin-card-body { background: #0c1016; }
#app .admin-collapsible { background: #131820; }
#app .admin-collapsible summary h3 { font-size: 15px; }
#app .dashboard-command-center { background: linear-gradient(120deg,#1d2633,#11161e); border-color: #354154; }
#app .dashboard-kicker span { border-color: #394b64; color: #b7c9e4; }
#app .metric { background: linear-gradient(140deg,#171d28,#11151c); border-color: #2b3546; }
#app .dashboard-lists .panel { background: #11151c; }
#app .dashboard-status-card { background: #0c1118; border-color: #354257; }
#app .reseller-admin-card { background: #131820; }
#app .whitelist-status { border-radius: 10px; border: 1px solid #34415a; background: #111a29; font-size: 12px; margin-bottom: 20px; }
#app .security-pill { font-size: 10px; }
#app .generated-keys { background: #111b2a; border: 1px solid #344762; border-radius: 10px; }
body:has(#app:not(.hidden)) #modal, body:has(#app:not(.hidden)) #confirm-dialog { background: #151b25; border: 1px solid #46536a; border-radius: 14px; box-shadow: 0 30px 100px #000a; font-family: Inter,Arial,sans-serif; }
body:has(#app:not(.hidden)) #modal h3, body:has(#app:not(.hidden)) #confirm-dialog h3 { text-transform: none; font-family: inherit; font-size: 21px; }
/* API permissions are roomy cards rather than an eleven-column spreadsheet. */
#app #partner-apis-table table, #app #partner-apis-table tbody { display: block; width: 100%; }
#app #partner-apis-table thead { display: none; }
#app #partner-apis-table tbody { padding: 18px; display: grid; gap: 16px; }
#app #partner-apis-table tr { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid #344154; border-radius: 10px; background: #141c28; overflow: hidden; }
#app #partner-apis-table td { min-width: 0; overflow-wrap: anywhere; padding: 17px; border-right: 1px solid #2c3749; }
#app #partner-apis-table td::before { display: block; font-size: 9px; color: #8193ad; margin-bottom: 9px; text-transform: uppercase; letter-spacing: .7px; }
#app #partner-apis-table td:nth-child(1)::before { content: 'Cliente'; }
#app #partner-apis-table td:nth-child(2)::before { content: 'Revendedor'; }
#app #partner-apis-table td:nth-child(3)::before { content: 'Saldo'; }
#app #partner-apis-table td:nth-child(4)::before { content: 'Keys ativas'; }
#app #partner-apis-table td:nth-child(5)::before { content: 'Identificação da chave'; }
#app #partner-apis-table td:nth-child(6)::before { content: 'Limites do checker'; }
#app #partner-apis-table td:nth-child(7)::before { content: 'Configuração de likes'; }
#app #partner-apis-table td:nth-child(8)::before { content: 'Permissões de rotas'; }
#app #partner-apis-table td:nth-child(9)::before { content: 'Status'; }
#app #partner-apis-table td:nth-child(10)::before { content: 'Último uso'; }
#app #partner-apis-table td:nth-child(11)::before { content: 'Gerenciar acesso'; }
#app #partner-apis-table td:nth-child(8) { grid-column: span 2; }
#app #partner-apis-table td:last-child { grid-column: span 2; }
#app .api-route-controls { display: flex; flex-wrap: wrap; gap: 7px; }
#app .api-route-toggle.enabled { background: #1d332d; border-color: #34574c; color: #b0d1c6; }
#app .api-route-toggle.disabled { background: #302730; border-color: #584355; color: #cbb3c7; }
@media (max-width: 1180px) { #app #partner-apis-table tr { grid-template-columns: repeat(2,minmax(0,1fr)); } #app .skin-workspace { grid-template-columns: 1fr; } #app .admin-view-marker { display: none; } }
@media (max-width: 980px) { #app #main-content { padding: 0 20px 36px; } #app .admin-view { padding-top: 22px; } #app .admin-view-title h3 { font-size: 22px; } #app .key-admin-layout, #app .partner-admin-grid, #app .likes-manual-layout { grid-template-columns: 1fr; } #app .admin-data-toolbar { flex-wrap: wrap; } #app .guest-import-controls { grid-template-columns: 1fr; } }
@media (max-width: 640px) { #app #main-content { padding: 0 14px 28px; } #app .admin-view-title { gap: 12px; align-items: flex-start; } #app .admin-view-icon { width: 42px; height: 42px; border-radius: 10px; } #app .admin-view-title h3 { font-size: 20px; } #app .admin-view-title p { font-size: 11px; } #app .admin-inline-search { width: 100%; } #app .admin-data-toolbar { padding: 17px; } #app .panel { padding: 18px; } #app .api-report-filters { grid-template-columns: 1fr 1fr; } #app #settings-form .settings-fields { grid-template-columns: 1fr; } #app #settings-form .settings-toolbar { flex-direction: column; align-items: stretch; } #app .admin-data-footer { flex-wrap: wrap; } #app #partner-apis-table tbody { padding: 10px; } #app .admin-workbench-tabs { width: 100%; } #app .admin-workbench-tabs button { padding: 9px 12px; font-size: 11px; } }
