html, body {
    min-height: 100%;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: #f4f6f8;
    color: #17202a;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(150, 132, 77, .72) rgba(9, 12, 18, .42);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(9, 12, 18, .42);
    border-radius: 5px;
}

*::-webkit-scrollbar-thumb {
    border: 2px solid rgba(9, 12, 18, .42);
    border-radius: 5px;
    background: rgba(150, 132, 77, .72);
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(190, 166, 92, .86);
}

*::-webkit-scrollbar-corner {
    background: rgba(9, 12, 18, .42);
}

.ai-chat-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: calc(100vh - 32px);
    margin: -8px;
    background: #eef2f5;
}

.ai-chat-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-right: 1px solid #d8e0e7;
    background: #f8fafc;
    padding: 16px;
    min-width: 0;
}

.ai-chat-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ai-chat-sidebar h1 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.ai-chat-session-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: auto;
}

.ai-chat-session {
    display: grid;
    gap: 2px;
    width: 100%;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #243447;
    padding: 9px 10px;
    text-align: left;
}

.ai-chat-session:hover,
.ai-chat-session.active {
    border-color: #cad6e2;
    background: #fff;
}

.ai-chat-session span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.ai-chat-session small {
    color: #6b7888;
}

.ai-chat-main {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    min-width: 0;
    min-height: 0;
}

.ai-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: auto;
    padding: 22px;
}

.ai-chat-empty {
    align-self: center;
    max-width: 620px;
    color: #5c6877;
    text-align: center;
}

.ai-chat-empty h2 {
    color: #17202a;
    font-size: 24px;
}

.ai-chat-message,
.ai-pending-action {
    width: min(840px, 100%);
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #fff;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.ai-chat-message-user {
    align-self: flex-end;
    background: #eaf3ff;
    border-color: #c9dcf4;
}

.ai-chat-message-assistant,
.ai-pending-action {
    align-self: flex-start;
}

.ai-chat-message-role {
    margin-bottom: 6px;
    color: #5e6b7a;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.ai-chat-message-text {
    white-space: pre-wrap;
}

.ai-tool-results {
    margin-top: 12px;
    display: grid;
    gap: 12px;
}

.ai-analysis-card {
    display: grid;
    gap: 12px;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #f8fafc;
    padding: 12px;
}

.ai-analysis-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ai-analysis-head-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-analysis-head h3,
.ai-analysis-section h4 {
    margin: 0;
    color: #17202a;
    font-size: 15px;
    line-height: 1.25;
}

.ai-analysis-section h4 span {
    margin-left: 6px;
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 500;
}

.ai-analysis-period {
    display: block;
    margin-top: 2px;
    color: #697789;
    font-size: 12px;
}

.ai-analysis-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ai-analysis-metric {
    border: 1px solid #dce4ec;
    border-radius: 6px;
    background: #fff;
    padding: 8px 10px;
}

.ai-analysis-metric span {
    display: block;
    color: #697789;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.ai-analysis-metric strong {
    display: block;
    margin-top: 2px;
    color: #17202a;
    font-size: 18px;
    line-height: 1.2;
}

.ai-analysis-section {
    display: grid;
    gap: 8px;
}

.ai-analysis-table {
    margin: 0;
    background: #fff;
}

.ai-analysis-table th,
.ai-analysis-table td {
    vertical-align: middle;
}

.ai-chat-message time {
    display: block;
    margin-top: 8px;
    color: #7b8794;
    font-size: 12px;
}

.ai-pending-action {
    border-color: #e3c783;
    background: #fffaf0;
}

.ai-pending-action dl {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 4px 12px;
    margin: 10px 0;
}

.ai-pending-action dt {
    color: #6d5b2f;
    font-weight: 700;
}

.ai-pending-action dd {
    margin: 0;
}

.ai-risk {
    display: inline-flex;
    margin-left: 8px;
    border-radius: 999px;
    background: #efe4bd;
    color: #5e4b1b;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
}

.ai-risk-high,
.ai-risk-critical {
    background: #f7d0d0;
    color: #842029;
}

.ai-pending-footer,
.ai-chat-composer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-pending-footer {
    justify-content: space-between;
}

.ai-pending-actions {
    display: flex;
    gap: 8px;
}

.ai-chat-composer {
    border-top: 1px solid #d8e0e7;
    background: #fff;
    padding: 14px;
}

.ai-chat-composer textarea {
    resize: none;
}

@media (max-width: 900px) {
    .ai-chat-shell {
        grid-template-columns: 1fr;
    }

    .ai-chat-sidebar {
        max-height: 220px;
        border-right: 0;
        border-bottom: 1px solid #d8e0e7;
    }

    .ai-chat-composer {
        align-items: stretch;
        flex-direction: column;
    }
}

a {
    color: #0f62fe;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.admin-sidebar {
    background: #18212f;
    color: #fff;
    padding: 20px 16px;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 20px;
}

.brand:hover {
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 32px;
    border: 1px solid rgba(255,255,255,.35);
    font-size: 12px;
    letter-spacing: 0;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-nav .nav-link,
.admin-nav summary,
.admin-nav .nav-group a {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #dce3ea;
    border-radius: 6px;
    padding: 8px 10px;
}

.admin-nav .nav-link:hover,
.admin-nav summary:hover,
.admin-nav .nav-group a:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
    text-decoration: none;
}

.nav-group {
    margin: 4px 0;
}

.nav-group summary {
    cursor: pointer;
    font-weight: 600;
}

.nav-group a {
    margin-left: 14px;
    font-size: 14px;
}

.nav-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    opacity: .86;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-icon svg path {
    vector-effect: non-scaling-stroke;
}

.admin-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-header {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    border-bottom: 1px solid #dce1e7;
    background: #fff;
}

.server-stat {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.server-stat > span {
    padding: 4px 8px;
    border: 1px solid #dce1e7;
    border-radius: 6px;
    background: #f9fafb;
    font-size: 13px;
}

.faction-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    vertical-align: middle;
}

.faction-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    border: 1px solid rgba(23, 32, 42, .55);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    vertical-align: middle;
}

.faction-icon.small {
    width: 20px;
    height: 20px;
}

.faction-icon.rounded {
    border-radius: 50% !important;
}

.faction-0 {
    background-image: url("/images/aol.png");
}

.faction-1 {
    background-image: url("/images/uof.png");
}

.faction-2 {
    border-color: transparent;
    background: transparent;
}

.job-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    vertical-align: middle;
}

.job-icon.small {
    width: 20px;
    height: 20px;
}

.job-all { background-image: url("/images/job-all.png"); }
.job-0 { background-image: url("/images/job-0.png"); }
.job-1 { background-image: url("/images/job-1.png"); }
.job-2 { background-image: url("/images/job-2.png"); }
.job-3 { background-image: url("/images/job-3.png"); }
.job-4 { background-image: url("/images/job-4.png"); }
.job-5 { background-image: url("/images/job-5.png"); }

.inline-meta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.ip-address {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.ip-address img {
    border: 1px solid rgba(23, 32, 42, .15);
    box-shadow: 0 0 0 1px rgba(255,255,255,.6);
}

.ip-country-placeholder {
    display: inline-flex;
    width: 16px;
    height: 12px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(23, 32, 42, .18);
    border-radius: 2px;
    color: #8a94a3;
    background: #f1f3f6;
    font-size: 8px;
    line-height: 1;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.admin-content {
    width: 100%;
    max-width: 1600px;
    padding: 24px;
}

.auth-content {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 24px;
}

.page-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.page-title h1 {
    font-size: 28px;
    margin: 0;
}

.page-title p {
    margin: 4px 0 0;
    color: #5f6b7a;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.metric {
    background: #fff;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    padding: 14px;
}

.metric span {
    display: block;
    color: #5f6b7a;
    font-size: 13px;
}

.metric strong {
    display: block;
    margin-top: 6px;
    font-size: 26px;
    overflow-wrap: anywhere;
    line-height: 1.15;
}

.metric.metric-wide {
    grid-column: span 2;
}

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.dashboard-card {
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-areas:
        "icon label"
        "icon value"
        "icon hint";
    align-items: center;
    gap: 2px 12px;
    min-height: 112px;
    padding: 16px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #f8fafc);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.dashboard-card-primary {
    border-color: #b8cef9;
    background: linear-gradient(180deg, #f4f8ff, #fff);
}

.dashboard-card-icon {
    grid-area: icon;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #0d6efd;
    background: #eaf2ff;
}

.dashboard-card-icon .nav-icon {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
}

.dashboard-card-icon .faction-icon {
    width: 24px;
    height: 24px;
}

.dashboard-card span {
    grid-area: label;
    color: #5f6b7a;
    font-size: 13px;
    font-weight: 600;
}

.dashboard-card strong {
    grid-area: value;
    color: #101828;
    font-size: 28px;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.dashboard-card small {
    grid-area: hint;
    color: #667085;
}

.dashboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 4px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #f7f9fc;
}

.dashboard-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #344054;
    background: transparent;
    font-weight: 600;
}

.dashboard-tabs button:hover {
    color: #0d6efd;
    background: #fff;
    border-color: #d6e4ff;
}

.dashboard-tabs button.active {
    color: #0b5ed7;
    background: #fff;
    border-color: #9bbcff;
    box-shadow: 0 4px 14px rgba(13, 110, 253, .08);
}

.dashboard-control-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.dashboard-control-divider {
    width: 1px;
    height: 24px;
    margin: 0 4px;
    background: #dce1e7;
}

.dashboard-shop-list {
    display: grid;
    gap: 10px;
}

.dashboard-shop-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(120px, .35fr) minmax(150px, .45fr) minmax(110px, .25fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e1e6ed;
    border-radius: 8px;
    background: #fff;
}

.dashboard-shop-row:hover {
    border-color: #bdd2ff;
    background: #fbfdff;
}

.dashboard-shop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.dashboard-shop-stat,
.dashboard-shop-price {
    display: grid;
    gap: 3px;
}

.dashboard-shop-stat span,
.dashboard-shop-price span {
    color: #667085;
    font-size: 12px;
    font-weight: 600;
}

.dashboard-shop-stat strong,
.dashboard-shop-price strong {
    color: #101828;
    font-size: 16px;
}

.dashboard-daily-total {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.dashboard-daily-total div {
    padding: 12px;
    border: 1px solid #e1e6ed;
    border-radius: 8px;
    background: #f9fbfd;
}

.dashboard-daily-total span {
    display: block;
    color: #667085;
    font-size: 12px;
    font-weight: 600;
}

.dashboard-daily-total strong {
    display: block;
    margin-top: 4px;
    font-size: 20px;
}

.progression-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.progression-up {
    color: #067647;
    background: #dcfae6;
}

.progression-down {
    color: #b42318;
    background: #fee4e2;
}

.progression-even {
    color: #475467;
    background: #eef2f6;
}

.empty-state {
    padding: 18px;
    color: #667085;
    text-align: center;
}

.panel {
    background: #fff;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.user-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: -4px 0 16px;
    padding-bottom: 2px;
}

.user-section-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid #dce1e7;
    border-radius: 6px;
    background: #fff;
    color: #344054;
    font-size: .88rem;
    font-weight: 600;
}

.user-section-nav a:hover {
    border-color: #9bbcff;
    background: #f1f6ff;
    color: #0d6efd;
    text-decoration: none;
}

.user-section-nav a.active {
    border-color: #0d6efd;
    background: #e8f1ff;
    color: #0b5ed7;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-header h2 {
    font-size: 18px;
    margin: 0;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.toolbar.toolbar-end {
    align-items: flex-end;
}

.toolbar .form-control {
    max-width: 420px;
}

.admin-table {
    font-size: 14px;
    vertical-align: middle;
}

.table-responsive:has(.column-filter-popover) {
    overflow: visible;
}

.admin-table thead th {
    color: #5f6b7a;
    font-weight: 600;
    border-bottom: 1px solid #cfd6dd;
    white-space: nowrap;
    transition: background-color .12s ease, color .12s ease;
}

.admin-table tr.clickable-row {
    cursor: pointer;
}

.admin-table tr.clickable-row:hover > td {
    background: #f1f6ff;
}

.table-tools,
.panel-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.table-tools {
    margin: 8px 0;
    color: var(--muted);
    font-size: .86rem;
}

.panel-actions {
    justify-content: flex-end;
}

.user-overview-quick-links {
    padding: 12px 16px;
}

.quick-link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-link-grid .btn {
    min-width: 112px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.compact-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.form-grid label,
.toolbar label {
    display: grid;
    gap: 5px;
    color: #5f6b7a;
    font-size: .86rem;
    font-weight: 600;
}

.toolbar label.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    margin: 0;
    padding-left: 0;
    color: #3f4a5a;
}

.toolbar label.form-check .form-check-input {
    float: none;
    flex: 0 0 auto;
    margin: 0;
}

.form-grid .form-control,
.toolbar label .form-control {
    max-width: none;
}

.form-control-color {
    width: 100%;
    min-height: 38px;
    padding: 4px;
}

.table-sort {
    border: 0;
    background: transparent;
    padding: 3px 5px;
    border-radius: 5px;
    color: inherit;
    font: inherit;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color .12s ease, color .12s ease;
}

.table-sort:hover {
    background: #eef4ff;
    color: #0d6efd;
}

.sort-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: #e8f1ff;
    color: #0d6efd;
}

.sort-marker svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.table-column-tools {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.column-filter {
    position: relative;
    display: inline-flex;
}

.column-filter-button {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #6c7785;
    font-size: 0;
    line-height: 1;
}

.column-filter-button::before {
    content: "РІРЉвЂў";
    font-size: 14px;
}

.column-filter-button.active {
    color: #0d6efd;
    background: #e8f1ff;
}

.column-filter-popover {
    position: absolute;
    z-index: 1050;
    top: 28px;
    right: 0;
    min-width: 220px;
    padding: 10px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(23, 32, 42, .16);
}

.column-filter-popover label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #5f6b7a;
}

.column-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 8px;
}

.column-filter-button {
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: inherit;
    line-height: 1;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.column-filter-button::before {
    content: none;
}

.column-filter-button svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.column-filter-button:hover {
    color: #0d6efd;
    border-color: #bcd4ff;
    background: #eef4ff;
}

.column-filter-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.column-filter-popover-header label {
    margin: 0;
}

.column-filter-close {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #6c7785;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.column-filter-close:hover {
    background: #f1f3f6;
    color: #344054;
}

.column-filter-close svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    color: #5f6b7a;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c5cbd3;
}

.status-dot.online {
    background: #1a7f37;
}

.color-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1px solid #cfd6dd;
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
}

.color-input-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.color-input-row .color-swatch {
    margin-right: 0;
}

.loading-block {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #5f6b7a;
    margin: 10px 0;
}

.command-panel {
    display: grid;
    gap: 12px;
}

.points-form {
    grid-template-columns: minmax(300px, 1.5fr) minmax(120px, .5fr) minmax(120px, .5fr);
}

.toast-stack {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 2000;
    display: grid;
    gap: 8px;
}

.toast-message {
    width: 320px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #fff;
    background: #334155;
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.toast-message.success { background: #1a7f37; }
.toast-message.warning { background: #9a6700; }
.toast-message.error { background: #b42318; }

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(100%, 380px);
    display: grid;
    gap: 14px;
    background: #fff;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    padding: 24px;
}

.login-panel h1 {
    font-size: 24px;
    margin: 0;
}

.route-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 16px;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.full-width {
    grid-column: 1 / -1;
}

.news-icon {
    width: 72px;
    height: 44px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.details-grid > div {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
}

.details-grid span {
    display: block;
    color: var(--muted);
    font-size: .82rem;
}

.details-list {
    display: grid;
    gap: 10px;
}

.details-list > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
}

.details-list span {
    color: var(--muted);
    font-size: .84rem;
}

.item-view-panel {
    overflow: hidden;
}

.item-overview {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.item-icon-frame {
    width: 72px;
    height: 72px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #101820;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-icon-frame img,
.gem-slot img {
    max-width: 46px;
    max-height: 46px;
    image-rendering: auto;
}

.item-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.item-summary > div {
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    padding: 10px 12px;
    min-width: 0;
}

.item-summary span {
    display: block;
    color: var(--muted);
    font-size: .82rem;
    margin-bottom: 3px;
}

.item-summary strong,
.item-summary code,
.details-list strong {
    overflow-wrap: anywhere;
}

.gem-grid,
.gem-edit-grid,
.craft-edit-grid,
.item-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.gem-edit-grid,
.craft-edit-grid {
    margin-top: 14px;
}

.item-edit-groups {
    display: grid;
    gap: 10px;
}

.item-edit-groups-equipment {
    grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
    align-items: start;
}

.item-edit-group {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}

.item-edit-card {
    border: 1px solid #dce3ec;
    border-radius: 6px;
    background: #fbfcfe;
    padding: 10px 12px 12px;
}

.item-edit-group legend {
    float: none;
    width: auto;
    margin: 0 0 8px;
    padding: 0;
    color: #2f3a47;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.item-edit-card legend {
    padding: 0 4px;
}

.item-edit-group .gem-edit-grid,
.item-edit-group .craft-edit-grid {
    margin-top: 0;
}

.item-edit-panel .panel-header {
    margin-bottom: 10px;
}

.item-edit-panel .grid-form {
    gap: 10px;
}

.item-edit-base-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(82px, 110px);
    gap: 10px;
    align-items: end;
}

.item-edit-item-field {
    min-width: 0;
}

.item-edit-make-type .form-control {
    text-align: center;
    font-weight: 700;
}

.item-edit-gems-card {
    min-width: 0;
}

.item-edit-stats-layout {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(520px, 1fr) minmax(280px, 380px);
    gap: 10px;
    align-items: start;
}

.item-edit-attributes-card .craft-edit-grid {
    grid-template-columns: repeat(6, minmax(74px, 1fr));
}

.item-edit-combat-grid {
    display: grid;
    gap: 12px;
}

.item-edit-combat-grid h3 {
    margin: 0 0 6px;
    color: #647084;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.item-edit-combat-card .compact-craft-edit-grid {
    grid-template-columns: repeat(3, minmax(60px, 1fr));
}

.item-edit-combat-card .item-enchant-edit-grid {
    grid-template-columns: minmax(90px, 1fr);
}

.item-edit-panel label {
    font-size: .82rem;
}

.item-edit-panel .form-control,
.item-edit-panel .form-select {
    min-height: 34px;
}

.item-edit-panel .gem-edit-grid {
    grid-template-columns: repeat(auto-fit, minmax(154px, 1fr));
    gap: 8px;
}

.item-edit-panel .craft-edit-grid {
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    gap: 8px;
}

.item-edit-stat-sections {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) minmax(180px, 1fr) minmax(110px, .55fr);
    gap: 12px;
    align-items: start;
}

.item-edit-stat-sections h3 {
    margin: 0 0 6px;
    color: #647084;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.item-edit-subgroups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.item-edit-subgroups h3 {
    margin: 0 0 8px;
    color: #5f6b7a;
    font-size: .88rem;
    font-weight: 700;
}

.compact-craft-edit-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.item-enchant-edit-grid {
    grid-template-columns: minmax(120px, 180px);
}

.item-stat-groups {
    display: grid;
    grid-template-columns: minmax(320px, 1.25fr) minmax(240px, .75fr) minmax(140px, .35fr);
    gap: 10px;
    align-items: start;
}

.item-stat-card {
    border: 1px solid #dce3ec;
    border-radius: 6px;
    background: #fbfcfe;
    padding: 10px 12px 12px;
}

.item-stat-card h3 {
    margin: 0 0 8px;
    color: #5f6b7a;
    font-size: .84rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.item-stat-card-enchant {
    max-width: none;
}

.item-stat-card-attributes .item-stat-grid {
    grid-template-columns: repeat(3, minmax(95px, 1fr));
}

.item-stat-card-resources .item-stat-grid {
    grid-template-columns: repeat(3, minmax(82px, 1fr));
}

.item-stat-card-enchant .item-stat-grid {
    grid-template-columns: 1fr;
}

.chance-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 3px 8px;
    border: 1px solid #b8d4ff;
    border-radius: 999px;
    background: #edf5ff;
    color: #0b57b7;
    font-size: .82rem;
    font-weight: 800;
}

.chance-badge-guaranteed {
    border-color: #f1d36b;
    background: #fff7d7;
    color: #8a6200;
}

.admin-form-layout,
.goal-form-layout {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(420px, 1.4fr);
    gap: 18px;
    align-items: start;
}

.admin-form-layout.admin-form-layout-even {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-form-group,
.goal-form-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #fbfcfe;
}

.admin-form-group legend,
.goal-form-group legend {
    float: none;
    width: auto;
    margin: 0 0 2px;
    padding: 0 4px;
    color: #344054;
    font-size: .86rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.admin-form-group label,
.goal-form-group label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: #344054;
    font-size: .88rem;
    font-weight: 600;
}

.admin-form-group .form-check,
.goal-form-group .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding-left: 0;
}

.admin-form-group .form-check-input,
.goal-form-group .form-check-input {
    margin: 0;
}

.admin-form-group-wide,
.goal-form-group-wide {
    grid-template-columns: minmax(300px, 1fr) minmax(100px, 120px) minmax(120px, 140px);
}

.admin-form-group-compact {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.admin-form-group-two {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.admin-form-field-wide {
    grid-column: 1 / -1;
}

.admin-form-group .item-select-blazor,
.admin-form-group .user-select-blazor,
.goal-form-group .item-select-blazor,
.goal-form-group .user-select-blazor {
    width: 100%;
    min-width: 0;
}

.admin-form-group .item-search-blazor,
.admin-form-group .user-search-blazor,
.goal-form-group .item-search-blazor,
.goal-form-group .user-search-blazor {
    min-width: min(300px, 100%);
}

.goal-item-field {
    grid-column: span 1;
}

.donation-goal {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #f8fafc;
}

.donation-goal-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.donation-goal-header span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.donation-goal-header strong {
    display: block;
    color: #111827;
    font-size: 1.35rem;
    line-height: 1.1;
}

.order-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 2px 0;
    padding: 3px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.order-status-approved {
    border-color: #abd7bc;
    background: #eaf7ef;
    color: #166534;
}

.order-status-pending {
    border-color: #ecd08a;
    background: #fff8db;
    color: #7a5100;
}

.order-status-refunded {
    border-color: #e7b3b8;
    background: #fff0f1;
    color: #9f1d2f;
}

.order-status-muted {
    border-color: #d3dae4;
    background: #f3f6fa;
    color: #4b5563;
}

.order-method-stripe {
    border-color: #bdb8ff;
    background: #f0efff;
    color: #3f37a8;
}

.order-method-paypal {
    border-color: #a9c8ec;
    background: #eef6ff;
    color: #075985;
}

.order-method-other {
    border-color: #d3dae4;
    background: #f7f8fb;
    color: #475467;
}

.schedule-day-list {
    display: grid;
    gap: 14px;
}

.schedule-day-group {
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #fbfcfe;
    overflow: hidden;
}

.schedule-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #e7ebf0;
    background: #f4f7fb;
}

.schedule-day-header h3 {
    margin: 0;
    font-size: .95rem;
    font-weight: 800;
}

.schedule-day-header span {
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e8f1ff;
    color: #0d6efd;
    font-size: .78rem;
    font-weight: 800;
    text-align: center;
}

.schedule-table {
    margin-bottom: 0;
}

.schedule-empty {
    padding: 12px;
    color: var(--muted);
    font-size: .88rem;
}

.gem-slot {
    min-height: 120px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    display: grid;
    gap: 6px;
    align-content: start;
}

.gem-slot.filled {
    border-style: solid;
}

.gem-slot .item-chip {
    max-width: 100%;
}

.gem-slot .item-chip-name {
    max-width: 112px;
}

.gem-slot span,
.gem-slot small {
    color: var(--muted);
    font-size: .82rem;
}

.item-stat-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    min-height: 38px;
    padding: 7px 10px;
}

.item-stat-row span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .03em;
}

.item-stat-row strong {
    margin-left: auto;
    font-weight: 900;
}

.item-stat-row em {
    color: #c46a00;
    font-style: normal;
    font-weight: 700;
}

.owner-online-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.owner-online-pill.online {
    background: #dcfce7;
    color: #166534;
}

.owner-online-pill.offline {
    background: #eef2f7;
    color: #475467;
}

.item-name {
    color: #1f6feb;
    font-weight: 700;
}

.library-search-panel {
    position: relative;
    overflow: hidden;
}

.library-item-search {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(120px, 150px) minmax(100px, 120px) auto;
    gap: 12px;
    align-items: end;
}

.library-item-search label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: #344054;
    font-size: .88rem;
    font-weight: 600;
}

.library-result-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #667085;
    font-size: .86rem;
}

.library-result-summary span {
    border-radius: 999px;
    background: #f2f4f7;
    padding: 3px 8px;
}

.library-items-list {
    display: grid;
    gap: 10px;
    max-height: 1000px;
    overflow: auto;
    padding-right: 4px;
}

.library-item-card {
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(250px, .8fr) minmax(260px, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 70px;
    padding: 11px 13px;
    border: 1px solid #dce3ec;
    border-left-width: 4px;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #f8fafc);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: background-color .12s ease, border-color .12s ease, transform .12s ease;
}

.library-item-card:hover {
    border-color: #b8c6d8;
    background: #f6f9ff;
    transform: translateY(-1px);
}

.library-item-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.library-item-title {
    min-width: 0;
}

.library-item-title strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #182230;
    font-size: .98rem;
    font-weight: 800;
}

.library-item-title span {
    color: #667085;
    font-size: .82rem;
}

.library-item-badges,
.library-item-details,
.library-meta-icons,
.library-icon-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.library-item-details {
    justify-content: flex-end;
    gap: 8px 12px;
}

.library-meta-group {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}

.library-meta-icons {
    justify-content: flex-end;
}

.library-icon-strip {
    gap: 3px;
}

.library-icon-strip .job-icon,
.library-icon-strip .faction-icon {
    width: 20px;
    height: 20px;
}

.library-slots {
    color: #b7791f;
    font-weight: 800;
    letter-spacing: 1px;
}

.pill-soft {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #d7dee8;
    border-radius: 999px;
    background: #f8fafc;
    color: #475467;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.pill-blue {
    border-color: #b9d7ff;
    background: #eff6ff;
    color: #175cd3;
}

.pill-gold {
    border-color: #f5d889;
    background: #fffaeb;
    color: #93370d;
}

.pill-green {
    border-color: #abefc6;
    background: #ecfdf3;
    color: #067647;
}

.pill-violet {
    border-color: #d9d6fe;
    background: #f4f3ff;
    color: #5925dc;
}

.pill-red {
    border-color: #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.library-item-card.item-sort-1 { border-left-color: #05B2D2; }
.library-item-card.item-sort-2 { border-left-color: dodgerblue; }
.library-item-card.item-sort-3 { border-left-color: limegreen; }
.library-item-card.item-sort-4 { border-left-color: #d2ad00; }
.library-item-card.item-sort-5 { border-left-color: goldenrod; }
.library-item-card.item-sort-6 { border-left-color: pink; }
.library-item-card.item-sort-7 { border-left-color: hotpink; }
.library-item-card.item-sort-8 { border-left-color: blueviolet; }

.item-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 5px 8px;
    border: 1px solid #dce1e7;
    border-radius: 6px;
    background: linear-gradient(180deg, #fff, #f6f8fb);
    color: #17202a;
    text-decoration: none;
}

.item-chip:hover {
    border-color: #7aa2d6;
    color: #0b5ed7;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    border: 1px solid #dce1e7;
    border-radius: 6px;
    background: linear-gradient(180deg, #fff, #f6f8fb);
    color: #17202a;
    padding: 5px 8px;
    text-decoration: none;
    vertical-align: middle;
}

.character-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    border: 1px solid #dce1e7;
    border-radius: 6px;
    background: linear-gradient(180deg, #fff, #f6f8fb);
    color: #17202a;
    padding: 5px 8px;
    text-decoration: none;
    vertical-align: middle;
}

.user-chip:hover {
    border-color: #7aa2d6;
    color: #0b5ed7;
    text-decoration: none;
}

.character-chip:hover {
    border-color: #7aa2d6;
    color: #0b5ed7;
    text-decoration: none;
}

.user-chip-online {
    border-color: #abefc6;
    background: linear-gradient(180deg, #fff, #ecfdf3);
}

.character-chip-online {
    border-color: #abefc6;
    background: linear-gradient(180deg, #fff, #ecfdf3);
}

.character-chip-deleted {
    opacity: .72;
}

.user-chip-empty {
    color: #8a94a3;
}

.character-chip-empty {
    color: #8a94a3;
}

.user-chip-icons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.character-chip-icons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.user-chip-icons .faction-badge,
.user-chip-icons .rank-icon {
    flex: 0 0 auto;
}

.character-chip-icons .faction-badge,
.character-chip-icons .job-icon {
    flex: 0 0 auto;
}

.user-chip-text {
    display: grid;
    min-width: 0;
    line-height: 1.05;
}

.character-chip-text {
    display: grid;
    min-width: 0;
    line-height: 1.05;
}

.user-chip-text strong,
.user-chip-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.character-chip-text strong,
.character-chip-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip-text strong {
    font-size: .86rem;
}

.character-chip-text strong {
    font-size: .86rem;
}

.user-chip-text small {
    color: #667085;
    font-size: .72rem;
}

.character-chip-text small {
    color: #667085;
    font-size: .72rem;
}

.user-chip-time {
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(15, 98, 254, .1);
    color: #175cd3;
    padding: 2px 6px;
    font-size: .72rem;
    font-weight: 800;
}

.character-chip-level {
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(15, 98, 254, .1);
    color: #175cd3;
    padding: 2px 6px;
    font-size: .72rem;
    font-weight: 800;
}

.item-chip-icon-only {
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    gap: 0;
}

.item-chip-icon-only:hover {
    border-color: transparent;
    background: transparent;
}

.item-chip-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    border-radius: 4px;
    background: #202833;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.item-chip-icon img {
    max-width: 30px;
    max-height: 30px;
    object-fit: contain;
    image-rendering: pixelated;
}

.item-chip-name {
    display: block;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .85rem;
    font-weight: 400;
}

.item-chip-meta {
    display: block;
    color: #5f6b7a;
    font-size: 12px;
}

.equipment-gems {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    min-width: 0;
}

.equipment-gem-slot {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #9b8a69;
    border-radius: 3px;
    background: #151b22;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.equipment-gem-slot.filled {
    border-color: #c7ab6a;
    background: #111820;
}

.equipment-gem-slot img {
    width: 17px;
    height: 17px;
    object-fit: contain;
    image-rendering: pixelated;
}

.equipment-gem-slot .item-chip-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
    background: transparent;
    box-shadow: none;
}

.equipment-gem-slot .item-chip-icon img {
    width: 17px;
    height: 17px;
}

.lookup-selector {
    position: relative;
    display: grid;
    gap: 8px;
}

.lookup-input-row {
    display: flex;
    gap: 8px;
}

.lookup-input-row .form-control {
    min-width: 220px;
}

.lookup-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #5f6b7a;
    font-size: 13px;
}

.lookup-results {
    display: grid;
    gap: 6px;
    max-height: 280px;
    overflow: auto;
    padding: 6px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #fff;
}

.lookup-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    align-items: center;
    width: 100%;
    border: 1px solid #e7ebf0;
    border-radius: 7px;
    padding: 8px 10px;
    background: #fbfcfe;
    color: #17202a;
    text-align: left;
}

.lookup-result:hover {
    border-color: #7aa2d6;
    background: #f1f6ff;
}

.lookup-result small,
.lookup-result em {
    color: #5f6b7a;
    font-size: 12px;
    font-style: normal;
}

.item-lookup-result {
    grid-template-columns: auto minmax(0, 1fr);
}

.item-select-blazor {
    min-width: 300px;
    position: relative;
}

.selected-item-blazor {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 6px 10px;
    border: 1px solid #ccd4df;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    text-align: left;
}

.selected-item-blazor:hover {
    border-color: #7aa2d6;
    background: #f6f9ff;
}

.selected-item-blazor.selected-with-clear,
.selected-user-blazor.selected-with-clear {
    padding-right: 40px;
}

.selector-clear-button {
    position: absolute;
    top: 50%;
    right: 7px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: #667085;
    transform: translateY(-50%);
}

.selector-clear-button:hover {
    border-color: #cfd6dd;
    background: #eef2f6;
    color: #344054;
}

.selector-clear-button svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.selected-item-icon,
.search-item-icon {
    width: 28px;
    height: 28px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    flex: 0 0 28px;
}

.selected-item-name,
.search-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-item-placeholder {
    color: #6b7280;
}

.item-search-blazor {
    position: absolute;
    z-index: 40;
    width: 100%;
    min-width: 300px;
    margin-top: 4px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

.item-search-input {
    background: #f8fafc;
    color: #1f2937;
    border-color: #ccd4df;
}

.item-search-input:focus {
    background: #fff;
    color: #111827;
}

.item-search-results-blazor {
    max-height: 220px;
    overflow: auto;
}

.search-item-blazor {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 36px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #1f2937;
    padding: 5px 8px;
    text-align: left;
}

.search-item-blazor:hover {
    background: #f1f6ff;
}

.search-item-blazor.muted {
    padding: 8px 12px;
    color: #667085;
}

.item-sort-1 .selected-item-icon,
.item-sort-1 .search-item-icon { border-color: #05B2D2; }
.item-sort-2 .selected-item-icon,
.item-sort-2 .search-item-icon { border-color: dodgerblue; }
.item-sort-3 .selected-item-icon,
.item-sort-3 .search-item-icon { border-color: limegreen; }
.item-sort-4 .selected-item-icon,
.item-sort-4 .search-item-icon { border-color: yellow; }
.item-sort-5 .selected-item-icon,
.item-sort-5 .search-item-icon { border-color: goldenrod; }
.item-sort-6 .selected-item-icon,
.item-sort-6 .search-item-icon { border-color: pink; }
.item-sort-7 .selected-item-icon,
.item-sort-7 .search-item-icon { border-color: hotpink; }
.item-sort-8 .selected-item-icon,
.item-sort-8 .search-item-icon { border-color: blueviolet; }

.user-select-blazor {
    min-width: 300px;
    position: relative;
}

.selected-user-blazor {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 6px 10px;
    border: 1px solid #ccd4df;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    text-align: left;
}

.selected-user-blazor:hover {
    border-color: #7aa2d6;
    background: #f6f9ff;
}

.selected-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #223247;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.selected-user-text,
.search-user-name {
    display: grid;
    min-width: 0;
    line-height: 1.2;
}

.selected-user-text strong,
.search-user-name strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-user-text small,
.search-user-name small {
    color: #667085;
    font-size: 12px;
}

.selected-user-placeholder {
    color: #6b7280;
}

.user-status-pill {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.user-status-pill.status-active,
.user-status-pill.status-normal {
    background: #dcfce7;
    color: #166534;
}

.user-status-pill.status-banned,
.user-status-pill.status-blocked {
    background: #fee2e2;
    color: #991b1b;
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    border: 1px solid transparent;
}

.user-role-player {
    background: #eef2f7;
    color: #475467;
}

.user-role-extended {
    background: #e0f2fe;
    color: #075985;
}

.user-role-gs,
.user-role-gma,
.user-role-gm {
    background: #ecfdf3;
    color: #027a48;
}

.user-role-assistant {
    background: #eff6ff;
    color: #1d4ed8;
}

.user-role-developer {
    background: #f5f3ff;
    color: #6d28d9;
}

.user-role-admin {
    background: #fff7ed;
    color: #c2410c;
}

.user-role-banned {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.user-search-blazor {
    position: absolute;
    z-index: 30;
    width: 100%;
    min-width: 300px;
    margin-top: 4px;
    border: 1px solid #424b57;
    border-radius: 6px;
    background: #17202b;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
}

.user-search-input {
    border-color: #313b49;
    background: #f8fafc;
}

.user-search-results-blazor {
    max-height: 250px;
    overflow: auto;
    padding: 4px;
}

.search-user-blazor {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 6px 8px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #f8fafc;
    text-align: left;
}

.search-user-blazor:hover {
    background: #29313a;
}

.search-user-blazor.muted {
    display: block;
    padding: 8px 12px;
    color: #9aa4b2;
}

.search-user-blazor .selected-user-avatar {
    background: #31415a;
}

.search-user-blazor .search-user-name small {
    color: #b7c0cf;
}

.bool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    vertical-align: middle;
}

.bool-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.bool-icon-true {
    background: #dcfce7;
    color: #15803d;
}

.bool-icon-false {
    background: #fee2e2;
    color: #b91c1c;
}

.bool-flag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.bool-flag-list > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.tier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.tier-common {
    border-color: #d0d5dd;
    background: #f2f4f7;
    color: #475467;
}

.tier-uncommon {
    border-color: #86efac;
    background: #dcfce7;
    color: #166534;
}

.tier-rare {
    border-color: #93c5fd;
    background: #dbeafe;
    color: #1d4ed8;
}

.tier-epic {
    border-color: #d8b4fe;
    background: #f3e8ff;
    color: #7e22ce;
}

.tier-legendary {
    border-color: #facc15;
    background: #fef3c7;
    color: #92400e;
}

.badge-neutral {
    border: 1px solid #cfd6dd;
    background: #eef2f6;
    color: #344054;
}

.command-badge {
    border: 1px solid currentColor;
    font-weight: 700;
}

.command-badge-success {
    background: #dcfce7;
    color: #166534;
}

.command-badge-warning {
    background: #fff7d6;
    color: #9a5b00;
}

.command-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.command-badge-info {
    background: #e0f2fe;
    color: #075985;
}

.icon-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    vertical-align: middle;
}

.icon-action-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.transaction-list {
    display: grid;
    gap: 14px;
}

.transaction-card {
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.transaction-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #f6f8fb;
    border-bottom: 1px solid #dce1e7;
}

.transaction-type {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.transaction-exchange { color: #0d6efd; }
.transaction-market { color: #d97706; }
.transaction-drop { color: #b42318; }
.transaction-auction { color: #8a6f00; }
.transaction-guildhouse { color: #7c3aed; }

.transaction-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    padding: 14px;
}

.transaction-party {
    min-width: 0;
    border: 1px solid #e7ebf0;
    border-radius: 8px;
    padding: 12px;
    background: #fbfcfe;
}

.transaction-party-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.transaction-party-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 46px;
}

.transaction-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f6b7a;
    font-size: 28px;
    font-weight: 700;
}

.action-log-form {
    grid-template-columns: minmax(320px, .9fr) minmax(380px, 1fr) minmax(420px, 1.25fr);
    gap: 14px;
}

.action-type-selects {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.action-type-picker {
    display: grid;
    gap: 8px;
    min-width: 0;
    position: relative;
}

.action-type-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.action-type-picker-head strong {
    color: #5f6b7a;
    font-size: .86rem;
}

.action-type-picker-input-row {
    position: relative;
    display: block;
}

.action-type-picker-search {
    padding-right: 38px;
}

.action-type-search-clear {
    right: 7px;
}

.action-type-picker-selected-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 26px;
    color: #667085;
    font-size: .8rem;
}

.action-type-picker-selected-head .btn-link {
    padding: 0;
    color: #0d6efd;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
}

.action-type-picker-selected-head .btn-link:hover {
    text-decoration: underline;
}

.action-type-picker-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 2px 9px;
    border: 1px solid rgba(226, 189, 88, .34);
    border-radius: 999px;
    background: rgba(226, 189, 88, .1);
    color: #f0d27a;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.action-type-picker-clear:hover,
.action-type-picker-clear:focus {
    border-color: rgba(226, 189, 88, .58);
    background: rgba(226, 189, 88, .18);
    color: #ffe39a;
}

.action-type-picker-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-content: flex-start;
    min-height: 180px;
    height: 180px;
    overflow: auto;
    padding: 6px;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    background: #fbfcfe;
}

.action-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 7px;
    border: 1px solid #c9d7ee;
    border-radius: 999px;
    background: #edf4ff;
    color: #24579d;
    font-size: .78rem;
    font-weight: 700;
}

.action-type-chip button {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(36, 87, 157, .12);
    color: inherit;
    line-height: 1;
}

.action-type-chip button:hover {
    background: rgba(36, 87, 157, .22);
}

.action-type-picker-empty {
    align-self: center;
    color: #8a94a3;
    font-size: .82rem;
}

.action-type-picker-list {
    position: absolute;
    z-index: 1060;
    top: 70px;
    left: 0;
    right: 0;
    display: grid;
    gap: 4px;
    max-height: 265px;
    overflow: auto;
    padding: 4px;
    border: 1px solid #dce3ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .18);
}

.action-type-picker-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 32px;
    padding: 5px 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #344054;
    text-align: left;
    font-size: .84rem;
}

.action-type-picker-option:hover {
    background: #eef4ff;
    color: #0d6efd;
}

.action-type-picker-option.selected {
    background: #e8f1ff;
    color: #0b5ed7;
    font-weight: 700;
}

.action-type-picker-option small {
    color: #5f6b7a;
    font-size: .72rem;
}

.action-log-results {
    display: grid;
    gap: 9px;
}

.action-log-card {
    display: grid;
    grid-template-columns: minmax(135px, .65fr) minmax(180px, .85fr) minmax(150px, .7fr) minmax(180px, .85fr) minmax(300px, 1.4fr) minmax(430px, 1.75fr);
    gap: 14px;
    align-items: center;
    justify-items: stretch;
    padding: 11px 14px;
    border: 1px solid #dce3ec;
    border-left: 4px solid #9fb5d5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.action-log-time,
.action-log-actor,
.action-log-map,
.action-log-label,
.action-log-details,
.action-label-stack,
.action-target {
    display: grid;
    gap: 4px;
    min-width: 0;
    justify-items: center;
    text-align: center;
}

.action-log-type {
    display: flex;
    justify-content: center;
    min-width: 0;
    text-align: center;
}

.action-log-time strong {
    color: #0d6efd;
}

.action-log-time span,
.action-log-time small,
.action-log-map span,
.action-log-map small {
    color: #64748b;
    font-size: .82rem;
}

.action-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: #344054;
    font-size: .82rem;
    font-weight: 800;
    white-space: normal;
}

.action-type-violet { background: #f1e9ff; color: #824eb6; }
.action-type-orange { background: #fff3df; color: #d6991f; }
.action-type-pink { background: #ffe9f3; color: #c25bc2; }
.action-type-lightgreen { background: #edfdf4; color: #118a38; }
.action-type-indianred { background: #fff0f0; color: indianred; }
.action-type-desc { background: #eef4ff; color: #3264a8; }
.action-type-warning { background: #fff7d7; color: #9a6700; }
.action-type-primary { background: #e9f2ff; color: #0d6efd; }
.action-type-darkblue { background: #ececff; color: #6262d8; }
.action-type-red { background: #ffecec; color: #d00000; }

.action-label-stack {
    color: #344054;
    font-size: .9rem;
}

.action-label-stack strong {
    font-weight: 800;
}

.money-text {
    color: #b7791f;
    font-weight: 800;
}

.money-color-default { color: #ffffff !important; text-shadow: 0 1px 2px rgba(0,0,0,.55); }
.money-color-5 { color: #80ffff !important; }
.money-color-6 { color: #0080ff !important; }
.money-color-7 { color: #00ff40 !important; }
.money-color-9 { color: #ffff00 !important; }
.money-color-10 { color: #ff8000 !important; }
.money-color-11 { color: #ff00ff !important; }
.money-color-13 { color: #a64dff !important; }
.money-color-14 { color: #f1435c !important; }

.action-two-items {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.action-two-items-arrow {
    color: #64748b;
    font-weight: 900;
}

.action-item-box:empty {
    display: none;
}

.action-success {
    color: #15803d;
    font-weight: 900;
}

.action-fail {
    color: #b42318;
    font-weight: 900;
}

@media (max-width: 1280px) {
    .item-stat-groups {
        grid-template-columns: 1fr;
    }

    .item-edit-groups-equipment,
    .item-edit-stats-layout {
        grid-template-columns: 1fr;
    }

    .item-edit-attributes-card .craft-edit-grid {
        grid-template-columns: repeat(3, minmax(90px, 1fr));
    }

    .action-log-card {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}

@media (max-width: 760px) {
    .item-stat-card-attributes .item-stat-grid,
    .item-stat-card-resources .item-stat-grid {
        grid-template-columns: 1fr;
    }

    .item-edit-base-grid,
    .item-edit-combat-card .compact-craft-edit-grid,
    .item-edit-attributes-card .craft-edit-grid {
        grid-template-columns: 1fr;
    }

    .library-item-search,
    .library-item-card {
        grid-template-columns: 1fr;
    }

    .library-item-details {
        justify-content: flex-start;
    }

    .action-log-card,
    .action-log-form,
    .action-type-selects {
        grid-template-columns: 1fr;
    }
}

.money-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 9px;
    background: #fff7d6;
    color: #6b4e00;
    font-weight: 700;
}

.tooltip.item-tooltip {
    --bs-tooltip-max-width: 380px;
    --bs-tooltip-bg: #0b1016;
    --bs-tooltip-opacity: 1;
}

.tooltip.user-tooltip {
    --bs-tooltip-max-width: 360px;
    --bs-tooltip-bg: #0b1016;
    --bs-tooltip-opacity: 1;
}

.tooltip.character-tooltip {
    --bs-tooltip-max-width: 360px;
    --bs-tooltip-bg: #0b1016;
    --bs-tooltip-opacity: 1;
}

.tooltip.user-tooltip .tooltip-inner,
.tooltip.character-tooltip .tooltip-inner {
    max-width: 360px;
    padding: 0;
    border: 1px solid #324764;
    border-radius: 6px;
    background: linear-gradient(180deg, #151b23, #080b10);
    color: #f2f5f8;
    text-align: left;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .46), inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.user-tooltip-content,
.character-tooltip-content {
    display: grid;
    gap: 9px;
    min-width: 280px;
    padding: 12px;
}

.user-tooltip-head,
.character-tooltip-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 10px;
    align-items: center;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(88, 114, 148, .72);
}

.user-tooltip-head-icons,
.character-tooltip-head-icons {
    display: inline-flex;
    grid-row: span 2;
    align-items: center;
    gap: 5px;
}

.user-tooltip-head-icons .faction-icon,
.character-tooltip-head-icons .faction-icon,
.character-tooltip-head-icons .job-icon {
    width: 28px;
    height: 28px;
}

.user-tooltip-head-icons .rank-icon {
    width: 28px;
    height: 16px;
}

.user-tooltip-head strong,
.character-tooltip-head strong {
    display: block;
    color: #d7e8ff;
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.user-tooltip-head small,
.character-tooltip-head small {
    display: block;
    margin-top: 3px;
    color: #aeb8c4;
    font-size: 11px;
}

.user-tooltip-lines,
.character-tooltip-lines {
    display: grid;
    gap: 5px;
}

.user-tooltip-line,
.character-tooltip-line {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    color: #cbd5e1;
    font-size: 12px;
}

.user-tooltip-line span,
.character-tooltip-line span {
    color: #7f8da3;
}

.user-tooltip-line strong,
.character-tooltip-line strong {
    color: #f2f5f8;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.tooltip.item-tooltip .tooltip-inner {
    max-width: 380px;
    padding: 0;
    border: 1px solid #5c492d;
    border-radius: 6px;
    background: linear-gradient(180deg, #151b23, #080b10);
    color: #f2f5f8;
    text-align: left;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .46), inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.item-tooltip-content {
    display: grid;
    gap: 8px;
    min-width: 290px;
    padding: 12px;
    letter-spacing: 0;
}

.item-tooltip-head {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(122, 97, 58, .72);
}

.item-tooltip-head strong {
    display: block;
    color: #ffe27b;
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 1px #000;
}

.item-tooltip-head small {
    display: block;
    margin-top: 3px;
    color: #aeb8c4;
    font-size: 11px;
}

.item-tooltip-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #8c744a;
    border-radius: 4px;
    background: #05070a;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.item-tooltip-icon img,
.item-tooltip-gem img {
    max-width: 34px;
    max-height: 34px;
    image-rendering: pixelated;
}

.item-tooltip-lines {
    display: grid;
    gap: 2px;
    padding: 2px 0;
}

.item-tooltip-lines + .item-tooltip-lines,
.item-tooltip-gems,
.item-tooltip-desc {
    border-top: 1px solid rgba(75, 89, 106, .58);
    padding-top: 8px;
}

.item-tooltip-line {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-height: 18px;
    color: #f2f5f8;
    font-size: 13px;
}

.item-tooltip-line span {
    color: #aab4c1;
}

.item-tooltip-line strong {
    color: #f2f5f8;
    font-weight: 600;
}

.item-tooltip-jobs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.item-tooltip-head-jobs {
    display: flex;
    justify-content: flex-end;
    min-width: 58px;
    max-width: 104px;
}

.item-tooltip-head-jobs .item-tooltip-jobs {
    justify-content: flex-end;
}

.item-tooltip-line .job-icon {
    filter: drop-shadow(0 1px 1px #000);
}

.item-tooltip-head-jobs .job-icon {
    filter: drop-shadow(0 1px 1px #000);
}

.item-tooltip-line-stat span,
.item-tooltip-line-stat strong {
    color: #f4f204;
}

.item-tooltip-line-stat em {
    color: #dd7602;
    font-style: normal;
    font-weight: 700;
}

.item-tooltip-line-absorb strong {
    color: #ffff00;
}

.item-tooltip-line-element strong,
.item-tooltip-line-danger strong {
    color: #f1435c;
}

.item-tooltip-line-warn strong {
    color: #ffd44d;
}

.item-tooltip-line-money strong {
    color: #6df36d;
}

.item-tooltip-line-muted strong {
    color: #999;
}

.item-tooltip-line-paint strong {
    color: #5c7aea;
}

.item-tooltip-stat-hp span,
.item-tooltip-stat-hp strong {
    color: palevioletred;
}

.item-tooltip-stat-sp span,
.item-tooltip-stat-sp strong {
    color: gold;
}

.item-tooltip-stat-mp span,
.item-tooltip-stat-mp strong {
    color: dodgerblue;
}

.item-tooltip-stat-str span,
.item-tooltip-stat-str strong {
    color: indianred;
}

.item-tooltip-stat-dex span,
.item-tooltip-stat-dex strong {
    color: yellow;
}

.item-tooltip-stat-rec span,
.item-tooltip-stat-rec strong {
    color: blueviolet;
}

.item-tooltip-stat-int span,
.item-tooltip-stat-int strong {
    color: royalblue;
}

.item-tooltip-stat-wis span,
.item-tooltip-stat-wis strong {
    color: seagreen;
}

.item-tooltip-stat-luc span,
.item-tooltip-stat-luc strong {
    color: deepskyblue;
}

.item-tooltip-gems {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 7px;
}

.item-tooltip-gem {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 7px;
    align-items: center;
    min-height: 28px;
    padding: 4px 6px;
    border: 1px solid #423522;
    border-radius: 4px;
    background: #0a0d12;
    color: #dfe7ef;
}

.item-tooltip-gem img {
    max-width: 22px;
    max-height: 22px;
}

.item-tooltip-gem-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #05070a;
}

.item-tooltip-gem-empty {
    color: #777;
}

.item-tooltip-gem > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-tooltip-desc {
    color: #c7d1dc;
    font-size: 12px;
    line-height: 1.35;
}

.item-tooltip-price {
    color: #d8e8d2;
}

.item-card-list {
    display: grid;
    gap: 8px;
}

.item-row-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) minmax(260px, auto);
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #fbfcfe;
}

.item-row-card:hover {
    border-color: #b7c7db;
    background: #f7faff;
}

.item-row-card.item-sort-1 { border-left: 4px solid #05B2D2; }
.item-row-card.item-sort-2 { border-left: 4px solid dodgerblue; }
.item-row-card.item-sort-3 { border-left: 4px solid limegreen; }
.item-row-card.item-sort-4 { border-left: 4px solid #d2ad00; }
.item-row-card.item-sort-5 { border-left: 4px solid goldenrod; }
.item-row-card.item-sort-6 { border-left: 4px solid pink; }
.item-row-card.item-sort-7 { border-left: 4px solid hotpink; }
.item-row-card.item-sort-8 { border-left: 4px solid blueviolet; }

.broken-item-row-card {
    grid-template-columns: minmax(280px, 1fr) auto;
    align-items: center;
}

.broken-item-row-card .item-row-main {
    align-items: flex-start;
}

.broken-item-row-card .item-row-meta {
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.item-row-slot {
    display: grid;
    gap: 2px;
}

.item-row-slot strong {
    font-size: .9rem;
}

.item-row-slot span,
.item-row-meta span {
    color: #5f6b7a;
    font-size: .82rem;
}

.item-row-main,
.item-row-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.item-row-meta {
    justify-content: flex-end;
}

.chat-table tr.chat-common { background: #fff; }
.chat-table tr.chat-commongm,
.chat-table tr.chat-gmnotice,
.chat-table tr.chat-notice,
.chat-table tr.chat-znotice { background: #fff8db; }
.chat-table tr.chat-whisper { background: #f0f7ff; }
.chat-table tr.chat-guild { background: #edf7ed; }
.chat-table tr.chat-group,
.chat-table tr.chat-raid { background: #f3efff; }
.chat-table tr.chat-trade { background: #fff2e5; }
.chat-table tr.chat-yelling,
.chat-table tr.chat-region,
.chat-table tr.chat-warning { background: #fff0f1; }

.chat-type-pill {
    display: inline-flex;
    align-items: center;
    min-width: 76px;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid currentColor;
    background: color-mix(in srgb, currentColor 11%, transparent);
    font-size: .78rem;
    font-weight: 700;
}

.chat-message {
    font-weight: 600;
}

.chat-type-pill.chat-common,
.chat-message.chat-common {
    color: #2f3640;
}

.chat-type-pill.chat-commongm,
.chat-message.chat-commongm,
.chat-type-pill.chat-gmnotice,
.chat-message.chat-gmnotice {
    color: #d25b00;
}

.chat-type-pill.chat-yelling,
.chat-message.chat-yelling {
    color: #b93838;
}

.chat-type-pill.chat-whisper,
.chat-message.chat-whisper {
    color: #d87565;
}

.chat-type-pill.chat-guild,
.chat-message.chat-guild {
    color: #824eb6;
}

.chat-type-pill.chat-group,
.chat-message.chat-group {
    color: #218f43;
}

.chat-type-pill.chat-trade,
.chat-message.chat-trade {
    color: #b77900;
}

.chat-type-pill.chat-all,
.chat-message.chat-all,
.chat-type-pill.chat-region,
.chat-message.chat-region {
    color: #4d63d6;
}

.chat-type-pill.chat-raid,
.chat-message.chat-raid {
    color: #c02fa8;
}

.chat-type-pill.chat-warning,
.chat-message.chat-warning,
.chat-type-pill.chat-notice,
.chat-message.chat-notice,
.chat-type-pill.chat-znotice,
.chat-message.chat-znotice {
    color: orangered;
}

.chat-type-pill.chat-monster,
.chat-message.chat-monster {
    color: #697386;
}

/* Shaiya-style dark palette override. Layout is intentionally unchanged. */
:root {
    --admin-bg: #0b0d13;
    --admin-bg-alt: #10131c;
    --admin-surface: #121620;
    --admin-surface-2: #171c28;
    --admin-surface-3: #1d2433;
    --admin-border: #2a3144;
    --admin-border-soft: #202737;
    --admin-text: #d6dae6;
    --admin-heading: #f2f0e6;
    --admin-muted: #858b9b;
    --admin-muted-2: #626a7d;
    --admin-accent: #e2bd58;
    --admin-accent-strong: #f0ca63;
    --admin-accent-soft: rgba(226, 189, 88, .13);
    --admin-gold: #e2bd58;
    --admin-gold-soft: rgba(226, 189, 88, .15);
    --admin-danger: #d95b69;
    --admin-blue: #8ea2ff;
    --admin-violet: #a88dff;
    --border: var(--admin-border);
    --muted: var(--admin-muted);
    --bs-body-bg: var(--admin-bg);
    --bs-body-color: var(--admin-text);
    --bs-border-color: var(--admin-border);
    --bs-heading-color: var(--admin-heading);
    --bs-secondary-color: var(--admin-muted);
    --bs-tertiary-bg: var(--admin-surface-2);
}

html,
body {
    background:
        radial-gradient(circle at 18% 0%, rgba(226, 189, 88, .035), transparent 30%),
        linear-gradient(180deg, #0d1018 0%, #0b0d13 46%, #080a0f 100%);
    color: var(--admin-text);
}

a {
    color: #9dadff;
}

a:hover {
    color: #c3cbff;
}

.admin-sidebar {
    background:
        linear-gradient(180deg, #11141e 0%, #0e1119 52%, #090b10 100%);
    border-right-color: #202638;
    box-shadow: 10px 0 32px rgba(0, 0, 0, .3);
}

.brand {
    color: var(--admin-heading);
}

.brand span:last-child {
    color: var(--admin-heading);
}

.brand-mark {
    border-color: rgba(226, 189, 88, .7);
    background: linear-gradient(180deg, rgba(226, 189, 88, .16), rgba(226, 189, 88, .05));
    color: #fff7d6;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.admin-nav .nav-link,
.admin-nav summary,
.admin-nav .nav-group a {
    color: #9ca3b4;
}

.admin-nav .nav-link:hover,
.admin-nav summary:hover,
.admin-nav .nav-group a:hover {
    background: rgba(226, 189, 88, .08);
    border-color: rgba(226, 189, 88, .18);
    color: #f1ead2;
}

.admin-nav .nav-group a {
    color: #8d94a5;
}

.admin-nav .nav-icon {
    color: #d1ad4d;
}

.admin-header {
    background: rgba(15, 18, 27, .96);
    border-bottom-color: #202638;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

.server-stat > span {
    background: #151a25;
    border-color: #2c3448;
    color: #d4d8e4;
}

.server-stat .server-stat-faction {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-block: 3px;
}

.server-stat .faction-icon {
    width: 18px;
    height: 18px;
}

.page-title h1,
.panel-header h2,
.login-panel h1 {
    color: var(--admin-heading);
}

.metric strong,
.metric-card strong,
.dashboard-card strong,
.dashboard-daily-total strong,
.dashboard-shop-row strong,
.item-summary strong,
.details-list strong {
    color: var(--admin-heading);
}

.page-title p,
.metric span,
.dashboard-card span,
.dashboard-card small,
.table-tools,
.muted,
.empty-state,
.details-list span,
.item-summary span,
.library-result-summary,
.library-item-title span,
.form-grid label,
.toolbar label,
.admin-form-group label,
.goal-form-group label {
    color: var(--admin-muted);
}

.panel,
.metric,
.login-panel,
.dashboard-card,
.dashboard-daily-total div,
.dashboard-shop-row,
.item-summary > div,
.admin-form-group,
.goal-form-group,
.item-edit-card,
.item-stat-card,
.schedule-day-group,
.library-item-card,
.item-row-card,
.transaction-card,
.action-log-form,
.action-log-card,
.action-type-picker-selected,
.details-list > div {
    background: linear-gradient(180deg, rgba(19, 23, 34, .98), rgba(15, 18, 27, .99));
    border-color: var(--admin-border);
    color: var(--admin-text);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}

.panel {
    box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
}

.dashboard-card-primary {
    border-color: rgba(226, 189, 88, .35);
    background: linear-gradient(180deg, rgba(28, 29, 36, .98), rgba(16, 19, 28, .99));
}

.dashboard-card-icon,
.dashboard-tabs button:hover,
.dashboard-tabs button.active,
.user-section-nav a:hover,
.user-section-nav a.active {
    background: var(--admin-accent-soft);
    border-color: rgba(226, 189, 88, .36);
    color: #f4d474;
}

.dashboard-tabs {
    background: #0f131c;
    border-color: var(--admin-border);
}

.dashboard-tabs button {
    color: var(--admin-muted);
}

.form-control,
.form-select,
.form-control:disabled,
.form-select:disabled,
.selected-item-blazor,
.selected-user-blazor,
.action-type-picker-search,
.item-search-input,
.user-search-input,
.column-filter-popover input,
.column-filter-popover select {
    background-color: #0c1017;
    border-color: #30384c;
    color: var(--admin-text);
}

.form-control:focus,
.form-select:focus,
.selected-item-blazor:hover,
.selected-user-blazor:hover,
.action-type-picker-search:focus,
.item-search-input:focus,
.user-search-input:focus {
    background-color: #0a0d13;
    border-color: var(--admin-accent);
    color: var(--admin-heading);
    box-shadow: 0 0 0 .18rem rgba(226, 189, 88, .14);
}

.form-control::placeholder {
    color: #646c7d;
}

.btn-primary {
    --bs-btn-bg: #e2bd58;
    --bs-btn-border-color: #e2bd58;
    --bs-btn-hover-bg: #f0ca63;
    --bs-btn-hover-border-color: #f0ca63;
    --bs-btn-active-bg: #c89f3d;
    --bs-btn-active-border-color: #c89f3d;
    --bs-btn-color: #12100a;
    --bs-btn-hover-color: #12100a;
    --bs-btn-active-color: #12100a;
}

.btn-outline-secondary,
.btn-outline-primary {
    --bs-btn-color: #b8becd;
    --bs-btn-border-color: #3a4258;
    --bs-btn-hover-bg: rgba(226, 189, 88, .1);
    --bs-btn-hover-border-color: #d4b255;
    --bs-btn-hover-color: #f3df9d;
    --bs-btn-active-bg: rgba(226, 189, 88, .16);
    --bs-btn-active-border-color: #d4b255;
}

.btn-outline-danger {
    --bs-btn-color: #d95b69;
    --bs-btn-border-color: #63313a;
    --bs-btn-hover-bg: rgba(217, 91, 105, .15);
    --bs-btn-hover-border-color: #d95b69;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--admin-text);
    --bs-table-border-color: var(--admin-border);
    --bs-table-striped-bg: rgba(255, 255, 255, .018);
    --bs-table-hover-bg: rgba(226, 189, 88, .055);
    --bs-table-hover-color: var(--admin-heading);
}

.admin-table thead th {
    background: #101520;
    color: #aeb5c5;
    border-bottom-color: #3a4258;
}

.admin-table tbody td {
    border-color: var(--admin-border-soft);
}

.admin-table tr.clickable-row:hover > td,
.dashboard-shop-row:hover,
.library-item-card:hover,
.item-row-card:hover {
    background: rgba(226, 189, 88, .055);
}

.column-filter-popover,
.item-search-blazor,
.user-search-blazor,
.action-type-picker-list,
.dropdown-menu,
.modal-content {
    background: #111722;
    border-color: #343d52;
    color: var(--admin-text);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .48);
}

.search-item-blazor:hover,
.search-user-blazor:hover,
.action-type-picker-option:hover,
.action-type-picker-option.selected {
    background: rgba(226, 189, 88, .1);
    color: #f2dfa2;
}

.item-chip,
.selected-item-blazor,
.selected-user-blazor,
.user-section-nav a,
.pill-soft,
.money-pill,
.progression-even,
.progression-up,
.progression-down {
    background: #111722;
    border-color: var(--admin-border);
    color: var(--admin-text);
}

.item-chip {
    background: linear-gradient(180deg, #171d2a, #10151f);
}

.item-chip:hover {
    border-color: var(--admin-accent);
}

.selected-item-placeholder,
.selected-user-placeholder,
.search-item-blazor.muted,
.search-user-blazor.muted,
.action-type-picker-empty {
    color: var(--admin-muted-2);
}

.selector-clear-button {
    color: #9098aa;
}

.selector-clear-button:hover {
    border-color: #3a4258;
    background: #1b2230;
    color: var(--admin-heading);
}

.item-icon-frame,
.library-item-card .item-chip-icon-only,
.selected-item-icon,
.search-item-icon {
    background-color: #090c12;
}

.library-result-summary span,
.pill-soft {
    background: #111722;
    border-color: #343d52;
    color: #c5cad6;
}

.pill-blue {
    background: rgba(142, 162, 255, .12);
    border-color: rgba(142, 162, 255, .36);
    color: #b7c3ff;
}

.pill-gold,
.money-pill {
    background: var(--admin-gold-soft);
    border-color: rgba(226, 189, 88, .42);
    color: #f0d27a;
}

.pill-green {
    background: rgba(71, 160, 90, .14);
    border-color: rgba(71, 160, 90, .4);
    color: #70d184;
}

.pill-violet {
    background: rgba(168, 141, 255, .13);
    border-color: rgba(168, 141, 255, .36);
    color: #c5b5ff;
}

.pill-red {
    background: rgba(217, 91, 105, .14);
    border-color: rgba(217, 91, 105, .4);
    color: #ef8490;
}

.text-primary {
    color: #8ea2ff !important;
}

.text-success {
    color: #70d184 !important;
}

.text-danger {
    color: #ef8490 !important;
}

.text-warning {
    color: #f0d27a !important;
}

.text-bg-secondary,
.bg-secondary {
    background-color: #242b3b !important;
    color: #d1d6e1 !important;
}

.alert,
.toast {
    background: #141a25;
    border-color: var(--admin-border);
    color: var(--admin-text);
}

.toast-header {
    background: #171d2a;
    color: var(--admin-heading);
    border-bottom-color: var(--admin-border);
}

.auth-content {
    background:
        radial-gradient(circle at 18% 0%, rgba(226, 189, 88, .06), transparent 34%),
        var(--admin-bg);
}

.action-log-form .admin-form-group {
    background: linear-gradient(180deg, rgba(19, 23, 34, .98), rgba(15, 19, 28, .99));
    border-color: #30384c;
}

.action-log-form .admin-form-group legend,
.admin-form-group legend,
.goal-form-group legend,
.item-edit-group legend {
    color: #d8bd68;
    text-shadow: none;
}

.action-log-form .admin-form-group label,
.action-type-picker-head strong {
    color: #9ca4b6;
}

.action-type-picker-selected {
    background: linear-gradient(180deg, #0c1017, #10151f);
    border-color: #30384c;
}

.action-type-chip {
    background: rgba(226, 189, 88, .13);
    border-color: rgba(226, 189, 88, .34);
    color: #f0d27a;
}

.action-type-chip button {
    background: rgba(226, 189, 88, .16);
}

.action-type-chip button:hover {
    background: rgba(226, 189, 88, .28);
}

.action-log-card {
    border-color: #2d3649;
    border-left-color: #d8bd68;
    background: linear-gradient(180deg, rgba(20, 26, 37, .98), rgba(16, 20, 30, .99));
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}

.action-log-card:hover {
    border-color: #46506a;
    border-left-color: #f0ca63;
    background: linear-gradient(180deg, rgba(24, 30, 43, .98), rgba(18, 23, 34, .99));
}

.action-log-time strong {
    color: #8ea2ff;
}

.action-log-time span,
.action-log-time small,
.action-log-map span,
.action-log-map small {
    color: #737d91;
}

.action-log-actor,
.action-log-map,
.action-log-label,
.action-log-details,
.action-label-stack {
    color: #d6dae6;
    justify-items: center;
    text-align: center;
}

.action-label-stack span {
    color: #9ca4b6;
}

.action-type-badge {
    background: linear-gradient(180deg, rgba(29, 35, 49, .98), rgba(21, 26, 38, .98));
    border-color: #3b455c;
    color: #e4e7ef;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.action-type-violet { background: rgba(168, 141, 255, .16); color: #c5b5ff; }
.action-type-orange,
.action-type-warning { background: rgba(226, 189, 88, .16); color: #f0d27a; }
.action-type-pink { background: rgba(217, 91, 160, .15); color: #ee9fd2; }
.action-type-lightgreen,
.action-type-primary { background: rgba(71, 160, 90, .15); color: #70d184; }
.action-type-indianred,
.action-type-red { background: rgba(217, 91, 105, .16); color: #ef8490; }
.action-type-desc { background: rgba(142, 162, 255, .14); color: #b7c3ff; }
.action-type-darkblue { background: rgba(86, 102, 205, .16); color: #aeb9ff; }

.action-two-items-arrow,
.money-text {
    color: #e2bd58;
}

.action-success {
    color: #70d184 !important;
    font-weight: 900;
}

.action-fail {
    color: #ef8490 !important;
    font-weight: 900;
}

.chat-table tr.chat-common { background: transparent; }
.chat-table tr.chat-commongm,
.chat-table tr.chat-gmnotice,
.chat-table tr.chat-notice,
.chat-table tr.chat-znotice { background: rgba(226, 189, 88, .07); }
.chat-table tr.chat-whisper { background: rgba(217, 91, 105, .07); }
.chat-table tr.chat-guild { background: rgba(168, 141, 255, .07); }
.chat-table tr.chat-group,
.chat-table tr.chat-raid { background: rgba(71, 160, 90, .07); }
.chat-table tr.chat-trade { background: rgba(226, 189, 88, .08); }
.chat-table tr.chat-yelling,
.chat-table tr.chat-region,
.chat-table tr.chat-warning { background: rgba(217, 91, 105, .08); }


@media (max-width: 900px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-content {
        padding: 16px;
    }
}

/* Bootstrap utility overrides for the dark admin theme. */
.btn-danger {
    background: linear-gradient(180deg, #74323d, #542631) !important;
    border-color: #8b414c !important;
    color: #ffd1d6 !important;
}

.btn-danger:hover,
.btn-danger:focus {
    background: linear-gradient(180deg, #8a3a47, #66303a) !important;
    border-color: #aa5360 !important;
    color: #fff0f2 !important;
}

.btn-outline-danger {
    color: #e88b96 !important;
    border-color: #6d3540 !important;
    background: rgba(109, 53, 64, .12) !important;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    color: #ffd8dc !important;
    border-color: #a84f5c !important;
    background: rgba(109, 53, 64, .26) !important;
}

.table-active,
.table-active > * {
    --bs-table-bg-state: rgba(226, 189, 88, .08);
    --bs-table-color-state: #f2dfa2;
    background-color: rgba(226, 189, 88, .08) !important;
    color: #f2dfa2 !important;
}

.table-active td,
.table-active th {
    border-top-color: rgba(226, 189, 88, .28) !important;
    border-bottom-color: rgba(226, 189, 88, .22) !important;
}

.admin-table thead th {
    vertical-align: middle;
}

.table-column-tools {
    min-height: 30px;
    align-items: center;
}

.table-column-tools > span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 3px 5px;
    font-weight: 700;
    line-height: 1;
}

.table-sort {
    min-height: 30px;
    color: inherit;
}

.table-sort:hover,
.table-sort:focus {
    background: rgba(226, 189, 88, .08);
    color: #f0d27a;
}

.sort-marker {
    background: rgba(226, 189, 88, .16);
    color: #f0d27a;
}

.column-filter-button {
    color: #737d91;
}

.column-filter-button.active,
.column-filter-button:hover,
.column-filter-button:focus {
    border-color: rgba(226, 189, 88, .38);
    background: rgba(226, 189, 88, .12);
    color: #f0d27a;
}

.bool-icon-true {
    border: 1px solid rgba(71, 160, 90, .42);
    background: rgba(71, 160, 90, .16);
    color: #83da95;
}

.bool-icon-false {
    border: 1px solid rgba(217, 91, 105, .46);
    background: rgba(217, 91, 105, .18);
    color: #ef9aa3;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background: #211e18 !important;
    border-color: #3a3322 !important;
    color: #81775d !important;
    box-shadow: none;
}

.btn-outline-primary {
    background: rgba(216, 189, 104, .08) !important;
    border-color: rgba(216, 189, 104, .5) !important;
    color: #f0d27a !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: rgba(216, 189, 104, .16) !important;
    border-color: #f0d27a !important;
    color: #ffe39a !important;
}

.btn-outline-primary:disabled,
.btn-outline-primary.disabled {
    background: rgba(22, 27, 39, .5) !important;
    border-color: #30384c !important;
    color: #626b7d !important;
}

.btn {
    text-decoration: none !important;
}

.btn-primary {
    background: linear-gradient(180deg, #d8bd68, #b88d3c) !important;
    border-color: rgba(240, 210, 122, .72) !important;
    color: #12100a !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
    transition: background-color .14s ease, border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(180deg, #e3c973, #c99c45) !important;
    border-color: #f3d988 !important;
    color: #0f0d08 !important;
    text-decoration: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 0 3px rgba(226, 189, 88, .12), 0 10px 22px rgba(0, 0, 0, .22);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .22);
}

.btn-outline-primary {
    font-weight: 500 !important;
    text-decoration: none !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    text-decoration: none !important;
    box-shadow: 0 0 0 3px rgba(226, 189, 88, .1);
    transform: translateY(-1px);
}

.user-overview-title {
    margin-bottom: 12px;
}

.user-overview-quick-links {
    background: linear-gradient(180deg, rgba(18, 23, 34, .98), rgba(13, 16, 24, .99));
}

.user-overview-quick-links .panel-header {
    margin-bottom: 10px;
}

.user-overview-quick-links .btn {
    min-height: 34px;
}

.btn-character-inventory {
    border-color: rgba(143, 172, 228, .42) !important;
    background: rgba(48, 62, 92, .18) !important;
    color: #aebff0 !important;
    font-weight: 400 !important;
    box-shadow: none !important;
}

.btn-character-inventory:hover,
.btn-character-inventory:focus {
    border-color: rgba(168, 194, 242, .62) !important;
    background: rgba(72, 89, 128, .28) !important;
    color: #d6e0ff !important;
    transform: none !important;
}

.user-overview-metrics {
    grid-template-columns: minmax(260px, 1.25fr) repeat(4, minmax(140px, .7fr));
}

.user-overview-metrics .metric-wide {
    grid-column: auto;
}

.user-overview-metrics .metric {
    min-height: 76px;
    padding: 13px 15px;
}

.user-overview-metrics .metric strong {
    font-size: 24px;
}

.user-character-panel {
    background: linear-gradient(180deg, rgba(18, 23, 34, .98), rgba(13, 16, 24, .99));
}

.user-overview-forms {
    grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
}

.user-overview-edit-panel {
    padding: 18px;
}

.user-overview-edit-panel .panel-header {
    margin-bottom: 14px;
}

.user-overview-edit-panel .panel-header h2 {
    font-size: 20px;
}

.user-overview-edit-panel .panel-actions {
    margin-top: 6px;
}

.user-identity-layout {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.user-identity-main-fields,
.user-identity-color-fields {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.user-identity-main-fields {
    grid-template-columns: minmax(150px, .75fr) minmax(220px, 1.25fr);
}

.user-identity-color-group {
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(61, 70, 92, .34);
    border-radius: 5px;
    background: rgba(8, 12, 19, .22);
}

.user-identity-color-group legend {
    float: none;
    width: auto;
    margin: 0 0 8px;
    padding: 0;
    color: #d9c16c;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.user-identity-color-fields {
    grid-template-columns: repeat(4, minmax(90px, 1fr));
}

.user-identity-layout label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--text-muted);
    font-size: .86rem;
    font-weight: 600;
}

.user-identity-layout .form-control {
    min-width: 0;
    min-height: 40px;
}

.user-identity-layout .form-control-color {
    width: 100%;
    padding: 5px;
}

@media (max-width: 1320px) {
    .user-identity-color-fields {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

@media (max-width: 900px) {
    .user-overview-metrics,
    .user-identity-main-fields,
    .user-identity-color-fields {
        grid-template-columns: 1fr;
    }

    .user-overview-forms {
        grid-template-columns: 1fr;
    }
}

.btn.btn-primary {
    font-weight: 400 !important;
}

.user-character-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.user-character-actions .btn {
    margin: 0;
}

.badge,
.badge-neutral,
.status-badge,
.user-status-pill,
.user-role-badge,
.owner-online-pill,
.order-pill,
.tier-badge,
.command-badge,
.chance-badge,
.pill-soft,
.money-pill,
.chat-type-pill,
.action-type-badge {
    border: 1px solid #3b455c !important;
    background: #171d2a !important;
    color: #d9deea !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.text-bg-secondary,
.bg-secondary,
.badge.text-bg-secondary {
    border-color: #3b455c !important;
    background: #171d2a !important;
    color: #d9deea !important;
}

.text-bg-success,
.bg-success,
.badge.text-bg-success,
.owner-online-pill.online,
.user-status-pill.status-active,
.user-status-pill.status-normal,
.command-badge-success,
.pill-green {
    border-color: rgba(71, 160, 90, .44) !important;
    background: rgba(71, 160, 90, .18) !important;
    color: #83da95 !important;
}

.text-bg-danger,
.bg-danger,
.badge.text-bg-danger,
.owner-online-pill.offline,
.user-status-pill.status-banned,
.user-status-pill.status-blocked,
.command-badge-danger,
.pill-red {
    border-color: rgba(217, 91, 105, .45) !important;
    background: rgba(217, 91, 105, .18) !important;
    color: #ef9aa3 !important;
}

.text-bg-warning,
.bg-warning,
.badge.text-bg-warning,
.command-badge-warning,
.pill-gold,
.money-pill,
.chance-badge,
.chance-badge-guaranteed {
    border-color: rgba(226, 189, 88, .46) !important;
    background: rgba(226, 189, 88, .18) !important;
    color: #f0d27a !important;
}

.text-bg-info,
.bg-info,
.text-bg-primary,
.bg-primary,
.badge.text-bg-info,
.badge.text-bg-primary,
.command-badge-info,
.pill-blue {
    border-color: rgba(142, 162, 255, .42) !important;
    background: rgba(142, 162, 255, .16) !important;
    color: #b7c3ff !important;
}

.pill-violet {
    border-color: rgba(168, 141, 255, .42) !important;
    background: rgba(168, 141, 255, .16) !important;
    color: #c5b5ff !important;
}

.tier-common {
    border-color: #3b455c !important;
    background: #171d2a !important;
    color: #d9deea !important;
}

.tier-uncommon {
    border-color: rgba(71, 160, 90, .44) !important;
    background: rgba(71, 160, 90, .18) !important;
    color: #83da95 !important;
}

.tier-rare {
    border-color: rgba(142, 162, 255, .42) !important;
    background: rgba(142, 162, 255, .16) !important;
    color: #b7c3ff !important;
}

.tier-epic {
    border-color: rgba(168, 141, 255, .42) !important;
    background: rgba(168, 141, 255, .16) !important;
    color: #c5b5ff !important;
}

.tier-legendary {
    border-color: rgba(226, 189, 88, .5) !important;
    background: rgba(226, 189, 88, .18) !important;
    color: #f0d27a !important;
}

a,
.btn-link {
    color: #9ca8df;
    text-decoration: none !important;
}

a:hover,
a:focus,
.btn-link:hover,
.btn-link:focus {
    color: #b9c2f2;
    text-decoration: none !important;
}

.badge,
.badge-neutral,
.status-badge,
.user-status-pill,
.user-role-badge,
.owner-online-pill,
.order-pill,
.tier-badge,
.command-badge,
.chance-badge,
.pill-soft,
.money-pill,
.chat-type-pill,
.action-type-badge,
.transaction-type {
    border-radius: 5px !important;
}

.transaction-list {
    gap: 25px;
}

.transaction-card {
    border-color: rgba(70, 79, 105, .45);
    background: rgba(18, 24, 35, .68);
    box-shadow: none;
}

.transaction-card-header {
    background: rgba(20, 27, 39, .62);
    border-bottom-color: rgba(70, 79, 105, .32);
    color: #c8cfdf;
}

.transaction-card-header strong {
    color: #8590b4;
    font-weight: 700;
}

.transaction-card-header .text-muted {
    color: #6f7891 !important;
}

.transaction-body {
    background: transparent;
}

.transaction-party {
    background: rgba(8, 12, 19, .34);
    border-color: rgba(70, 79, 105, .38);
    box-shadow: none;
}

.transaction-party:hover {
    background: rgba(13, 18, 28, .44);
    border-color: rgba(92, 103, 134, .52);
}

.transaction-party-head,
.transaction-party a,
.transaction-party small a {
    color: #9ca8df;
}

.transaction-party a:hover,
.transaction-party small a:hover {
    color: #b9c2f2;
}

.transaction-party-head small,
.transaction-party .ip-address {
    color: #818aa2;
}

.transaction-arrow {
    color: #d6be68;
    text-shadow: none;
    opacity: .9;
}

.transaction-type {
    min-height: 26px;
    padding: 3px 9px;
    border-color: rgba(226, 189, 88, .34);
    background: rgba(226, 189, 88, .08);
    color: #d8c073;
    font-weight: 600;
    letter-spacing: .035em;
}

.transaction-exchange {
    border-color: rgba(142, 162, 255, .34);
    background: rgba(142, 162, 255, .09);
    color: #9eacdf;
}

.transaction-market,
.transaction-auction {
    border-color: rgba(226, 189, 88, .34);
    background: rgba(226, 189, 88, .08);
    color: #d8c073;
}

.transaction-drop {
    border-color: rgba(217, 91, 105, .28);
    background: rgba(217, 91, 105, .08);
    color: #d99aa2;
}

.transaction-guildhouse {
    border-color: rgba(168, 141, 255, .3);
    background: rgba(168, 141, 255, .08);
    color: #b9ace0;
}

.money-pill,
.transaction-party .money-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 9px;
    border-color: rgba(88, 102, 134, .58) !important;
    background: rgba(52, 62, 83, .72) !important;
    color: #e0c466 !important;
    font-weight: 700;
    box-shadow: none;
}

.item-chip {
    border-color: rgba(70, 79, 105, .52);
    background: rgba(20, 27, 39, .62);
    box-shadow: none;
}

.item-chip:hover {
    border-color: rgba(92, 103, 134, .68);
    background: rgba(24, 32, 46, .72);
}

.item-chip-name,
.item-chip:hover .item-chip-name,
a.item-chip:hover .item-chip-name {
    color: #d8deee;
}

.item-chip-meta {
    color: #7f89a4;
    font-size: 10px;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    transform: none;
}

.progression-badge {
    border: 1px solid rgba(88, 102, 134, .5);
    border-radius: 5px;
    background: rgba(52, 62, 83, .42);
    color: #9ca7bd;
    box-shadow: none;
}

.progression-up {
    border-color: rgba(71, 160, 90, .32);
    background: rgba(71, 160, 90, .12);
    color: #7fce8f;
}

.progression-down {
    border-color: rgba(217, 91, 105, .32);
    background: rgba(217, 91, 105, .12);
    color: #df8b94;
}

.progression-even {
    border-color: rgba(142, 162, 255, .25);
    background: rgba(142, 162, 255, .08);
    color: #9aa8d8;
}

.form-check-input {
    background-color: rgba(185, 194, 210, .82);
    border-color: rgba(216, 224, 238, .9);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .2);
}

.form-check-input:hover {
    background-color: rgba(216, 224, 238, .94);
    border-color: #eef3fb;
}

.form-check-input:focus {
    border-color: rgba(226, 189, 88, .74);
    box-shadow: 0 0 0 .18rem rgba(226, 189, 88, .16);
}

.form-check-input:checked {
    background-color: #d8bd68;
    border-color: #e6cf82;
}

.form-check-input:disabled {
    background-color: rgba(122, 132, 150, .44);
    border-color: rgba(122, 132, 150, .5);
}

a,
.btn-link,
.admin-table a,
.panel a:not(.btn),
.metric a,
.details-list a {
    color: #93a8e8;
    text-decoration: none !important;
}

a:hover,
a:focus,
.btn-link:hover,
.btn-link:focus,
.admin-table a:hover,
.admin-table a:focus,
.panel a:not(.btn):hover,
.panel a:not(.btn):focus {
    color: #b6c3f4;
    text-decoration: none !important;
}

.user-role-badge {
    min-width: 56px;
    border-radius: 5px !important;
    font-weight: 500 !important;
    letter-spacing: 0;
    text-shadow: none;
}

.user-role-player {
    border-color: rgba(115, 125, 145, .42) !important;
    background: rgba(115, 125, 145, .12) !important;
    color: #b8c0d0 !important;
}

.user-role-extended,
.user-role-gs {
    border-color: rgba(83, 127, 213, .44) !important;
    background: rgba(83, 127, 213, .15) !important;
    color: #9eb7ee !important;
}

.user-role-gm,
.user-role-gma {
    border-color: rgba(58, 174, 203, .42) !important;
    background: rgba(58, 174, 203, .14) !important;
    color: #91d0df !important;
}

.user-role-assistant,
.user-role-developer,
.user-role-admin {
    border-color: rgba(83, 171, 110, .44) !important;
    background: rgba(83, 171, 110, .15) !important;
    color: #93d6a7 !important;
}

.user-role-banned {
    border-color: rgba(217, 91, 105, .45) !important;
    background: rgba(217, 91, 105, .16) !important;
    color: #e69aa2 !important;
}

.user-name-cell {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.user-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #63d985;
    box-shadow: 0 0 0 2px rgba(99, 217, 133, .14), 0 0 10px rgba(99, 217, 133, .32);
    flex: 0 0 auto;
}

.rank-icon {
    display: inline-block;
    width: 28px;
    height: 16px;
    background-image: url("/images/ranks.png");
    background-repeat: no-repeat;
    vertical-align: middle;
}

.rank-icon-empty {
    background-image: none;
    opacity: .35;
}

.library-item-card {
    transition: border-color .12s ease, background-color .12s ease;
}

.library-item-card:hover {
    transform: none !important;
    border-color: rgba(226, 189, 88, .22) !important;
    background: rgba(18, 24, 35, .74) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22) !important;
}

.library-item-card .item-chip,
.library-item-card .item-chip * {
    cursor: default;
}

.library-item-card .item-chip:hover {
    border-color: rgba(70, 79, 105, .52) !important;
    background: rgba(20, 27, 39, .62) !important;
    color: inherit !important;
}

.library-item-card .item-chip:hover .item-chip-name {
    color: #d8deee !important;
}

.badge,
.badge-neutral,
.status-badge,
.user-status-pill,
.user-role-badge,
.owner-online-pill,
.order-pill,
.tier-badge,
.command-badge,
.chance-badge,
.pill-soft,
.money-pill,
.chat-type-pill,
.action-type-badge,
.transaction-type {
    font-weight: 500 !important;
}

.library-slot-gems {
    gap: 3px;
}

.library-empty-slot {
    width: 18px;
    height: 18px;
    border-color: rgba(155, 138, 105, .58);
    background: rgba(10, 13, 19, .82);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
}

.library-slots-empty {
    color: var(--admin-muted);
}

.items-search-item-selector {
    min-width: min(420px, 100%);
    flex: 1 1 360px;
}

.form-select {
    color-scheme: dark;
}

.form-select option,
select option {
    background-color: #0b0f17;
    color: #d8deee;
}

.form-select option:checked,
select option:checked {
    background: #2a3142 linear-gradient(0deg, #2a3142, #2a3142);
    color: #f0d27a;
}

.form-select option:hover,
select option:hover {
    background-color: #171f2d;
    color: #f2dfa2;
}

.form-select optgroup,
select optgroup {
    background-color: #0b0f17;
    color: #aeb7ca;
}

.mall-catalog-flags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 4px;
}

.mall-catalog-flags .form-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 26px;
    margin: 0;
    padding-left: 0;
}

.mall-catalog-flags .form-check-input {
    float: none;
    margin: 0;
    flex: 0 0 auto;
}

.guild-main-list {
    gap: 0;
}

.guild-main-list > div {
    grid-template-columns: minmax(120px, 220px) minmax(0, 1fr);
    align-items: center;
    min-height: 42px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(61, 70, 92, .22);
    background: transparent !important;
    box-shadow: none !important;
}

.guild-main-list > div:last-child {
    border-bottom: 0;
}

.guild-main-list span {
    color: #aeb7ca;
    font-weight: 500;
}

.guild-main-list strong {
    font-weight: 500;
    color: var(--admin-text);
}

.item-sort-0 .item-name,
.item-sort-0 .item-chip-name,
.item-sort-0 .selected-item-name,
.item-sort-0 .search-item-name,
.library-item-card.item-sort-0 .library-item-title strong {
    color: #e7ecf5 !important;
}

.item-sort-1 .item-name,
.item-sort-1 .item-chip-name,
.item-sort-1 .selected-item-name,
.item-sort-1 .search-item-name,
.library-item-card.item-sort-1 .library-item-title strong {
    color: #05B2D2 !important;
}

.item-sort-2 .item-name,
.item-sort-2 .item-chip-name,
.item-sort-2 .selected-item-name,
.item-sort-2 .search-item-name,
.library-item-card.item-sort-2 .library-item-title strong {
    color: dodgerblue !important;
}

.item-sort-3 .item-name,
.item-sort-3 .item-chip-name,
.item-sort-3 .selected-item-name,
.item-sort-3 .search-item-name,
.library-item-card.item-sort-3 .library-item-title strong {
    color: limegreen !important;
}

.item-sort-4 .item-name,
.item-sort-4 .item-chip-name,
.item-sort-4 .selected-item-name,
.item-sort-4 .search-item-name,
.library-item-card.item-sort-4 .library-item-title strong {
    color: yellow !important;
}

.item-sort-5 .item-name,
.item-sort-5 .item-chip-name,
.item-sort-5 .selected-item-name,
.item-sort-5 .search-item-name,
.library-item-card.item-sort-5 .library-item-title strong {
    color: goldenrod !important;
}

.item-sort-6 .item-name,
.item-sort-6 .item-chip-name,
.item-sort-6 .selected-item-name,
.item-sort-6 .search-item-name,
.library-item-card.item-sort-6 .library-item-title strong {
    color: #de93a0 !important;
}

.item-sort-7 .item-name,
.item-sort-7 .item-chip-name,
.item-sort-7 .selected-item-name,
.item-sort-7 .search-item-name,
.library-item-card.item-sort-7 .library-item-title strong {
    color: hotpink !important;
}

.item-sort-8 .item-name,
.item-sort-8 .item-chip-name,
.item-sort-8 .selected-item-name,
.item-sort-8 .search-item-name,
.library-item-card.item-sort-8 .library-item-title strong {
    color: blueviolet !important;
}

.panel,
.metric,
.login-panel,
.dashboard-card,
.dashboard-daily-total div,
.dashboard-shop-row,
.item-summary > div,
.admin-form-group,
.goal-form-group,
.item-edit-card,
.item-stat-card,
.schedule-day-group,
.library-item-card,
.item-row-card,
.action-log-form,
.action-log-card,
.action-type-picker-selected,
.details-list > div,
.user-overview-quick-links,
.user-overview-edit-panel,
.transaction-card {
    background: rgba(17, 22, 33, .72) !important;
    border-color: rgba(61, 70, 92, .42) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .14) !important;
}

.panel {
    box-shadow: 0 10px 24px rgba(0, 0, 0, .14) !important;
}

.panel-header,
.user-overview-quick-links .panel-header,
.user-overview-edit-panel .panel-header {
    background: transparent !important;
    border-color: rgba(61, 70, 92, .28) !important;
}

.admin-form-group,
.goal-form-group,
.item-edit-card,
.action-log-form .admin-form-group,
.item-edit-compact-card {
    background: rgba(12, 16, 24, .36) !important;
    border-color: rgba(61, 70, 92, .34) !important;
    box-shadow: none !important;
}

.form-control,
.form-select,
.form-control:disabled,
.form-select:disabled,
.selected-item-blazor,
.selected-user-blazor,
.action-type-picker-search,
.item-search-input,
.user-search-input,
.column-filter-popover input,
.column-filter-popover select {
    background-color: rgba(8, 12, 19, .76) !important;
    border-color: rgba(67, 77, 101, .62) !important;
}

.form-control:focus,
.form-select:focus,
.action-type-picker-search:focus,
.item-search-input:focus,
.user-search-input:focus {
    background-color: rgba(8, 12, 19, .9) !important;
    border-color: rgba(226, 189, 88, .56) !important;
    box-shadow: 0 0 0 .12rem rgba(226, 189, 88, .1) !important;
}

.selected-item-blazor:hover,
.selected-user-blazor:hover,
.selected-item-blazor:focus,
.selected-user-blazor:focus {
    background-color: rgba(11, 15, 23, .82) !important;
    border-color: rgba(92, 104, 133, .7) !important;
    color: var(--admin-heading);
    box-shadow: none !important;
    outline: 0;
}

.selected-item-blazor:active,
.selected-user-blazor:active {
    background-color: rgba(12, 17, 26, .9) !important;
    border-color: rgba(116, 128, 158, .74) !important;
}

.table,
.admin-table tbody td {
    border-color: rgba(61, 70, 92, .3) !important;
}

.table > :not(caption) > * > *,
.admin-table tbody td,
.admin-table tbody th {
    color: var(--admin-text) !important;
}

.table .text-muted,
.admin-table .text-muted,
.admin-table .muted {
    color: var(--admin-muted) !important;
}

.admin-table thead th {
    background: rgba(15, 20, 30, .76) !important;
    border-bottom-color: rgba(96, 108, 136, .48) !important;
}

.column-filter-popover,
.item-search-blazor,
.user-search-blazor,
.action-type-picker-list,
.dropdown-menu,
.modal-content {
    background: rgba(17, 23, 34, .96) !important;
    border-color: rgba(61, 70, 92, .5) !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, .34) !important;
}

.library-item-card:hover,
.item-row-card:hover,
.transaction-party:hover,
.admin-table tr.clickable-row:hover > td,
.dashboard-shop-row:hover {
    background: rgba(20, 27, 39, .64) !important;
    border-color: rgba(84, 96, 124, .48) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .14) !important;
}

.action-log-map .action-map-name {
    color: #9aa6bd;
    font-weight: 500;
}

.action-type-badge {
    font-weight: 500 !important;
    background: rgba(20, 25, 36, .72) !important;
    border-radius: 5px !important;
    box-shadow: none !important;
}

.action-type-default {
    border-color: rgba(71, 206, 230, .38) !important;
    color: #47cee6 !important;
}

.action-type-violet {
    border-color: rgba(130, 78, 182, .55) !important;
    color: #b98be8 !important;
}

.action-type-orange {
    border-color: rgba(214, 153, 31, .55) !important;
    color: #d6991f !important;
}

.action-type-warning {
    border-color: rgba(255, 193, 7, .5) !important;
    color: #f0ca63 !important;
}

.action-type-pink {
    border-color: rgba(238, 146, 238, .5) !important;
    color: #ee92ee !important;
}

.action-type-lightgreen {
    border-color: rgba(144, 238, 144, .45) !important;
    color: #90ee90 !important;
}

.action-type-primary {
    border-color: rgba(115, 148, 255, .5) !important;
    color: #7394ff !important;
}

.action-type-indianred {
    border-color: rgba(205, 92, 92, .52) !important;
    color: #cd5c5c !important;
}

.action-type-red {
    border-color: rgba(255, 84, 84, .55) !important;
    color: #ff5454 !important;
}

.action-type-desc {
    border-color: rgba(71, 206, 230, .42) !important;
    color: #47cee6 !important;
}

.action-type-darkblue {
    border-color: rgba(142, 142, 248, .5) !important;
    color: #8e8ef8 !important;
}

.transaction-card {
    border-radius: 3px !important;
}

.transaction-card-header {
    min-height: 46px;
}

.transaction-card-header strong,
.transaction-date {
    color: #7f89a2 !important;
    display: block;
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.25;
}

.transaction-age {
    display: block;
    color: #d6be68 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.25;
}

.transaction-party {
    position: relative;
    border-radius: 3px !important;
    padding: 13px 13px 12px;
}

.transaction-party-head {
    display: block !important;
    min-height: 38px;
    margin-bottom: 10px;
    padding-right: 130px;
}

.transaction-party-person {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.transaction-party-user a {
    color: #8fa1df;
    font-weight: 500;
}

.transaction-party-character a,
.transaction-party-character span {
    color: #7888c5;
    font-size: 12px;
    font-weight: 400;
}

.transaction-party-ip {
    position: absolute;
    top: 12px;
    right: 12px;
    max-width: 128px;
    text-align: right;
    font-size: 11px;
    line-height: 1.2;
    opacity: .68;
}

.transaction-party-ip .ip-address {
    gap: 4px;
    justify-content: flex-end;
    color: #7b8499 !important;
}

.transaction-party-ip .ip-address img {
    width: 13px;
    height: 10px;
}

.transaction-party-content {
    display: grid;
    gap: 10px;
    align-content: start;
}

.transaction-money-row {
    display: flex;
    align-items: center;
}

.transaction-party .money-pill {
    font-weight: 500 !important;
}

.transaction-arrow {
    align-self: center;
    color: #d6be68 !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    opacity: .82;
}

.admin-nav {
    gap: 8px !important;
}

.nav-section {
    display: grid;
    gap: 5px;
}

.nav-section-pinned {
    margin-bottom: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(61, 70, 92, .38);
}

.admin-nav .nav-link,
.admin-nav summary,
.admin-nav .nav-group a {
    min-height: 34px;
    border-radius: 5px;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.admin-nav .nav-link-primary {
    color: #dfe6f3;
    background: rgba(17, 22, 33, .42);
    border-color: rgba(61, 70, 92, .36);
}

.nav-group {
    margin: 0;
    padding: 5px 0;
    border-bottom: 1px solid rgba(61, 70, 92, .22);
}

.nav-group:last-child {
    border-bottom: 0;
}

.nav-group summary {
    position: relative;
    color: #d9c16c !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.nav-group summary::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: auto;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    opacity: .58;
    transition: transform .15s ease;
}

.admin-nav .nav-group a {
    margin: 2px 0 2px 27px;
    min-height: 30px;
    padding: 6px 9px;
    color: #96a0b4;
    font-size: 13px;
    line-height: 1.2;
}

.admin-nav .nav-link.active,
.admin-nav .nav-group a.active {
    background: rgba(226, 189, 88, .13) !important;
    border-color: rgba(226, 189, 88, .36) !important;
    color: #f2df9f !important;
    box-shadow: inset 2px 0 0 rgba(226, 189, 88, .78);
}

.admin-nav .nav-link:hover,
.admin-nav summary:hover,
.admin-nav .nav-group a:hover {
    background: rgba(226, 189, 88, .07) !important;
    border-color: rgba(226, 189, 88, .22) !important;
    color: #f1ead2 !important;
}

.admin-nav .nav-group a.active:hover,
.admin-nav .nav-link.active:hover {
    background: rgba(226, 189, 88, .16) !important;
}

.library-item-title strong {
    font-weight: 400 !important;
}

.library-item-title .library-item-id {
    display: block;
    margin-top: 1px;
    color: #77839b;
    font-size: .78rem;
}

.library-meta-slots {
    align-items: center !important;
    min-height: 34px;
}

.library-slot-gems,
.library-slots-empty {
    align-self: center;
}

.item-chip-name {
    font-size: .85rem !important;
    font-weight: 400 !important;
}

.form-check-input:checked {
    background-color: #63d985 !important;
    border-color: #63d985 !important;
    box-shadow: 0 0 0 .12rem rgba(99, 217, 133, .12) !important;
}

.form-check-input:focus {
    border-color: rgba(99, 217, 133, .72) !important;
    box-shadow: 0 0 0 .18rem rgba(99, 217, 133, .14) !important;
}

.action-log-card {
    background: rgba(17, 22, 33, .72) !important;
    border-color: rgba(61, 70, 92, .42) !important;
    border-left-color: rgba(226, 189, 88, .5) !important;
    box-shadow: none !important;
}

.action-log-card::before {
    display: none !important;
}

.action-log-card:hover {
    background: rgba(20, 27, 39, .64) !important;
    border-color: rgba(84, 96, 124, .48) !important;
    border-left-color: rgba(226, 189, 88, .65) !important;
    box-shadow: none !important;
}

.transaction-type-filter {
    align-content: start;
}

.transaction-type-filter .form-check {
    min-height: 30px;
    color: #aab4c7;
}

.transaction-card {
    background: rgba(17, 22, 33, .42) !important;
    border-color: rgba(61, 70, 92, .32) !important;
    box-shadow: none !important;
}

.transaction-card-header {
    background: rgba(18, 24, 35, .36) !important;
    border-bottom-color: rgba(61, 70, 92, .24) !important;
}

.transaction-body {
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) !important;
    gap: 18px !important;
    padding: 18px !important;
}

.transaction-party {
    min-height: 152px;
    background: rgba(8, 12, 19, .2) !important;
    border-color: rgba(70, 79, 105, .32) !important;
    box-shadow: none !important;
}

.transaction-party:hover {
    background: rgba(12, 17, 26, .28) !important;
    border-color: rgba(92, 103, 134, .42) !important;
}

.transaction-arrow {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px;
    align-self: center;
    color: #d9be5c !important;
    font-size: 21px !important;
    font-weight: 400 !important;
    line-height: 1;
    opacity: .86;
}

.transaction-party .money-pill {
    min-height: 27px !important;
    padding: 3px 8px !important;
    border-color: rgba(88, 102, 134, .5) !important;
    background: rgba(52, 62, 83, .48) !important;
    color: #ddc45e !important;
    font-size: .86rem !important;
    font-weight: 500 !important;
}

.team-fight-general-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    grid-column: 1 / -1;
    gap: 14px;
    min-width: 0;
}

.team-fight-general-fields label {
    min-width: 0;
}

.event-flags,
.team-fight-flags {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
    margin-top: 2px;
    min-width: 0;
}

.event-flags .form-check,
.team-fight-flags .form-check {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    width: auto;
    color: var(--admin-muted);
}

@media (max-width: 900px) {
    .team-fight-general-fields {
        grid-template-columns: 1fr;
    }
}

.admin-table a,
.admin-table .btn-link {
    color: #9fb0e6 !important;
    font-weight: 400;
    text-decoration: none !important;
}

.admin-table tbody tr:nth-child(even) a,
.admin-table tbody tr:nth-child(odd) a,
.admin-table tbody tr:hover a,
.admin-table tbody tr:hover .btn-link,
.admin-table a:hover,
.admin-table a:focus,
.admin-table .btn-link:hover,
.admin-table .btn-link:focus {
    color: #d8c27a !important;
    text-decoration: none !important;
}

.admin-table a:visited {
    color: #9aa9dc !important;
}

.admin-table tbody tr:nth-child(even) a:not(:hover):not(:focus),
.admin-table tbody tr:nth-child(odd) a:not(:hover):not(:focus),
.admin-table tbody tr:hover a:not(:hover):not(:focus),
.admin-table tbody tr:hover .btn-link:not(:hover):not(:focus) {
    color: #9fb0e6 !important;
}

.order-pill {
    border-radius: 5px !important;
    background: rgba(23, 29, 42, .86) !important;
    border-color: rgba(59, 69, 92, .9) !important;
    color: #d9deea !important;
    font-weight: 500 !important;
}

.order-status-approved {
    border-color: rgba(99, 217, 133, .5) !important;
    background: rgba(99, 217, 133, .13) !important;
    color: #9be7af !important;
}

.order-status-pending {
    border-color: rgba(226, 189, 88, .56) !important;
    background: rgba(226, 189, 88, .14) !important;
    color: #e4c86f !important;
}

.order-status-refunded {
    border-color: rgba(217, 91, 105, .5) !important;
    background: rgba(217, 91, 105, .13) !important;
    color: #e9909a !important;
}

.order-status-muted {
    border-color: rgba(115, 125, 145, .42) !important;
    background: rgba(115, 125, 145, .12) !important;
    color: #aeb7c8 !important;
}

.order-method-stripe {
    border-color: rgba(142, 126, 255, .52) !important;
    background: rgba(142, 126, 255, .14) !important;
    color: #b8afff !important;
}

.order-method-paypal {
    border-color: rgba(58, 174, 203, .5) !important;
    background: rgba(58, 174, 203, .13) !important;
    color: #8ed8ea !important;
}

.order-method-other {
    border-color: rgba(115, 125, 145, .42) !important;
    background: rgba(115, 125, 145, .12) !important;
    color: #b8c0d0 !important;
}

.nav-group-content-inner {
    min-height: 0;
    overflow: hidden;
    padding-top: 2px;
}

.schedule-day-group {
    border-color: rgba(61, 70, 92, .42) !important;
    background: rgba(17, 22, 33, .72) !important;
}

.schedule-day-header {
    border-bottom-color: rgba(61, 70, 92, .34) !important;
    background: rgba(18, 24, 35, .62) !important;
}

.schedule-day-header h3 {
    color: #d8c27a !important;
    font-weight: 600;
}

.schedule-day-header span {
    border: 1px solid rgba(99, 217, 133, .38);
    background: rgba(99, 217, 133, .12) !important;
    color: #9be7af !important;
    font-weight: 500;
}

.schedule-flags {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
    padding-top: 2px;
}

.schedule-flags .form-check {
    min-height: 28px;
    color: var(--admin-muted);
}

.schedule-day-current {
    border-color: rgba(226, 189, 88, .42) !important;
    background: rgba(20, 24, 33, .82) !important;
}

.schedule-day-current .schedule-day-header {
    background: rgba(226, 189, 88, .08) !important;
}

.schedule-day-header h3 em {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 1px 7px;
    border: 1px solid rgba(226, 189, 88, .36);
    border-radius: 5px;
    background: rgba(226, 189, 88, .12);
    color: #e2bd58;
    font-size: .72rem;
    font-style: normal;
    font-weight: 500;
}

.schedule-type-badge {
    display: inline-flex;
    align-items: center;
    min-width: 96px;
    justify-content: center;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: rgba(132, 145, 170, .12);
    color: #b6c0d4;
    font-size: .78rem;
    font-weight: 500;
    white-space: nowrap;
}

.schedule-type-map {
    border-color: rgba(142, 162, 255, .28);
    background: rgba(142, 162, 255, .11);
    color: #aab6ea;
}

.schedule-type-relic {
    border-color: rgba(226, 189, 88, .3);
    background: rgba(226, 189, 88, .11);
    color: #dbc06b;
}

.schedule-type-goddess {
    border-color: rgba(213, 117, 196, .3);
    background: rgba(213, 117, 196, .1);
    color: #d994ca;
}

.schedule-type-team-fight {
    border-color: rgba(217, 91, 105, .3);
    background: rgba(217, 91, 105, .1);
    color: #dc8b95;
}

.schedule-type-happy-hour {
    border-color: rgba(99, 217, 133, .28);
    background: rgba(99, 217, 133, .1);
    color: #94d7a6;
}

.schedule-type-other {
    border-color: rgba(143, 160, 185, .24);
    background: rgba(143, 160, 185, .1);
    color: #aeb8c9;
}

.donation-goal-orders {
    margin-bottom: 18px;
    padding: 18px 20px;
    border-color: rgba(226, 189, 88, .28) !important;
    border-radius: 5px;
    background: rgba(17, 22, 33, .58) !important;
    box-shadow: none !important;
}

.donation-goal-header {
    align-items: center;
}

.donation-goal-header span {
    color: #d8c27a !important;
    letter-spacing: .06em;
}

.donation-goal-header strong {
    color: #f0f3fb !important;
    font-size: 1.28rem;
    font-weight: 500;
    text-transform: uppercase;
}

.donation-goal-orders .progress {
    height: 22px;
    border: 1px solid rgba(61, 70, 92, .58);
    border-radius: 5px;
    background: rgba(8, 12, 19, .62);
    overflow: hidden;
}

.donation-goal-orders .progress-bar {
    color: #0a0d13;
    font-weight: 600;
}

.donation-goal-footer {
    display: flex;
    justify-content: center;
    gap: 18px;
    color: #8994aa;
    font-size: .84rem;
    text-transform: uppercase;
}

.transaction-type {
    font-size: .74rem !important;
}

.nav-group > .nav-group-content {
    display: grid !important;
    grid-template-rows: 0fr !important;
    overflow: hidden !important;
    opacity: 0 !important;
    transform: translateY(-5px) !important;
    transition:
        grid-template-rows .24s ease,
        opacity .18s ease,
        transform .24s ease !important;
}

.nav-group.expanded > .nav-group-content {
    grid-template-rows: 1fr !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.nav-group summary::after {
    transition: transform .2s ease, opacity .2s ease !important;
}

.nav-group.expanded summary::after {
    transform: rotate(225deg) translate(-1px, -1px) !important;
}

.money-color-default { color: #d6d9e3 !important; }
.money-color-5 { color: #74d0d2 !important; }
.money-color-6 { color: #6f9ed4 !important; }
.money-color-7 { color: #6fc982 !important; }
.money-color-9 { color: #d8c75f !important; }
.money-color-10 { color: #d99a55 !important; }
.money-color-11 { color: #d978c9 !important; }
.money-color-13 { color: #ae88dc !important; }
.money-color-14 { color: #d36d7a !important; }

.transaction-party .money-pill.money-color-default { color: #d6d9e3 !important; }
.transaction-party .money-pill.money-color-5 { color: #74d0d2 !important; }
.transaction-party .money-pill.money-color-6 { color: #6f9ed4 !important; }
.transaction-party .money-pill.money-color-7 { color: #6fc982 !important; }
.transaction-party .money-pill.money-color-9 { color: #d8c75f !important; }
.transaction-party .money-pill.money-color-10 { color: #d99a55 !important; }
.transaction-party .money-pill.money-color-11 { color: #d978c9 !important; }
.transaction-party .money-pill.money-color-13 { color: #ae88dc !important; }
.transaction-party .money-pill.money-color-14 { color: #d36d7a !important; }

.action-log-actor {
    gap: 2px !important;
}

.action-log-icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.action-log-icons .faction-icon,
.action-log-icons .job-icon {
    width: 20px;
    height: 20px;
}

.action-log-time strong {
    font-size: .78rem !important;
    font-weight: 500 !important;
    line-height: 1.1;
}

.action-label-stack strong {
    font-weight: 500 !important;
}

.action-log-login a,
.action-log-login span {
    font-size: .86rem !important;
    line-height: 1.15;
}

.action-log-nickname {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: .76rem !important;
    line-height: 1.1;
}

.action-log-nickname a,
.action-log-nickname span {
    font-size: .76rem !important;
}

.action-item-box .item-chip {
    justify-content: flex-start !important;
    text-align: left !important;
}

.action-item-box .item-chip > span:not(.item-chip-icon) {
    text-align: left !important;
}

.action-item-box .item-chip-name,
.action-item-box .item-chip-meta {
    text-align: left !important;
}

.gem-slot {
    background: rgba(8, 12, 19, .42) !important;
    border-color: rgba(67, 77, 101, .55) !important;
    color: #dfe6f3 !important;
}

.gem-slot.filled {
    background: rgba(12, 17, 26, .54) !important;
    border-color: rgba(92, 103, 134, .46) !important;
}

.gem-slot span,
.gem-slot small {
    color: #8f9bb2 !important;
}

.gem-slot strong {
    color: #667087 !important;
    font-weight: 500 !important;
}

.item-stat-row {
    background: rgba(8, 12, 19, .46) !important;
    border-color: rgba(67, 77, 101, .48) !important;
    color: #dfe6f3 !important;
}

.item-stat-row span {
    color: #8f9bb2 !important;
    font-weight: 600 !important;
}

.item-stat-row strong {
    color: #dfe6f3 !important;
    font-weight: 500 !important;
}

.item-stat-row em {
    color: #d99a55 !important;
    font-weight: 500 !important;
}

.activity-reward-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.activity-reward-form {
    display: grid;
    gap: 12px;
}

.activity-reward-actions {
    display: flex;
    align-items: end;
    justify-content: end;
    min-height: 100%;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    padding: .6rem 1.25rem .7rem;
    border-top: 1px solid #5b4826;
    background: #241f14;
    color: #f1d996;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: .5rem;
    right: .75rem;
    cursor: pointer;
}

.ai-chat-panel {
    display: flex;
    height: calc(100vh - 170px);
    min-height: 480px;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.ai-chat-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    max-height: none;
    margin: 0;
    overflow: hidden;
    background: transparent;
}

.ai-chat-sidebar {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    overflow: hidden;
    border-right: 1px solid var(--admin-border);
    background: rgba(8, 12, 19, .28);
}

.ai-chat-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 32px;
}

.ai-chat-sidebar-head h2 {
    margin: 0;
    color: var(--admin-heading);
    font-size: 16px;
    line-height: 1.2;
}

.ai-chat-sidebar-head span {
    min-width: 28px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background: rgba(20, 27, 39, .64);
    color: var(--admin-muted);
    padding: 2px 7px;
    font-size: 12px;
    text-align: center;
}

.ai-chat-session-list {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 6px;
    overflow: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, .72) rgba(2, 6, 23, .22);
}

.ai-chat-session-list::-webkit-scrollbar {
    width: 10px;
}

.ai-chat-session-list::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(2, 6, 23, .22);
}

.ai-chat-session-list::-webkit-scrollbar-thumb {
    min-height: 42px;
    border: 3px solid rgba(2, 6, 23, .22);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(148, 163, 184, .76), rgba(71, 85, 105, .82));
}

.ai-chat-session-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(203, 213, 225, .9), rgba(100, 116, 139, .92));
}

.ai-new-chat-button {
    width: 100%;
}

.ai-chat-session-row {
    position: relative;
    display: block;
}

.ai-chat-session {
    display: grid;
    width: 100%;
    gap: 3px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--admin-text);
    padding: 9px 34px 9px 10px;
    text-align: left;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.ai-chat-session:hover {
    border-color: rgba(226, 189, 88, .24);
    background: rgba(226, 189, 88, .07);
    color: var(--admin-heading);
}

.ai-chat-session.active {
    border-color: rgba(226, 189, 88, .42);
    background: rgba(226, 189, 88, .12);
    color: #f3df9d;
}

.ai-chat-session span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.ai-chat-session small {
    color: var(--admin-muted);
}

.ai-chat-session-owner {
    color: #9db8e8;
    font-weight: 700;
}

.ai-chat-session-delete {
    position: absolute;
    top: 9px;
    right: 8px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: transparent;
    font-size: 0;
    line-height: 1;
    opacity: 0;
    transform: none;
    transition: opacity .12s ease;
}

.ai-chat-session-delete::before,
.ai-chat-session-delete::after {
    content: "";
    position: absolute;
    top: 9px;
    left: 4px;
    width: 12px;
    height: 2px;
    border-radius: 999px;
    background: #8fa1b7;
    transition: background-color .12s ease, transform .12s ease;
}

.ai-chat-session-delete::before {
    transform: rotate(45deg);
}

.ai-chat-session-delete::after {
    transform: rotate(-45deg);
}

.ai-chat-session-row:hover .ai-chat-session-delete,
.ai-chat-session-delete:focus-visible {
    opacity: .85;
}

.ai-chat-session-delete:hover:not(:disabled),
.ai-chat-session-delete:focus-visible:not(:disabled) {
    opacity: 1;
}

.ai-chat-session-delete:hover:not(:disabled)::before,
.ai-chat-session-delete:hover:not(:disabled)::after,
.ai-chat-session-delete:focus-visible:not(:disabled)::before,
.ai-chat-session-delete:focus-visible:not(:disabled)::after {
    background: #f87171;
}

.ai-chat-main {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.ai-chat-messages {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 14px;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 18px;
}

.ai-chat-empty {
    display: grid;
    align-self: center;
    justify-items: center;
    gap: 8px;
    max-width: 560px;
    margin: auto;
    color: var(--admin-muted);
    text-align: center;
}

.ai-chat-empty .nav-icon {
    width: 32px !important;
    height: 32px !important;
    color: var(--admin-accent);
}

.ai-chat-empty h2 {
    margin: 0;
    color: var(--admin-heading);
    font-size: 22px;
}

.ai-chat-empty p {
    margin: 0;
}

.ai-chat-message,
.ai-pending-action {
    width: min(900px, 100%);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: rgba(17, 22, 33, .72);
    color: var(--admin-text);
    padding: 13px 15px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.ai-chat-message-user {
    align-self: flex-end;
    border-color: rgba(142, 162, 255, .3);
    background: rgba(142, 162, 255, .11);
}

.ai-chat-message-assistant,
.ai-pending-action {
    align-self: flex-start;
}

.ai-chat-message-role {
    margin-bottom: 6px;
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ai-chat-message-text {
    white-space: normal;
    overflow-wrap: anywhere;
}

.ai-chat-message-text a {
    color: var(--admin-accent);
    font-weight: 700;
}

.ai-chat-message-text p,
.ai-chat-message-text ul,
.ai-chat-message-text ol,
.ai-chat-message-text blockquote,
.ai-chat-message-text pre {
    margin: 0 0 10px;
}

.ai-chat-message-text > :last-child {
    margin-bottom: 0;
}

.ai-chat-message-text ul,
.ai-chat-message-text ol {
    padding-left: 22px;
}

.ai-chat-message-text li + li {
    margin-top: 4px;
}

.ai-chat-message-text h3,
.ai-chat-message-text h4 {
    margin: 8px 0 8px;
    color: var(--admin-heading);
    font-size: 15px;
    line-height: 1.3;
}

.ai-chat-message-text blockquote {
    border-left: 3px solid var(--admin-border);
    color: var(--admin-muted);
    padding-left: 10px;
}

.ai-chat-message-text code {
    border: 1px solid var(--admin-border);
    border-radius: 4px;
    background: rgba(12, 16, 24, .62);
    color: var(--admin-heading);
    padding: 1px 4px;
}

.ai-chat-message-text pre {
    overflow: auto;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background: rgba(12, 16, 24, .72);
    padding: 10px;
}

.ai-chat-message-text pre code {
    border: 0;
    background: transparent;
    padding: 0;
    white-space: pre;
}

.ai-tool-results {
    margin-top: 12px;
    display: grid;
    gap: 12px;
}

.ai-analysis-card {
    display: grid;
    gap: 12px;
    border: 1px solid rgba(61, 70, 92, .58);
    border-radius: 8px;
    background: rgba(12, 16, 24, .66);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
    padding: 14px;
}

.ai-analysis-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ai-analysis-head-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-analysis-head h3,
.ai-analysis-section h4 {
    margin: 0;
    color: var(--admin-heading);
    font-size: 15px;
    line-height: 1.25;
}

.ai-analysis-section h4 span {
    margin-left: 6px;
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 500;
}

.ai-analysis-period {
    display: block;
    margin-top: 2px;
    color: var(--admin-muted);
    font-size: 12px;
}

.ai-analysis-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ai-analysis-metric {
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background: rgba(17, 22, 33, .72);
    padding: 8px 10px;
}

.ai-analysis-metric span {
    display: block;
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ai-analysis-metric strong {
    display: block;
    margin-top: 2px;
    color: var(--admin-heading);
    font-size: 18px;
    line-height: 1.2;
}

.ai-analysis-section {
    display: grid;
    gap: 8px;
}

.ai-analysis-table {
    margin: 0;
    border-color: var(--admin-border);
    background: rgba(12, 16, 24, .62) !important;
    color: var(--admin-text);
    font-size: 14px;
    --bs-table-bg: rgba(12, 16, 24, .62);
    --bs-table-color: var(--admin-text);
    --bs-table-border-color: var(--admin-border);
    --bs-table-striped-bg: rgba(20, 27, 39, .62);
    --bs-table-striped-color: var(--admin-text);
    --bs-table-hover-bg: rgba(26, 34, 49, .82);
    --bs-table-hover-color: var(--admin-heading);
}

.ai-tool-results .table-responsive {
    border: 1px solid rgba(61, 70, 92, .34);
    border-radius: 6px;
    background: rgba(8, 12, 19, .34);
}

.ai-boss-grid,
.ai-pending-preview-bosses,
.ai-map-grid,
.ai-pending-preview-maps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-boss-choice,
.ai-map-choice {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    border: 1px solid rgba(61, 70, 92, .58);
    border-radius: 7px;
    background: rgba(17, 22, 33, .64);
    padding: 6px;
}

.ai-boss-choice .boss-chip,
.ai-map-choice .map-chip {
    min-width: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.ai-boss-choice-button {
    min-width: 78px;
}

.ai-map-choice-button {
    min-width: 78px;
}

.map-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-height: 34px;
    border: 1px solid rgba(92, 105, 132, .56);
    border-radius: 7px;
    background: rgba(17, 22, 33, .76);
    color: var(--admin-text);
    padding: 5px 8px;
    vertical-align: middle;
}

.map-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border: 1px solid rgba(96, 165, 250, .28);
    border-radius: 5px;
    background: rgba(37, 99, 235, .14);
    color: #bfdbfe;
    font-size: 12px;
    font-weight: 800;
}

.map-chip-text {
    display: grid;
    min-width: 0;
    line-height: 1.1;
}

.map-chip-text strong,
.map-chip-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-chip-text strong {
    color: var(--admin-heading);
    font-size: 13px;
}

.map-chip-text small {
    color: var(--admin-muted);
    font-size: 11px;
}

.map-tooltip .tooltip-inner {
    border: 1px solid rgba(96, 165, 250, .28);
    border-radius: 7px;
    background: rgba(8, 11, 17, .98);
    color: var(--admin-text);
    padding: 8px 10px;
    text-align: left;
}

.map-tooltip-content {
    display: grid;
    gap: 2px;
}

.map-tooltip-content strong {
    color: var(--admin-heading);
}

.map-tooltip-content span {
    color: var(--admin-muted);
    font-size: 12px;
}

.boss-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-height: 36px;
    border: 1px solid rgba(92, 105, 132, .56);
    border-radius: 7px;
    background: rgba(17, 22, 33, .76);
    color: var(--admin-text);
    padding: 5px 8px;
    text-decoration: none;
    vertical-align: middle;
}

.boss-chip-alive {
    border-color: rgba(68, 188, 130, .58);
    background: rgba(20, 46, 38, .72);
}

.boss-chip-state {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #9aa5b5;
    box-shadow: 0 0 0 3px rgba(154, 165, 181, .14);
}

.boss-chip-alive .boss-chip-state {
    background: #45d483;
    box-shadow: 0 0 0 3px rgba(69, 212, 131, .16);
}

.boss-chip-text {
    display: grid;
    min-width: 0;
    line-height: 1.1;
}

.boss-chip-text strong,
.boss-chip-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.boss-chip-text strong {
    color: var(--admin-heading);
    font-size: 13px;
}

.boss-chip-text small {
    color: var(--admin-muted);
    font-size: 11px;
}

.boss-chip-status {
    flex: 0 0 auto;
    border-radius: 5px;
    background: rgba(255, 255, 255, .07);
    color: var(--admin-heading);
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
}

.boss-tooltip .tooltip-inner {
    max-width: 310px;
    border: 1px solid rgba(98, 116, 155, .46);
    border-radius: 8px;
    background: rgba(8, 11, 17, .98);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .04);
    color: var(--admin-text);
    padding: 0;
    text-align: left;
}

.boss-tooltip-content {
    display: grid;
    gap: 8px;
    min-width: 260px;
    padding: 10px;
}

.boss-tooltip-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid rgba(98, 116, 155, .22);
    padding-bottom: 8px;
}

.boss-tooltip-mark {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9aa5b5;
    box-shadow: 0 0 0 5px rgba(154, 165, 181, .12);
}

.boss-tooltip-mark.is-alive {
    background: #45d483;
    box-shadow: 0 0 0 5px rgba(69, 212, 131, .14);
}

.boss-tooltip-title {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.boss-tooltip-title strong,
.boss-tooltip-title small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.boss-tooltip-title strong {
    color: var(--admin-heading);
    font-size: 14px;
    line-height: 1.15;
}

.boss-tooltip-title small {
    color: rgba(226, 232, 240, .72);
    font-size: 11px;
}

.boss-tooltip-status {
    border: 1px solid rgba(226, 189, 88, .26);
    border-radius: 5px;
    background: rgba(226, 189, 88, .11);
    color: #f3df9d;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.boss-tooltip-hero {
    display: grid;
    gap: 2px;
    border: 1px solid rgba(61, 70, 92, .42);
    border-radius: 7px;
    background: rgba(22, 28, 41, .76);
    padding: 8px 10px;
}

.boss-tooltip-hero span,
.boss-tooltip-tile span {
    color: rgba(226, 232, 240, .68);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.boss-tooltip-hero strong {
    color: var(--admin-heading);
    font-size: 16px;
    line-height: 1.2;
}

.boss-tooltip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.boss-tooltip-tile {
    display: grid;
    gap: 2px;
    border: 1px solid rgba(61, 70, 92, .34);
    border-radius: 6px;
    background: rgba(14, 18, 27, .72);
    padding: 7px 8px;
}

.boss-tooltip-tile strong {
    overflow: hidden;
    color: var(--admin-heading);
    font-size: 13px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-analysis-table th,
.ai-analysis-table td {
    border-color: var(--admin-border) !important;
    color: var(--admin-text) !important;
    vertical-align: middle;
}

.ai-analysis-table thead th {
    border-bottom-color: rgba(96, 108, 136, .48) !important;
    background: rgba(15, 20, 30, .76) !important;
    color: var(--admin-heading) !important;
}

.ai-analysis-table > :not(caption) > * > *,
.ai-analysis-table tbody td {
    background-color: var(--bs-table-bg) !important;
    box-shadow: none !important;
}

.ai-analysis-table tbody tr:nth-child(even) > * {
    background-color: var(--bs-table-striped-bg) !important;
}

.ai-analysis-table tbody tr:hover td {
    background: var(--bs-table-hover-bg) !important;
}

.ai-chat-log-analysis .ai-analysis-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-chat-log-list {
    display: grid;
    gap: 8px;
}

.ai-chat-log-line {
    display: grid;
    gap: 5px;
    border: 1px solid rgba(61, 70, 92, .38);
    border-radius: 7px;
    background: rgba(12, 16, 24, .62);
    padding: 9px 10px;
}

.ai-chat-log-line.chat-commongm,
.ai-chat-log-line.chat-gmnotice,
.ai-chat-log-line.chat-notice,
.ai-chat-log-line.chat-znotice {
    background: rgba(226, 189, 88, .07);
}

.ai-chat-log-line.chat-whisper {
    background: rgba(217, 91, 105, .07);
}

.ai-chat-log-line.chat-guild {
    background: rgba(168, 141, 255, .07);
}

.ai-chat-log-line.chat-group,
.ai-chat-log-line.chat-raid {
    background: rgba(71, 160, 90, .07);
}

.ai-chat-log-line.chat-trade {
    background: rgba(226, 189, 88, .08);
}

.ai-chat-log-line.chat-yelling,
.ai-chat-log-line.chat-region,
.ai-chat-log-line.chat-warning {
    background: rgba(217, 91, 105, .08);
}

.ai-chat-log-line-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.ai-chat-log-time {
    color: var(--admin-muted);
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    white-space: nowrap;
}

.ai-chat-log-participants {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
    color: var(--admin-heading);
}

.ai-chat-log-participants a {
    color: #9eb7ff;
    font-weight: 700;
    text-decoration: none;
}

.ai-chat-log-participants a:hover,
.ai-chat-log-participants a:focus {
    color: #f0d27a;
    text-decoration: none;
}

.ai-chat-log-arrow {
    color: var(--admin-muted);
}

.ai-chat-log-line-message {
    color: var(--admin-heading);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.ai-code-value {
    display: inline-block;
    max-width: 260px;
    border: 1px solid rgba(67, 77, 101, .42);
    border-radius: 5px;
    background: rgba(8, 12, 19, .62);
    color: var(--admin-heading);
    padding: 2px 6px;
    overflow-wrap: anywhere;
    white-space: normal;
}

.ai-session-id {
    display: inline-block;
    max-width: 96px;
    border: 1px solid rgba(67, 77, 101, .42);
    border-radius: 5px;
    background: rgba(8, 12, 19, .42);
    color: var(--admin-muted);
    padding: 2px 6px;
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
}

.ai-uid-value {
    display: inline-block;
    max-width: 86px;
    border: 1px solid rgba(67, 77, 101, .42);
    border-radius: 5px;
    background: rgba(8, 12, 19, .42);
    color: var(--admin-muted);
    padding: 2px 6px;
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
}

.ai-user-single {
    display: flex;
    align-items: center;
    min-width: 0;
}

.ai-character-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-character-choice {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    border: 1px solid rgba(61, 70, 92, .58);
    border-radius: 7px;
    background: rgba(17, 22, 33, .64);
    padding: 6px;
}

.ai-choice-button {
    flex: 0 0 auto;
}

.ai-character-choice .character-chip {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.ai-character-choice .character-chip:hover {
    background: transparent;
}

.ai-chat-panel .user-chip {
    border-color: rgba(61, 70, 92, .72);
    background: rgba(17, 22, 33, .78);
    color: var(--admin-heading);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.ai-chat-panel .user-chip:hover {
    border-color: rgba(226, 189, 88, .42);
    background: rgba(23, 30, 43, .9);
    color: #f3df9d;
}

.ai-chat-panel .user-chip-online {
    border-color: rgba(99, 217, 133, .38);
    background: rgba(19, 43, 31, .68);
}

.ai-chat-panel .user-chip-text small {
    color: var(--admin-muted);
}

.ai-chat-panel .user-chip-text strong,
.ai-chat-panel .character-chip-text strong {
    font-weight: 500;
}

.ai-chat-panel .user-chip-time,
.ai-chat-panel .character-chip-level {
    font-weight: 600;
}

.ai-chat-panel .user-chip-time {
    background: rgba(226, 189, 88, .16);
    color: #f0d27a;
}

.ai-chat-panel .ai-analysis-table .user-chip {
    width: 100%;
    min-width: 0;
    max-width: 220px;
}

.ai-chat-panel .ai-analysis-table .user-chip-text {
    flex: 1 1 auto;
    overflow: hidden;
}

.ai-chat-panel .ai-analysis-table .user-chip-time {
    display: none;
}

.ai-related-users-analysis .ai-analysis-head {
    align-items: center;
}

.ai-related-summary {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-related-summary > div,
.ai-related-summary > details {
    min-width: 118px;
    border: 1px solid rgba(61, 70, 92, .58);
    border-radius: 6px;
    background: rgba(17, 22, 33, .72);
    padding: 8px 10px;
}

.ai-related-summary strong {
    display: block;
    color: var(--admin-heading);
    font-size: 18px;
    line-height: 1.15;
}

.ai-related-summary span,
.ai-related-summary summary {
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 700;
}

.ai-related-summary details span {
    display: inline-block;
    margin: 6px 8px 0 0;
}

.ai-related-table {
    table-layout: fixed;
}

.ai-related-table th:nth-child(1),
.ai-related-table td:nth-child(1) {
    width: 210px;
}

.ai-related-table th:nth-child(2),
.ai-related-table td:nth-child(2) {
    width: 130px;
}

.ai-related-table th:nth-child(4),
.ai-related-table td:nth-child(4) {
    width: 130px;
}

.ai-relation-score {
    display: grid;
    gap: 4px;
    align-content: start;
}

.ai-relation-score strong {
    color: var(--admin-heading);
    font-size: 18px;
    line-height: 1;
}

.ai-relation-score small {
    color: var(--admin-muted);
    font-size: 12px;
}

.ai-strength,
.ai-evidence-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(98, 116, 155, .34);
    border-radius: 999px;
    background: rgba(32, 39, 54, .72);
    color: var(--admin-heading);
    padding: 2px 7px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
}

.ai-strength-strong,
.ai-evidence-chip-strong {
    border-color: rgba(99, 217, 133, .34);
    background: rgba(19, 43, 31, .72);
    color: #9af0b7;
}

.ai-strength-medium {
    border-color: rgba(226, 189, 88, .34);
    background: rgba(58, 45, 18, .58);
    color: #f3df9d;
}

.ai-strength-weak {
    color: var(--admin-muted);
}

.ai-related-evidence {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ai-related-evidence details,
.ai-related-raw {
    width: 100%;
}

.ai-related-evidence summary,
.ai-related-raw summary {
    cursor: pointer;
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 800;
}

.ai-related-detail-grid {
    display: grid;
    gap: 5px;
    margin-top: 8px;
    max-width: 520px;
}

.ai-related-detail-grid > div {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.ai-related-detail-grid span {
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 700;
}

.ai-related-detail-grid code,
.ai-related-raw code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-chat-panel .character-chip {
    border-color: rgba(61, 70, 92, .72);
    background: rgba(17, 22, 33, .78);
    color: var(--admin-heading);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.ai-chat-panel .character-chip:hover {
    border-color: rgba(226, 189, 88, .42);
    background: rgba(23, 30, 43, .9);
    color: #f3df9d;
}

.ai-chat-panel .character-chip-online {
    border-color: rgba(99, 217, 133, .38);
    background: rgba(19, 43, 31, .68);
}

.ai-chat-panel .character-chip-text small {
    color: var(--admin-muted);
}

.ai-chat-panel .character-chip-level {
    background: rgba(226, 189, 88, .16);
    color: #f0d27a;
}

.ai-chat-message time {
    display: block;
    margin-top: 8px;
    color: var(--admin-muted-2);
    font-size: 12px;
}

.ai-chat-waiting {
    border-color: rgba(226, 189, 88, .25);
    background: rgba(226, 189, 88, .07);
}

.ai-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.ai-typing-dots i {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--admin-accent);
    animation: aiTypingPulse 1s infinite ease-in-out;
}

.ai-typing-dots i:nth-child(2) {
    animation-delay: .15s;
}

.ai-typing-dots i:nth-child(3) {
    animation-delay: .3s;
}

@keyframes aiTypingPulse {
    0%, 80%, 100% {
        opacity: .35;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.ai-pending-action {
    border-color: rgba(226, 189, 88, .42);
    background: rgba(226, 189, 88, .08);
}

.ai-pending-action > div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--admin-heading);
}

.ai-pending-action dl {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 5px 12px;
    margin: 10px 0;
}

.ai-pending-action dt {
    color: #f0d27a;
    font-weight: 700;
}

.ai-pending-action dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.ai-pending-preview-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-pending-preview-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ai-pending-preview-item small {
    color: var(--admin-muted);
    white-space: nowrap;
}

.ai-risk {
    display: inline-flex;
    border: 1px solid rgba(226, 189, 88, .3);
    border-radius: 999px;
    background: rgba(226, 189, 88, .14);
    color: #f0d27a;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
}

.ai-risk-high,
.ai-risk-critical {
    border-color: rgba(217, 91, 105, .38);
    background: rgba(217, 91, 105, .16);
    color: #ef8490;
}

.ai-pending-footer,
.ai-chat-composer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-pending-footer {
    justify-content: space-between;
}

.ai-pending-footer small {
    color: var(--admin-muted);
}

.ai-pending-actions {
    display: flex;
    gap: 8px;
}

.ai-chat-composer {
    flex: 0 0 auto;
    border-top: 1px solid var(--admin-border);
    background: rgba(8, 12, 19, .28);
    padding: 14px;
}

.ai-chat-composer textarea {
    min-height: 74px;
    resize: none;
}

.ai-chat-composer .btn {
    align-self: stretch;
    min-width: 112px;
}

@media (max-width: 1000px) {
    .ai-chat-panel {
        height: auto;
        min-height: 0;
    }

    .ai-chat-shell {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 640px;
        max-height: none;
    }

    .ai-chat-sidebar {
        max-height: 220px;
        border-right: 0;
        border-bottom: 1px solid var(--admin-border);
    }
}

@media (max-width: 640px) {
    .ai-chat-composer {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-chat-composer .btn {
        min-height: 40px;
    }

    .ai-pending-footer {
        align-items: stretch;
        flex-direction: column;
    }
}
