/* app/portals/cd/static/app.css */

:root {
    --bg: #0b0b0b;
    --panel: #121212;
    --bd: #2b2b2b;
    --gold: #e4c95c;
    --muted: #aaa;
    --text: #eee;
    --danger: #b00020;
    --success: #1b6c1b;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
    overflow-x: hidden;
}

/* --- Layout Principal (Herdado do Padrão HS) --- */
.shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100dvh;
}

/* --- Sidebar --- */
.sidebar {
    background: #0e0e0e;
    border-right: 1px solid var(--bd);
    padding: 16px;
    position: sticky;
    top: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 0 10px;
}

.brand h2 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--text);
}
.brand h2 span { color: var(--gold); }

.nav { flex: 1; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 8px 0;
    border-radius: 10px;
    color: #ddd;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.nav-item i { font-size: 1.4rem; }

.nav-item:hover, .nav-item.active {
    background: var(--panel);
    border-color: var(--bd);
    color: var(--gold);
}

/* --- Topbar & Main --- */
.main {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--panel);
    border-bottom: 1px solid var(--bd);
}

.topbar-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 600;
}

.content-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* --- Cards e UI WMS --- */
.grid-missoes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--bd);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--bd);
    padding-bottom: 10px;
}

.mission-id {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}
.badge.gold { background: var(--gold); color: #000; }
.badge.danger { background: var(--danger); color: #fff; }
.badge.ghost { background: transparent; color: var(--muted); border: 1px solid var(--bd); }

.card-body h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: #fff;
}
.card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.instruction-box {
    background: #1a1a1a;
    border: 1px solid var(--bd);
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    font-size: 0.95rem;
    color: #eee;
    display: flex;
    gap: 8px;
}
.instruction-box i { color: var(--gold); font-size: 1.2rem; }

/* Botões Padrão HS */
.btn {
    display: inline-block;
    background: var(--gold);
    color: #000;
    font-weight: 800;
    font-size: 1rem;
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    transition: filter 0.15s ease, transform 0.05s ease;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }

/* --- Mobile / Coletores (Abaixo de 768px) --- */
@media (max-width: 768px) {
    .shell {
        display: block; /* Desfaz o grid lateral */
    }
    
    .sidebar {
        position: fixed;
        bottom: 0; left: 0; width: 100%; height: auto;
        flex-direction: row;
        padding: 0;
        border-right: none;
        border-top: 1px solid var(--bd);
        z-index: 1000;
    }
    
    .brand { display: none; }
    
    .nav {
        display: flex;
        width: 100%;
        justify-content: space-around;
        margin: 0;
    }
    
    .nav-item {
        flex-direction: column;
        gap: 4px;
        margin: 0;
        padding: 10px 4px;
        border-radius: 0;
        font-size: 0.75rem;
        border: none;
        border-top: 3px solid transparent;
    }
    
    .nav-item:hover, .nav-item.active {
        background: rgba(228, 201, 92, 0.05);
        border-color: var(--gold);
    }
    
    .main { height: calc(100dvh - 65px); } /* Desconta a barra inferior */
    .content-area { padding: 16px; }
}