/* =========================================
   COMBAT TERMINAL STYLING
   ========================================= */

.combat-page {
    background-color: #05070a;
}
.combat-vignette {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, transparent 45%, rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
    z-index: 0;
}

.combat-layout-fixed {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px 70px;
    gap: 48px;
    position: relative;
    z-index: 2;
}

.tactical-sidebar-final {
    width: 260px;
    position: sticky;
    top: 100px;
    height: fit-content;
    background: rgba(8, 12, 20, 0.75);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid #2a2f3d;
    padding: 24px 16px;
}

.sidebar-label {
    font-size: 10px;
    letter-spacing: 3px;
    color: #8a94a8;
    border-bottom: 1px solid #2a2f3d;
    padding-bottom: 8px;
    margin-bottom: 24px;
}

.category-list-final {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list-final li {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e0e0e0;
}

.category-list-final li .code {
    color: #c9a063;
    font-family: monospace;
    font-weight: 600;
}

.category-list-final li:hover,
.category-list-final li.active {
    background: rgba(201, 160, 99, 0.12);
    border-color: #c9a063;
    transform: translateX(6px);
}

.category-list-final li.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.content-stream-final {
    flex: 1;
}

.status-dashboard-final {
    display: flex;
    gap: 24px;
    background: rgba(13, 17, 27, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid #2a2f3d;
    border-radius: 20px;
    padding: 20px 28px;
    margin-bottom: 32px;
}

.dash-item {
    flex: 1;
}

.dash-item label {
    display: block;
    font-size: 11px;
    letter-spacing: 1.5px;
    color: #8a94a8;
    margin-bottom: 6px;
}

.dash-item .value {
    font-size: 28px;
    font-weight: 800;
    font-family: monospace;
    color: #c9a063;
}

.value.warning {
    color: #ff4d4d;
}

.log-entry-final {
    background: #0d1117;
    border: 1px solid #2a2f3d;
    border-radius: 20px;
    margin-bottom: 24px;
    padding: 24px 28px;
    position: relative;
}

.log-entry-final::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: #c9a063;
    border-radius: 20px 0 0 20px;
}

.log-entry-final.critical-card::before {
    background: #ff4d4d;
}

.log-header {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
    font-family: monospace;
    font-size: 12px;
}

.log-id {
    color: #c9a063;
}

.log-date {
    color: #8a94a8;
}

.tag {
    background: #1a1f2e;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 10px;
}

.tag.danger-tag {
    background: rgba(255, 77, 77, 0.2);
    color: #ff4d4d;
}

.log-body h3 {
    font-size: 1.5rem;
    margin: 0 0 12px 0;
    color: #f0f3fc;
}

.log-body p {
    color: #b4c0da;
    margin-bottom: 16px;
}

.mini-data-flex {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 16px 0 8px;
}

.data-point {
    background: rgba(201, 160, 99, 0.1);
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 12px;
    color: #c9a063;
}

.log-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 12px;
    text-decoration: none;
    color: #8a94a8;
    border-bottom: 1px solid #8a94a8;
}

.log-link:hover {
    color: #fff;
    border-bottom-color: #c9a063;
}

.end-of-data {
    text-align: center;
    padding: 48px 20px;
    color: #8a94a8;
    font-size: 12px;
    border-top: 1px dashed #2a2f3d;
}

@media (max-width: 880px) {
    .combat-layout-fixed {
        flex-direction: column;
        padding: 20px 16px;
    }
    .tactical-sidebar-final {
        width: 100%;
        position: static;
    }
    .status-dashboard-final {
        flex-direction: column;
    }
}

.log-entry-final.viewed {
    opacity: 0.85;
}

.log-entry-final.viewed::before {
    background: #2ecc71;
}

.log-entry-final.viewed .log-link {
    color: #2ecc71;
    border-bottom-color: #2ecc71;
}

.read-badge {
    margin-left: auto;
    font-size: 10px;
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.15);
    padding: 2px 8px;
    border-radius: 20px;
}

.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #c9a063, #8b6b3a);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(201, 160, 99, 0.4);
    background: linear-gradient(135deg, #d4ae6e, #9b7a45);
}

.back-to-top .arrow-up {
    font-size: 24px;
    font-weight: bold;
    color: #000;
    line-height: 1;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
    .back-to-top .arrow-up {
        font-size: 20px;
    }
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    background: #0f121b;
    border: 1px solid #2a2f3d;
    border-radius: 12px;
    padding: 12px 20px;
}
.search-field {
    flex: 1;
    background: transparent;
    border: none;
    color: #b0bedb;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
}
.search-field::placeholder { color: #4a5060; }
.tag-select {
    background: #05070a;
    border: 1px solid #2a2f3d;
    border-radius: 8px;
    color: #b0bedb;
    font-size: 0.8rem;
    padding: 6px 12px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}
.tag-select:focus { border-color: #c9a063; }
.filter-count {
    color: #6a7080;
    font-size: 0.75rem;
    white-space: nowrap;
}
.sort-select {
    background: #05070a;
    border: 1px solid #2a2f3d;
    border-radius: 8px;
    color: #b0bedb;
    font-size: 0.8rem;
    padding: 6px 12px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}
.sort-select:focus { border-color: #c9a063; }
.fav-filter-btn {
    background: #05070a;
    border: 1px solid #2a2f3d;
    border-radius: 8px;
    color: #c9a063;
    font-size: 1rem;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
}
.fav-filter-btn:hover { border-color: #c9a063; }
.fav-filter-btn.active { background: rgba(201,160,99,0.15); border-color: #c9a063; }
.random-btn {
    background: #05070a;
    border: 1px solid #2a2f3d;
    border-radius: 8px;
    color: #c9a063;
    font-size: 1rem;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
}
.random-btn:hover { border-color: #c9a063; background: rgba(201,160,99,0.1); }
.random-btn:active { transform: scale(0.95); }
.fav-star {
    cursor: pointer;
    font-size: 1.1rem;
    color: #6a7080;
    transition: color 0.2s;
    margin-left: auto;
}
.fav-star:hover { color: #c9a063; }
.log-header .fav-star { margin-left: auto; order: 1; }
.log-header .read-badge { order: 2; }
.recent-section {
    background: #0d1117;
    border: 1px solid #2a2f3d;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    letter-spacing: 2px;
    color: #8a94a8;
}
.recent-toggle {
    background: none;
    border: 1px solid #2a2f3d;
    border-radius: 6px;
    color: #8a94a8;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 10px;
}
.recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.recent-chip {
    background: rgba(201,160,99,0.1);
    border: 1px solid #2a2f3d;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 11px;
    color: #c9a063;
    cursor: pointer;
    transition: all 0.2s;
}
.recent-chip:hover { background: rgba(201,160,99,0.2); border-color: #c9a063; }
@media (max-width: 700px) {
    .search-bar { flex-wrap: wrap; }
    .tag-select { width: 100%; }
    .sort-select { width: 100%; }
    .fav-filter-btn { width: 100%; }
    .filter-count { width: 100%; text-align: right; }
}
