.balance-model-cth-button {
    margin-left: 20px;
    background-color: #28a745;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.balance-model-toolbar-button {
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.balance-model-modal-hidden {
    display: none !important;
}

.balance-model-table-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
}

.balance-model-pane {
    background: #0d1117;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #30363d;
    width: 100%;
    min-width: 0;
    height: calc((100vh - 240px) / 2);
    overflow: auto;
}

.balance-model-pane table {
    width: auto;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 11px;
    font-weight: bold;
    font-family: "DIN", "Segoe UI", sans-serif;
    font-variant-numeric: tabular-nums;
    position: relative;
}

.balance-model-pane thead {
    position: sticky;
    top: 0;
    z-index: 30;
}

.balance-model-pane th {
    background: linear-gradient(135deg, #21262d 0%, #30363d 100%);
    color: #ffffff;
    padding: 4px 2px;
    text-align: center;
    border-bottom: 1px solid #30363d;
    border-right: 1px solid #30363d;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
    line-height: 1.5;
    overflow: visible;
}

.balance-model-pane td {
    padding: 4px 2px;
    border-bottom: 1px solid #30363d;
    border-right: 1px solid #30363d;
    background: #ffffff;
    color: #000000;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    line-height: 1.2;
    text-align: center;
    overflow: visible;
    transition: box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.balance-model-pane tbody tr {
    cursor: pointer;
}

.balance-model-pane tbody tr:hover td {
    box-shadow: inset 0 0 0 999px rgba(86, 82, 82, 0.08);
}

.balance-model-pane tbody tr.hover-synced td {
    box-shadow: inset 0 0 0 999px rgba(86, 82, 82, 0.08);
}

.balance-model-pane tbody tr.selected td {
    box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.12);
}

.balance-model-pane tbody tr.timeline-current td {
    border-top: 2px solid #000000;
    border-bottom: 2px solid #000000;
}

.balance-model-pane .balance-model-key-column {
    position: sticky;
    left: 0;
    z-index: 20;
    background: #000000 !important;
    color: #ffffff !important;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    min-width: 64px;
}

.balance-model-pane th.balance-model-key-column {
    z-index: 40;
}

.balance-model-pane .balance-model-ph-column {
    background: #000000 !important;
    color: #ffffff !important;
}

.balance-model-pane tbody tr:hover td.balance-model-key-column,
.balance-model-pane tbody tr.hover-synced td.balance-model-key-column,
.balance-model-pane tbody tr.selected td.balance-model-key-column,
.balance-model-pane tbody tr.timeline-current td.balance-model-key-column {
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    background: #000000 !important;
    color: #ffffff !important;
}

.balance-model-pane .error,
.balance-model-pane .content-loading {
    text-align: center;
    padding: 2rem;
}

.balance-model-pane .error {
    color: #ff7b72;
    font-weight: 600;
}

.balance-model-pane .content-loading {
    color: #30363d;
    font-size: 1.2rem;
}

.balance-model-pane td.dark-orange {
    background-color: #e08753 !important;
}

.balance-model-pane td.light-blue {
    background-color: #9cdaee !important;
}

.balance-model-pane td.light-red {
    background-color: #eaa06e !important;
}

.balance-model-pane td.light-green {
    background-color: #9be49b !important;
}

.balance-model-pane td.light-yellow {
    background-color: #fbfb9e !important;
}

.balance-model-pane td.dark-green {
    background-color: #7ba87b !important;
}

.balance-model-pane td.light-purple {
    background-color: #b3a3d0 !important;
}

.balance-model-pane td.dark-blue {
    background-color: #76a6dd !important;
}

.balance-model-pane td.grey {
    background-color: #adadad !important;
}

.balance-model-pane td.dark-purple {
    background-color: #bea3fb !important;
}

.balance-model-pane td.light-grey {
    background-color: #e3e2e2 !important;
}

.balance-model-pane td.black-white {
    background-color: #ffffff !important;
}

.balance-model-pane td.magenta {
    background-color: #ea497e !important;
}

.balance-model-pane td.black {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.balance-model-pane td.light-pink {
    background-color: #fcadb9 !important;
}

.balance-model-pane td.negative-number {
    color: #ff4444 !important;
}

.balance-model-pane td.negative-consumption {
    color: #0c7e0c !important;
}

.balance-model-pane td.positive-consumption {
    color: #ff4444 !important;
}

.balance-model-pane td.empty-value {
    color: #6b7280 !important;
}

.balance-model-atcs-stars {
    letter-spacing: 0.08em;
    font-size: 0.92em;
    font-weight: 800;
    line-height: 1;
}

.balance-model-atcs-star {
    display: inline-block;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.18);
}

.balance-model-atcs-star-outbound {
    color: #30c46c;
}

.balance-model-atcs-star-inbound {
    color: #e5534b;
}

.balance-model-atcs-empty {
    color: #8b949e;
}

.balance-model-atcs-tooltip {
    position: fixed;
    z-index: 10000;
    width: min(420px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #30363d;
    background: #1c2128;
    color: #c9d1d9;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    font-size: 13px;
    line-height: 1.55;
    white-space: normal;
    pointer-events: none;
    text-align: left;
    overflow: hidden auto;
}

.balance-model-atcs-tooltip-card {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.balance-model-atcs-tooltip-title {
    color: #f0f6fc;
    font-size: 15px;
    font-weight: 700;
}

.balance-model-atcs-tooltip-summary {
    color: #dbe4ee;
}

.balance-model-atcs-tooltip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.balance-model-atcs-tooltip-table th,
.balance-model-atcs-tooltip-table td {
    border: 1px solid rgba(201, 209, 217, 0.12);
    padding: 0.35rem 0.45rem;
    text-align: left;
}

.balance-model-atcs-tooltip-table th {
    color: #f0f6fc;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 700;
}

.balance-model-atcs-tooltip-table tr.is-zero td {
    color: #ff8b81;
    font-weight: 700;
}

.balance-model-pane tr.timeline-current td.black-white,
.balance-model-pane tr.selected td.black-white {
    background-color: #d0d0d0 !important;
    color: #000000 !important;
}

.balance-model-pane tr.timeline-current td.dark-orange,
.balance-model-pane tr.selected td.dark-orange {
    background-color: #d86d2f !important;
    color: #000000 !important;
}

.balance-model-pane tr.timeline-current td.light-pink,
.balance-model-pane tr.selected td.light-pink {
    background-color: #f98e9e !important;
    color: #000000 !important;
}

.balance-model-pane tr.timeline-current td.light-grey,
.balance-model-pane tr.selected td.light-grey {
    background-color: #cccccc !important;
    color: #000000 !important;
}

.balance-model-pane tr.timeline-current td.light-blue,
.balance-model-pane tr.selected td.light-blue {
    background-color: #3e9fe0 !important;
    color: #000000 !important;
}

.balance-model-pane tr.timeline-current td.light-red,
.balance-model-pane tr.selected td.light-red {
    background-color: #efa844 !important;
    color: #000000 !important;
}

.balance-model-pane tr.timeline-current td.light-green,
.balance-model-pane tr.selected td.light-green {
    background-color: #34d379 !important;
    color: #000000 !important;
}

.balance-model-pane tr.timeline-current td.light-yellow,
.balance-model-pane tr.selected td.light-yellow {
    background-color: #f7d23c !important;
    color: #000000 !important;
}

.balance-model-pane tr.timeline-current td.dark-green,
.balance-model-pane tr.selected td.dark-green {
    background-color: #29ab5f !important;
    color: #000000 !important;
}

.balance-model-pane tr.timeline-current td.light-purple,
.balance-model-pane tr.selected td.light-purple {
    background-color: rgba(150, 75, 185, 0.8) !important;
    color: #000000 !important;
}

.balance-model-pane tr.timeline-current td.grey,
.balance-model-pane tr.selected td.grey {
    background-color: #747c83 !important;
    color: #000000 !important;
}

.balance-model-pane tr.timeline-current td.black,
.balance-model-pane tr.selected td.black {
    background-color: #505151 !important;
    color: #ffffff !important;
}

.balance-model-pane tr.timeline-current td.dark-blue,
.balance-model-pane tr.selected td.dark-blue {
    background-color: #255ab2 !important;
    color: #000000 !important;
}

.balance-model-pane tr.timeline-current td.dark-purple,
.balance-model-pane tr.selected td.dark-purple {
    background-color: rgba(144, 98, 253, 0.8) !important;
    color: #000000 !important;
}

.balance-model-pane tr:hover td.balance-model-ph-column,
.balance-model-pane tr.hover-synced td.balance-model-ph-column,
.balance-model-pane tr.selected td.balance-model-ph-column,
.balance-model-pane tr.timeline-current td.balance-model-ph-column {
    background: #000000 !important;
    color: #ffffff !important;
}

.split-regulation-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(120, 53, 15, 0.45);
    backdrop-filter: blur(4px);
}

.split-regulation-modal-content {
    width: min(760px, 92vw);
    max-height: 88vh;
    overflow-y: auto;
    padding: 24px;
    border-radius: 20px;
    border: 2px solid #f59e0b;
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.35), transparent 34%),
        linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
    box-shadow: 0 24px 80px rgba(124, 45, 18, 0.35);
    color: #7c2d12;
}

.split-regulation-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #ea580c;
    color: #fff7ed;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.split-regulation-title {
    margin: 14px 0 18px;
    color: #9a3412;
    font-size: 28px;
    line-height: 1.1;
    text-transform: uppercase;
}

.split-regulation-body {
    display: grid;
    gap: 14px;
}

.split-regulation-card {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid #fdba74;
    border-left: 8px solid #ea580c;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 28px rgba(194, 65, 12, 0.12);
}

.split-regulation-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.split-regulation-card h3 {
    margin: 0;
    color: #9a3412;
    font-size: 20px;
    text-transform: uppercase;
}

.split-regulation-topic-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ffedd5;
    color: #c2410c;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #fdba74;
}

.split-regulation-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.split-regulation-meta-item {
    padding: 10px 12px;
    border-radius: 12px;
    background: #fffaf5;
    border: 1px solid #fed7aa;
}

.split-regulation-meta-label {
    display: block;
    margin-bottom: 4px;
    color: #c2410c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.split-regulation-meta-value {
    color: #7c2d12;
    font-size: 14px;
    font-weight: 700;
}

.split-regulation-message {
    margin: 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #fed7aa;
    color: #7c2d12;
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.split-regulation-close-btn {
    margin-top: 18px;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff7ed;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(194, 65, 12, 0.24);
}

.split-regulation-close-btn:hover {
    filter: brightness(1.04);
}

.umm-modal-content.split-regulation-theme {
    background: linear-gradient(135deg, #43210f 0%, #7c2d12 45%, #c2410c 100%);
    border: 3px solid #f59e0b;
    box-shadow: 0 0 35px rgba(245, 158, 11, 0.55);
    animation: splitRegulationPulse 1.9s ease-in-out infinite;
}

.umm-modal-content.split-regulation-theme .umm-modal-title {
    color: #fff7ed;
    text-shadow: 0 0 8px rgba(255, 237, 213, 0.45);
    text-transform: uppercase;
}

.umm-modal-content.split-regulation-theme .umm-modal-close-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #fff7ed;
}

.umm-modal-content.split-regulation-theme .umm-modal-close-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45);
}

.umm-region-alert.split-regulation-region-alert {
    background: linear-gradient(120deg, rgba(255, 237, 213, 0.18) 0%, rgba(251, 191, 36, 0.2) 100%);
    border-left: 5px solid #f59e0b;
    border-radius: 10px;
}

.umm-region-alert.split-regulation-region-alert h3 {
    color: #ffedd5;
}

@keyframes splitRegulationPulse {
    0%, 100% {
        border-color: #f59e0b;
        box-shadow: 0 0 28px rgba(245, 158, 11, 0.48);
    }
    50% {
        border-color: #fb923c;
        box-shadow: 0 0 38px rgba(249, 115, 22, 0.55);
    }
}

.umm-sound-unlock-hint {
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    background: #fff7ed;
}

.umm-sound-unlock-text {
    margin: 0 0 8px 0;
    color: #92400e;
    font-weight: 600;
}

.umm-sound-unlock-button {
    background: #f59e0b;
    color: #111827;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.flow-alert-emoji {
    text-align: center;
    font-size: 48px;
    margin-bottom: 10px;
}

.flow-alert-heading {
    text-align: center;
}

.flow-alert-heading.flow-alert-buy {
    color: #10b981;
}

.flow-alert-heading.flow-alert-sell {
    color: #ef4444;
}

.flow-alert-summary {
    background: #f3f4f6;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.flow-alert-summary p {
    margin: 8px 0;
}

.flow-alert-change.flow-alert-buy {
    color: #10b981;
    font-weight: bold;
}

.flow-alert-change.flow-alert-sell {
    color: #ef4444;
    font-weight: bold;
}

.flow-alert-meta {
    font-size: 12px;
    color: #6b7280;
}

.flow-alert-meta p {
    margin: 5px 0;
}

.balance-model-report-link,
.flow-alert-link {
    color: #58a6ff;
}

@media (max-width: 640px) {
    .split-regulation-modal {
        padding: 14px;
    }

    .split-regulation-modal-content {
        padding: 18px;
    }

    .split-regulation-title {
        font-size: 24px;
    }
}
