/* =====================================
   RESET GLOBAL
   ===================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden;
}

/* =====================================
   LAYOUT PRINCIPAL (GRID)
   ===================================== */
.layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    grid-template-rows: 80px 1fr 60px;
    height: 100vh;
    gap: 0;
}

/* SIDEBAR - Ocupa coluna 1, linhas 1-3 */
.sidebar {
    grid-row: 1 / 4;
    grid-column: 1;
    background-color: #111;
    border-right: 1px solid #00B3FF;
    padding: 20px 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* TOPBAR - Ocupa coluna 2, linha 1 */
.topbar {
    grid-column: 2;
    grid-row: 1;
    background-color: #1a1a1a;
    border-bottom: 1px solid #00B3FF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 25px;
    gap: 20px;
    flex-wrap: wrap;
}

/* CONTEÚDO PRINCIPAL - Ocupa coluna 2, linha 2 */
.content {
    grid-column: 2;
    grid-row: 2;
    padding: 25px;
    overflow-y: auto;
    background-color: #000;
}

/* FOOTER - Ocupa coluna 2, linha 3 */
.footer {
    grid-column: 2;
    grid-row: 3;
    background-color: #1a1a1a;
    border-top: 1px solid #00B3FF;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 25px;
}

/* =====================================
   SIDEBAR COMPONENTES
   ===================================== */
.sidebar .logo {
    width: 150px;
    margin: 0 auto 80px;
    display: block;
}

.text-center {
    text-align: center;
}

.sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    transition: 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar nav a:hover {
    background-color: #00B3FF;
    color: #000;
    border-left-color: #00B3FF;
}

.sidebar nav a i {
    width: 20px;
    text-align: center;
}

.sidebar nav a span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-bottom {
    padding-top: 20px;
    border-top: 1px solid #333;
    margin-top: auto;
}

.settings-link {
    justify-content: center;
}

/* =====================================
   TOPBAR COMPONENTES
   ===================================== */
.perfil {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.perfil-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.perfil-info h2 {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
}

.perfil-info .nome {
    font-size: 15px;
    font-weight: 600;
    display: block;
}

.perfil-info .color-azul {
    color: #00B3FF;
    text-decoration: none;
    font-size: 12px;
}

.perfil-info .color-azul:hover {
    text-decoration: underline;
}

.search-form {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 400px;
}

.search-form input {
    flex: 1;
    height: 35px;
    border-radius: 6px;
    border: 1px solid #333;
    padding: 0 10px;
    background-color: #222;
    color: #fff;
    font-size: 13px;
}

.search-form input::placeholder {
    color: #666;
}

.search-form input:focus {
    outline: none;
    border-color: #00B3FF;
    background-color: #1a1a1a;
}

/* =====================================
   BOTÕES
   ===================================== */
.btn {
    background-color: #00B3FF;
    color: #000;
    padding: 10px 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s ease;
    font-size: 13px;
    white-space: nowrap;
}

.btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.btn-novo {
    min-width: 140px;
}

.btn-logout {
    min-width: 100px;
}

/* =====================================
   DROPDOWN
   ===================================== */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #222;
    min-width: 180px;
    border-radius: 8px;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid #00B3FF;
    z-index: 1000;
    top: 100%;
    right: 0;
}

.dropdown-content a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #fff;
    font-size: 13px;
    transition: 0.2s ease;
}

.dropdown-content a:hover {
    background-color: #00B3FF;
    color: #000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* =====================================
   NOTIFICAÇÕES
   ===================================== */
.notification-btn {
    display: flex;
    align-items: center;
    background-color: #2d3436;
    padding: 10px 15px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    overflow: hidden;
    color: #fff;
    transition: 0.3s ease;
}

.notification-btn:hover {
    background-color: #3d4436;
}

.icon {
    margin-right: 10px;
    font-size: 16px;
}

.message-wrapper {
    height: 20px;
    overflow: hidden;
}

.message-list {
    display: flex;
    flex-direction: column;
    animation: scroll-up 6s infinite ease-in-out;
}

.message-list span {
    height: 20px;
    line-height: 20px;
    font-size: 12px;
    white-space: nowrap;
}

@keyframes scroll-up {
    0%, 20% {
        transform: translateY(0);
    }
    25%, 45% {
        transform: translateY(-20px);
    }
    50%, 70% {
        transform: translateY(-40px);
    }
    75%, 100% {
        transform: translateY(-60px);
    }
}

/* =====================================
   FOOTER
   ===================================== */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 12px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #00B3FF;
    text-decoration: none;
    transition: 0.2s ease;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* =====================================
   DASHBOARD - VISÃO GERAL
   ===================================== */
.visao-geral {
    text-align: center;
    margin-bottom: 30px;
}

.visao-geral h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #00B3FF;
}

.estados-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.estado {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #00B3FF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

/* =====================================
   CARDS DO DASHBOARD
   ===================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background-color: #111;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #00B3FF;
    transition: 0.3s ease;
}

.card:hover {
    border-color: #6A3DFF;
    box-shadow: 0 0 15px rgba(0, 179, 255, 0.2);
}

.card h2 {
    margin-bottom: 15px;
    font-size: 16px;
    color: #fff;
}

.card p {
    font-size: 13px;
    color: #aaa;
    line-height: 1.5;
}

.card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* =====================================
   TABELAS
   ===================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    font-size: 13px;
    border-bottom: 1px solid #333;
    text-align: left;
}

th {
    color: #00B3FF;
    font-weight: 600;
    background-color: #1a1a1a;
}

tr:hover {
    background-color: #1a1a1a;
}

/* =====================================
   UTILITÁRIOS
   ===================================== */
.color-azul {
    color: #00B3FF;
}

.text-center {
    text-align: center;
}

/* =====================================
   RESPONSIVO
   ===================================== */
@media (max-width: 768px) {
    .layout {
        grid-template-columns: 60px 1fr;
    }

    .sidebar {
        padding: 10px 0;
    }

    .sidebar nav a span {
        display: none;
    }

    .sidebar nav a {
        justify-content: center;
        padding: 12px 8px;
    }

    .topbar {
        flex-wrap: wrap;
        padding: 10px;
        gap: 10px;
    }

    .perfil {
        min-width: auto;
        order: 1;
        width: 100%;
    }

    .search-form {
        order: 2;
        max-width: 100%;
    }

    .dropdown {
        order: 3;
    }

    .notification-btn {
        order: 4;
    }

    .btn-logout {
        order: 5;
    }

    .content {
        padding: 15px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 10px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .layout {
        grid-template-columns: 1fr;
        grid-template-rows: 80px 1fr 60px;
    }

    .sidebar {
        display: none;
    }

    .topbar, .content, .footer {
        grid-column: 1;
    }

    .topbar {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .perfil {
        width: 100%;
    }

    .search-form {
        width: 100%;
    }
}
