:root { color-scheme: dark; font-family: Arial, Helvetica, sans-serif; color: #f5f5f5; background: #1c1c1c; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
a { color: #e99a19; text-decoration: none; }
a:hover { color: #ffbd59; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, .table-scroll:focus-visible { outline: 2px solid #e99a19; outline-offset: 4px; }
.header { position: relative; min-height: 96px; border-bottom: 1px solid #303030; padding: 22px max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-size: 28px; font-weight: 700; letter-spacing: -1px; display: flex; align-items: center; gap: 24px; }
.brand span { border-left: 1px solid #404040; padding-left: 24px; font-size: 13px; font-weight: 400; color: #999; letter-spacing: 0; }
.account { min-width: 0; display: flex; align-items: center; gap: 12px; }
.avatar { position: relative; flex-shrink: 0; overflow: hidden; display: grid; place-items: center; width: 38px; height: 38px; background: #342819; color: #ffbd59; border: 1px solid #51412b; border-radius: 50%; font-weight: 700; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 280px; overflow-wrap: anywhere; }
.account-info strong { font-size: 14px; }
.account-info > span { color: #999; font-size: 12px; }
.account-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; }
.role-block { position: relative; }
.role-badge { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid #674920; border-radius: 5px; background: #332819; color: #efb65d; font-size: 10px; font-weight: 600; line-height: 1.3; white-space: nowrap; cursor: help; }
.role-badge:hover, .role-badge[aria-expanded="true"] { border-color: #a8742b; background: #40301b; }
.role-tooltip { position: absolute; z-index: 20; top: calc(100% + 10px); right: 0; width: 310px; max-width: calc(100vw - 32px); padding: 18px 20px; border: 1px solid #55422a; border-radius: 10px; background: #191a17; box-shadow: 0 12px 36px #0007; text-align: left; }
.role-tooltip::before { content: ''; position: absolute; height: 10px; top: -10px; left: 0; right: 0; }
.account-info .role-tooltip-title { display: block; color: #f0d6b1; font-size: 13px; font-weight: 600; }
.role-tooltip ul { margin: 12px 0 0; padding-left: 16px; color: #ccc; font-size: 12px; line-height: 1.6; }
.role-names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.role-names span { padding: 3px 7px; border: 1px solid #55422a; border-radius: 5px; color: #efb65d; font-size: 10px; line-height: 1.5; }
.role-tooltip li + li { margin-top: 6px; }
main { max-width: 1228px; margin: 0 auto; padding: 42px 24px 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 11px 18px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.primary { background: #e99a19; color: #17130c; }
.primary:hover { background: #ffb638; }
.secondary { color: #d1c7b6; background: #24221f; border-color: #494035; }
.secondary:hover { color: #ffbd59; background: #30291f; border-color: #715126; }
.small { min-height: 36px; padding: 8px 12px; font-size: 13px; }
.button:disabled, .button[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.login-card { max-width: 420px; margin: 48px auto 32px; padding: 36px; text-align: center; border: 1px solid #3c3020; border-radius: 14px; background: #131413; box-shadow: 0 12px 35px #0003; }
.login-mark { margin: 0 auto 24px; width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid #5a4223; border-radius: 14px; background: #302416; font-size: 28px; color: #e99a19; }
.eyebrow { font-size: 11px; color: #e99a19; text-transform: uppercase; letter-spacing: 1.7px; margin: 0 0 12px; font-weight: 600; }
h1 { margin: 0 0 12px; font-size: 30px; line-height: 1.2; letter-spacing: -.7px; }
.muted { color: #a5a5a5; font-size: 14px; line-height: 1.6; margin: 0; }
.login-card .primary { margin-top: 28px; width: 100%; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 30px; }
.page-heading > h1 { margin-bottom: 0; }
.page-heading > .button { flex-shrink: 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat { display: flex; flex-direction: column; gap: 14px; background: #151615; border: 1px solid #33312c; border-radius: 12px; padding: 24px; }
.stat > span { font-size: 13px; color: #aaa; }
.stat > strong { font-size: 34px; font-weight: 600; letter-spacing: -.8px; }
.stat > .stat-date { font-size: 23px; padding: 6px 0 7px; }
.stat small { color: #777; font-size: 12px; }
.table-card { position: relative; border: 1px solid #33312c; background: #131413; border-radius: 12px; overflow: hidden; }
.toolbar { display: flex; align-items: end; gap: 16px; justify-content: space-between; padding: 22px 24px; }
.search-field { max-width: 440px; width: 100%; }
.search-field label { display: block; font-size: 12px; color: #b3b3b3; margin-bottom: 8px; }
input { width: 100%; min-height: 42px; background: #202020; color: #fff; border: 1px solid #3a3a3a; border-radius: 8px; padding: 10px 13px; font-size: 14px; }
input::placeholder { color: #777; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th { padding: 14px 24px; background: #1a1b19; border-block: 1px solid #302f29; color: #999; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; font-weight: 500; white-space: nowrap; }
td { padding: 18px 24px; border-bottom: 1px solid #292a26; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #1b1b18; }
.minecraft { font: 600 14px ui-monospace, SFMono-Regular, Consolas, monospace; color: #f1ba67; }
.discord-name { display: block; max-width: 230px; overflow-wrap: anywhere; font-weight: 500; }
.discord-username { display: block; margin-top: 5px; color: #888; font-size: 12px; }
.copy-id { background: none; border: 0; padding: 5px 0; color: #aaa; font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; cursor: pointer; }
.copy-id:hover { color: #e99a19; }
.date { color: #aaa; font-size: 12px; white-space: nowrap; }
.profile { white-space: nowrap; font-size: 12px; }
.row-actions { white-space: nowrap; }
.row-actions .profile { margin-right: 14px; }
.edit-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 28px; color: #f5f5f5; background: #191a17; border: 1px solid #55422a; border-radius: 12px; box-shadow: 0 18px 70px #0009; }
.edit-dialog::backdrop { background: #000a; }
.edit-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.edit-heading h2 { margin: 0; font-size: 21px; }
.dialog-close { padding: 0 4px; border: 0; background: none; color: #aaa; font-size: 26px; cursor: pointer; }
.edit-dialog label { display: block; margin: 18px 0 8px; color: #b3b3b3; font-size: 12px; }
.edit-dialog input[readonly] { color: #888; background: #1c1d1a; }
.edit-note { color: #999; font-size: 11px; line-height: 1.6; margin: 10px 0 0; }
.edit-dialog .status { margin: 16px 0 0; }
.edit-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.empty { padding: 48px 20px; text-align: center; color: #888; line-height: 1.7; }
.pagination { display: flex; align-items: center; gap: 18px; justify-content: space-between; padding: 18px 24px; border-top: 1px solid #302f29; color: #888; font-size: 12px; }
.page-size { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
select { padding: 7px 9px; border-radius: 6px; border: 1px solid #3a3a3a; background: #202020; color: #ddd; }
.page-buttons { display: flex; gap: 8px; }
.status { margin: 0 0 18px; color: #ffbc9e; font-size: 14px; line-height: 1.6; }
.status:empty, .table-status:empty { display: none; }
.table-status { margin: 0; padding: 0 24px 16px; color: #b1a494; font-size: 13px; }
.toast { position: fixed; z-index: 30; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 20px; width: max-content; max-width: min(560px, calc(100vw - 32px)); padding: 18px 20px; border: 1px solid #70603a; border-radius: 12px; background: #22231b; box-shadow: 0 8px 35px #0008; }
.toast p { margin: 0; color: #e7dfc9; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.toast-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
footer { padding: 32px 24px; text-align: center; color: #666; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
    .header { padding: 18px 20px; min-height: 80px; }
    .brand { font-size: 24px; }.brand span { display: none; }
    main { padding: 28px 16px 0; } h1 { font-size: 25px; }
    .page-heading { align-items: start; flex-direction: column; gap: 18px; }
    .stats { gap: 10px; grid-template-columns: 1fr; }
    .stat { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 18px; gap: 8px; }
    .stat small { grid-column: 1; }.stat strong { grid-column: 2; grid-row: 1 / 3; }.stat .stat-date { font-size: 19px; }
    .toolbar { padding: 18px 16px; gap: 12px; }.toolbar .button { white-space: nowrap; }
    th, td { padding: 15px 16px; }.pagination { flex-wrap: wrap; padding: 16px; gap: 16px; }
    .page-buttons { margin-left: auto; }.login-card { padding: 28px 24px; margin-top: 24px; }
    .account-info { max-width: 160px; }.account-name-row > strong { font-size: 12px; }
    .role-block { position: static; }
    .role-tooltip { top: calc(100% + 8px); left: 16px; right: 16px; width: auto; max-width: none; }
    .header { gap: 12px; }
    #logout, .brand { flex-shrink: 0; }
    .header { flex-wrap: wrap; }.account { margin-left: auto; max-width: 100%; gap: 8px; }
    .avatar { width: 30px; height: 30px; }
    .toast { right: 16px; bottom: 16px; flex-wrap: wrap; gap: 12px; padding: 16px; }.toast-actions { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
