/* =========================
   RESET BÁSICO
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================
   BODY
========================= */
body {
    background-color: #1f1f1f;
    color: #1f3d3b;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* =========================
   CONTENEDOR PRINCIPAL
========================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px;
}

.cards-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* =========================
   HEADER
========================= */
.dashboard-header {

    color: #ffffff;
    padding: 20px 30px;
    border-radius: 14px;
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    color: #eff5f5;
    text-align: center;
}

.dashboard-header h2 {
    font-size: 1.8rem;
    color: #eff5f5;
    text-align: center;
}

.dashboard-header p {
    display: none;
    /* el wireframe no muestra texto largo */
}

/* =========================
   TARJETAS RESUMEN
========================= */
.dashboard-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 50px;
    justify-content: center;
}

.summary-card:hover {
    transform: translateY(-1px);
}

.summary-card {
    background-color: #2b2b2b;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: none;

}

#index-card {
    width: 240px;
    min-height: 120px;
}

#index-card {
    display: grid;
    align-items: center;
    justify-content: center;
}

.summary-card h3 {
    color: #99dada;
    font-weight: 700;
}

.summary-value {
    color: #41b7ad;
    font-size: 20px;
}

/* =========================
   ACCIONES RÁPIDAS
========================= */
.dashboard-actions {
    margin-bottom: 50px;
    width: 30%;
    text-align: center;
}

.dashboard-actions h2 {
    margin-bottom: 20px;
    color: #eff5f5;
}

.dashboard-main {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}


.actions-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.action-btn {
    background-color: #03433e;
    color: #eff5f5;
    text-align: center;
    border-radius: 16px;
    padding: 14px;
    text-decoration: none;
}

.action-btn:hover {
    background-color: #14a6a2;
    transform: translateY(-3px);
}

.double-group {
    display: flex;
    gap: 40px;
    justify-content: space-around;
}

/* =========================
   GRÁFICA
========================= */
.dashboard-graph {
    margin-bottom: 40px;
}

.dashboard-graph h2 {
    margin-bottom: 16px;
    color: #eff5f5;
    text-align: center;
}

.graph-container {
    background-color: #2b2b2b;
    border-radius: 18px;
    padding: 14px;
    overflow: hidden;
}

/* =========================
   ÚLTIMOS REGISTROS
========================= */

.table {
    width: 100%;
    text-align: left;
    margin-bottom: 30px;
}

.table h2 {
    text-align: center;
}

.dashboard-latest h2 {
    margin-bottom: 16px;
    font-size: 1.6rem;
    color: #eff5f5;
}

.latest-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #2b2b2b;
    color: #eff5f5;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.latest-table thead {
    background-color: #3a3a3a;
}

.latest-table th,
.latest-table td {
    padding: 14px 18px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.latest-table th {
    color: #99dada;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 1px solid #dce9e7;
    min-width: 120px;
}

.latest-table td {
    color: #eff5f5;
    font-size: 0.95rem;
    border-bottom: 1px solid #e7f2f0;
    max-width: 200px;
}

.latest-table tbody tr:last-child td {
    border-bottom: none;
}

.latest-table tbody tr:hover {
    background-color: #333333;
}

/* =========================
   TABLAS DE GRAFICAS
========================= */
.graficas-resumen {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.graph-container {
    flex: 1 1 50%;
    min-width: 320px;
    box-sizing: border-box;
}

.graph-container h2 {
    margin-top: 0;
}

/* Mensaje cuando no hay datos */
.no-data {
    text-align: center;
    color: #d1d1d1;
    padding: 1.5rem;
    border: 1px dashed rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
}

/* En pantallas pequeñas, permitir apilar */
@media (max-width: 760px) {
    .graficas-resumen {
        flex-wrap: wrap;
    }

    .graph-container {
        flex-basis: 100%;
        justify-content: center;
    }
}


/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
    .dashboard-main {
        grid-template-columns: 1fr;
    }

    .dashboard-actions {
        width: 100%;
    }

    .double-group {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 700px) {
    .dashboard-header {
        padding: 16px 20px;
    }

    .dashboard-summary {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .summary-card {
        padding: 20px;
    }

    .latest-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 520px) {

    .dashboard-header h1,
    .dashboard-header h2 {
        font-size: 1.4rem;
    }

    .dashboard-actions h2,
    .dashboard-graph h2,
    .dashboard-latest h2 {
        font-size: 1.2rem;
    }

    .action-btn {
        padding: 12px;
        font-size: 16px;
    }

    .latest-table th,
    .latest-table td {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;

    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img {
    width: 50%;
    height: 50%;
    display: block;
    object-fit: cover;
}