:root {
    --bg-dark: #060709;
    --panel-bg: #0b0c0e;
    --card-bg: #111317;
    --card-border: #1c2026;
    --accent-orange: #d85c00;
    --accent-orange-bright: #ff6a00;
    --text-main: #e1e4e8;
    --text-muted: #747b85;
    --card-selected-border: #e0e4ea;
    --font-hud: 'Chakra Petch', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-hud);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
}

/* --- BARRA DE NAVEGACIÓN --- */
.top-nav {
    width: 100%;
    max-width: 1400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0d0f12;
    padding: 10px 20px;
    border: 1px solid #1c2026;
    margin-bottom: 15px;
}

.brand-link {
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-orange-bright);
    text-decoration: none;
}

.main-menu {
    display: flex;
    gap: 8px;
}

.nav-btn {
    background: transparent;
    border: 1px solid #282e38;
    color: var(--text-muted);
    padding: 8px 20px;
    font-family: var(--font-hud);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: 0.2s;
}

.nav-btn:hover {
    color: #fff;
    border-color: #4a5464;
}

.nav-btn.active {
    background: var(--accent-orange);
    color: #fff;
    border-color: var(--accent-orange-bright);
}

/* --- ESTILOS DE LA HOME (index.php) --- */
.home-viewport {
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px 0;
}

.home-header {
    border-bottom: 1px solid #1f242d;
    padding-bottom: 15px;
}

.hud-status {
    color: var(--accent-orange-bright);
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-weight: 700;
}

.home-header h1 {
    font-size: 1.8rem;
    letter-spacing: 2px;
    margin-top: 5px;
}

.category-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.category-card {
    background: #0b0c0e;
    border: 1px solid #1c2026;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    position: relative;
    transition: all 0.2s ease;
}

.category-card:hover {
    border-color: var(--accent-orange-bright);
    background: #111318;
}

.card-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1px;
}

.card-content h2 {
    font-size: 2.2rem;
    color: #fff;
    margin: 10px 0;
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.sub-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sub-list span {
    background: #161920;
    border: 1px solid #232832;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #a0a8b4;
}

.card-action {
    color: var(--accent-orange-bright);
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 20px;
}

/* --- ESTRUCTURA WIKI (vehiculos.php y objetos.php) --- */
.wiki-viewport {
    display: flex;
    width: 100%;
    max-width: 1400px;
    background-color: var(--panel-bg);
    border: 1px solid #181b20;
    padding: 15px;
    gap: 15px;
    min-height: 680px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 10px;
    border-right: 1px solid #1a1e24;
}

.sidebar-brand h2 {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #242932;
    white-space: nowrap;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-bar {
    display: flex;
    gap: 4px;
}

.icon-btn, .filter-tab {
    background: #111317;
    color: var(--text-muted);
    border: 1px solid #1f242c;
    padding: 5px 12px;
    font-family: var(--font-hud);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
}

.filter-tab.active {
    background: var(--accent-orange);
    color: #fff;
    border-color: var(--accent-orange-bright);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    max-height: 600px;
    overflow-y: auto;
}

/* CARDS DE LA REJILLA */
.item-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.item-card.selected {
    border: 1px solid var(--card-selected-border);
}

.card-dots {
    position: absolute;
    top: 4px;
    left: 4px;
    display: flex;
    gap: 2px;
}

.card-dots span {
    width: 3px;
    height: 3px;
    background: #2a303c;
}

.item-card.selected .card-dots span {
    background: var(--accent-orange-bright);
}

.card-image-box {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.card-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-footer {
    background: #090a0c;
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    border-top: 1px solid #16191e;
}

/* PANEL DERECHO DE INSPECCIÓN */
.detail-panel {
    width: 380px;
    background: #0d0f12;
    border: 1px solid #1b1f26;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.detail-preview-box {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #1a1e26 0%, #08090b 80%);
    margin-bottom: 15px;
}

.detail-preview-box img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.8));
}

.detail-header {
    text-align: right;
    margin-bottom: 15px;
}

.detail-badge {
    background: #ffffff;
    color: #000000;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 2px 6px;
    letter-spacing: 0.5px;
    display: inline-block;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 4px;
    color: #ffffff;
}

.detail-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 2px;
}

.stats-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #000;
    border: 1px solid #16191f;
}

.stat-row {
    background: #111317;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.stat-row:nth-child(even) {
    background: #0e1013;
}

.stat-label {
    color: var(--text-muted);
}

.stat-value {
    color: #ffffff;
}

.stat-row-multi {
    align-items: flex-start;
}

.stat-value-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: #ffffff;
    text-align: right;
    gap: 2px;
}