/* =========================
   RESET BASE
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #f5f7fa;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    line-height: 1.5;
}

/* =========================
   CONTENEDORES
========================= */
.contenedor {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

/* =========================
   TÍTULOS
========================= */
.titulo-seccion {
    margin-bottom: 24px;
}

.titulo-seccion h1 {
    font-size: 28px;
    margin-bottom: 6px;
}

.titulo-seccion p {
    color: #666;
    font-size: 14px;
}

/* =========================
   CARDS
========================= */
.card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

/* =========================
   GRID
========================= */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* =========================
   FORMULARIOS
========================= */
.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d7dde5;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
}

textarea {
    resize: vertical;
}

/* =========================
   BOTONES
========================= */
.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-secondary {
    background: #e5e7eb;
    color: #222;
}

.btn-success {
    background: #16a34a;
    color: white;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 13px;
}

.btn-full {
    width: 100%;
}

/* =========================
   TABLAS
========================= */
.table-responsive {
    overflow-x: auto;
}

.tabla {
    width: 100%;
    border-collapse: collapse;
}

.tabla th,
.tabla td {
    padding: 12px;
    border-bottom: 1px solid #ececec;
    text-align: left;
    font-size: 14px;
}

.tabla th {
    background: #f9fafb;
    font-weight: 600;
}

/* =========================
   BADGES
========================= */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-secondary {
    background: #e5e7eb;
    color: #374151;
}

/* =========================
   HEADER
========================= */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 16px 28px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 18px;
}

.header-left .logo {
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    color: #111;
}

.header-left .logo span {
    color: #2563eb;
}

.header-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.header-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.header-nav a:hover {
    color: #111;
}

.header-nav a.activo {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.usuario-box {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.usuario-label {
    font-size: 11px;
    color: #888;
}

.usuario-header {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

/* =========================
   ALERTAS
========================= */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-nav {
        width: 100%;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .contenedor {
        padding: 16px;
    }
}