* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0f2f5;
    color: #2c3e50;
    display: flex;
    min-height: 100vh;
}

body.login-page {
    justify-content: center;
    align-items: center;
    background: #1a4a3a;
}

.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.login-logo h1 {
    font-size: 32px;
    color: #1a4a3a;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-logo p {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 28px;
}

.campo {
    margin-bottom: 18px;
}

.campo label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.campo input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border 0.2s;
}

.campo input:focus {
    outline: none;
    border-color: #1a4a3a;
}

.btn-principal {
    width: 100%;
    padding: 12px;
    background: #1a4a3a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-principal:hover {
    background: #0f6e56;
}

.btn-secundario {
    padding: 9px 18px;
    background: #fff;
    color: #1a4a3a;
    border: 1.5px solid #1a4a3a;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-secundario:hover {
    background: #1a4a3a;
    color: #fff;
}

.btn-peligro {
    padding: 9px 18px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.menu-lateral {
    width: 240px;
    background: #1a4a3a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
}

.menu-logo {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.menu-logo h1 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.menu-items {
    list-style: none;
    padding: 16px 0;
    flex: 1;
}

.menu-items li a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
}

.menu-items li a:hover,
.menu-items li.activo a {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.menu-pie {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.menu-pie span {
    display: block;
    margin-bottom: 4px;
}

.rol-badge {
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px !important;
}

.btn-salir {
    display: block;
    text-align: center;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    margin-top: 8px;
    transition: background 0.2s;
}

.btn-salir:hover {
    background: rgba(255,255,255,0.2);
}

.contenido {
    margin-left: 240px;
    padding: 32px;
    flex: 1;
}

.cabecera-pagina {
    margin-bottom: 28px;
}

.cabecera-pagina h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a4a3a;
}

.cabecera-pagina p {
    color: #7f8c8d;
    margin-top: 4px;
}

.tarjetas-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.tarjeta {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-top: 4px solid #1a4a3a;
}

.tarjeta.amarilla { border-top-color: #f39c12; }
.tarjeta.verde    { border-top-color: #27ae60; }
.tarjeta.roja     { border-top-color: #e74c3c; }

.tarjeta-numero {
    font-size: 40px;
    font-weight: 700;
    color: #1a4a3a;
}

.tarjeta-label {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 6px;
    text-align: center;
}

.tabla-contenedor {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #f8f9fa;
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    border-bottom: 1.5px solid #eee;
}

table td {
    padding: 13px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

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

table tr:hover td {
    background: #f8fffe;
}

.formulario {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    max-width: 680px;
}

.formulario h3 {
    font-size: 18px;
    color: #1a4a3a;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid #eee;
}

.fila-campos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.acciones-tabla {
    display: flex;
    gap: 8px;
}

.alerta {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alerta.error   { background: #fdecea; color: #c0392b; border-left: 4px solid #e74c3c; }
.alerta.exito   { background: #eafaf1; color: #1e8449; border-left: 4px solid #27ae60; }
.alerta.aviso   { background: #fef9e7; color: #b7770d; border-left: 4px solid #f39c12; }

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.pendiente { background: #fef9e7; color: #b7770d; }
.badge.firmado   { background: #eafaf1; color: #1e8449; }
.badge.cancelado { background: #fdecea; color: #c0392b; }

@media (max-width: 768px) {
    .menu-lateral {
        width: 100%;
        min-height: auto;
        position: relative;
    }
    .contenido {
        margin-left: 0;
        padding: 16px;
    }
    .fila-campos {
        grid-template-columns: 1fr;
    }
}