/* ===== RESET ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== BODY E FUNDO ===== */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 30px 20px;
    background: linear-gradient(135deg, #5093d6 0%, #4a7fb8 100%);
    color: #102a43;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

/* ===== HEADER BRAND ===== */
.dash-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    margin-bottom: 30px;
}

.dash-brand img {
    width: min(200px, 80vw);
    max-height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.dash-brand h1 {
    font-size: 28px;
    color: #ffffff;
    margin-bottom: 4px;
}

.dash-brand p {
    font-size: 14px;
    color: #ffffff;
    opacity: 0.9;
    font-weight: 500;
}

/* ===== CONTAINER PRINCIPAL ===== */
.dashboard {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ===== SEÇÃO DE CABEÇALHO COM TÍTULO ===== */
.dashboard__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.dashboard__header div {
    flex: 1;
}

.dashboard__header h1 {
    font-size: 32px;
    color: #ffffff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard__header h1::before {
    content: '👥';
    font-size: 28px;
}

.dashboard__header p {
    font-size: 14px;
    color: #ffffff;
    opacity: 0.9;
}

.dashboard__header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard__header a,
.btn-atualizar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 6px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.dashboard__header a:hover,
.btn-atualizar:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.dashboard__header a::before {
    content: '+';
    font-size: 18px;
}

.btn-atualizar::before {
    content: '⟳';
    font-size: 16px;
}

/* ===== SEÇÃO DE RESUMO ===== */
.dashboard__summary {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.summary-card span {
    font-size: 12px;
    color: #ffffff;
    opacity: 0.9;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card strong {
    font-size: 24px;
    color: #ffffff;
    font-weight: 800;
}

.summary-card::before {
    content: '👤';
    font-size: 20px;
}

/* ===== SEÇÃO DE LISTA ===== */
.dashboard__list-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard__list-title {
    font-size: 18px;
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard__list-title::before {
    content: '📋';
    font-size: 20px;
}

/* ===== BARRA DE BUSCA ===== */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.search-bar::before {
    content: '🔍';
    font-size: 16px;
    color: #52606d;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #102a43;
    background: transparent;
}

.search-bar input::placeholder {
    color: #a0aec0;
}

/* ===== TABELA ===== */
.table-panel {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.table-panel-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

thead {
    background: #ffffff;
    border-bottom: 2px solid #e4e7eb;
}

th {
    padding: 16px;
    color: #334e68;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: left;
    background: #ffffff;
}

th::before {
    content: attr(data-icon);
    margin-right: 6px;
    font-size: 14px;
}

td {
    padding: 16px;
    border-bottom: 1px solid #e4e7eb;
    color: #243b53;
    font-size: 14px;
}

tbody tr {
    transition: all 0.2s ease;
    background: #ffffff;
}

tbody tr:hover {
    background: #f8fafc;
}

tbody tr:last-child td {
    border-bottom: 0;
}

/* ===== BADGES ===== */
.topic-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.topic-badge.fotografia {
    background: #fef3c7;
    color: #92400e;
}

.topic-badge.transmissao {
    background: #dbeafe;
    color: #1e40af;
}

.topic-badge.midia {
    background: #e0e7ff;
    color: #3730a3;
}

.topic-badge.default {
    background: #e0f2fe;
    color: #075985;
}

/* ===== MENSAGENS ===== */
.empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #52606d;
    background: #ffffff;
    border-radius: 8px;
}

.empty-message strong {
    display: block;
    margin-bottom: 8px;
    color: #102a43;
}

.error-message {
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #b91c1c;
    font-weight: 700;
    text-align: center;
}

/* ===== RODAPÉ ===== */
.dashboard-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }

    .dash-brand {
        margin-bottom: 24px;
    }

    .dash-brand h1 {
        font-size: 22px;
    }

    .dashboard__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }

    .dashboard__header h1 {
        font-size: 26px;
        justify-content: center;
    }

    .dashboard__header-buttons {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .dashboard__header a,
    .btn-atualizar {
        flex: 1;
        min-width: 140px;
        padding: 12px;
        font-size: 13px;
    }

    .dashboard__summary {
        justify-content: center;
    }

    .summary-card {
        width: 100%;
        justify-content: center;
    }

    th,
    td {
        padding: 14px 10px;
        font-size: 13px;
    }

    th {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px 10px;
    }

    .dash-brand img {
        width: 140px;
        max-height: 70px;
    }

    .dash-brand h1 {
        font-size: 20px;
    }

    .dashboard__header h1 {
        font-size: 22px;
        gap: 6px;
    }

    .dashboard__header h1::before {
        font-size: 22px;
    }

    .dashboard__header p {
        font-size: 13px;
    }

    .dashboard__header-buttons {
        flex-direction: column;
        width: 100%;
    }

    .dashboard__header a,
    .btn-atualizar {
        width: 100%;
        min-height: 44px;
        font-size: 14px;
    }

    .summary-card strong {
        font-size: 22px;
    }

    .dashboard__list-title {
        font-size: 17px;
    }

    .table-panel {
        border-radius: 6px;
    }

    th,
    td {
        padding: 12px 8px;
        font-size: 12px;
    }

    th {
        font-size: 10px;
    }

    th::before {
        margin-right: 4px;
        font-size: 12px;
    }

    .search-bar {
        padding: 12px;
    }

    .search-bar input {
        font-size: 14px;
    }

    .topic-badge {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* Ajuste fino para telas muito pequenas */
@media (max-width: 360px) {
    .dash-brand h1 {
        font-size: 18px;
    }

    .dashboard__header h1 {
        font-size: 20px;
    }

    th,
    td {
        padding: 10px 5px;
        font-size: 11px;
    }
}
