/* battle-shell.css — chrome + shared host kit extracted from battle.css.
   Loaded globally via MainLayout. Full battlefield styles remain in battle.css
   (loaded only on Battle RCL routes). */

.battle-top-bar {
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
    border-bottom: 1px solid rgba(255, 200, 100, 0.2);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.battle-top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.battle-top-bar-center {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.battle-top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.battle-resource-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 0.85rem;
}

.battle-resource-item.gold {
    color: #ffb84d;
}

.battle-resource-item.energy {
    color: #4ade80;
}

.battle-sidebar {
    background: linear-gradient(135deg, #151a25 0%, #0f1419 100%);
    border: 1px solid rgba(255, 200, 100, 0.15);
    border-radius: 8px;
    padding: 1rem;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.battle-sidebar-section {
    margin-bottom: 1.5rem;
}

.battle-sidebar-title {
    color: #ffb84d;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 200, 100, 0.2);
}

.battle-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: #a0a8b8;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.battle-nav-item:hover {
    background: rgba(255, 200, 100, 0.1);
    color: #fff;
}

.battle-nav-item.active {
    background: rgba(255, 200, 100, 0.2);
    border: 1px solid rgba(255, 200, 100, 0.4);
    color: #ffb84d;
}

.battle-nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.battle-nav-item.active .battle-nav-icon {
    opacity: 1;
}

.battle-send-units {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 200, 100, 0.15);
    border-radius: 6px;
    padding: 0.75rem;
}

.battle-send-units-title {
    color: #ffb84d;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.battle-unit-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.battle-unit-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 200, 100, 0.2);
    border-radius: 4px;
    padding: 0.5rem;
    color: #fff;
    font-size: 0.9rem;
    text-align: center;
}

.battle-unit-input:focus {
    outline: none;
    border-color: #ffb84d;
    box-shadow: 0 0 8px rgba(255, 184, 77, 0.3);
}

.battle-btn-small {
    background: rgba(255, 200, 100, 0.2);
    border: 1px solid rgba(255, 200, 100, 0.3);
    color: #ffb84d;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 700;
}

.battle-btn-small:hover {
    background: rgba(255, 200, 100, 0.3);
    border-color: #ffb84d;
}

.battle-momentum-card {
    background: linear-gradient(135deg, #151a25 0%, #0f1419 100%);
    border: 1px solid rgba(255, 200, 100, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 992px) {
.battle-sidebar,
    .battle-right-panel {
        position: static;
    }
}

.battle-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.95) 0%, rgba(15, 20, 25, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.battle-top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.battle-flag-small {
    width: 24px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.battle-top-bar-center {
    display: flex;
    align-items: center;
    gap: 24px;
}

.battle-resource-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a0a8b8;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.battle-resource-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.battle-resource-item.gold {
    color: #fbbf24;
}

.battle-resource-item.energy {
    color: #10b981;
}

.battle-resource-icon {
    font-size: 14px;
}

.battle-top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.battle-utility-icon {
    color: #a0a8b8;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.battle-utility-icon:hover {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    transform: scale(1.1);
}

/* Hamburger — chrome lives here (battle.css is battle-route only). */
.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    padding: 0;
    width: 40px;
    height: 32px;
    margin-right: 12px;
    cursor: pointer;
    color: #e0e6ef;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sidebar-toggle-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.hamburger-icon {
    display: block;
    line-height: 1;
}

.battle-sidebar {
    width: 280px;
    background: linear-gradient(180deg, rgba(21, 26, 37, 0.95) 0%, rgba(15, 20, 25, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(59, 130, 246, 0.2);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.battle-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.battle-sidebar-title {
    color: #a0a8b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.battle-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #a0a8b8;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.battle-nav-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #e0e7ef;
}

.battle-nav-item.active {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.25) 0%, rgba(251, 191, 36, 0.15) 100%);
    border-left: 3px solid #fbbf24;
    color: #fbbf24;
    font-weight: 600;
    box-shadow: inset 0 0 15px rgba(251, 191, 36, 0.1), 0 2px 8px rgba(251, 191, 36, 0.2);
}

.battle-nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.battle-send-units-title {
    color: #a0a8b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.battle-send-units {
    background: rgba(15, 20, 25, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.battle-unit-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.battle-unit-input-label {
    color: #e0e7ef;
    font-size: 13px;
    font-weight: 500;
    min-width: 80px;
}

.battle-unit-input-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.battle-btn-small {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 4px;
    color: #e0e7ef;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.2s;
}

.battle-btn-small:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
    color: #fbbf24;
    transform: scale(1.05);
}

.battle-unit-input {
    flex: 1;
    background: rgba(10, 14, 26, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    color: #e0e7ef;
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s;
}

.battle-unit-input:focus {
    outline: none;
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
    background: rgba(10, 14, 26, 0.95);
}

.battle-momentum-card {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.85) 0%, rgba(15, 20, 25, 0.85) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.battle-error-container,
.battle-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: #e0e7ef;
}

.battle-error-message {
    font-size: 16px;
    margin-bottom: 20px;
}

.battle-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.battle-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e7ef;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.battle-btn-secondary:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
    color: #fbbf24;
}

@media (max-width: 1400px) {
.battle-sidebar {
        width: 240px;
    }
}

@media (max-width: 1200px) {
.battle-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    }
}

.withdraw-btn-compact {
    margin-top: 8px;
    padding: 6px 10px;
    font-size: 11px;
}

.withdraw-btn {
    width: 100%;
    margin-top: 14px;
    padding: 10px 16px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.withdraw-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.6);
    transform: translateY(-1px);
}

.withdraw-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.global-deployments-bar-spacer {
    flex-shrink: 0;
    min-height: 0;
}

.global-deployments-bar {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(180deg, rgba(15, 20, 30, 0.98) 0%, rgba(10, 14, 26, 0.98) 100%);
    border-bottom: 1px solid rgba(34, 197, 94, 0.28);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.global-deployments-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    margin: 3px 10px;
    padding: 4px 8px 4px 10px;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(34, 197, 94, 0.45);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s, background 0.2s;
}

.global-deployments-summary:hover {
    background: rgba(0, 0, 0, 0.55);
    border-color: rgba(34, 197, 94, 0.65);
}

.global-deployments-summary-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.global-deployments-summary-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #4ade80;
}

.global-deployments-summary-text {
    display: flex;
    align-items: center;
    min-width: 0;
}

.global-deployments-summary-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f1f5f9;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-deployments-summary-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.global-deployments-summary-timers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.global-deployments-timer-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-family: inherit;
    cursor: pointer;
    line-height: 1;
}

.global-deployments-timer-chip:hover {
    color: #4ade80;
}

.global-deployments-timer-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.55);
    flex-shrink: 0;
}

.global-deployments-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    flex-shrink: 0;
}

.global-deployments-chevron:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}

.global-deployments-chevron-icon {
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform 0.2s ease;
}

.global-deployments-bar.is-expanded .global-deployments-chevron-icon {
    transform: rotate(225deg) translate(-1px, -1px);
}

.global-deployments-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px 8px;
}

.global-deployment-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
}

.global-deployment-row:hover {
    background: rgba(0, 0, 0, 0.45);
    border-color: rgba(34, 197, 94, 0.4);
}

.global-deployment-row-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.08));
    pointer-events: none;
    min-width: 2px;
}

.global-deployment-row-content {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
    padding: 0 12px;
    flex: 1;
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
}

.global-deployment-battle-info {
    flex-shrink: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    max-width: 240px;
}

.global-deployment-battle-label {
    font-size: 12px;
    font-weight: 600;
    color: #e0e7ef;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-deployment-region {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.global-deployment-stats-inline {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.global-deployment-stat {
    flex-shrink: 0;
    font-size: 11px;
    color: #cbd5e1;
    white-space: nowrap;
}

.global-deployment-stat-dpm {
    color: #4ade80;
    font-weight: 600;
}

.global-deployment-stat-xp {
    color: #a855f7;
}

.global-deployment-stat-general {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.global-deployment-general-icon {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    object-fit: contain;
    flex-shrink: 0;
}

.global-deployment-withdraw-wrap {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}

.withdraw-btn-inline {
    flex: 0 0 auto;
    width: auto;
    min-width: fit-content;
    margin: 0;
    padding: 5px 10px;
    font-size: 11px;
    line-height: 1;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.withdraw-btn-inline:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.6);
}

.withdraw-btn-inline:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.app-main-container {
    min-height: 100vh;
    background: #0a0e1a;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(59, 130, 246, 0.03) 2px, rgba(59, 130, 246, 0.03) 4px), repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(59, 130, 246, 0.03) 2px, rgba(59, 130, 246, 0.03) 4px), url("/images/battle-background.webp");
    background-size: auto, auto, cover;
    background-position: 0 0, 0 0, center center;
    background-repeat: repeat, repeat, no-repeat;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.app-bg-overlay {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px; 
    background: #0f1419;
    z-index: 20000; 
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.7);
    border-right: 1px solid rgba(59, 130, 246, 0.3);
    
    transform: translateX(-100%); 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-wrapper.open {
        transform: translateX(0); 
    }

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 19000; 
    opacity: 0;
    pointer-events: none; 
    transition: opacity 0.3s ease;
}

.sidebar-overlay.visible {
        opacity: 1;
        pointer-events: auto; 
    }

.main-content-area {
    margin-left: 0 !important;
    width: 100% !important;
    padding-top: 50px; 
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.battle-top-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important; 
    right: 0 !important;
    height: 50px;
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.95) 0%, rgba(15, 20, 25, 0.95) 100%);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 10000 !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.battle-top-bar-left,
.battle-top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.battle-top-bar-center {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
    max-width: calc(100vw - 600px);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.battle-top-bar-center::-webkit-scrollbar {
        display: none;
    }

.battle-sidebar {
    width: 100%; 
    height: 100%;
    
    background: linear-gradient(180deg, rgba(21, 26, 37, 0.95) 0%, rgba(15, 20, 25, 0.95) 100%);
    
    border: none;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

.battle-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.battle-sidebar-title {
    color: #60a5fa; 
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 8px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    user-select: none;
}

.battle-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #a0a8b8;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid transparent;
    text-decoration: none !important;
}

.battle-nav-item:hover {
        background: rgba(59, 130, 246, 0.15);
        color: #e0e7ef;
        transform: translateX(4px);
        border-color: rgba(59, 130, 246, 0.3);
    }

.battle-nav-item.active {
        background: linear-gradient(90deg, rgba(251, 191, 36, 0.25) 0%, rgba(251, 191, 36, 0.12) 100%);
        border-left: 4px solid #fbbf24;
        color: #fbbf24;
        font-weight: 700;
        box-shadow: inset 0 0 20px rgba(251, 191, 36, 0.15), 0 4px 12px rgba(251, 191, 36, 0.25);
    }

.battle-nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.battle-nav-text {
    display: block !important; 
    opacity: 1 !important;
}

.battle-flag-small {
    width: 28px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.battle-flag-small.poland {
        background: linear-gradient(to bottom, #dc143c 0%, #dc143c 50%, #fff 50%, #fff 100%);
    }

.battle-resource-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a0a8b8;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s;
    cursor: default;
    white-space: nowrap;
    flex-shrink: 0;
}

.battle-resource-item.gold {
        color: #fbbf24;
        border: 1px solid rgba(251, 191, 36, 0.2);
    }

.battle-resource-item.energy {
        color: #10b981;
        border: 1px solid rgba(16, 185, 129, 0.2);
    }

.battle-resource-icon {
    font-size: 14px;
    display: inline-block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.battle-utility-icon {
    color: #a0a8b8;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.battle-utility-icon:hover {
        color: #fbbf24;
        background: rgba(251, 191, 36, 0.15);
        transform: scale(1.15);
    }

.battle-send-units-title {
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.battle-send-units {
    background: linear-gradient(135deg, rgba(15, 20, 35, 0.60) 0%, rgba(10, 14, 26, 0.60) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.battle-unit-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.battle-unit-input-label {
    color: #e0e7ef;
    font-size: 13px;
    font-weight: 600;
    min-width: 85px;
}

.battle-btn-small {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 6px;
    color: #e0e7ef;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: 800;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.battle-btn-small:hover {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(245, 158, 11, 0.2) 100%);
        border-color: #fbbf24;
        color: #fbbf24;
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    }

.battle-btn-small:active {
        transform: scale(0.95);
    }

.battle-unit-input {
    flex: 1;
    background: rgba(10, 14, 26, 0.70);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 6px;
    color: #e0e7ef;
    padding: 10px 14px;
    font-size: 14px;
    text-align: center;
    font-weight: 700;
    transition: all 0.2s;
}

.battle-unit-input:focus {
        outline: none;
        border-color: #fbbf24;
        box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25);
        background: rgba(10, 14, 26, 1);
    }

.battle-unit-input::-webkit-inner-spin-button,
    .battle-unit-input::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.battle-momentum-card {
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.70) 0%, rgba(15, 20, 25, 0.70) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.battle-unit-input-slider {
    flex: 1;
    background: rgba(10, 14, 26, 0.70);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 6px;
    color: #e0e7ef;
    padding: 6px 10px;
    font-size: 12px;
    text-align: center;
    font-weight: 700;
    transition: all 0.2s;
    width: 80px;
}

.battle-unit-input-slider:focus {
        outline: none;
        border-color: #fbbf24;
        box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25);
        background: rgba(10, 14, 26, 1);
    }

.battle-unit-input-slider::-webkit-inner-spin-button,
    .battle-unit-input-slider::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.battle-btn-max {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.2) 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 6px;
    color: #60a5fa;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.battle-btn-max:hover {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(37, 99, 235, 0.3) 100%);
        border-color: rgba(59, 130, 246, 0.7);
        color: #93c5fd;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    }

.battle-btn-max:active {
        transform: translateY(0);
    }

.battle-error-container,
.battle-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: #e0e7ef;
    background: #0a0e1a;
}

.battle-error-message {
    font-size: 18px;
    margin-bottom: 24px;
    font-weight: 600;
}

.battle-btn-secondary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #e0e7ef;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.battle-btn-secondary:hover {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.25) 0%, rgba(245, 158, 11, 0.18) 100%);
        border-color: #fbbf24;
        color: #fbbf24;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(251, 191, 36, 0.3);
    }

.battle-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.battle-sidebar::-webkit-scrollbar,
.battle-content::-webkit-scrollbar {
    width: 10px;
}

.battle-sidebar::-webkit-scrollbar-track,
.battle-content::-webkit-scrollbar-track {
    background: rgba(15, 20, 35, 0.5);
    border-radius: 5px;
}

.battle-sidebar::-webkit-scrollbar-thumb,
.battle-content::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.4);
    border-radius: 5px;
    border: 2px solid rgba(15, 20, 35, 0.5);
}

.battle-sidebar::-webkit-scrollbar-thumb:hover,
    .battle-content::-webkit-scrollbar-thumb:hover {
        background: rgba(251, 191, 36, 0.6);
    }

.battle-create-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.battle-create-form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
.battle-create-form-row {
        grid-template-columns: 1fr;
    }
}

.battle-create-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.battle-create-form-label {
    color: #a0a8b8;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.battle-create-form-select {
    background: rgba(10, 14, 26, 0.70);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    color: #e0e7ef;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.battle-create-form-select:focus {
        outline: none;
        border-color: #fbbf24;
        box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25);
        background: rgba(10, 14, 26, 1);
    }

.battle-create-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.battle-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.battle-list-empty-message {
    color: #a0a8b8;
    font-size: 16px;
    margin-bottom: 20px;
}

.battle-list-section {
    margin-bottom: 32px;
}

.battle-list-section-title {
    color: #e0e7ef;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.battle-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.battle-list-item {
    background: var(--cg-surface-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--cg-surface-border);
    border-radius: var(--cg-surface-radius);
    padding: 12px 16px;
    box-shadow: var(--cg-surface-shadow);
    cursor: pointer;
    transition: transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
    width: 100%;
}

.battle-list-item:hover {
        transform: translateY(-2px);
        border-color: var(--cg-surface-border-hover);
        box-shadow: var(--cg-surface-shadow-hover);
    }

.battle-list-item-row {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.battle-list-item-flags-section {
    display: flex;
    align-items: center;
    min-width: 200px;
    flex-shrink: 0;
}

.battle-list-item-title-text {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e7ef;
    font-size: 14px;
    font-weight: 700;
}

.battle-list-country-with-flag {
    display: flex;
    align-items: center;
    gap: 8px;
}

.battle-list-flag-img {
    width: 24px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.battle-list-country-name {
    color: #e0e7ef;
    white-space: nowrap;
}

.battle-list-separator {
    color: #6b7280;
    font-weight: 500;
    font-size: 12px;
    margin: 0 4px;
}

.battle-list-item-region-section {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a0a8b8;
    font-size: 13px;
    font-weight: 500;
    min-width: 120px;
    flex-shrink: 0;
}

.battle-list-region-icon {
    font-size: 14px;
}

.battle-list-item-stat-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
    flex: 1;
}

.battle-list-stat-label {
    color: #6b7280;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.battle-list-stat-label-small {
    color: #6b7280;
    font-size: 9px;
    font-weight: 500;
}

.battle-list-stat-value {
    color: #fbbf24;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.battle-list-item-status-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 140px;
    flex-shrink: 0;
}

.battle-list-time {
    color: #6b7280;
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 768px) {
.battle-top-bar {
        padding: 0 8px !important; 
        height: 56px; 
    }

.battle-top-bar-center {
        gap: 4px; 
        padding: 0 2px;
        justify-content: center; 
        flex-wrap: nowrap; 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch;
        mask-image: linear-gradient(to right, transparent, black 10px, black 90%, transparent); 
    }

.battle-resource-item {
        font-size: 10px; 
        padding: 2px 6px; 
        gap: 4px; 
        min-width: auto; 
        height: 24px; 
    }

.battle-resource-icon {
        font-size: 12px; 
    }

.battle-list-item-row {
        flex-wrap: wrap;
        gap: 12px;
    }

.battle-list-item-flags-section {
        min-width: 100%;
        order: 1;
    }

.battle-list-item-region-section {
        min-width: auto;
        order: 2;
    }

.battle-list-item-stat-section {
        min-width: calc(50% - 6px);
        order: 3;
    }

.battle-list-item-status-section {
        min-width: 100%;
        order: 4;
        align-items: flex-start;
    }

.battle-list-item-title-text {
        font-size: 12px;
    }
}

.layout-pc {
    display: flex;
    min-height: 100vh;
}

.layout-pc .sidebar-wrapper {
    width: 300px;
    transform: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 20000;
}

.layout-pc.sidebar-collapsed .sidebar-wrapper {
    transform: translateX(-100%);
}

.layout-pc .sidebar-overlay {
    display: none;
}

.layout-pc .main-content-pc {
    margin-left: 300px !important;
    width: calc(100% - 300px) !important;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.layout-pc.sidebar-collapsed .main-content-pc {
    margin-left: 0 !important;
    width: 100% !important;
}

.layout-pc .top-bar-pc {
    left: 300px !important;
    width: calc(100% - 300px) !important;
}

.layout-pc.sidebar-collapsed .top-bar-pc {
    left: 0 !important;
    width: 100% !important;
}

.layout-pc .global-deployments-bar {
    left: 300px !important;
    right: auto !important;
    width: calc(100% - 300px) !important;
}

.layout-pc.sidebar-collapsed .global-deployments-bar {
    left: 0 !important;
    width: 100% !important;
}

.layout-pc .main-content-below-bars {
    flex: 1;
    padding: 12px 32px 28px;
    overflow-y: auto;
    margin-top: 50px;
}

.game-logo-chip {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(7, 12, 20, 0.72);
    border: 1px solid rgba(96, 165, 250, 0.2);
    cursor: pointer;
}

.game-logo-img {
    height: 28px;
    width: auto;
    display: block;
}

.player-power-chip {
    color: #facc15;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(250, 204, 21, 0.35);
    background: rgba(250, 204, 21, 0.12);
}

.battle-resource-item.local-currency {
    border-color: rgba(96, 165, 250, 0.35);
}

.top-menu-label {
    margin-right: 6px;
    margin-bottom: 0;
    font-size: 10px;
}

@media (max-width: 1199px) {
.layout-pc .sidebar-wrapper {
        width: 300px;
        transform: translateX(-100%);
    }

.layout-pc.sidebar-expanded .sidebar-wrapper {
        transform: translateX(0);
    }

.layout-pc .main-content-pc,
    .layout-pc.sidebar-collapsed .main-content-pc {
        margin-left: 0 !important;
        width: 100% !important;
    }

.layout-pc .top-bar-pc,
    .layout-pc.sidebar-collapsed .top-bar-pc {
        left: 0 !important;
        width: 100% !important;
    }

.layout-pc .global-deployments-bar,
    .layout-pc.sidebar-collapsed .global-deployments-bar {
        left: 0 !important;
        width: 100% !important;
    }

.layout-pc .sidebar-overlay {
        display: block;
    }

.game-logo-img {
        height: 22px;
    }
}

.sidebar-brand-card {
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(67, 20, 7, 0.85) 0%, rgba(18, 28, 41, 0.9) 100%);
    padding: 3px 6px;
    width: fit-content;
    margin: 0 auto;
    text-align: center;
    cursor: pointer;
}

.sidebar-brand-logo {
    color: #f8d08a;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.sidebar-brand-logo-image {
    width: auto;
    max-width: 100%;
    max-height: 56px;
    height: auto;
    display: block;
    border-radius: 6px;
}

.sidebar-profile-card {
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 12px;
    padding: 8px 10px;
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.82) 0%, rgba(17, 24, 39, 0.9) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-avatar-box {
    width: 64px;
    height: 64px;
    border-radius: 0;
    overflow: hidden;
    margin: 0 auto 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.sidebar-avatar-img,
.sidebar-avatar-placeholder {
    width: 100%;
    height: 100%;
}

.sidebar-avatar-img {
    object-fit: cover;
}

.sidebar-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 24px;
    color: #e5e7eb;
}

.sidebar-player-name {
    color: #f3f4f6;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 1px;
    line-height: 1.2;
}

.sidebar-player-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #d1d5db;
    font-size: 11px;
    margin-bottom: 6px;
}

.sidebar-country-flag {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.sidebar-level-row {
    display: flex;
    justify-content: space-between;
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.sidebar-level-track {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.18);
    margin-bottom: 10px;
}

.sidebar-level-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.sidebar-resource-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.7);
}

.sidebar-resource-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    line-height: 1.2;
    color: #e5e7eb;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 3px 8px;
    min-height: 24px;
}

.sidebar-resource-row.gold {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.08);
}

.sidebar-resource-row.influence {
    color: #ddd6fe;
}

.sidebar-resource-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.sidebar-resource-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-menu-section {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding-top: 10px;
}

.sidebar-menu-section .battle-nav-item {
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.28);
    padding: 12px 8px;
}

.sidebar-menu-section .battle-nav-item:hover {
    transform: none;
    background: rgba(37, 99, 235, 0.2);
}

.sidebar-menu-section .battle-nav-item.active {
    border-left: 0;
    border-bottom-color: rgba(147, 197, 253, 0.5);
    box-shadow: none;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.4) 0%, rgba(59, 130, 246, 0.2) 100%);
    color: #dbeafe;
}

.sidebar-menu-section .battle-nav-item--icon-only {
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
}

.sidebar-menu-section button.battle-nav-item {
    width: 100%;
    text-align: left;
    
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    color: inherit;
    cursor: pointer;
}

.sidebar-menu-section button.battle-nav-item--icon-only {
    text-align: center;
}

.sidebar-nav-tree {
    display: flex;
    flex-direction: column;
}

.sidebar-menu-section .sidebar-nav-tree > .sidebar-nav-tree-toggle {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.sidebar-nav-tree-toggle .sidebar-nav-tree-chevron {
    display: inline-block;
    width: 0.45em;
    height: 0.45em;
    margin-left: auto;
    margin-right: 2px;
    flex-shrink: 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
    opacity: 0.75;
}

.sidebar-nav-tree-toggle {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

.battle-nav-icon .sidebar-nav-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.sidebar-nav-tree-toggle--open .sidebar-nav-tree-chevron {
    transform: rotate(45deg);
    margin-top: -2px;
}

.sidebar-nav-tree-children {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.42);
    box-shadow: inset 3px 0 0 rgba(59, 130, 246, 0.25);
}

.sidebar-menu-section .battle-nav-item--tree-child {
    padding-left: 18px;
    font-size: 12.5px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.sidebar-menu-section .battle-nav-item--tree-child:last-child {
    border-bottom: none;
}

.battle-nav-icon--with-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.battle-nav-icon-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.85);
}

.battle-nav-icon-badge--gold {
    background: #ffc928;
    box-shadow: 0 0 6px rgba(255, 180, 0, 0.9);
}

.battle-nav-notify-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffc928;
    border: 1.5px solid #1a1f2e;
    box-shadow: 0 0 6px rgba(255, 180, 0, 0.9);
    pointer-events: none;
}

.battle-nav-count-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    color: #1a1200;
    background: #ffc928;
    border: 1px solid #1a1f2e;
    box-shadow: 0 0 8px rgba(255, 180, 0, 0.75);
}

.battle-nav-count-badge--gold {
    color: #1a1200;
    background: linear-gradient(180deg, #ffe45c 0%, #ffc928 55%, #d99500 100%);
}

.battle-nav-count-badge--danger {
    color: #fff;
    background: linear-gradient(180deg, #ff6b6b 0%, #e11d2e 55%, #b91c1c 100%);
    box-shadow: 0 0 8px rgba(225, 29, 46, 0.75);
    letter-spacing: 0.02em;
}

.mu-nav-order-pill {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.7);
    background: rgba(220, 38, 38, 0.22);
    color: #fca5a5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    vertical-align: middle;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.35);
}

.research-nav-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 999px;
    border: 1px solid rgba(52, 211, 153, 0.5);
    background: rgba(16, 185, 129, 0.14);
    color: #86efac;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.generals-nav-skill-pill {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 201, 40, 0.7);
    background: rgba(255, 180, 0, 0.22);
    color: #ffe45c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    vertical-align: middle;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(255, 180, 0, 0.35);
}

.research-nav-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.85);
    flex: 0 0 auto;
}

.buildings-nav-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
}

.buildings-nav-status-dot--boost {
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.85);
    margin-left: 0;
}

.buildings-nav-status-dot--prod {
    background: #60a5fa;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.85);
}

.buildings-nav-status-dot--busy {
    background: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.85);
    margin-left: 0;
}

.buildings-nav-boost-pill,
.buildings-nav-busy-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 8px;
    padding: 1px 6px 1px 5px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: nowrap;
    vertical-align: middle;
}

.buildings-nav-boost-pill {
    border: 1px solid rgba(52, 211, 153, 0.5);
    background: rgba(16, 185, 129, 0.14);
    color: #86efac;
}

.buildings-nav-busy-pill {
    border: 1px solid rgba(248, 113, 113, 0.55);
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
}

.sidebar-tutorial-dock {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 200, 100, 0.22);
    border-radius: 10px;
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.sidebar-tutorial-dock > .battle-sidebar-title:first-child {
    margin-top: 0;
}

.sidebar-tutorial-dock-muted {
    font-size: 12px;
    line-height: 1.35;
    color: rgba(148, 163, 184, 0.95);
    margin: 0;
}

.sidebar-tutorial-dock-retry {
    margin-top: 8px;
    width: 100%;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(96, 165, 250, 0.45);
    background: rgba(30, 58, 138, 0.35);
    color: #e2e8f0;
    cursor: pointer;
}

.sidebar-tutorial-dock-retry:hover {
    border-color: rgba(147, 197, 253, 0.65);
    color: #f8fafc;
}

/* Sidebar missions (EnhancedNavMenu) — must live in shell, not battle.css */
.sidebar-missions-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    border-radius: 10px;
    transition: box-shadow 0.25s ease, background 0.25s ease, outline-color 0.25s ease;
}

.sidebar-missions-hint {
    margin: 0 0 8px;
    font-size: 11px;
    line-height: 1.4;
    color: rgba(148, 163, 184, 0.95);
}

.sidebar-missions-section--highlight {
    padding-left: 6px;
    padding-right: 6px;
    padding-bottom: 6px;
    background: rgba(251, 191, 36, 0.12);
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.55), 0 0 18px rgba(251, 191, 36, 0.22);
    animation: sidebar-missions-pulse 1.1s ease-in-out 3;
}

@keyframes sidebar-missions-pulse {
    0%, 100% {
        box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.45), 0 0 10px rgba(251, 191, 36, 0.12);
    }
    50% {
        box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.85), 0 0 22px rgba(251, 191, 36, 0.35);
    }
}

.sidebar-missions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.sidebar-missions-grid--tiles {
    grid-template-columns: repeat(3, 48px);
    gap: 6px;
    justify-content: start;
}

.sidebar-mission-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-height: 76px;
    padding: 6px 6px 28px;
    border-radius: 8px;
    border: 1px solid rgba(100, 116, 139, 0.35);
    background: rgba(15, 23, 42, 0.55);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

button.sidebar-mission-tile {
    font: inherit;
    color: inherit;
    width: 100%;
}

button.sidebar-mission-tile.sidebar-mission-tile--icon-only {
    width: 48px;
    height: 48px;
    padding: 0;
    line-height: 0;
    appearance: none;
    -webkit-appearance: none;
}

.sidebar-mission-tile--icon-only {
    display: block;
    min-height: 0;
    padding: 0;
    gap: 0;
    border: 2px solid rgba(148, 163, 184, 0.45);
    background: transparent;
    width: 48px;
    height: 48px;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    box-sizing: border-box;
    line-height: 0;
}

.sidebar-mission-tile-icon-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    background: transparent;
    display: block;
}

.sidebar-mission-tile-ready-dot {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.85);
    border: 2px solid rgba(15, 23, 42, 0.92);
    pointer-events: none;
}

.sidebar-mission-tile-head {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    width: 100%;
}

.sidebar-mission-tile-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(2, 6, 23, 0.35);
}

.sidebar-mission-tile-head-text {
    flex: 1;
    min-width: 0;
}

.sidebar-mission-tile:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(96, 165, 250, 0.45);
}

.sidebar-mission-tile--locked {
    opacity: 0.72;
}

.sidebar-mission-tile--active {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.sidebar-mission-tile--ready {
    border-color: rgba(34, 197, 94, 0.65);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25);
}

.sidebar-mission-tile--icon-only:hover {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.75);
    filter: brightness(1.08);
}

.sidebar-mission-tile--icon-only:hover:not(.sidebar-mission-tile--ready):not(.sidebar-mission-tile--active) {
    box-shadow: none;
}

.sidebar-mission-tile--icon-only.sidebar-mission-tile--active {
    border-color: rgba(59, 130, 246, 0.85);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.sidebar-mission-tile--icon-only.sidebar-mission-tile--ready {
    border-color: rgba(34, 197, 94, 0.85);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.sidebar-mission-tile-num {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
}

.sidebar-mission-tile-title {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    color: #e2e8f0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-mission-tile-status {
    font-size: 10px;
    color: rgba(148, 163, 184, 0.9);
}

.sidebar-mission-claim-btn {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 4px;
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid rgba(34, 197, 94, 0.55);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.35), rgba(22, 163, 74, 0.45));
    color: #ecfdf5;
    cursor: pointer;
}

.sidebar-mission-claim-btn:hover:not(:disabled) {
    filter: brightness(1.08);
}

.sidebar-mission-claim-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sidebar-mission-claim-btn--inline {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 6px 10px;
    font-size: 11px;
}

.sidebar-mission-detail-lead {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(203, 213, 225, 0.95);
    margin: 0 0 14px;
}

.sidebar-mission-detail-block {
    margin-bottom: 12px;
}

.sidebar-mission-detail-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
    margin-bottom: 6px;
}

.sidebar-mission-detail-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(226, 232, 240, 0.92);
}

.sidebar-mission-detail-list li {
    margin-bottom: 4px;
}

.sidebar-mission-detail-rewards {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(250, 204, 21, 0.95);
}

.sidebar-mission-detail-status {
    font-size: 11px;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.95);
    margin: 0 0 12px;
}

.sidebar-mission-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sidebar-missions-show-all-btn {
    margin-top: 8px;
    width: 100%;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.45);
    color: #cbd5e1;
    cursor: pointer;
}

.sidebar-missions-show-all-btn:hover {
    border-color: rgba(96, 165, 250, 0.5);
    color: #e2e8f0;
}

.sidebar-missions-modal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-missions-modal-list--compact {
    max-height: min(48vh, 360px);
}

.sidebar-missions-modal-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 10px;
    border-radius: 10px;
    border: 1px solid rgba(51, 65, 85, 0.55);
    background: rgba(15, 23, 42, 0.5);
}

.sidebar-missions-modal-row-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.35);
}

.sidebar-missions-modal-row-main {
    flex: 1 1 160px;
    min-width: 0;
}

.sidebar-missions-modal-row-title {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.sidebar-missions-modal-row-desc {
    font-size: 12px;
    line-height: 1.35;
    color: rgba(148, 163, 184, 0.95);
    margin-bottom: 4px;
}

.sidebar-missions-modal-row-status {
    font-size: 11px;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.95);
}

.sidebar-missions-modal-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    align-self: center;
}

.sidebar-missions-modal-open-page {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(96, 165, 250, 0.45);
    background: rgba(37, 99, 235, 0.25);
    color: #dbeafe;
    cursor: pointer;
}

.sidebar-missions-modal-open-page:hover {
    background: rgba(37, 99, 235, 0.4);
}
