.management-admin { --mgmt-ink:#4f2a10; --mgmt-muted:#785b43; --mgmt-line:#d4a57a; color:var(--mgmt-ink); text-align:left; }
.management-admin [hidden] { display:none !important; }
.management-admin h2,.management-admin h3,.management-admin h4 { color:#743b16; line-height:1.3; }
.management-admin h2 { margin:0.2rem 0 0.35rem; font-size:1.65rem; }
.management-admin h3 { margin:0; font-size:1.15rem; }
.management-admin h4 { margin:0; font-size:1rem; }
.mgmt-heading,.mgmt-section-heading,.mgmt-form-footer,.mgmt-dialog-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:0.75rem; }
.mgmt-heading { margin-bottom:1.35rem; }
.mgmt-heading p { margin:0; color:var(--mgmt-muted); line-height:1.55; }
.mgmt-eyebrow { color:#91643a; font-size:0.75rem; font-weight:700; letter-spacing:0.09em; text-transform:uppercase; }
.mgmt-badge { display:inline-flex; align-items:center; flex:none; padding:0.35rem 0.65rem; border:1px solid #cfb395; border-radius:99px; background:#fff9ef; color:#78572d; font-size:0.78rem; font-weight:700; }
.mgmt-badge-caution { border-color:#ddb56b; background:#fff4d6; color:#77521b; }
.mgmt-panel { min-width:0; margin-bottom:1.1rem; padding:1.1rem; border:1px solid var(--mgmt-line); border-radius:9px; background:linear-gradient(180deg,#fffaf5,#fff1e2); box-shadow:0 2px 4px #5b2e1010; }
.mgmt-section-heading { margin-bottom:0.85rem; }
.mgmt-section-heading p { margin:0.35rem 0 0; }
.mgmt-muted { color:var(--mgmt-muted); font-size:0.85rem; line-height:1.5; }
.mgmt-empty { padding:1.6rem 0.8rem; color:var(--mgmt-muted); font-size:0.9rem; line-height:1.6; text-align:center; }
.mgmt-note { padding:0.7rem 0.85rem; margin:0 0 1rem; border-left:3px solid #cc9a59; background:#fff7e9; color:#715231; font-size:0.85rem; line-height:1.55; }
.mgmt-loading { padding:1.15rem; color:#78552e; text-align:center; font-size:0.95rem; }
.mgmt-message { margin:0 0 1rem; padding:0.75rem 0.9rem; border:1px solid #d2b589; border-radius:5px; background:#fff6df; color:#72521e; line-height:1.5; overflow-wrap:anywhere; }
.mgmt-message.is-error { border-color:#d09b94; background:#fff0ed; color:#832a22; }
.mgmt-message.is-success { border-color:#a9c59c; background:#f0f7e9; color:#3e602c; }
.mgmt-search { display:flex; align-items:flex-end; gap:0.75rem; flex-wrap:wrap; }
.mgmt-field { display:flex; min-width:0; flex-direction:column; gap:0.4rem; color:#6b3410; font-size:0.85rem; font-weight:700; }
.mgmt-grow { flex:1 1 15rem; }
.mgmt-field input,.mgmt-field select,.mgmt-field textarea { box-sizing:border-box; width:100%; min-height:42px; padding:0.65rem 0.75rem; border:1px solid #c7a282; border-radius:5px; background:#fff; color:var(--mgmt-ink); font:inherit; font-weight:400; }
.mgmt-field textarea { resize:vertical; min-height:68px; }
.management-admin input::placeholder,.management-admin textarea::placeholder { color:#9b8775; }
.management-admin input:focus-visible,.management-admin select:focus-visible,.management-admin textarea:focus-visible,.management-admin button:focus-visible,.management-admin summary:focus-visible { outline:2px solid #a76528; outline-offset:3px; }
.mgmt-button { display:inline-flex; align-items:center; justify-content:center; flex:none; min-height:42px; padding:0.6rem 1rem; border:1px solid #a9713a; border-radius:5px; background:linear-gradient(#dca879,#bd824e); color:#fff; font:inherit; font-size:0.85rem; font-weight:700; box-shadow:inset 0 1px 0 #fff5; cursor:pointer; }
.mgmt-button:hover:not(:disabled) { background:linear-gradient(#e3b488,#ca905c); }
.mgmt-secondary { border-color:#c69d77; background:linear-gradient(#fffaf4,#ecd0b5); color:#6b3410; }
.mgmt-secondary:hover:not(:disabled) { background:#ffe5c9; }
.management-admin button:disabled { opacity:0.5; cursor:not-allowed !important; }
.mgmt-full { width:100%; margin-top:0.75rem; }
.mgmt-user-layout { display:grid; grid-template-columns:minmax(210px,0.65fr) minmax(0,1.45fr); align-items:start; gap:1rem; }
.mgmt-account-content { min-width:0; }
.mgmt-results { position:sticky; top:6rem; }
.mgmt-result-list { max-height:30rem; overflow:auto; overscroll-behavior:contain; }
.mgmt-result { display:block; width:100%; padding:0.8rem; margin-bottom:0.45rem; border:1px solid #e2c9ad; border-radius:5px; background:#fff; color:var(--mgmt-ink); text-align:left; font:inherit; cursor:pointer; }
.mgmt-result strong,.mgmt-result small { display:block; overflow-wrap:anywhere; }
.mgmt-result small { margin-top:0.25rem; color:var(--mgmt-muted); font-size:0.8rem; line-height:1.5; }
.mgmt-result:hover,.mgmt-result.is-selected { border-color:#b87e45; background:#fff0da; }
.mgmt-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:0.6rem; margin:0 0 1rem; }
.mgmt-summary > div { min-width:0; padding:0.65rem 0.75rem; border:1px solid #ead4bd; border-radius:5px; background:#fffaf5; }
.mgmt-summary dt { margin-bottom:0.3rem; color:var(--mgmt-muted); font-size:0.75rem; }
.mgmt-summary dd { margin:0; color:var(--mgmt-ink); font-weight:700; overflow-wrap:anywhere; }
.mgmt-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:0.8rem; }
.mgmt-span-all { grid-column:1 / -1; }
.mgmt-form-footer { margin-top:0.75rem; }
.mgmt-form-footer p { margin:0; flex:1 1 12rem; }
.mgmt-character-list { display:grid; gap:0.5rem; }
.mgmt-audit { margin-top:1rem; }
.mgmt-audit > summary { color:#795032; font-size:0.85rem; cursor:pointer; padding:0.4rem 0; }
.mgmt-character { display:flex; align-items:center; justify-content:space-between; gap:0.75rem; width:100%; min-width:0; padding:0.7rem; border:1px solid #e1c5a7; border-radius:5px; background:#fff; color:var(--mgmt-ink); font:inherit; text-align:left; cursor:pointer; }
.mgmt-character strong,.mgmt-character small { display:block; overflow-wrap:anywhere; }
.mgmt-character small { margin-top:0.2rem; color:var(--mgmt-muted); font-size:0.8rem; }
.mgmt-character.is-selected { border-color:#af7438; background:#fff0da; }
.mgmt-online { display:inline-block; color:#4d7038; font-size:0.75rem; white-space:nowrap; }
.mgmt-segments { display:flex; flex-wrap:wrap; gap:0.35rem; margin-bottom:1rem; padding-bottom:0.45rem; border-bottom:1px solid #dbc0a4; }
.mgmt-segment { min-height:38px; padding:0.5rem 0.8rem; border:1px solid #dbc0a4; border-radius:5px; background:#fff9f1; color:#795032; font:inherit; font-size:0.85rem; cursor:pointer; }
.mgmt-segment.is-active { border-color:#af773f; background:#e8c69e; color:#4f2a10; font-weight:700; }
.mgmt-storage-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(200px,0.65fr); align-items:start; gap:1rem; }
.mgmt-item-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); max-width:430px; gap:5px; padding:0.6rem; border:1px solid #ceb08d; border-radius:6px; background:#eee0ce; }
.mgmt-item-grid > .mgmt-empty { grid-column:1 / -1; }
.mgmt-item-slot:disabled { color:#998166; font-size:0.62rem; opacity:0.65; }
.mgmt-item-slot { position:relative; aspect-ratio:1; min-width:0; min-height:44px; padding:4px; border:1px solid #c7ad8c; border-radius:4px; background:linear-gradient(#fff8e9,#e8d5b8); box-shadow:inset 0 0 3px #916e4630; }
.mgmt-item-slot.is-item { cursor:pointer; }
.mgmt-item-slot.is-selected { outline:2px solid #a66b2c; outline-offset:0; background:#ffe8b8; }
.mgmt-item-slot img { display:block; width:32px; height:32px; max-width:100%; max-height:100%; margin:auto; object-fit:contain; }
.mgmt-item-fallback { display:block; overflow:hidden; color:#7b654b; font-size:0.65rem; font-weight:700; text-overflow:ellipsis; }
.mgmt-item-quantity { position:absolute; right:2px; bottom:1px; padding:0 2px; border-radius:2px; background:#43301ad9; color:#fff; font-size:0.65rem; line-height:1.4; pointer-events:none; }
.mgmt-item-detail { min-width:0; padding:0.85rem; border:1px solid #d7b999; border-radius:6px; background:#fffdf8; }
.mgmt-item-detail h4 { margin-bottom:0.75rem; }
.mgmt-item-data { margin:0.65rem 0 0; font-size:0.8rem; }
.mgmt-item-data > div { display:grid; grid-template-columns:minmax(80px,0.6fr) minmax(0,1fr); gap:0.5rem; padding:0.3rem 0; border-bottom:1px solid #efe2d2; }
.mgmt-item-data dt { color:var(--mgmt-muted); }
.mgmt-item-data dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.mgmt-item-title { font-size:0.95rem; color:#8a5523; line-height:1.4; overflow-wrap:anywhere; }
.mgmt-tooltip { position:fixed; z-index:11000; width:min(300px,calc(100vw - 20px)); max-height:min(420px,70vh); overflow:auto; padding:0.85rem; border:1px solid #bd965d; border-radius:6px; background:#fff9eef8; box-shadow:0 5px 20px #29170740; pointer-events:none; }
.mgmt-table-wrap { overflow:auto; max-width:100%; max-height:34rem; margin-top:1rem; border:1px solid #d9bca0; border-radius:6px; background:#fff; overscroll-behavior:contain; }
.mgmt-table { width:100%; border-collapse:collapse; font-size:0.82rem; }
.mgmt-table th,.mgmt-table td { padding:0.7rem; border-bottom:1px solid #ecdaca; text-align:left; vertical-align:top; overflow-wrap:anywhere; }
.mgmt-table th { position:sticky; top:0; z-index:1; background:#f4dfc9; color:#6b3410; white-space:nowrap; }
.mgmt-table td small { display:block; margin-top:0.2rem; color:var(--mgmt-muted); }
.mgmt-table td img { display:block; width:32px; height:32px; object-fit:contain; margin-bottom:0.3rem; }
.mgmt-table tbody tr:last-child td { border-bottom:0; }
.mgmt-table .mgmt-button { min-height:32px; padding:0.35rem 0.6rem; font-size:0.75rem; }
.mgmt-subheading { margin-top:1.15rem !important; }
.mgmt-candidate-list { display:grid; gap:0.65rem; }
.mgmt-candidate { border:1px solid #d9bc97; border-radius:6px; background:#fff; overflow:hidden; }
.mgmt-candidate summary { padding:0.8rem; cursor:pointer; color:#6b3410; font-size:0.9rem; font-weight:700; overflow-wrap:anywhere; }
.mgmt-candidate[open] summary { border-bottom:1px solid #ead4b9; background:#fff3df; }
.mgmt-candidate-body { padding:0.7rem; }
.mgmt-candidate-body .mgmt-table-wrap { margin:0; }
.mgmt-scan-actions,.mgmt-scan-pager { display:flex; align-items:center; flex-wrap:wrap; gap:0.6rem; margin:0.85rem 0; }
.mgmt-scan-pager { justify-content:space-between; }
.mgmt-scan-progress { padding:0.9rem; margin-bottom:1rem; border:1px solid #d8bc90; border-radius:6px; background:#fff9ed; }
.mgmt-scan-progress label { display:block; margin-bottom:0.6rem; font-size:0.85rem; font-weight:700; overflow-wrap:anywhere; }
.mgmt-scan-progress progress { display:block; width:100%; height:13px; accent-color:#a9763a; border:0; border-radius:6px; overflow:hidden; background:#e8d7bd; }
.mgmt-scan-progress progress::-webkit-progress-bar { background:#e8d7bd; }
.mgmt-scan-progress progress::-webkit-progress-value { background:linear-gradient(90deg,#a27138,#d2a759); }
.mgmt-scan-progress p { margin:0.6rem 0 0; }
.mgmt-scan-limits { margin-bottom:1rem; padding:0.7rem 0.85rem; border-left:3px solid #c79d63; background:#fff8e9; font-size:0.83rem; color:var(--mgmt-muted); line-height:1.55; }
.mgmt-scan-limits summary { cursor:pointer; font-weight:700; color:#795032; }
.mgmt-scan-limits p { margin:0.7rem 0 0; }
.mgmt-scan-limits ul { padding-left:1.1rem; margin:0.7rem 0 0; }
.mgmt-scan-limits ul:empty { display:none; }
.mgmt-candidate-classification { margin:0 0 0.7rem; padding:0.5rem; background:#fff8eb; color:var(--mgmt-muted); font-size:0.82rem; line-height:1.5; }
.mgmt-state { display:inline-block; padding:0.2rem 0.5rem; border-radius:3px; background:#f0e2cc; color:#79562d; font-size:0.75rem; white-space:nowrap; }
.mgmt-state.is-complete { background:#e8f0de; color:#42602e; }
.mgmt-state.is-error { background:#f8e3df; color:#852f25; }
.mgmt-dialog { width:min(520px,calc(100vw - 24px)); max-height:85vh; margin:auto; padding:1.4rem; overflow:auto; border:2px solid #c79664; border-radius:10px; background:linear-gradient(#fffaf3,#f4e0c9); box-shadow:0 18px 70px #25100566; }
.mgmt-dialog:not([open]) { display:none; }
.mgmt-dialog::backdrop { background:#24140899; }
.mgmt-dialog > p { margin:0.8rem 0; color:var(--mgmt-muted); line-height:1.6; }
.mgmt-dialog .mgmt-summary { grid-template-columns:1fr 1fr; }
.mgmt-dialog-actions { justify-content:flex-end; margin-top:1.15rem; }
.mgmt-sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:850px) { .mgmt-user-layout { grid-template-columns:1fr; } .mgmt-results { position:static; } .mgmt-result-list { max-height:18rem; } .mgmt-storage-layout { grid-template-columns:1fr; } }
@media(max-width:540px) { .mgmt-panel { padding:0.85rem; } .mgmt-heading h2 { font-size:1.4rem; } .mgmt-search { align-items:stretch; } .mgmt-search .mgmt-field { flex:1 1 100%; } .mgmt-search > .mgmt-button { width:100%; } .mgmt-form-grid { grid-template-columns:1fr; } .mgmt-item-grid { gap:3px; padding:0.35rem; } .mgmt-item-slot { min-height:32px; padding:2px; } .mgmt-form-footer .mgmt-button { width:100%; } .mgmt-table th,.mgmt-table td { padding:0.55rem; } .mgmt-dialog .mgmt-summary { grid-template-columns:1fr; } }
@media(prefers-reduced-motion:reduce) { .management-admin * { animation:none !important; transition:none !important; } }
