/* Standalone admin stylesheet: shared source layout plus admin overrides. */
/* Card issuance and balances remain scoped to the source-file service. */
:root{color-scheme:light;--ink:#10191e;--muted:#52666f;--accent:#087f77;--line:#d8e7eb;--soft:#edf8f6}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:#f4f8fb;font:15px/1.6 system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif}[hidden]{display:none!important}button,input,a{font:inherit}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #cbdfe4;border-radius:11px;padding:10px 16px;background:white;color:#183d43;text-decoration:none;font-weight:650;cursor:pointer;transition:background .16s,box-shadow .16s,transform .16s}button:hover:not(:disabled),.button:hover{background:#eff9f7;box-shadow:0 4px 12px #1438430d;transform:translateY(-1px)}button:disabled{opacity:.5;cursor:not-allowed}.primary{background:linear-gradient(120deg,#07877c,#096b68);color:white;border-color:transparent}.primary:hover:not(:disabled){background:#076e67}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #72c4bc;outline-offset:3px}a{color:#087c75;text-underline-offset:3px}.source-shell{max-width:1360px;margin:auto;padding:28px 24px 40px}.source-heading,.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}h1,h2,h3{color:#000;line-height:1.3;margin:0 0 10px;font-weight:750}h1{font-size:30px}h2{font-size:23px}p{color:var(--muted);margin:6px 0}.eyebrow{font-size:12px;font-weight:750;letter-spacing:.06em;color:#14786e}.card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:26px;box-shadow:0 8px 24px #20394204}.source-layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:22px;margin:20px 0}.account-card{align-self:start;border-top:3px solid #38b6a6}.account-card h2{font-size:20px;margin-top:12px}.balance{margin:24px 0 20px;padding:18px;background:var(--soft);border:1px solid #bde2d9;border-radius:14px}.balance span,.balance strong{display:block}.balance strong{font-size:34px;line-height:1.25;color:#006e61}.price-row{display:flex;justify-content:space-between;gap:12px;padding-bottom:16px;border-bottom:1px solid var(--line)}.account-card p{font-size:13px;margin:18px 0}.create-card{border-top:3px solid #50a4b3}.pill{display:inline-flex;padding:5px 10px;border-radius:10px;background:#eef5f8;color:#254e5b;font-size:13px;font-weight:700}.upload-area{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:240px;border:1.5px dashed #a7c9d1;border-radius:16px;background:linear-gradient(135deg,#f6fcfb,#f6f9fd);cursor:pointer;gap:8px;color:var(--muted);text-align:center;padding:20px}.upload-area.dragging{border-color:#07877c;background:#e6f7f2}.upload-area strong{color:#132b33;font-size:18px}.upload-area input{position:absolute;width:1px;height:1px;opacity:0}.upload-area:focus-within{outline:3px solid #72c4bc;outline-offset:3px}.upload-icon{width:54px;height:54px;color:#288b88;padding:11px;background:#e0f2ee;border-radius:16px}.upload-icon svg{width:100%;height:100%}.preview-box{display:flex;gap:24px;align-items:center;min-height:240px;padding:20px;border:1px solid var(--line);border-radius:14px;background:#f9fbfc}.preview-box img{width:220px;max-height:240px;object-fit:contain;background:repeating-conic-gradient(#eef1f2 0% 25%,#fff 0% 50%) 50%/16px 16px;border-radius:9px}.preview-box strong{overflow-wrap:anywhere}.preview-box p{font-size:13px;margin:10px 0 18px}.check-row{display:flex;gap:9px;align-items:center;margin-top:20px;font-weight:650}.check-row input{accent-color:#088477;width:18px;height:18px}.helper{font-size:13px}.submit-footer{border-top:1px solid var(--line);margin-top:24px;padding-top:22px;display:flex;align-items:center;justify-content:space-between;gap:18px}.submit-footer strong{font-size:21px;color:#006e61}.submit-footer p{font-size:12px}.notice{padding:15px 18px;background:#eff7fb;border:1px solid #c4e0eb;border-radius:12px;color:#244d61;margin:14px 0}.notice p{color:inherit}.notice.error{background:#fff3ef;border-color:#f4cbbb;color:#913b1d}.notice.success{background:#ecf8f1;border-color:#bddfcb;color:#216541}.notice button{margin-top:8px}.records{margin-top:24px}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left;font-size:14px}th{background:#f2f6f8;color:#111;padding:14px 12px;white-space:nowrap}td{padding:18px 12px;border-bottom:1px solid #e6eef1;vertical-align:top}td strong{display:block;color:#111;max-width:300px;overflow-wrap:anywhere}td small{display:block;color:var(--muted);font-size:11px;overflow-wrap:anywhere;max-width:280px}.status{display:inline-flex;background:#edf3fc;border-radius:8px;padding:3px 8px;color:#275995;white-space:nowrap}.status.done{background:#e6f7ef;color:#067051}.status.error{background:#fff0e8;color:#9c501d}.downloads{display:flex;flex-wrap:wrap;gap:8px}.downloads a{padding:5px 9px;border:1px solid #cbe0e4;border-radius:8px;text-decoration:none}.empty{text-align:center;padding:28px;color:#5c727b}.pager{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:20px;font-size:13px}.activation{background:#f2fbf8;margin-bottom:20px}.activation p{margin-bottom:15px}@media(max-width:760px){.source-shell{padding:18px 14px}.source-layout{grid-template-columns:1fr}.card{padding:19px}.account-card .balance{margin:12px 0;padding:12px}.account-card p{margin:12px 0}.source-heading{align-items:flex-start}h1{font-size:26px}.preview-box{flex-direction:column;align-items:flex-start}.preview-box img{max-width:100%;align-self:center}.submit-footer{align-items:stretch;flex-direction:column}.section-heading{align-items:flex-start}.table-scroll{margin:0 -6px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

.admin-app{display:grid;grid-template-columns:238px minmax(0,1fr);min-height:100vh}.sidebar{background:linear-gradient(155deg,#15323f,#163e45);padding:28px 18px;color:#d5e7ec;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:12px;margin-bottom:44px}.brand strong,.brand small{display:block}.brand strong{color:white;font-size:18px}.brand small{font-size:12px}.brand-icon{font-size:30px;color:#116b65;background:#d8f5eb;width:44px;height:44px;text-align:center;border-radius:14px}.side-label{font-size:12px;font-weight:700;color:#9bc3c7;padding-left:12px}.sidebar nav{display:flex;flex-direction:column;gap:8px;margin-top:14px}.sidebar a{padding:13px 14px;border-radius:12px;color:#c8e5e7;text-decoration:none;font-weight:650}.sidebar a:hover{background:#ffffff0d}.sidebar a[aria-current]{color:white;background:#ffffff12;box-shadow:inset 3px 0 #79d6ce}.side-help{color:#a5c7cb;font-size:13px;margin:40px 12px}.admin-content{padding:34px 36px;max-width:1600px;width:100%;margin:auto}.settings-card{max-width:100%}.settings-fields{display:flex;gap:40px;align-items:center;margin:20px 0}.settings-fields label{display:flex;flex-direction:column;gap:8px;font-weight:700;color:#111}.settings-fields .check-row{flex-direction:row;margin:0}.settings-fields input[type=number]{border:1px solid #c8dce2;border-radius:10px;padding:12px;width:220px;background:white;color:#111}.billing-rule{margin:20px 0}.auth{min-height:100vh;display:grid;place-items:center;padding:24px}.auth .card{width:min(100%,440px)}.auth label{display:flex;flex-direction:column;font-weight:700;gap:8px;margin:22px 0}.auth input{border:1px solid #c8dce2;border-radius:10px;padding:12px}.auth button{width:100%;margin-bottom:18px}@media(max-width:900px){.admin-app{grid-template-columns:1fr}.sidebar{position:static;height:auto;padding:16px}.brand{margin-bottom:14px}.side-label,.side-help{display:none}.sidebar nav{flex-direction:row;flex-wrap:wrap}.sidebar a{padding:8px 10px}.admin-content{padding:22px 15px}.settings-fields{align-items:flex-start;flex-direction:column;gap:22px}.source-heading{align-items:flex-start}}
.issue-card{border-top:3px solid #24a58f}.issue-fields{display:grid;grid-template-columns:minmax(140px,1fr) minmax(130px,.7fr) minmax(200px,1.6fr);gap:18px}.issue-fields label,dialog label{display:flex;flex-direction:column;gap:8px;font-weight:700;color:#111}.issue-fields input,.search-row input,dialog input{width:100%;min-width:0;border:1px solid #c8dce2;border-radius:10px;padding:12px;background:#fff;color:#111}.form-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:20px}.form-footer p{font-weight:650;color:#183d43}.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.issued-box{margin-top:24px;padding:20px;border:1px solid #b8ded6;border-radius:14px;background:#f0faf7}.issued-box h3{font-size:18px}.issued-box textarea{width:100%;resize:vertical;border:1px solid #c6ded7;border-radius:10px;padding:14px;color:#112e35;font:14px/1.9 ui-monospace,SFMono-Regular,Consolas,monospace;background:#fff;overflow-wrap:anywhere}.search-row{display:flex;gap:12px;max-width:650px;margin:0 0 20px}.cards-table{min-width:900px}.cards-table .card-code,.card-code{font:13px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;word-break:break-all;max-width:360px;color:#111;font-weight:650}.cards-table .actions{min-width:150px}.cards-table button{font-size:13px;padding:7px 11px}.status.pending{background:#fff7e6;color:#875412}.status.active{background:#e6f7ef;color:#067051}.status.disabled{background:#fff0e8;color:#9c501d}.status.transferred{background:#eef0f3;color:#5c6570}.fixed-price{padding:12px 18px;border-radius:12px;background:#eef8f5;color:#244b43}.fixed-price strong{font-size:25px;color:#006e61}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}dialog{width:min(520px,calc(100% - 28px));padding:26px;border:1px solid #cee1e5;border-radius:20px;box-shadow:0 24px 80px #112e3540;color:#10191e}dialog::backdrop{background:#15323f70}dialog label{margin:18px 0}.icon-button{font-size:24px;line-height:1;padding:8px 12px}.dialog-actions{justify-content:flex-end;margin-top:24px}.billing-tag{font-size:12px;color:#52666f;display:block;margin-top:5px}.admin-content{overflow:hidden}.table-scroll{max-width:100%}@media(max-width:650px){.issue-fields{grid-template-columns:1fr 1fr}.issue-fields .wide{grid-column:1/-1}.issue-card .section-heading,.issued-box .section-heading{flex-wrap:wrap}.form-footer{align-items:stretch;flex-direction:column}.search-row{gap:8px}.search-row input{width:0;flex:1}.source-heading{gap:10px}.source-heading h1{font-size:24px}.source-heading>button{white-space:nowrap;padding:8px 12px}.pager span{text-align:center}.settings-fields{margin:14px 0}.card-code{max-width:100%}}
.pill{flex-shrink:0;white-space:nowrap}.search-row input{flex:1;width:0}.search-row button{flex:0 0 auto;white-space:nowrap}.records table{min-width:750px}.records .cards-table{min-width:900px}

.source-agency summary { cursor:pointer; font-weight:750; font-size:1.2rem; color:#163d3d; }
.source-agency summary:focus-visible { outline:2px solid #087f71; outline-offset:4px; }
.source-agency > p { line-height:1.55; color:#426469; }
.agency-select { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.agency-select select { min-width:12rem; max-width:100%; padding:9px 13px; border:1px solid #c1d6d8; border-radius:9px; color:#163d3d; background:white; font:inherit; }
.agency-stats,.agency-forms { display:grid; gap:12px; margin:18px 0; }
.agency-stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
.agency-forms { grid-template-columns:repeat(2,minmax(0,1fr)); }
.agency-stats > div,.agency-forms form { border:1px solid #dae8e8; background:#f5faf9; border-radius:12px; padding:15px; }
.agency-stats strong { display:block; margin-top:6px; font-size:1.35rem; color:#116e61; }
.agency-forms form { display:grid; align-content:start; gap:12px; }
.agency-forms h3 { margin:0; }
.agency-forms .agency-check { display:flex; align-items:center; gap:8px; }
.agency-forms .agency-check input { width:18px; height:18px; }
#agencyMessage { color:#86531f; }
@media(max-width:680px) { .agency-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .agency-forms { grid-template-columns:1fr; } }

.agency-forms label:not(.agency-check) { display:grid; gap:6px; color:#264d51; font-weight:650; }
.agency-forms input:not([type="checkbox"]) { width:100%; min-width:0; box-sizing:border-box; border:1px solid #c4d8dc; border-radius:9px; background:#fff; color:#173b3d; padding:10px 12px; font:inherit; }
.agency-forms input:focus-visible { outline:2px solid #208779; outline-offset:2px; }
