/* Bubble Ninja GM Panel � Blue-Black dark theme with glow effects */
:root {
    --color-bg: #0b1120;
    --color-surface: rgba(16, 24, 42, 0.94);
    --color-surface-strong: #131d32;
    --color-surface-hover: rgba(28, 42, 68, 0.92);
    --color-primary: #1565c0;
    --color-primary-hover: #1e88e5;
    --color-primary-light: rgba(21, 101, 192, 0.22);
    --color-accent: #64b5f6;
    --color-accent-dim: rgba(100, 181, 246, 0.4);
    --color-text: #e8ecf4;
    --color-text-secondary: #9cb3cc;
    --color-success: #4caf6e;
    --color-warning: #e0b44f;
    --color-error: #e05555;
    --color-border: rgba(60, 110, 180, 0.4);
    --color-glow: rgba(100, 181, 246, 0.22);
    --color-glow-strong: rgba(100, 181, 246, 0.4);
    --radius-card: 8px;
    --radius-input: 5px;
    --radius-btn: 7px;
    --font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    --sidebar-width: 240px;
    --drawer-width: 480px;
    --topbar-height: 56px;
    --transition-fast: 0.15s ease;
    --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.28), 0 0 20px rgba(100, 181, 246, 0.08);
    --shadow-glow: 0 0 14px rgba(100, 181, 246, 0.25), 0 0 5px rgba(100, 181, 246, 0.15);
    --shadow-glow-strong: 0 0 22px rgba(100, 181, 246, 0.4), 0 0 10px rgba(100, 181, 246, 0.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: #7cc4f0; text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }

/* Login */
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    background: #060a10;
}
.login-bg-image {
    position: absolute;
    inset: 0;
    background: url("/gm/assets/shinobi-login-DZWrh1qT.webp") center right / cover no-repeat;
}
.login-bg-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(6, 10, 16, 0.97) 0%, rgba(10, 16, 32, 0.84) 30%, rgba(14, 24, 48, 0.34) 60%, rgba(6, 10, 16, 0.16) 100%);
}
.login-card {
    position: relative;
    z-index: 2;
    width: min(400px, calc(100% - 2rem));
    margin-left: 6vw;
    padding: 2.4rem 2.2rem;
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 16px;
    background: rgba(12, 18, 32, 0.93);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 30px rgba(100, 181, 246, 0.1);
}
.login-brand { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.75rem; }
.login-brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    padding: 4px;
    border: 1px solid rgba(100, 181, 246, 0.35);
    border-radius: 11px;
    background: rgba(14, 22, 38, 0.9);
    box-shadow: 0 0 10px rgba(100, 181, 246, 0.18);
}
.login-title, .sidebar-title {
    color: #f0f4fa;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}
.login-title {
    font-size: 1.5rem;
    font-weight: 850;
    letter-spacing: 0.35px;
}
.login-subtitle, .login-heading p { color: var(--color-text-secondary); font-size: 0.8rem; }
.login-heading { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.login-heading-mark { width: 3px; height: 38px; border-radius: 2px; background: linear-gradient(#64b5f6, #1565c0); }
.login-heading h2 { font-size: 1.05rem; font-weight: 650; }
.login-form { display: flex; flex-direction: column; gap: 1rem; }
.login-field { position: relative; display: flex; align-items: center; }
.login-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    z-index: 2;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: rgba(138, 155, 176, 0.55);
    pointer-events: none;
}
.login-field input { height: 48px; padding-left: 2.8rem !important; border-radius: 8px; }
.login-submit { width: 100%; height: 46px; margin-top: 0.25rem; }
.login-error { min-height: 1.2em; color: #ff7a72; font-size: 0.82rem; text-align: center; }

/* Shell and navigation */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid rgba(100, 181, 246, 0.18);
    background: linear-gradient(180deg, #0e1628 0%, #090e1a 100%);
    box-shadow: 3px 0 14px rgba(0, 0, 0, 0.32), 2px 0 10px rgba(100, 181, 246, 0.06);
    transition: transform 0.2s ease;
}
.sidebar-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(100, 181, 246, 0.15);
}
.sidebar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    padding: 3px;
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 8px;
    background: rgba(14, 22, 38, 0.9);
    box-shadow: 0 0 8px rgba(100, 181, 246, 0.15);
}
.sidebar-title {
    display: inline-block;
    font-size: 1.06rem;
    font-weight: 850;
    letter-spacing: 0.45px;
    white-space: nowrap;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.65rem 0.5rem; }
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2px 0;
    padding: 0.62rem 0.85rem;
    border-radius: 8px;
    color: rgba(180, 195, 215, 0.72);
    font-size: 0.88rem;
    transition: color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}
.nav-item:hover { background: rgba(100, 181, 246, 0.08); color: var(--color-text); text-decoration: none; }
.nav-item.active {
    background: linear-gradient(90deg, rgba(21, 101, 192, 0.35), rgba(21, 101, 192, 0.12));
    color: #fff;
    box-shadow: inset 3px 0 var(--color-accent), 0 0 10px rgba(100, 181, 246, 0.12);
}
.nav-icon { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; opacity: 0.68; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-item.active .nav-icon { color: var(--color-accent); opacity: 1; }
.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer { flex-shrink: 0; padding: 0.75rem; border-top: 1px solid rgba(100, 181, 246, 0.15); }
.main-content { display: flex; min-width: 0; min-height: 100vh; flex: 1; flex-direction: column; margin-left: var(--sidebar-width); }
.top-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    height: var(--topbar-height);
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--color-border);
    background: rgba(12, 16, 28, 0.98);
}
.menu-toggle { display: none; }
.page-title { flex: 1; font-size: 1.1rem; font-weight: 650; }
.top-bar-right { display: flex; align-items: center; gap: 0.75rem; }
.server-status { color: var(--color-text-secondary); font-size: 0.8rem; }
.page-content { flex: 1; width: 100%; min-width: 0; padding: 1.5rem; }

/* Cards � glowing bottom border effect */
.card {
    position: relative;
    width: 100%;
    padding: 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: linear-gradient(145deg, rgba(16, 26, 44, 0.96), rgba(12, 18, 32, 0.96));
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition-fast), box-shadow 0.25s ease;
    overflow: hidden;
}
.card::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: 0;
    height: 2px;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    box-shadow: 0 0 8px rgba(100, 181, 246, 0.55), 0 0 20px rgba(100, 181, 246, 0.35), 0 0 40px rgba(100, 181, 246, 0.18);
    opacity: 0.7;
    transition: opacity 0.25s ease;
}
.card:hover::after {
    opacity: 1;
    box-shadow: 0 0 10px rgba(100, 181, 246, 0.75), 0 0 25px rgba(100, 181, 246, 0.45), 0 0 50px rgba(100, 181, 246, 0.22);
}
.card:hover {
    border-color: rgba(100, 181, 246, 0.4);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}
.card + .card { margin-top: 1rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--color-border); }
.card-title { font-size: 1rem; font-weight: 650; }

/* Forms */
input[type="text"], input[type="number"], input[type="password"], input[type="search"], input[type="email"], input[type="date"], input[type="datetime-local"], input:not([type]), select, textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-input);
    outline: none;
    background: #0c1224;
    color: var(--color-text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
input:focus, select:focus, textarea:focus { border-color: var(--color-accent); box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.2), 0 0 10px rgba(100, 181, 246, 0.15); }
input::placeholder, textarea::placeholder { color: var(--color-text-secondary); opacity: 0.72; }
input:disabled, select:disabled, textarea:disabled { cursor: wait; opacity: 0.65; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px #0b1120 inset; -webkit-text-fill-color: var(--color-text); }
select {
    cursor: pointer;
    appearance: none;
    padding-right: 2rem;
    background-color: #0c1224;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239cb3cc' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}
select option {
    background: #131d32;
    color: var(--color-text);
}
textarea { min-height: 80px; resize: vertical; }
label { display: block; margin-bottom: 0.35rem; color: var(--color-text-secondary); font-size: 0.85rem; font-weight: 550; }
.form-group { min-width: 0; margin-bottom: 1rem; }
.form-row { display: flex; gap: 1rem; }
.form-row > * { min-width: 0; flex: 1; }
.input-error { border-color: var(--color-error) !important; }

/* Unified button component � glow on hover */
.btn {
    --btn-bg: linear-gradient(180deg, rgba(24, 38, 60, 0.92), rgba(16, 26, 42, 0.92));
    --btn-bg-hover: linear-gradient(180deg, rgba(32, 50, 76, 0.96), rgba(22, 36, 56, 0.96));
    --btn-border: rgba(80, 140, 210, 0.4);
    --btn-text: #c8daf0;
    --btn-glow: rgba(100, 181, 246, 0.15);
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--btn-border);
    border-radius: var(--radius-btn);
    outline: none;
    background: var(--btn-bg);
    color: var(--btn-text);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow 0.2s ease, filter var(--transition-fast);
}
.btn:hover:not(:disabled) {
    background: var(--btn-bg-hover);
    border-color: rgba(100, 181, 246, 0.55);
    box-shadow: 0 0 12px var(--btn-glow), 0 2px 6px rgba(0, 0, 0, 0.25);
    filter: brightness(1.08);
    text-decoration: none;
}
.btn:active:not(:disabled) { filter: brightness(0.92); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); }
.btn:disabled { cursor: not-allowed; opacity: 0.48; }
.btn-primary {
    --btn-bg: linear-gradient(180deg, #1e88e5, #1565c0);
    --btn-bg-hover: linear-gradient(180deg, #2196f3, #1976d2);
    --btn-border: rgba(100, 181, 246, 0.6);
    --btn-text: #fff;
    --btn-glow: rgba(100, 181, 246, 0.35);
}
.btn-success { --btn-bg: linear-gradient(#22633a, #123b22); --btn-bg-hover: linear-gradient(#2a7847, #18512d); --btn-border: rgba(57, 173, 103, 0.58); --btn-text: #dcf7e5; --btn-glow: rgba(57, 173, 103, 0.25); }
.btn-error { --btn-bg: linear-gradient(#761f1f, #431010); --btn-bg-hover: linear-gradient(#8e2929, #5b1717); --btn-border: rgba(196, 74, 74, 0.62); --btn-text: #ffe1e1; --btn-glow: rgba(196, 74, 74, 0.25); }
.btn-warning { --btn-bg: linear-gradient(#68501a, #3d2e0b); --btn-bg-hover: linear-gradient(#7c6020, #513e10); --btn-border: rgba(208, 169, 76, 0.58); --btn-text: #fff3c6; --btn-glow: rgba(208, 169, 76, 0.25); }
.btn-ghost { --btn-bg: rgba(16, 26, 42, 0.52); --btn-bg-hover: rgba(24, 38, 60, 0.76); --btn-border: rgba(80, 140, 210, 0.3); --btn-text: #a4bcd8; --btn-glow: rgba(100, 181, 246, 0.1); }
.btn-sm { min-height: 29px; padding: 0.3rem 0.6rem; font-size: 0.78rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Tables */
.table-wrapper { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-card); }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead { background: #0e1628; }
th { padding: 0.72rem 1rem; border-bottom: 1px solid var(--color-border); color: var(--color-text-secondary); font-weight: 650; text-align: left; white-space: nowrap; }
td { height: 42px; padding: 0.58rem 1rem; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
tbody tr:nth-child(even) { background: rgba(12, 18, 32, 0.48); }
tbody tr:hover { background: var(--color-surface-hover); }
tbody tr:last-child td { border-bottom: 0; }
.clickable-row { cursor: pointer; }
.clickable-row.selected { background: rgba(21, 101, 192, 0.25); box-shadow: inset 3px 0 var(--color-accent); }
.table-empty { padding: 2rem; color: var(--color-text-secondary); text-align: center; }

/* Item page */
.items-control-group { width: min(50%, 680px); }
.item-results-scroll { width: 100%; max-height: 462px; overflow-y: auto; }
.item-results-scroll thead { position: sticky; top: 0; z-index: 1; }
.selected-item-display { min-height: 38px; padding: 0.5rem 0; color: var(--color-text-secondary); font-size: 0.85rem; }

/* Toasts */
.toast-container { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 9500; display: flex; max-width: 380px; flex-direction: column-reverse; gap: 0.5rem; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 1.1rem; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: #131d32; box-shadow: var(--shadow-card); font-size: 0.85rem; pointer-events: auto; }
.toast-success { border-left: 3px solid var(--color-success); }
.toast-error { border-left: 3px solid var(--color-error); cursor: pointer; }
.toast-info { border-left: 3px solid var(--color-text-secondary); }
.toast-warning { border-left: 3px solid var(--color-warning); }

/* Modal and drawer */
.modal-backdrop, .drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.62); }
.modal-backdrop { z-index: 8000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-card { width: 100%; max-width: 480px; max-height: 80vh; overflow-y: auto; padding: 1.5rem; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: #131d32; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.48), 0 0 24px rgba(100, 181, 246, 0.1); }
.modal-title { margin-bottom: 1rem; font-size: 1.1rem; font-weight: 650; }
.modal-message, .modal-body { margin-bottom: 1.15rem; color: var(--color-text-secondary); font-size: 0.9rem; line-height: 1.6; }
.modal-input-label { display: block; margin-bottom: 0.45rem; color: var(--color-text); font-size: 0.85rem; font-weight: 600; }
.modal-input { margin-bottom: 0.45rem; }
.modal-input-help { margin-bottom: 0.75rem; color: var(--color-text-secondary); font-size: 0.78rem; }
.modal-input-error { margin: -0.35rem 0 0.75rem; color: var(--color-error); font-size: 0.8rem; }
.modal-actions, .modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; }
.drawer-backdrop { z-index: 7000; }
.drawer-panel { position: absolute; inset: 0 0 0 auto; display: flex; width: var(--drawer-width); max-width: 100vw; flex-direction: column; border-left: 1px solid var(--color-border); background: #111a2e; box-shadow: -8px 0 24px rgba(0, 0, 0, 0.38), -2px 0 14px rgba(100, 181, 246, 0.06); }
.drawer-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--color-border); }
.drawer-header h3 { font-size: 1rem; font-weight: 650; }
.drawer-content { flex: 1; min-width: 0; overflow-y: auto; padding: 1.25rem; }
.drawer-content > *, .drawer-content .form-group { min-width: 0; }
.drawer-content .form-row { flex-wrap: wrap; }
.drawer-content .form-row > * { flex: 1 1 12rem; }

/* Tabs and pagination */
.tabs { display: flex; margin-bottom: 1rem; overflow-x: auto; border-bottom: 1px solid var(--color-border); }
.tab { padding: 0.6rem 1.1rem; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--color-text-secondary); font-size: 0.85rem; font-weight: 550; white-space: nowrap; cursor: pointer; }
.tab:hover { color: var(--color-text); }
.tab.active { border-bottom-color: var(--color-accent); color: #90caf9; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.35rem; margin-top: 1.25rem; flex-wrap: wrap; }
.pagination-btn { min-width: 2rem; min-height: 2rem; padding: 0.25rem 0.5rem; }
.pagination-btn.active { --btn-bg: var(--color-primary); --btn-bg-hover: var(--color-primary-hover); --btn-border: var(--color-accent-dim); --btn-text: #fff; }
.pagination-info { margin: 0 0.5rem; color: var(--color-text-secondary); font-size: 0.8rem; }

/* Loading */
.spinner { display: inline-block; width: 1.5rem; height: 1.5rem; border: 2px solid var(--color-border); border-top-color: var(--color-accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
.spinner-lg { width: 2.5rem; height: 2.5rem; border-width: 3px; }
.loading-center, .page-loading { display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 3rem; color: var(--color-text-secondary); }
@keyframes spin { to { transform: rotate(360deg); } }
.placeholder-page { padding: 3rem; color: var(--color-text-secondary); text-align: center; }

/* Badges and statistics */
.badge { display: inline-flex; align-items: center; padding: 0.15rem 0.5rem; border-radius: 10px; font-size: 0.72rem; font-weight: 650; white-space: nowrap; }
.badge-success { background: rgba(57, 173, 103, 0.15); color: #65ca8a; }
.badge-error { background: rgba(196, 74, 74, 0.16); color: #e77878; }
.badge-warning { background: rgba(208, 169, 76, 0.15); color: #dfbd67; }
.badge-special { background: rgba(255, 104, 180, 0.17); color: #ff68b4; }
.badge-treasure { background: rgba(255, 174, 22, 0.16); color: #ffae16; }
.badge-artifact-base { background: rgba(230, 236, 245, 0.12); color: #edf2f8; }
.badge-artifact-add { background: rgba(190, 95, 255, 0.17); color: #d37cff; }
.badge-artifact-special { background: rgba(44, 218, 83, 0.16); color: #42e96c; }
.badge-neutral { background: rgba(100, 181, 246, 0.14); color: var(--color-text-secondary); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.stat-card {
    position: relative;
    padding: 1rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: var(--color-surface);
    text-align: center;
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow 0.25s ease;
}
.stat-card::after {
    content: '';
    position: absolute;
    left: 15%;
    right: 15%;
    bottom: 0;
    height: 2px;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    box-shadow: 0 0 8px rgba(100, 181, 246, 0.55), 0 0 20px rgba(100, 181, 246, 0.35);
    opacity: 0.6;
    transition: opacity 0.25s ease;
}
.stat-card:hover::after {
    opacity: 1;
    box-shadow: 0 0 10px rgba(100, 181, 246, 0.75), 0 0 25px rgba(100, 181, 246, 0.45);
}
.stat-card:hover {
    border-color: rgba(100, 181, 246, 0.4);
    box-shadow: var(--shadow-glow);
}
.stat-value { color: var(--color-text); font-size: 1.75rem; font-weight: 750; }
.stat-label { margin-top: 0.25rem; color: var(--color-text-secondary); font-size: 0.8rem; }
.search-bar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.search-bar input[type="search"] { max-width: 300px; }

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: 0.25rem; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-secondary { color: var(--color-text-secondary); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-warning { color: var(--color-warning); }
.text-sm { font-size: 0.8rem; }
.font-bold { font-weight: 700; }
.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 1.5rem; }
.mb-sm { margin-bottom: 0.5rem; }
.mb-md { margin-bottom: 1rem; }
.mb-lg { margin-bottom: 1.5rem; }
.p-md { padding: 1rem; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: "Cascadia Code", "Fira Code", monospace; font-size: 0.82rem; }
.sidebar-overlay { position: fixed; inset: 0; z-index: 99; display: none; background: rgba(0, 0, 0, 0.5); }
.sidebar-overlay.active { display: block; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 3px; background: rgba(80, 140, 210, 0.55); }

@media (max-width: 768px) {
    .login-overlay { justify-content: center; }
    .login-card { margin: 0 1rem; }
    .login-bg-shade { background: rgba(6, 10, 16, 0.82); }    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .page-content { padding: 1rem; }
    .drawer-panel { width: 100vw; }
    .form-row { flex-direction: column; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .search-bar input[type="search"], .items-control-group { width: 100%; max-width: none; }
    .toast-container { right: 0.75rem; left: 0.75rem; max-width: none; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .modal-card { max-width: 100%; }
    .card { padding: 1rem; }
}


/* ============================================================
   Dashboard � Runtime strip, Metric cards, Issues, Quick actions
   ============================================================ */

.dashboard-runtime-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 52px;
    padding: 10px 16px;
    margin-bottom: 1rem;
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: var(--radius-card);
    background: rgba(76, 175, 80, 0.06);
}
.runtime-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--color-text);
}
.runtime-title svg { color: #4caf6e; }
.runtime-items {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    font-size: 0.85rem;
}
.runtime-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
}
.runtime-dot.online {
    background: #4caf6e;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.18);
}
.runtime-sep {
    width: 1px;
    height: 16px;
    background: var(--color-border);
    margin: 0 4px;
}

/* Metric Cards Grid */
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 1rem;
}
.metric-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 88px;
    padding: 1rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: linear-gradient(145deg, rgba(16, 26, 44, 0.96), rgba(12, 18, 32, 0.96));
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.25s ease;
}
.metric-card::after {
    content: '';
    position: absolute;
    left: 15%;
    right: 15%;
    bottom: 0;
    height: 2px;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    box-shadow: 0 0 8px rgba(100, 181, 246, 0.55), 0 0 20px rgba(100, 181, 246, 0.35);
    opacity: 0.5;
    transition: opacity 0.25s ease;
}
.metric-card:hover::after { opacity: 1; }
.metric-card:hover {
    border-color: rgba(100, 181, 246, 0.35);
    box-shadow: var(--shadow-glow);
}
.metric-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    flex-shrink: 0;
}
.metric-body { min-width: 0; }
.metric-body span { display: block; color: var(--color-text-secondary); font-size: 0.8rem; }
.metric-body strong { display: block; margin-top: 3px; font-size: 1.6rem; font-weight: 750; line-height: 1.1; color: var(--color-text); }

/* Metric color variants */
.metric-blue .metric-icon { color: #42a5f5; background: rgba(66, 165, 245, 0.12); }
.metric-red .metric-icon { color: #ef5350; background: rgba(239, 83, 80, 0.12); }
.metric-green .metric-icon { color: #66bb6a; background: rgba(102, 187, 106, 0.12); }
.metric-orange .metric-icon { color: #ffa726; background: rgba(255, 167, 38, 0.12); }

/* Dashboard 2-column grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1rem;
}

/* Issue List */
.dashboard-issues .card-header { border-bottom: none; padding-bottom: 0; margin-bottom: 0.5rem; }
.issue-list { display: flex; flex-direction: column; }
.issue-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    padding: 10px 4px;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s ease;
}
.issue-row:last-child { border-bottom: 0; }
.issue-row:hover { background: rgba(100, 181, 246, 0.06); }
.issue-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
}
.issue-icon.issue-error { color: #ef5350; background: rgba(239, 83, 80, 0.12); }
.issue-icon.issue-warning { color: #ffa726; background: rgba(255, 167, 38, 0.12); }
.issue-icon.issue-info { color: #42a5f5; background: rgba(66, 165, 245, 0.12); }
.issue-icon.issue-neutral { color: #78909c; background: rgba(120, 144, 156, 0.12); }
.issue-main { width: 100%; min-width: 0; }
.issue-main b { display: block; font-size: 0.88rem; font-weight: 600; }
.issue-main small { display: block; margin-top: 2px; color: var(--color-text-secondary); font-size: 0.76rem; }
#event-status { overflow-wrap: anywhere; }
.issue-chevron { color: var(--color-text-secondary); opacity: 0.5; }

/* Quick Actions Grid */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.btn-quick {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 0.7rem 1rem;
    min-height: 44px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-btn);
    background: rgba(16, 26, 44, 0.7);
    color: var(--color-text);
    font-size: 0.85rem;
    font-weight: 550;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
}
.btn-quick:hover {
    background: rgba(24, 38, 60, 0.9);
    border-color: rgba(100, 181, 246, 0.4);
    box-shadow: 0 0 8px rgba(100, 181, 246, 0.12);
}
.btn-quick svg { color: var(--color-text-secondary); flex-shrink: 0; }
.btn-quick-primary {
    border-color: rgba(100, 181, 246, 0.35);
    background: rgba(21, 101, 192, 0.15);
}
.btn-quick-primary svg { color: var(--color-accent); }

/* Catalog Summary */
.catalog-summary {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}
.catalog-summary h5 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 0.6rem;
}
.catalog-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}
.catalog-row b {
    color: var(--color-text);
    font-weight: 650;
}

/* Dashboard responsive */
@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-metrics { grid-template-columns: repeat(2, 1fr); }
    .dashboard-runtime-strip { flex-direction: column; align-items: flex-start; gap: 8px; }
    .quick-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .dashboard-metrics { grid-template-columns: 1fr; }
}

/* GM data workbench � compact, opt-in controls inspired by the original panel. */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.filter-bar .form-group {
    flex: 0 0 auto;
    margin-bottom: 0;
}
.filter-control-search { width: min(24rem, 100%); }
.filter-control-sm { width: 9rem; }
.filter-control-md { width: 13rem; }
.filter-control-lg { width: 18rem; }
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 1px;
}
.filter-bar input,
.filter-bar select,
.drawer-content input[type="datetime-local"] { width: 100%; min-height: 38px; }
.page-hint { margin: -0.35rem 0 1rem; color: var(--color-text-secondary); font-size: 0.8rem; line-height: 1.5; }
.table-value { display: inline-block; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.detail-toggle summary { color: var(--color-accent); font-size: 0.8rem; cursor: pointer; }
.detail-panel { margin-top: 0.5rem; padding: 0.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-input); background: #090f1d; }
.code-block { max-width: 48rem; max-height: 18rem; overflow: auto; margin: 0; color: #c5d6e9; font: 0.78rem/1.55 "Cascadia Code", "Fira Code", monospace; white-space: pre-wrap; word-break: break-word; }
.segment-list, .evidence-list, .import-error-list { display: grid; gap: 0.55rem; }
.segment-item, .evidence-item, .import-error-item { padding: 0.65rem 0.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-input); background: rgba(12, 18, 32, 0.58); }
.segment-item b, .evidence-item b, .import-error-item b { color: var(--color-accent); }
.mutation-note { margin-top: 0.75rem; color: var(--color-warning); font-size: 0.8rem; }

@media (max-width: 768px) {
    .filter-bar { align-items: stretch; }
    .filter-bar .form-group,
    .filter-control-search,
    .filter-control-sm,
    .filter-control-md,
    .filter-control-lg { flex: 1 1 100%; width: 100%; }
    .filter-actions { width: 100%; }
    .table-value { max-width: 14rem; }
}

/* Reusable field-based editor dialog for Shop and Catalog. */
.modal-card-lg { max-width: 760px; }
.modal-card-xl { max-width: 960px; }
.modal-form-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; border-bottom:1px solid var(--color-border); }
.modal-form-header .modal-title { margin-bottom:.75rem; }
.modal-form-header .btn { margin-bottom:.75rem; }
.modal-form-body { max-height:68vh; overflow-y:auto; padding-right:.25rem; }
.editor-section { margin-bottom:1rem; padding:1rem; border:1px solid var(--color-border); border-radius:var(--radius-card); background:rgba(9,15,29,.55); }
.editor-section-title { margin-bottom:.8rem; color:var(--color-accent); font-size:.85rem; font-weight:700; }
.editor-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.85rem 1rem; }
.editor-grid .form-group { margin-bottom:0; }
.editor-actions { position:sticky; bottom:0; display:flex; justify-content:flex-end; gap:.5rem; margin-top:1rem; padding-top:1rem; border-top:1px solid var(--color-border); background:#131d32; }
.shop-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; margin-bottom:1rem; }
.shop-summary .stat-card { padding:.75rem; }
@media (max-width:768px) { .modal-card-lg,.modal-card-xl { max-width:100%; } .editor-grid,.shop-summary { grid-template-columns:1fr; } }

/* Enriched audit identities and typed catalog editor fields. */
.audit-subject b,
.audit-action b,
.audit-payload b { display:block; font-size:.86rem; }
.audit-subject small,
.audit-action small,
.audit-payload small,
.table-subtext { display:block; margin-top:.2rem; color:var(--color-text-secondary); font-size:.72rem; line-height:1.35; }
.editor-field-wide { grid-column:1 / -1; }
.modal-form-body textarea { width:100%; resize:vertical; }
.checkbox-label { display:flex; align-items:center; gap:.5rem; min-height:38px; }
.checkbox-label input { width:auto; min-height:auto; }

/* Native Cash Shop management. */
.shop-category-tabs { display:flex; flex-wrap:wrap; gap:.45rem; margin:0 0 1rem; padding:.65rem; border:1px solid var(--color-border); border-radius:var(--radius-card); background:rgba(9,15,29,.55); }
.shop-category-tab { padding:.48rem .85rem; border:1px solid var(--color-border); border-radius:var(--radius-btn); background:rgba(16,26,44,.8); color:var(--color-text-secondary); cursor:pointer; }
.shop-category-tab:hover,.shop-category-tab.active { border-color:var(--color-accent); color:var(--color-text); background:rgba(21,101,192,.22); }
.shop-category-tab-external { border-style:dashed; color:var(--color-warning); }
.shop-product b,.shop-price b { display:block; }
.shop-product small,.shop-price small,.shop-period small,.shop-flags small { display:block; margin-top:.18rem; color:var(--color-text-secondary); font-size:.72rem; white-space:nowrap; }
.shop-price b { color:var(--color-warning); font-variant-numeric:tabular-nums; }
.shop-flags { display:grid; justify-items:start; gap:.25rem; }
.shop-period { min-width:10rem; }
.shop-period span { display:block; font-size:.78rem; }
.shop-option-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.65rem; margin-top:1rem; }
.shop-option { display:flex; align-items:flex-start; gap:.55rem; padding:.7rem; border:1px solid var(--color-border); border-radius:var(--radius-input); background:rgba(12,18,32,.58); }
.shop-option input { width:auto; min-height:auto; margin-top:.2rem; }
.shop-option b,.shop-option small { display:block; }
.shop-option small { margin-top:.2rem; color:var(--color-text-secondary); font-size:.72rem; line-height:1.35; }
@media (max-width:768px) { .shop-option-grid { grid-template-columns:1fr; } .shop-category-tab { flex:1 1 calc(33.333% - .45rem); } }


/* Catalog layout borrows the legacy selector/table hierarchy, while preserving the blue glass theme. */
.catalog-context-note {
    margin: 0 0 .85rem;
    padding: .7rem .85rem;
    border: 1px solid rgba(100, 181, 246, .26);
    border-radius: var(--radius-input);
    background: linear-gradient(135deg, rgba(21, 101, 192, .14), rgba(8, 15, 29, .72));
    color: var(--color-text-secondary);
    box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}
.catalog-category-block {
    margin-bottom: 1rem;
    padding: .7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: linear-gradient(145deg, rgba(18, 30, 52, .86), rgba(8, 15, 29, .76));
    box-shadow: inset 0 1px rgba(255, 255, 255, .04), 0 6px 18px rgba(0, 0, 0, .2);
}
.catalog-category-label {
    margin: 0 0 .55rem;
    color: var(--color-text-secondary);
    font-size: .75rem;
    font-weight: 650;
    letter-spacing: .03em;
}
.catalog-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.catalog-category-tab {
    min-height: 34px;
    padding: .45rem .82rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-btn);
    background: linear-gradient(180deg, rgba(24, 42, 69, .92), rgba(12, 23, 41, .92));
    color: var(--color-text-secondary);
    box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 2px 7px rgba(0, 0, 0, .22);
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.catalog-category-tab:hover {
    border-color: rgba(100, 181, 246, .72);
    color: var(--color-text);
    box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 0 13px rgba(100, 181, 246, .16);
    transform: translateY(-1px);
}
.catalog-category-tab.active,
.catalog-category-tab[aria-selected="true"] {
    border-color: var(--color-accent);
    background: linear-gradient(180deg, rgba(30, 136, 229, .4), rgba(21, 101, 192, .22));
    color: #fff;
    box-shadow: inset 0 1px rgba(255, 255, 255, .11), 0 0 15px rgba(100, 181, 246, .24);
}
.catalog-description { max-width: 27rem; line-height: 1.45; }
.cell-actions { white-space: nowrap; }
.expand-toggle {
    width: 28px;
    height: 28px;
    border: 1px solid transparent;
    border-radius: var(--radius-btn);
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: transform .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.expand-toggle:hover { border-color: var(--color-border); color: var(--color-accent); box-shadow: 0 0 10px rgba(100, 181, 246, .12); }
.expand-toggle[aria-expanded="true"] { color: var(--color-accent); transform: rotate(90deg); }
.expand-row > td,
.expand-cell { padding: 0 !important; background: rgba(5, 10, 20, .68); }
.child-table-shell {
    padding: .8rem 1rem .9rem 3rem;
    overflow-x: auto;
    border-left: 2px solid var(--color-accent);
    background: linear-gradient(90deg, rgba(21, 101, 192, .08), transparent 55%);
}
@media (max-width: 768px) {
    .catalog-category-tab { flex: 1 1 calc(50% - .45rem); }
    .child-table-shell { padding-left: .8rem; }
}

/* GameData translation workbench */
.gamedata-page { min-width: 0; }
.gamedata-progress { display:flex; justify-content:space-between; gap:1rem; margin:0 0 1rem; padding:1rem; border:1px solid rgba(100,181,246,.35); border-radius:var(--radius-card); background:linear-gradient(130deg,rgba(24,90,170,.2),rgba(8,15,29,.8)); }
.gamedata-progress h3 { margin:0 0 .45rem; font-size:1rem; }
.gamedata-progress p { margin:.45rem 0 0; color:var(--color-text-secondary); font-size:.78rem; }
.gamedata-progress-track { width:min(48rem,100%); height:.48rem; overflow:hidden; border-radius:99px; background:rgba(255,255,255,.12); }
.gamedata-progress-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#43a047,#64b5f6); }
.gamedata-progress-meta { display:flex; align-items:flex-start; justify-content:flex-end; flex-wrap:wrap; gap:.45rem; min-width:15rem; }
.gamedata-nav { display:flex; align-items:end; justify-content:space-between; gap:1rem; margin:0 0 1rem; padding:.75rem; border:1px solid var(--color-border); border-radius:var(--radius-card); }
.gamedata-nav label { min-width:16rem; color:var(--color-text-secondary); font-size:.78rem; }
.gamedata-nav select { width:100%; margin-top:.3rem; }
.gamedata-group-buttons { display:flex; flex-wrap:wrap; gap:.35rem; }
.gamedata-filter-bar { align-items:end; }
.gamedata-table { min-width:900px; }
.gamedata-preview { max-width:34rem; white-space:pre-wrap; word-break:break-word; }
.gamedata-preview small { color:var(--color-text-secondary); }
.gamedata-diagnostics { margin:0 0 1rem; padding:.75rem; border-left:3px solid var(--color-warning); border-radius:var(--radius-input); background:rgba(255,179,0,.1); color:var(--color-text-secondary); font-size:.8rem; }
.gamedata-diagnostics div + div { margin-top:.35rem; }
.gamedata-integrity { margin:1rem 0; padding:1.25rem; border:1px solid var(--color-error); border-radius:var(--radius-card); background:rgba(198,40,40,.12); }
.gamedata-integrity h3 { margin-top:0; color:#ff8a80; }
.gamedata-integrity ul { max-height:18rem; overflow:auto; padding-left:1.2rem; }
.gamedata-empty { padding:2.2rem 1rem; text-align:center; color:var(--color-text-secondary); border:1px dashed var(--color-border); border-radius:var(--radius-card); }
.gamedata-editor-meta { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.8rem; color:var(--color-text-secondary); font-size:.75rem; }
.gamedata-editor-meta span { padding:.2rem .42rem; border:1px solid var(--color-border); border-radius:99px; }
.gamedata-editor-warning { min-height:1.2rem; margin:.4rem 0 .8rem; color:var(--color-warning); font-size:.8rem; white-space:pre-wrap; }
.gamedata-page textarea { min-height:14rem; resize:vertical; white-space:pre-wrap; }
@media (max-width: 900px) { .gamedata-progress,.gamedata-nav { flex-direction:column; align-items:stretch; } .gamedata-progress-meta { justify-content:flex-start; min-width:0; } .gamedata-nav label { min-width:0; } }
.gamedata-apply-list { display:grid; gap:.55rem; margin:0 0 1rem; }
.gamedata-apply-source { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.8rem .9rem; border:1px solid var(--color-border); border-radius:var(--radius-input); background:rgba(9,15,29,.55); }
.gamedata-apply-source > div { display:flex; flex-direction:column; gap:.25rem; min-width:0; }
.gamedata-apply-source > div:last-child { align-items:flex-end; }
.gamedata-apply-source small { color:var(--color-text-secondary); font-size:.75rem; }
.gamedata-bundle-chips { display:flex; flex-wrap:wrap; gap:.35rem; margin-top:.55rem; }
.gamedata-import-errors { margin:.35rem 0 0; padding-left:1.1rem; color:var(--color-warning); font-size:.72rem; }
@media (max-width:600px) { .gamedata-apply-source { align-items:flex-start; flex-direction:column; } .gamedata-apply-source > div:last-child { align-items:flex-start; } }

/* Drop-rate editor */
.drop-rate-table { width:100%; margin:0 0 1rem; border-collapse:collapse; }
.drop-rate-table th, .drop-rate-table td { padding:.5rem .6rem; text-align:left; border-bottom:1px solid var(--color-border); vertical-align:middle; }
.drop-rate-table input { width:8rem; }
.drop-rate-table .drop-rate-sched { width:100%; max-width:22rem; }
.drop-rate-suffix { margin-left:.4rem; color:var(--color-text-secondary); font-size:.8rem; }
.drop-rule-row { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin-bottom:.5rem; padding:.5rem; border:1px solid var(--color-border); border-radius:var(--radius-input); }
.drop-rule-row input[type="number"] { width:8rem; }

/* Item icons (pre-rendered from *_info.swf by tools/build_item_icons.py) */
.item-icon { display: inline-block; image-rendering: -webkit-optimize-contrast; object-fit: contain; vertical-align: middle; }
.item-icon-cell { width: 44px; text-align: center; padding: 2px 4px; }
.redeem-item-chosen { display: flex; align-items: center; gap: .5rem; }
.redeem-item-chosen input { flex: 1; min-width: 0; }

/* Redeem item picker: scrollable result table (same layout as the Items page) */
.redeem-results { max-height: 300px; overflow-y: auto; margin-top: .4rem; }
.redeem-results thead { position: sticky; top: 0; z-index: 1; }